ipadm_ndpd.h revision 12016:0248e987199b
133965Sjdp/* 278828Sobrien * CDDL HEADER START 3218822Sdim * 438889Sjdp * The contents of this file are subject to the terms of the 533965Sjdp * Common Development and Distribution License (the "License"). 633965Sjdp * You may not use this file except in compliance with the License. 733965Sjdp * 833965Sjdp * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 933965Sjdp * or http://www.opensolaris.org/os/licensing. 1033965Sjdp * See the License for the specific language governing permissions 1133965Sjdp * and limitations under the License. 1233965Sjdp * 1333965Sjdp * When distributing Covered Code, include this CDDL HEADER in each 1433965Sjdp * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1533965Sjdp * If applicable, add the following below this CDDL HEADER, with the 1633965Sjdp * fields enclosed by brackets "[]" replaced with your own identifying 1733965Sjdp * information: Portions Copyright [yyyy] [name of copyright owner] 1833965Sjdp * 1933965Sjdp * CDDL HEADER END 20218822Sdim */ 21218822Sdim/* 2233965Sjdp * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 23218822Sdim * Use is subject to license terms. 2433965Sjdp */ 2533965Sjdp#ifndef _IPADM_NDPD_H 2633965Sjdp#define _IPADM_NDPD_H 2733965Sjdp 28218822Sdim#ifdef __cplusplus 2933965Sjdpextern "C" { 3061843Sobrien#endif 31130561Sobrien#include <libipadm.h> 32130561Sobrien 3333965Sjdp/* File used for the AF_UNIX socket used in communicating with in.ndpd */ 34218822Sdim#define IPADM_UDS_PATH "/var/run/in.ndpd_ipadm" 3533965Sjdp 3638889Sjdp/* Types of messages sent to in.ndpd */ 3738889Sjdpenum { 3838889Sjdp IPADM_DISABLE_AUTOCONF, 39104834Sobrien IPADM_ENABLE_AUTOCONF, 4038889Sjdp IPADM_CREATE_ADDRS, 4138889Sjdp IPADM_DELETE_ADDRS 4238889Sjdp}; 4338889Sjdp 4438889Sjdp/* Message format sent to in.ndpd */ 4538889Sjdptypedef struct ipadm_ndpd_msg_s { 4638889Sjdp uint32_t inm_cmd; 4760484Sobrien char inm_ifname[LIFNAMSIZ]; 4860484Sobrien struct sockaddr_in6 inm_intfid; 4960484Sobrien int inm_intfidlen; 5060484Sobrien boolean_t inm_stateless; 5160484Sobrien boolean_t inm_stateful; 5260484Sobrien char inm_aobjname[MAXNAMELEN]; 5360484Sobrien} ipadm_ndpd_msg_t; 5460484Sobrien 5589857Sobrien/* Functions to send to and receive from in.ndpd */ 5689857Sobrienextern int ipadm_ndpd_write(int, const void *, size_t); 5789857Sobrienextern int ipadm_ndpd_read(int, void *, size_t); 5889857Sobrien 5989857Sobrien/* 6089857Sobrien * Functions used by in.ndpd to add and delete address objects while 6189857Sobrien * adding/deleting each stateless/stateful autoconfigured address. 6289857Sobrien */ 6389857Sobrienextern ipadm_status_t ipadm_add_aobjname(ipadm_handle_t, const char *, 6489857Sobrien sa_family_t, const char *, ipadm_addr_type_t, int); 65130561Sobrienextern ipadm_status_t ipadm_delete_aobjname(ipadm_handle_t, const char *, 6689857Sobrien sa_family_t, const char *, ipadm_addr_type_t, int); 6760484Sobrien 6833965Sjdp#ifdef __cplusplus 69130561Sobrien} 70130561Sobrien#endif 7133965Sjdp 7233965Sjdp#endif /* _IPADM_NDPD_H */ 7333965Sjdp