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 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _IPMP_QUERY_IMPL_H
2N/A#define _IPMP_QUERY_IMPL_H
2N/A
2N/A#include <ipmp_query.h>
2N/A
2N/A/*
2N/A * Private IPMP query interfaces and structures.
2N/A *
2N/A * These are *only* for use by in.mpathd and libipmp itself.
2N/A */
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * List of ipmp_groupinfo_t structures.
2N/A */
2N/Atypedef struct ipmp_groupinfolist {
2N/A struct ipmp_groupinfolist *grl_next;
2N/A ipmp_groupinfo_t *grl_grinfop;
2N/A} ipmp_groupinfolist_t;
2N/A
2N/A/*
2N/A * List of ipmp_ifinfo_t structures.
2N/A */
2N/Atypedef struct ipmp_ifinfolist {
2N/A struct ipmp_ifinfolist *ifl_next;
2N/A ipmp_ifinfo_t *ifl_ifinfop;
2N/A} ipmp_ifinfolist_t;
2N/A
2N/A/*
2N/A * List of ipmp_addrinfo_t structures.
2N/A */
2N/Atypedef struct ipmp_addrinfolist {
2N/A struct ipmp_addrinfolist *adl_next;
2N/A ipmp_addrinfo_t *adl_adinfop;
2N/A} ipmp_addrinfolist_t;
2N/A
2N/A/*
2N/A * Snapshot of IPMP state.
2N/A */
2N/Atypedef struct ipmp_snap {
2N/A ipmp_grouplist_t *sn_grlistp;
2N/A ipmp_groupinfolist_t *sn_grinfolistp;
2N/A ipmp_ifinfolist_t *sn_ifinfolistp;
2N/A ipmp_addrinfolist_t *sn_adinfolistp;
2N/A unsigned int sn_ngroup;
2N/A unsigned int sn_nif;
2N/A unsigned int sn_naddr;
2N/A} ipmp_snap_t;
2N/A
2N/A/*
2N/A * Snapshot-related routines.
2N/A */
2N/Aextern ipmp_snap_t *ipmp_snap_create(void);
2N/Aextern void ipmp_snap_free(ipmp_snap_t *);
2N/Aextern int ipmp_snap_addifinfo(ipmp_snap_t *, ipmp_ifinfo_t *);
2N/Aextern int ipmp_snap_addaddrinfo(ipmp_snap_t *, ipmp_addrinfo_t *);
2N/Aextern int ipmp_snap_addgroupinfo(ipmp_snap_t *, ipmp_groupinfo_t *);
2N/A
2N/A/*
2N/A * IPMP structure creation/destruction routines.
2N/A */
2N/Aextern ipmp_ifinfo_t *ipmp_ifinfo_create(const char *, const char *,
2N/A ipmp_if_state_t, ipmp_if_type_t, ipmp_if_linkstate_t, ipmp_if_probestate_t,
2N/A ipmp_if_flags_t, ipmp_targinfo_t *, ipmp_targinfo_t *);
2N/Aextern ipmp_groupinfo_t *ipmp_groupinfo_create(const char *, uint64_t, uint_t,
2N/A ipmp_group_state_t, uint_t, char (*)[LIFNAMSIZ], const char *,
2N/A const char *, const char *, const char *, uint_t,
2N/A struct sockaddr_storage *);
2N/Aextern ipmp_grouplist_t *ipmp_grouplist_create(uint64_t, unsigned int,
2N/A char (*)[LIFGRNAMSIZ]);
2N/Aextern ipmp_addrinfo_t *ipmp_addrinfo_create(struct sockaddr_storage *,
2N/A ipmp_addr_state_t, const char *, const char *);
2N/Aextern ipmp_targinfo_t *ipmp_targinfo_create(const char *,
2N/A struct sockaddr_storage *, ipmp_if_targmode_t, uint_t,
2N/A struct sockaddr_storage *, uint_t nif, char (*)[LIFNAMSIZ]);
2N/Aextern void ipmp_freetarginfo(ipmp_targinfo_t *);
2N/A
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _IPMP_QUERY_IMPL_H */