tables.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NDPD_TABLES_H
#define _NDPD_TABLES_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
ADV_TIMER };
SOLICIT_DONE };
/*
* Data structures used to handle configuration variables set in ndpd.conf.
* cf_notdefault is set for variables explicitly set in ndpd.conf.
*/
struct confvar {
};
extern struct confvar ifdefaults[];
/*
* Interfaces configuration variable indicies
*/
#define I_DupAddrDetectTransmits 0 /* From RFC 2462 */
#define I_AdvSendAdvertisements 1
#define I_AdvManagedFlag 4
#define I_AdvOtherConfigFlag 5
#define I_AdvLinkMTU 6
#define I_AdvCurHopLimit 9
#define I_StatelessAddrConf 11
/*
* A doubly linked list of all physical interfaces that each contain a
* doubly linked list of prefixes (i.e. logical interfaces) and default
* routers.
*/
struct phyint {
int pi_sock; /* For sending and receiving */
/* Applies if pi_AdvSendAdvertisements */
enum adv_states pi_adv_state;
/* Applies if not pi_AdvSendAdvertisements */
enum solicit_states pi_sol_state;
/* Interface specific configurable variables */
/* Recorded variables for RFC3041 addresses */
/*
* The above value should be a uniformly-distributed random
* value between ND_MIN_RANDOM_FACTOR and
* ND_MAX_RANDOM_FACTOR times BaseReachableTime
* milliseconds. A new random value should be
* calculated when BaseReachableTime changes (due to
* Router Advertisements) or at least every few hours
* even if no Router Advertisements are received.
* Tracked using pi_each_time_since_random.
*/
char *pi_group_name;
};
/*
* pi_state/pr_kernel_state values
*/
#define PI_PRESENT 0x01
/*
* Prefix configuration variable indices
*/
#define I_AdvValidLifetime 0 /* In seconds */
#define I_AdvOnLinkFlag 1
#define I_AdvAutonomousFlag 3
/*
* A doubly linked list of prefixes for onlink and addrconf.
*/
struct prefix {
struct in6_addr pr_address;
/* in SECONDS */
};
/*
* Flags used for pr_kernel_state and pr_state where the latter is
* user-level state.
*/
/*
* The sum of all possible state string lengths, plus terminating
* null character; if new states are added, this needs to be updated.
* Useful for passing an appropriately sized buffer to prefix_print_state().
*
* Current strings: "ONLINK ", "AUTO ", "DEPRECATED ", "STATIC ", "\n"
* 7 + 5 + 11 + 7 + 1
*/
#define PREFIX_STATESTRLEN 31
/* Prefix used for storing advertisement specific stuff */
struct adv_prefix {
/* Used when sending advertisements */
#define adv_pr_AdvPreferredLifetime \
#define adv_pr_AdvAutonomousFlag \
#define adv_pr_AdvValidExpiration \
#define adv_pr_AdvPreferredExpiration \
/* The two below are set if the timers decrement in real time */
#define adv_pr_AdvValidRealTime \
#define adv_pr_AdvPreferredRealTime \
};
/*
* Doubly-linked list of default routers on a phyint.
*/
struct router {
};
/*
* Globals
*/
/*
* Functions
*/
extern uint_t getcurrenttime(void);
extern void phyint_print_all(void);
int bits);
int bits);
enum solicit_events event);
struct sockaddr_in6 *addr);
struct sockaddr_in6 *addr);
#ifdef __cplusplus
}
#endif
#endif /* _NDPD_TABLES_H */