xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/tables.h (revision 3431:9f2d277dcffa)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
51577Sseb  * Common Development and Distribution License (the "License").
61577Sseb  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*3431Scarlsonj  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef	_NDPD_TABLES_H
270Sstevel@tonic-gate #define	_NDPD_TABLES_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
300Sstevel@tonic-gate 
310Sstevel@tonic-gate #ifdef	__cplusplus
320Sstevel@tonic-gate extern "C" {
330Sstevel@tonic-gate #endif
340Sstevel@tonic-gate 
353284Sapersson #include <protocols/ndpd.h>
363284Sapersson 
370Sstevel@tonic-gate enum adv_states { NO_ADV = 0, REG_ADV, INIT_ADV, SOLICIT_ADV, FINAL_ADV };
380Sstevel@tonic-gate enum adv_events { ADV_OFF, START_INIT_ADV, START_FINAL_ADV, RECEIVED_SOLICIT,
390Sstevel@tonic-gate 			ADV_TIMER };
400Sstevel@tonic-gate 
410Sstevel@tonic-gate enum solicit_states { NO_SOLICIT = 0, INIT_SOLICIT, DONE_SOLICIT };
420Sstevel@tonic-gate enum solicit_events { SOLICIT_OFF, START_INIT_SOLICIT, SOL_TIMER,
43*3431Scarlsonj 			SOLICIT_DONE, RESTART_INIT_SOLICIT };
44*3431Scarlsonj 
450Sstevel@tonic-gate /*
460Sstevel@tonic-gate  * A doubly linked list of all physical interfaces that each contain a
470Sstevel@tonic-gate  * doubly linked list of prefixes (i.e. logical interfaces) and default
480Sstevel@tonic-gate  * routers.
490Sstevel@tonic-gate  */
500Sstevel@tonic-gate struct phyint {
510Sstevel@tonic-gate 	struct phyint	*pi_next;
520Sstevel@tonic-gate 	struct phyint	*pi_prev;
530Sstevel@tonic-gate 	struct prefix	*pi_prefix_list;	/* Doubly linked prefixes */
540Sstevel@tonic-gate 	struct router	*pi_router_list;	/* Doubly linked routers */
550Sstevel@tonic-gate 	struct adv_prefix *pi_adv_prefix_list;	/* Doubly linked adv.prefixes */
560Sstevel@tonic-gate 
570Sstevel@tonic-gate 	uint_t		pi_index;		/* Identifier > 0 */
580Sstevel@tonic-gate 	char		pi_name[LIFNAMSIZ];	/* Used to identify it */
590Sstevel@tonic-gate 	int		pi_sock;		/* For sending and receiving */
600Sstevel@tonic-gate 	struct in6_addr	pi_ifaddr;		/* Local address */
610Sstevel@tonic-gate 	uint_t		pi_flags;		/* IFF_* flags */
620Sstevel@tonic-gate 	uint_t		pi_hdw_addr_len;
630Sstevel@tonic-gate 	uchar_t		pi_hdw_addr[ND_MAX_HDW_LEN];
640Sstevel@tonic-gate 	uint_t		pi_mtu;			/* From SIOCGLIFMTU */
650Sstevel@tonic-gate 	struct in6_addr pi_token;
660Sstevel@tonic-gate 	uint_t		pi_token_length;
670Sstevel@tonic-gate 	struct in6_addr	pi_tmp_token;		/* For RFC3041 addrs */
680Sstevel@tonic-gate 	struct in6_addr	pi_dst_token;		/* For POINTOPOINT */
690Sstevel@tonic-gate 
700Sstevel@tonic-gate 	uint_t		pi_state;		/* PI_* below */
710Sstevel@tonic-gate 	uint_t		pi_kernel_state;	/* PI_* below */
720Sstevel@tonic-gate 	uint_t		pi_num_k_routers;	/* # routers in kernel */
730Sstevel@tonic-gate 	uint_t		pi_reach_time_since_random;	/* In milliseconds */
740Sstevel@tonic-gate 
750Sstevel@tonic-gate 	/* Applies if pi_AdvSendAdvertisements */
760Sstevel@tonic-gate 	uint_t		pi_adv_time_left;	/* In milliseconds */
770Sstevel@tonic-gate 	uint_t		pi_adv_time_since_sent;	/* In milliseconds */
780Sstevel@tonic-gate 	enum adv_states	pi_adv_state;
790Sstevel@tonic-gate 	uint_t		pi_adv_count;
800Sstevel@tonic-gate 
810Sstevel@tonic-gate 	/* Applies if not pi_AdvSendAdvertisements */
820Sstevel@tonic-gate 	uint_t		pi_sol_time_left;	/* In milliseconds */
830Sstevel@tonic-gate 	enum solicit_states pi_sol_state;
840Sstevel@tonic-gate 	uint_t		pi_sol_count;
850Sstevel@tonic-gate 
860Sstevel@tonic-gate 	/* Interface specific configurable variables */
870Sstevel@tonic-gate 	struct confvar	pi_config[I_IFSIZE];
880Sstevel@tonic-gate #define	pi_DupAddrDetectTransmits pi_config[I_DupAddrDetectTransmits].cf_value
890Sstevel@tonic-gate #define	pi_AdvSendAdvertisements pi_config[I_AdvSendAdvertisements].cf_value
900Sstevel@tonic-gate #define	pi_MaxRtrAdvInterval	pi_config[I_MaxRtrAdvInterval].cf_value
910Sstevel@tonic-gate #define	pi_MinRtrAdvInterval	pi_config[I_MinRtrAdvInterval].cf_value
920Sstevel@tonic-gate #define	pi_AdvManagedFlag	pi_config[I_AdvManagedFlag].cf_value
930Sstevel@tonic-gate #define	pi_AdvOtherConfigFlag	pi_config[I_AdvOtherConfigFlag].cf_value
940Sstevel@tonic-gate #define	pi_AdvLinkMTU		pi_config[I_AdvLinkMTU].cf_value
950Sstevel@tonic-gate #define	pi_AdvReachableTime	pi_config[I_AdvReachableTime].cf_value
960Sstevel@tonic-gate #define	pi_AdvRetransTimer	pi_config[I_AdvRetransTimer].cf_value
970Sstevel@tonic-gate #define	pi_AdvCurHopLimit	pi_config[I_AdvCurHopLimit].cf_value
980Sstevel@tonic-gate #define	pi_AdvDefaultLifetime	pi_config[I_AdvDefaultLifetime].cf_value
990Sstevel@tonic-gate #define	pi_StatelessAddrConf	pi_config[I_StatelessAddrConf].cf_value
1000Sstevel@tonic-gate #define	pi_TmpAddrsEnabled	pi_config[I_TmpAddrsEnabled].cf_value
1010Sstevel@tonic-gate #define	pi_TmpValidLifetime	pi_config[I_TmpValidLifetime].cf_value
1020Sstevel@tonic-gate #define	pi_TmpPreferredLifetime	pi_config[I_TmpPreferredLifetime].cf_value
1030Sstevel@tonic-gate #define	pi_TmpRegenAdvance	pi_config[I_TmpRegenAdvance].cf_value
1040Sstevel@tonic-gate #define	pi_TmpMaxDesyncFactor	pi_config[I_TmpMaxDesyncFactor].cf_value
105*3431Scarlsonj #define	pi_StatefulAddrConf	pi_config[I_StatefulAddrConf].cf_value
1060Sstevel@tonic-gate 
1070Sstevel@tonic-gate 	/* Recorded variables for RFC3041 addresses */
1080Sstevel@tonic-gate 	uint_t		pi_TmpDesyncFactor;		/* In milliseconds */
1090Sstevel@tonic-gate 	uint_t		pi_TmpRegenCountdown;		/* In milliseconds */
1100Sstevel@tonic-gate 
1110Sstevel@tonic-gate 	/* Recorded variables on node/host */
1120Sstevel@tonic-gate 	uint_t		pi_LinkMTU;
1130Sstevel@tonic-gate 	uint_t		pi_CurHopLimit;
1140Sstevel@tonic-gate 	uint_t		pi_BaseReachableTime;		/* In milliseconds */
1150Sstevel@tonic-gate 	uint_t		pi_ReachableTime;		/* In milliseconds */
1160Sstevel@tonic-gate 	/*
1170Sstevel@tonic-gate 	 * The above value should be a uniformly-distributed random
1180Sstevel@tonic-gate 	 * value between ND_MIN_RANDOM_FACTOR and
1190Sstevel@tonic-gate 	 * ND_MAX_RANDOM_FACTOR times BaseReachableTime
1200Sstevel@tonic-gate 	 * milliseconds.  A new random value should be
1210Sstevel@tonic-gate 	 * calculated when BaseReachableTime changes (due to
1220Sstevel@tonic-gate 	 * Router Advertisements) or at least every few hours
1230Sstevel@tonic-gate 	 * even if no Router Advertisements are received.
1240Sstevel@tonic-gate 	 * Tracked using pi_each_time_since_random.
1250Sstevel@tonic-gate 	 */
1260Sstevel@tonic-gate 	uint_t		pi_RetransTimer;		/* In milliseconds */
1270Sstevel@tonic-gate 	char		*pi_group_name;
128*3431Scarlsonj 
129*3431Scarlsonj 	uint_t		pi_ra_flags;		/* Detect when to start DHCP */
1300Sstevel@tonic-gate };
1310Sstevel@tonic-gate 
1320Sstevel@tonic-gate /*
1330Sstevel@tonic-gate  * pi_state/pr_kernel_state values
1340Sstevel@tonic-gate  */
1350Sstevel@tonic-gate #define	PI_PRESENT		0x01
1360Sstevel@tonic-gate #define	PI_JOINED_ALLNODES	0x02	/* allnodes multicast joined */
1370Sstevel@tonic-gate #define	PI_JOINED_ALLROUTERS	0x04	/* allrouters multicast joined */
1380Sstevel@tonic-gate 
1390Sstevel@tonic-gate /*
1400Sstevel@tonic-gate  * Prefix configuration variable indices
1410Sstevel@tonic-gate  */
1420Sstevel@tonic-gate #define	I_AdvValidLifetime	0	/* In seconds */
1430Sstevel@tonic-gate #define	I_AdvOnLinkFlag		1
1440Sstevel@tonic-gate #define	I_AdvPreferredLifetime	2	/* In seconds */
1450Sstevel@tonic-gate #define	I_AdvAutonomousFlag	3
1460Sstevel@tonic-gate #define	I_AdvValidExpiration	4	/* Seconds left */
1470Sstevel@tonic-gate #define	I_AdvPreferredExpiration 5	/* Seconds left */
1480Sstevel@tonic-gate #define	I_PREFIXSIZE		6	/* # of variables */
1490Sstevel@tonic-gate 
1500Sstevel@tonic-gate /*
151*3431Scarlsonj  * A doubly-linked list of prefixes for onlink and addrconf.
152*3431Scarlsonj  * ("Prefixes" in this context are identical to logical interfaces.)
1530Sstevel@tonic-gate  */
1540Sstevel@tonic-gate struct prefix {
1550Sstevel@tonic-gate 	struct prefix	*pr_next;	/* Next prefix for this physical */
1560Sstevel@tonic-gate 	struct prefix	*pr_prev;	/* Prev prefix for this physical */
1570Sstevel@tonic-gate 	struct phyint	*pr_physical;	/* Back pointer */
1580Sstevel@tonic-gate 
1590Sstevel@tonic-gate 	struct in6_addr	pr_prefix;	/* Used to indentify prefix */
1600Sstevel@tonic-gate 	uint_t		pr_prefix_len;	/* Num bits valid */
1610Sstevel@tonic-gate 
1620Sstevel@tonic-gate 	char		pr_name[LIFNAMSIZ];
1630Sstevel@tonic-gate 	struct in6_addr	pr_address;
1640Sstevel@tonic-gate 	uint64_t	pr_flags;	/* IFF_* flags */
1650Sstevel@tonic-gate 
1660Sstevel@tonic-gate 	uint_t		pr_state;	/* PR_ONLINK | PR_AUTO etc */
1670Sstevel@tonic-gate 	uint_t		pr_kernel_state; /* PR_ONLINK | PR_AUTO etc */
1680Sstevel@tonic-gate 	boolean_t	pr_in_use;	/* To detect removed prefixes */
1690Sstevel@tonic-gate 
1700Sstevel@tonic-gate 	/* Recorded variables on node/host */
1710Sstevel@tonic-gate 	uint_t		pr_ValidLifetime;	/* In ms w/ 2 hour rule */
1720Sstevel@tonic-gate 	uint_t		pr_PreferredLifetime;	/* In millseconds */
1730Sstevel@tonic-gate 	uint_t		pr_OnLinkLifetime;	/* ms valid w/o 2 hour rule */
1740Sstevel@tonic-gate 	boolean_t	pr_OnLinkFlag;
1750Sstevel@tonic-gate 	boolean_t	pr_AutonomousFlag;
1760Sstevel@tonic-gate 
1770Sstevel@tonic-gate 	uint_t		pr_CreateTime;		/* tmpaddr creation time */
1780Sstevel@tonic-gate 						/* in SECONDS */
1792546Scarlsonj 	uint_t		pr_attempts;	/* attempts to configure */
1800Sstevel@tonic-gate };
1810Sstevel@tonic-gate 
1820Sstevel@tonic-gate /*
1830Sstevel@tonic-gate  * Flags used for pr_kernel_state and pr_state where the latter is
1840Sstevel@tonic-gate  * user-level state.
1850Sstevel@tonic-gate  */
1860Sstevel@tonic-gate #define	PR_ONLINK	0x01		/* On-link */
1870Sstevel@tonic-gate #define	PR_AUTO		0x02		/* Stateless addrconf */
1880Sstevel@tonic-gate #define	PR_DEPRECATED	0x04		/* Address is deprecated */
1890Sstevel@tonic-gate #define	PR_STATIC	0x08		/* Not created by ndpd */
1900Sstevel@tonic-gate 
1910Sstevel@tonic-gate /*
1920Sstevel@tonic-gate  * The sum of all possible state string lengths, plus terminating
1930Sstevel@tonic-gate  * null character; if new states are added, this needs to be updated.
1940Sstevel@tonic-gate  * Useful for passing an appropriately sized buffer to prefix_print_state().
1950Sstevel@tonic-gate  *
1960Sstevel@tonic-gate  * Current strings: "ONLINK ", "AUTO ", "DEPRECATED ", "STATIC ", "\n"
1970Sstevel@tonic-gate  *                      7     +   5    +     11       +    7     +  1
1980Sstevel@tonic-gate  */
1990Sstevel@tonic-gate #define	PREFIX_STATESTRLEN	31
2000Sstevel@tonic-gate 
2010Sstevel@tonic-gate /* Prefix used for storing advertisement specific stuff */
2020Sstevel@tonic-gate struct adv_prefix {
2030Sstevel@tonic-gate 	struct adv_prefix	*adv_pr_next;	/* Next prefix */
2040Sstevel@tonic-gate 	struct adv_prefix	*adv_pr_prev;	/* Prev prefix */
2050Sstevel@tonic-gate 	struct phyint		*adv_pr_physical;	/* Back pointer */
2060Sstevel@tonic-gate 
2070Sstevel@tonic-gate 	struct in6_addr		adv_pr_prefix;	/* Used to indentify prefix */
2080Sstevel@tonic-gate 	uint_t			adv_pr_prefix_len;	/* Num bits valid */
2090Sstevel@tonic-gate 
2100Sstevel@tonic-gate 	/* Used when sending advertisements */
2110Sstevel@tonic-gate 	struct confvar		adv_pr_config[I_PREFIXSIZE];
2120Sstevel@tonic-gate #define	adv_pr_AdvValidLifetime	adv_pr_config[I_AdvValidLifetime].cf_value
2130Sstevel@tonic-gate #define	adv_pr_AdvOnLinkFlag	adv_pr_config[I_AdvOnLinkFlag].cf_value
2140Sstevel@tonic-gate #define	adv_pr_AdvPreferredLifetime	\
2150Sstevel@tonic-gate 			adv_pr_config[I_AdvPreferredLifetime].cf_value
2160Sstevel@tonic-gate #define	adv_pr_AdvAutonomousFlag	\
2170Sstevel@tonic-gate 			adv_pr_config[I_AdvAutonomousFlag].cf_value
2180Sstevel@tonic-gate #define	adv_pr_AdvValidExpiration	\
2190Sstevel@tonic-gate 			adv_pr_config[I_AdvValidExpiration].cf_value
2200Sstevel@tonic-gate #define	adv_pr_AdvPreferredExpiration	\
2210Sstevel@tonic-gate 			adv_pr_config[I_AdvPreferredExpiration].cf_value
2220Sstevel@tonic-gate 	/* The two below are set if the timers decrement in real time */
2230Sstevel@tonic-gate #define	adv_pr_AdvValidRealTime		\
2240Sstevel@tonic-gate 			adv_pr_config[I_AdvValidExpiration].cf_notdefault
2250Sstevel@tonic-gate #define	adv_pr_AdvPreferredRealTime	\
2260Sstevel@tonic-gate 			adv_pr_config[I_AdvPreferredExpiration].cf_notdefault
2270Sstevel@tonic-gate };
2280Sstevel@tonic-gate 
2290Sstevel@tonic-gate /*
2300Sstevel@tonic-gate  * Doubly-linked list of default routers on a phyint.
2310Sstevel@tonic-gate  */
2320Sstevel@tonic-gate struct router {
2330Sstevel@tonic-gate 	struct router	*dr_next;	/* Next router for this physical */
2340Sstevel@tonic-gate 	struct router	*dr_prev;	/* Prev router for this physical */
2350Sstevel@tonic-gate 	struct phyint	*dr_physical;	/* Back pointer */
2360Sstevel@tonic-gate 
2370Sstevel@tonic-gate 	struct in6_addr	dr_address;	/* Used to identify the router */
2380Sstevel@tonic-gate 	uint_t		dr_lifetime;	/* In milliseconds */
2390Sstevel@tonic-gate 	boolean_t	dr_inkernel;	/* Route added to kernel */
2400Sstevel@tonic-gate };
2410Sstevel@tonic-gate 
2420Sstevel@tonic-gate /*
2430Sstevel@tonic-gate  * Globals
2440Sstevel@tonic-gate  */
2450Sstevel@tonic-gate extern struct phyint *phyints;
2463284Sapersson extern int num_of_phyints;
2470Sstevel@tonic-gate 
2480Sstevel@tonic-gate 
2490Sstevel@tonic-gate /*
2500Sstevel@tonic-gate  * Functions
2510Sstevel@tonic-gate  */
2520Sstevel@tonic-gate extern uint_t		getcurrenttime(void);
2530Sstevel@tonic-gate 
2540Sstevel@tonic-gate extern struct phyint	*phyint_lookup(char *name);
2550Sstevel@tonic-gate extern struct phyint	*phyint_lookup_on_index(uint_t ifindex);
2560Sstevel@tonic-gate extern struct phyint	*phyint_create(char *name);
2570Sstevel@tonic-gate extern int		phyint_init_from_k(struct phyint *pi);
2580Sstevel@tonic-gate extern void		phyint_delete(struct phyint *pi);
2590Sstevel@tonic-gate extern uint_t		phyint_timer(struct phyint *pi, uint_t elapsed);
2600Sstevel@tonic-gate extern void		phyint_print_all(void);
2610Sstevel@tonic-gate extern void		phyint_reach_random(struct phyint *pi,
2620Sstevel@tonic-gate 			    boolean_t set_needed);
2630Sstevel@tonic-gate extern void		phyint_cleanup(struct phyint *pi);
2640Sstevel@tonic-gate 
2650Sstevel@tonic-gate extern boolean_t	tmptoken_create(struct phyint *pi);
2660Sstevel@tonic-gate extern void		tmptoken_delete(struct phyint *pi);
2670Sstevel@tonic-gate extern uint_t		tmptoken_timer(struct phyint *pi, uint_t elapsed);
2680Sstevel@tonic-gate extern boolean_t	token_equal(struct in6_addr t1, struct in6_addr t2,
2690Sstevel@tonic-gate 			    int bits);
2700Sstevel@tonic-gate 
2710Sstevel@tonic-gate extern struct prefix	*prefix_create(struct phyint *pi, struct in6_addr addr,
2720Sstevel@tonic-gate 			    int addrlen, uint64_t flags);
2730Sstevel@tonic-gate extern struct prefix	*prefix_lookup_name(struct phyint *pi, char *name);
2740Sstevel@tonic-gate extern struct prefix	*prefix_lookup_addr_match(struct prefix *pr);
2750Sstevel@tonic-gate extern struct prefix	*prefix_create_name(struct phyint *pi, char *name);
2760Sstevel@tonic-gate extern int		prefix_init_from_k(struct prefix *pr);
2770Sstevel@tonic-gate extern void		prefix_delete(struct prefix *pr);
2780Sstevel@tonic-gate extern boolean_t	prefix_equal(struct in6_addr p1, struct in6_addr p2,
2790Sstevel@tonic-gate 			    int bits);
280*3431Scarlsonj extern void		prefix_update_dhcp(struct prefix *pr);
2810Sstevel@tonic-gate extern void		prefix_update_k(struct prefix *pr);
2820Sstevel@tonic-gate extern uint_t		prefix_timer(struct prefix *pr, uint_t elapsed);
2830Sstevel@tonic-gate extern uint_t		adv_prefix_timer(struct adv_prefix *adv_pr,
2840Sstevel@tonic-gate 			    uint_t elapsed);
2850Sstevel@tonic-gate extern boolean_t	prefix_token_match(struct phyint *pi,
2860Sstevel@tonic-gate 			    struct prefix *pr, uint64_t flags);
2870Sstevel@tonic-gate extern struct prefix	*prefix_lookup_addr(struct phyint *pi,
2880Sstevel@tonic-gate 			    struct in6_addr prefix);
2890Sstevel@tonic-gate 
2900Sstevel@tonic-gate extern struct adv_prefix *adv_prefix_lookup(struct phyint *pi,
2910Sstevel@tonic-gate 			    struct in6_addr addr, int addrlen);
2920Sstevel@tonic-gate extern struct adv_prefix *adv_prefix_create(struct phyint *pi,
2930Sstevel@tonic-gate 			    struct in6_addr addr, int addrlen);
2940Sstevel@tonic-gate 
2950Sstevel@tonic-gate extern struct router	*router_lookup(struct phyint *pi, struct in6_addr addr);
2960Sstevel@tonic-gate extern struct router	*router_create(struct phyint *pi, struct in6_addr addr,
2970Sstevel@tonic-gate 			    uint_t lifetime);
2980Sstevel@tonic-gate extern void		router_update_k(struct router *dr);
2990Sstevel@tonic-gate extern uint_t		router_timer(struct router *dr, uint_t elapsed);
3000Sstevel@tonic-gate 
3010Sstevel@tonic-gate 
3020Sstevel@tonic-gate extern void	check_to_advertise(struct phyint *pi, enum adv_events event);
3030Sstevel@tonic-gate extern void	check_to_solicit(struct phyint *pi,
3040Sstevel@tonic-gate 		    enum solicit_events event);
3050Sstevel@tonic-gate extern uint_t	advertise_event(struct phyint *pi, enum adv_events event,
3060Sstevel@tonic-gate 		    uint_t elapsed);
3070Sstevel@tonic-gate extern uint_t	solicit_event(struct phyint *pi, enum solicit_events event,
3080Sstevel@tonic-gate 		    uint_t elapsed);
3090Sstevel@tonic-gate 
3100Sstevel@tonic-gate extern void	print_route_sol(char *str, struct phyint *pi,
3110Sstevel@tonic-gate 		    struct nd_router_solicit *rs, int len,
3120Sstevel@tonic-gate 		    struct sockaddr_in6 *addr);
3130Sstevel@tonic-gate extern void	print_route_adv(char *str, struct phyint *pi,
3140Sstevel@tonic-gate 		    struct nd_router_advert *ra, int len,
3150Sstevel@tonic-gate 		    struct sockaddr_in6 *addr);
3160Sstevel@tonic-gate extern void	print_iflist(struct confvar *confvar);
3170Sstevel@tonic-gate extern void	print_prefixlist(struct confvar *confvar);
3180Sstevel@tonic-gate 
3190Sstevel@tonic-gate extern void	in_data(struct phyint *pi);
3200Sstevel@tonic-gate 
321*3431Scarlsonj extern void	start_dhcp(struct phyint *pi);
322*3431Scarlsonj 
3230Sstevel@tonic-gate extern void	incoming_ra(struct phyint *pi, struct nd_router_advert *ra,
3240Sstevel@tonic-gate 		    int len, struct sockaddr_in6 *from, boolean_t loopback);
3250Sstevel@tonic-gate 
3260Sstevel@tonic-gate extern boolean_t incoming_prefix_addrconf_process(struct phyint *pi,
3270Sstevel@tonic-gate 		    struct prefix *pr, uchar_t *opt,
3280Sstevel@tonic-gate 		    struct sockaddr_in6 *from, boolean_t loopback,
3290Sstevel@tonic-gate 		    boolean_t new_prefix);
3300Sstevel@tonic-gate 
3310Sstevel@tonic-gate extern void	incoming_prefix_onlink_process(struct prefix *pr,
3320Sstevel@tonic-gate 		    uchar_t *opt);
3330Sstevel@tonic-gate 
3340Sstevel@tonic-gate #ifdef	__cplusplus
3350Sstevel@tonic-gate }
3360Sstevel@tonic-gate #endif
3370Sstevel@tonic-gate 
3380Sstevel@tonic-gate #endif	/* _NDPD_TABLES_H */
339