2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _IPADM_NDPD_H
2N/A#define _IPADM_NDPD_H
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <paths.h>
2N/A#include <libipadm.h>
2N/A
2N/A/* File used for the AF_UNIX socket used in communicating with in.ndpd */
2N/A#define IPADM_UDS_PATH _PATH_SYSVOL "/in.ndpd_ipadm"
2N/A
2N/A/* Types of messages sent to in.ndpd */
2N/Aenum {
2N/A IPADM_DISABLE_AUTOCONF,
2N/A IPADM_ENABLE_AUTOCONF,
2N/A IPADM_CREATE_ADDRS,
2N/A IPADM_DELETE_ADDRS,
2N/A IPADM_MODIFY_ADDRS
2N/A};
2N/A
2N/A/* Message format sent to in.ndpd */
2N/Atypedef struct ipadm_ndpd_msg_s {
2N/A uint32_t inm_cmd;
2N/A char inm_ifname[LIFNAMSIZ];
2N/A struct sockaddr_in6 inm_intfid;
2N/A int inm_intfidlen;
2N/A struct sockaddr_in6 inm_dintfid;
2N/A boolean_t inm_stateless;
2N/A boolean_t inm_stateful;
2N/A char inm_aobjname[MAXNAMELEN];
2N/A boolean_t inm_release;
2N/A} ipadm_ndpd_msg_t;
2N/A
2N/A/* Functions to send to and receive from in.ndpd */
2N/Aextern int ipadm_ndpd_write(int, const void *, size_t);
2N/Aextern int ipadm_ndpd_read(int, void *, size_t);
2N/A
2N/A/*
2N/A * Functions used by in.ndpd to add and delete address objects while
2N/A * adding/deleting each stateless/stateful autoconfigured address.
2N/A */
2N/Aextern ipadm_status_t ipadm_add_aobjname(ipadm_handle_t, const char *,
2N/A sa_family_t, const char *, ipadm_addr_type_t, int);
2N/Aextern ipadm_status_t ipadm_delete_aobjname(ipadm_handle_t, const char *,
2N/A sa_family_t, const char *, ipadm_addr_type_t, int);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _IPADM_NDPD_H */