/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _LIBIPADM_IMPL_H
#define _LIBIPADM_IMPL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <libipadm.h>
#include <libdladm.h>
#include <ipadm_ipmgmt.h>
#include <inet/tunables.h>
#include <pthread.h>
#include <libinetutil.h>
#include <libsocket_priv.h>
#include <libuutil.h>
/* mask for flags accepted by libipadm functions */
/* Opaque library handle */
struct ipadm_handle {
};
struct ipadm_addrobj_s {
union {
struct {
struct {
struct {
} ipadm_dhcp_s;
} ipadm_addr_u;
};
/*
* Structure used when moving data address objects from underlying interface
* to an IPMP interface.
*/
typedef struct ipadm_migrate_addr_s {
/*
* im_link : link to adjacent objects in the list
*/
/*
* im_aobjname : Address object name on underif to be removed.
*/
/*
* im_addr : Data address that was migrated from underif to ipmpif.
*/
/*
* im_lifnum : Logical interface number on the underif from which
* the data address was moved.
*/
/*
* Structure used while waiting for addresses that are externally managed
* by dhcpagent(1M) and in.ndpd(1M) to be removed from the underlying
* interfaces.
*/
typedef struct {
const char *ia_app;
/*
* Operations on an IPMP interface object.
*/
typedef enum {
/*
* Data structures and callback functions related to property management
*/
struct ipadm_prop_desc;
/* property set() callback */
/* property get() callback */
struct ipadm_prop_desc {
};
/* ipd_flags values */
/*
* IPADMPROP_GETPERSIST: property has a separate function callback to get
* persistent value.
*/
/* property is persisted via SMF, rather than ipadm database */
/* property is not ncp-specific */
/* Internal flags for use in ipd_get_callback function */
extern ipadm_prop_desc_t ipadm_addrprop_table[];
extern ipadm_pd_getf_t i_ipadm_get_onoff;
/* libipadm.c */
sa_family_t, uint64_t *);
sa_family_t, const char *, nvlist_t *);
extern int i_ipadm_strioctl(int, int, char *, int);
char *, size_t);
extern ipadm_status_t ipadm_errno2status(int);
size_t);
void **, size_t);
/* ipadm_ndpd.c */
extern ipadm_status_t i_ipadm_disable_autoconf(const char *);
extern ipadm_status_t i_ipadm_enable_autoconf(const char *);
extern ipadm_status_t i_ipadm_send_ndpd_cmd(const char *,
const struct ipadm_addrobj_s *, int, const void *);
/* ipadm_persist.c */
/* ipadm_prop.c */
ipadm_prop_desc_t *, const char *, const void *,
uint_t);
ipadm_prop_desc_t *, char *, uint_t *,
const void *);
/* ipadm_addr.c */
extern void i_ipadm_init_addr(ipadm_addrobj_t, const char *,
const char *, ipadm_addr_type_t);
nvlist_t *, sa_family_t);
nvlist_t *);
nvlist_t *);
extern void i_ipadm_addrobj2lifname(ipadm_addrobj_t, char *, int);
in6_addr_t *);
const ipadm_addrobj_t, uint32_t);
struct sockaddr *);
uint_t *);
list_t *, const char *);
extern boolean_t i_ipadm_is_owner_valid(const char *);
/* ipadm_if.c */
uint32_t);
nvlist_t **);
list_t *);
extern int i_ipadm_get_lnum(const char *);
extern void i_ipadm_get_ifname(const char *, char *, size_t);
char *, size_t);
const char *, const char *, uint32_t);
const char *);
/* ipadm_cong.c */
extern boolean_t ipadm_cong_is_privprop(const char *, char **);
extern ipadm_status_t ipadm_cong_get_persist_propval(const char *,
const char *, char *, uint_t *, const char *);
extern void ipadm_cong_smf_disable_nondef(const char *, uint_t,
uint_t);
extern void ipadm_cong_list_sort(char *);
#ifdef __cplusplus
}
#endif
#endif /* _LIBIPADM_IMPL_H */