xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.lib/in.ndpd/tables.h (revision 12016:0248e987199b)
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*12016SGirish.Moodalbail@Sun.COM  * Copyright 2010 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 #ifdef	__cplusplus
300Sstevel@tonic-gate extern "C" {
310Sstevel@tonic-gate #endif
320Sstevel@tonic-gate 
333479Sapersson #include <ndpd.h>
34*12016SGirish.Moodalbail@Sun.COM #include <libipadm.h>
353284Sapersson 
360Sstevel@tonic-gate enum adv_states { NO_ADV = 0, REG_ADV, INIT_ADV, SOLICIT_ADV, FINAL_ADV };
370Sstevel@tonic-gate enum adv_events { ADV_OFF, START_INIT_ADV, START_FINAL_ADV, RECEIVED_SOLICIT,
380Sstevel@tonic-gate 			ADV_TIMER };
390Sstevel@tonic-gate 
400Sstevel@tonic-gate enum solicit_states { NO_SOLICIT = 0, INIT_SOLICIT, DONE_SOLICIT };
410Sstevel@tonic-gate enum solicit_events { SOLICIT_OFF, START_INIT_SOLICIT, SOL_TIMER,
423431Scarlsonj 			SOLICIT_DONE, RESTART_INIT_SOLICIT };
433431Scarlsonj 
440Sstevel@tonic-gate /*
450Sstevel@tonic-gate  * A doubly linked list of all physical interfaces that each contain a
460Sstevel@tonic-gate  * doubly linked list of prefixes (i.e. logical interfaces) and default
470Sstevel@tonic-gate  * routers.
480Sstevel@tonic-gate  */
490Sstevel@tonic-gate struct phyint {
500Sstevel@tonic-gate 	struct phyint	*pi_next;
510Sstevel@tonic-gate 	struct phyint	*pi_prev;
520Sstevel@tonic-gate 	struct prefix	*pi_prefix_list;	/* Doubly linked prefixes */
530Sstevel@tonic-gate 	struct router	*pi_router_list;	/* Doubly linked routers */
540Sstevel@tonic-gate 	struct adv_prefix *pi_adv_prefix_list;	/* Doubly linked adv.prefixes */
550Sstevel@tonic-gate 
560Sstevel@tonic-gate 	uint_t		pi_index;		/* Identifier > 0 */
570Sstevel@tonic-gate 	char		pi_name[LIFNAMSIZ];	/* Used to identify it */
580Sstevel@tonic-gate 	int		pi_sock;		/* For sending and receiving */
590Sstevel@tonic-gate 	struct in6_addr	pi_ifaddr;		/* Local address */
608485SPeter.Memishian@Sun.COM 	uint64_t		pi_flags;		/* IFF_* flags */
610Sstevel@tonic-gate 	uint_t		pi_mtu;			/* From SIOCGLIFMTU */
620Sstevel@tonic-gate 	struct in6_addr pi_token;
630Sstevel@tonic-gate 	uint_t		pi_token_length;
64*12016SGirish.Moodalbail@Sun.COM 	boolean_t	pi_stateless;
65*12016SGirish.Moodalbail@Sun.COM 	boolean_t	pi_stateful;
660Sstevel@tonic-gate 	struct in6_addr	pi_tmp_token;		/* For RFC3041 addrs */
670Sstevel@tonic-gate 	struct in6_addr	pi_dst_token;		/* For POINTOPOINT */
680Sstevel@tonic-gate 
690Sstevel@tonic-gate 	uint_t		pi_state;		/* PI_* below */
700Sstevel@tonic-gate 	uint_t		pi_kernel_state;	/* PI_* below */
710Sstevel@tonic-gate 	uint_t		pi_num_k_routers;	/* # routers in kernel */
720Sstevel@tonic-gate 	uint_t		pi_reach_time_since_random;	/* In milliseconds */
730Sstevel@tonic-gate 
740Sstevel@tonic-gate 	/* Applies if pi_AdvSendAdvertisements */
750Sstevel@tonic-gate 	uint_t		pi_adv_time_left;	/* In milliseconds */
760Sstevel@tonic-gate 	uint_t		pi_adv_time_since_sent;	/* In milliseconds */
770Sstevel@tonic-gate 	enum adv_states	pi_adv_state;
780Sstevel@tonic-gate 	uint_t		pi_adv_count;
790Sstevel@tonic-gate 
800Sstevel@tonic-gate 	/* Applies if not pi_AdvSendAdvertisements */
810Sstevel@tonic-gate 	uint_t		pi_sol_time_left;	/* In milliseconds */
820Sstevel@tonic-gate 	enum solicit_states pi_sol_state;
830Sstevel@tonic-gate 	uint_t		pi_sol_count;
840Sstevel@tonic-gate 
850Sstevel@tonic-gate 	/* Interface specific configurable variables */
860Sstevel@tonic-gate 	struct confvar	pi_config[I_IFSIZE];
870Sstevel@tonic-gate #define	pi_DupAddrDetectTransmits pi_config[I_DupAddrDetectTransmits].cf_value
880Sstevel@tonic-gate #define	pi_AdvSendAdvertisements pi_config[I_AdvSendAdvertisements].cf_value
890Sstevel@tonic-gate #define	pi_MaxRtrAdvInterval	pi_config[I_MaxRtrAdvInterval].cf_value
900Sstevel@tonic-gate #define	pi_MinRtrAdvInterval	pi_config[I_MinRtrAdvInterval].cf_value
910Sstevel@tonic-gate #define	pi_AdvManagedFlag	pi_config[I_AdvManagedFlag].cf_value
920Sstevel@tonic-gate #define	pi_AdvOtherConfigFlag	pi_config[I_AdvOtherConfigFlag].cf_value
930Sstevel@tonic-gate #define	pi_AdvLinkMTU		pi_config[I_AdvLinkMTU].cf_value
940Sstevel@tonic-gate #define	pi_AdvReachableTime	pi_config[I_AdvReachableTime].cf_value
950Sstevel@tonic-gate #define	pi_AdvRetransTimer	pi_config[I_AdvRetransTimer].cf_value
960Sstevel@tonic-gate #define	pi_AdvCurHopLimit	pi_config[I_AdvCurHopLimit].cf_value
970Sstevel@tonic-gate #define	pi_AdvDefaultLifetime	pi_config[I_AdvDefaultLifetime].cf_value
980Sstevel@tonic-gate #define	pi_StatelessAddrConf	pi_config[I_StatelessAddrConf].cf_value
990Sstevel@tonic-gate #define	pi_TmpAddrsEnabled	pi_config[I_TmpAddrsEnabled].cf_value
1000Sstevel@tonic-gate #define	pi_TmpValidLifetime	pi_config[I_TmpValidLifetime].cf_value
1010Sstevel@tonic-gate #define	pi_TmpPreferredLifetime	pi_config[I_TmpPreferredLifetime].cf_value
1020Sstevel@tonic-gate #define	pi_TmpRegenAdvance	pi_config[I_TmpRegenAdvance].cf_value
1030Sstevel@tonic-gate #define	pi_TmpMaxDesyncFactor	pi_config[I_TmpMaxDesyncFactor].cf_value
1043431Scarlsonj #define	pi_StatefulAddrConf	pi_config[I_StatefulAddrConf].cf_value
1050Sstevel@tonic-gate 
1060Sstevel@tonic-gate 	/* Recorded variables for RFC3041 addresses */
1070Sstevel@tonic-gate 	uint_t		pi_TmpDesyncFactor;		/* In milliseconds */
1080Sstevel@tonic-gate 	uint_t		pi_TmpRegenCountdown;		/* In milliseconds */
1090Sstevel@tonic-gate 
1100Sstevel@tonic-gate 	/* Recorded variables on node/host */
1110Sstevel@tonic-gate 	uint_t		pi_LinkMTU;
1120Sstevel@tonic-gate 	uint_t		pi_CurHopLimit;
1130Sstevel@tonic-gate 	uint_t		pi_BaseReachableTime;		/* In milliseconds */
1140Sstevel@tonic-gate 	uint_t		pi_ReachableTime;		/* In milliseconds */
1150Sstevel@tonic-gate 	/*
1160Sstevel@tonic-gate 	 * The above value should be a uniformly-distributed random
1170Sstevel@tonic-gate 	 * value between ND_MIN_RANDOM_FACTOR and
1180Sstevel@tonic-gate 	 * ND_MAX_RANDOM_FACTOR times BaseReachableTime
1190Sstevel@tonic-gate 	 * milliseconds.  A new random value should be
1200Sstevel@tonic-gate 	 * calculated when BaseReachableTime changes (due to
1210Sstevel@tonic-gate 	 * Router Advertisements) or at least every few hours
1220Sstevel@tonic-gate 	 * even if no Router Advertisements are received.
1230Sstevel@tonic-gate 	 * Tracked using pi_each_time_since_random.
1240Sstevel@tonic-gate 	 */
125*12016SGirish.Moodalbail@Sun.COM 	uint_t		pi_RetransTimer;	/* In milliseconds */
1263431Scarlsonj 
127*12016SGirish.Moodalbail@Sun.COM 	uint_t		pi_ra_flags;	/* Detect when to start DHCP */
128*12016SGirish.Moodalbail@Sun.COM 	boolean_t	pi_autoconf;	/* Enable/Disable autoconfiguration */
129*12016SGirish.Moodalbail@Sun.COM 	boolean_t	pi_default_token;	/* Use default token */
130*12016SGirish.Moodalbail@Sun.COM 	char		pi_ipadm_aobjname[IPADM_AOBJSIZ];
1310Sstevel@tonic-gate };
1320Sstevel@tonic-gate 
1330Sstevel@tonic-gate /*
1340Sstevel@tonic-gate  * pi_state/pr_kernel_state values
1350Sstevel@tonic-gate  */
1360Sstevel@tonic-gate #define	PI_PRESENT		0x01
1370Sstevel@tonic-gate #define	PI_JOINED_ALLNODES	0x02	/* allnodes multicast joined */
1380Sstevel@tonic-gate #define	PI_JOINED_ALLROUTERS	0x04	/* allrouters multicast joined */
1390Sstevel@tonic-gate 
1400Sstevel@tonic-gate /*
1410Sstevel@tonic-gate  * Prefix configuration variable indices
1420Sstevel@tonic-gate  */
1430Sstevel@tonic-gate #define	I_AdvValidLifetime	0	/* In seconds */
1440Sstevel@tonic-gate #define	I_AdvOnLinkFlag		1
1450Sstevel@tonic-gate #define	I_AdvPreferredLifetime	2	/* In seconds */
1460Sstevel@tonic-gate #define	I_AdvAutonomousFlag	3
1470Sstevel@tonic-gate #define	I_AdvValidExpiration	4	/* Seconds left */
1480Sstevel@tonic-gate #define	I_AdvPreferredExpiration 5	/* Seconds left */
1490Sstevel@tonic-gate #define	I_PREFIXSIZE		6	/* # of variables */
1500Sstevel@tonic-gate 
1510Sstevel@tonic-gate /*
1523431Scarlsonj  * A doubly-linked list of prefixes for onlink and addrconf.
1533431Scarlsonj  * ("Prefixes" in this context are identical to logical interfaces.)
1540Sstevel@tonic-gate  */
1550Sstevel@tonic-gate struct prefix {
1560Sstevel@tonic-gate 	struct prefix	*pr_next;	/* Next prefix for this physical */
1570Sstevel@tonic-gate 	struct prefix	*pr_prev;	/* Prev prefix for this physical */
1580Sstevel@tonic-gate 	struct phyint	*pr_physical;	/* Back pointer */
1590Sstevel@tonic-gate 
1600Sstevel@tonic-gate 	struct in6_addr	pr_prefix;	/* Used to indentify prefix */
1610Sstevel@tonic-gate 	uint_t		pr_prefix_len;	/* Num bits valid */
1620Sstevel@tonic-gate 
1630Sstevel@tonic-gate 	char		pr_name[LIFNAMSIZ];
1640Sstevel@tonic-gate 	struct in6_addr	pr_address;
1650Sstevel@tonic-gate 	uint64_t	pr_flags;	/* IFF_* flags */
1660Sstevel@tonic-gate 
1670Sstevel@tonic-gate 	uint_t		pr_state;	/* PR_ONLINK | PR_AUTO etc */
1680Sstevel@tonic-gate 	uint_t		pr_kernel_state; /* PR_ONLINK | PR_AUTO etc */
1690Sstevel@tonic-gate 	boolean_t	pr_in_use;	/* To detect removed prefixes */
1700Sstevel@tonic-gate 
1710Sstevel@tonic-gate 	/* Recorded variables on node/host */
1720Sstevel@tonic-gate 	uint_t		pr_ValidLifetime;	/* In ms w/ 2 hour rule */
1730Sstevel@tonic-gate 	uint_t		pr_PreferredLifetime;	/* In millseconds */
1740Sstevel@tonic-gate 	uint_t		pr_OnLinkLifetime;	/* ms valid w/o 2 hour rule */
1750Sstevel@tonic-gate 	boolean_t	pr_OnLinkFlag;
1760Sstevel@tonic-gate 	boolean_t	pr_AutonomousFlag;
1770Sstevel@tonic-gate 
1780Sstevel@tonic-gate 	uint_t		pr_CreateTime;		/* tmpaddr creation time */
1790Sstevel@tonic-gate 						/* in SECONDS */
1802546Scarlsonj 	uint_t		pr_attempts;	/* attempts to configure */
1810Sstevel@tonic-gate };
1820Sstevel@tonic-gate 
1830Sstevel@tonic-gate /*
1840Sstevel@tonic-gate  * Flags used for pr_kernel_state and pr_state where the latter is
1850Sstevel@tonic-gate  * user-level state.
1860Sstevel@tonic-gate  */
1870Sstevel@tonic-gate #define	PR_ONLINK	0x01		/* On-link */
1880Sstevel@tonic-gate #define	PR_AUTO		0x02		/* Stateless addrconf */
1890Sstevel@tonic-gate #define	PR_DEPRECATED	0x04		/* Address is deprecated */
1900Sstevel@tonic-gate #define	PR_STATIC	0x08		/* Not created by ndpd */
1910Sstevel@tonic-gate 
1920Sstevel@tonic-gate /*
1930Sstevel@tonic-gate  * The sum of all possible state string lengths, plus terminating
1940Sstevel@tonic-gate  * null character; if new states are added, this needs to be updated.
1950Sstevel@tonic-gate  * Useful for passing an appropriately sized buffer to prefix_print_state().
1960Sstevel@tonic-gate  *
1970Sstevel@tonic-gate  * Current strings: "ONLINK ", "AUTO ", "DEPRECATED ", "STATIC ", "\n"
1980Sstevel@tonic-gate  *                      7     +   5    +     11       +    7     +  1
1990Sstevel@tonic-gate  */
2000Sstevel@tonic-gate #define	PREFIX_STATESTRLEN	31
2010Sstevel@tonic-gate 
2020Sstevel@tonic-gate /* Prefix used for storing advertisement specific stuff */
2030Sstevel@tonic-gate struct adv_prefix {
2040Sstevel@tonic-gate 	struct adv_prefix	*adv_pr_next;	/* Next prefix */
2050Sstevel@tonic-gate 	struct adv_prefix	*adv_pr_prev;	/* Prev prefix */
2060Sstevel@tonic-gate 	struct phyint		*adv_pr_physical;	/* Back pointer */
2070Sstevel@tonic-gate 
2080Sstevel@tonic-gate 	struct in6_addr		adv_pr_prefix;	/* Used to indentify prefix */
2090Sstevel@tonic-gate 	uint_t			adv_pr_prefix_len;	/* Num bits valid */
2100Sstevel@tonic-gate 
2110Sstevel@tonic-gate 	/* Used when sending advertisements */
2120Sstevel@tonic-gate 	struct confvar		adv_pr_config[I_PREFIXSIZE];
2130Sstevel@tonic-gate #define	adv_pr_AdvValidLifetime	adv_pr_config[I_AdvValidLifetime].cf_value
2140Sstevel@tonic-gate #define	adv_pr_AdvOnLinkFlag	adv_pr_config[I_AdvOnLinkFlag].cf_value
2150Sstevel@tonic-gate #define	adv_pr_AdvPreferredLifetime	\
2160Sstevel@tonic-gate 			adv_pr_config[I_AdvPreferredLifetime].cf_value
2170Sstevel@tonic-gate #define	adv_pr_AdvAutonomousFlag	\
2180Sstevel@tonic-gate 			adv_pr_config[I_AdvAutonomousFlag].cf_value
2190Sstevel@tonic-gate #define	adv_pr_AdvValidExpiration	\
2200Sstevel@tonic-gate 			adv_pr_config[I_AdvValidExpiration].cf_value
2210Sstevel@tonic-gate #define	adv_pr_AdvPreferredExpiration	\
2220Sstevel@tonic-gate 			adv_pr_config[I_AdvPreferredExpiration].cf_value
2230Sstevel@tonic-gate 	/* The two below are set if the timers decrement in real time */
2240Sstevel@tonic-gate #define	adv_pr_AdvValidRealTime		\
2250Sstevel@tonic-gate 			adv_pr_config[I_AdvValidExpiration].cf_notdefault
2260Sstevel@tonic-gate #define	adv_pr_AdvPreferredRealTime	\
2270Sstevel@tonic-gate 			adv_pr_config[I_AdvPreferredExpiration].cf_notdefault
2280Sstevel@tonic-gate };
2290Sstevel@tonic-gate 
2300Sstevel@tonic-gate /*
2310Sstevel@tonic-gate  * Doubly-linked list of default routers on a phyint.
2320Sstevel@tonic-gate  */
2330Sstevel@tonic-gate struct router {
2340Sstevel@tonic-gate 	struct router	*dr_next;	/* Next router for this physical */
2350Sstevel@tonic-gate 	struct router	*dr_prev;	/* Prev router for this physical */
2360Sstevel@tonic-gate 	struct phyint	*dr_physical;	/* Back pointer */
2370Sstevel@tonic-gate 
2380Sstevel@tonic-gate 	struct in6_addr	dr_address;	/* Used to identify the router */
2390Sstevel@tonic-gate 	uint_t		dr_lifetime;	/* In milliseconds */
2400Sstevel@tonic-gate 	boolean_t	dr_inkernel;	/* Route added to kernel */
2410Sstevel@tonic-gate };
2420Sstevel@tonic-gate 
2430Sstevel@tonic-gate /*
2440Sstevel@tonic-gate  * Globals
2450Sstevel@tonic-gate  */
2460Sstevel@tonic-gate extern struct phyint *phyints;
2473284Sapersson extern int num_of_phyints;
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);
2618485SPeter.Memishian@Sun.COM extern int		phyint_get_lla(struct phyint *pi, struct lifreq *lifrp);
2620Sstevel@tonic-gate extern void		phyint_reach_random(struct phyint *pi,
2630Sstevel@tonic-gate 			    boolean_t set_needed);
2640Sstevel@tonic-gate extern void		phyint_cleanup(struct phyint *pi);
2650Sstevel@tonic-gate 
2660Sstevel@tonic-gate extern boolean_t	tmptoken_create(struct phyint *pi);
2670Sstevel@tonic-gate extern void		tmptoken_delete(struct phyint *pi);
2680Sstevel@tonic-gate extern uint_t		tmptoken_timer(struct phyint *pi, uint_t elapsed);
2690Sstevel@tonic-gate extern boolean_t	token_equal(struct in6_addr t1, struct in6_addr t2,
2700Sstevel@tonic-gate 			    int bits);
2710Sstevel@tonic-gate 
2720Sstevel@tonic-gate extern struct prefix	*prefix_create(struct phyint *pi, struct in6_addr addr,
2730Sstevel@tonic-gate 			    int addrlen, uint64_t flags);
2740Sstevel@tonic-gate extern struct prefix	*prefix_lookup_name(struct phyint *pi, char *name);
2750Sstevel@tonic-gate extern struct prefix	*prefix_lookup_addr_match(struct prefix *pr);
2760Sstevel@tonic-gate extern struct prefix	*prefix_create_name(struct phyint *pi, char *name);
2770Sstevel@tonic-gate extern int		prefix_init_from_k(struct prefix *pr);
2780Sstevel@tonic-gate extern void		prefix_delete(struct prefix *pr);
2790Sstevel@tonic-gate extern boolean_t	prefix_equal(struct in6_addr p1, struct in6_addr p2,
2800Sstevel@tonic-gate 			    int bits);
2813431Scarlsonj extern void		prefix_update_dhcp(struct prefix *pr);
2820Sstevel@tonic-gate extern void		prefix_update_k(struct prefix *pr);
2830Sstevel@tonic-gate extern uint_t		prefix_timer(struct prefix *pr, uint_t elapsed);
2840Sstevel@tonic-gate extern uint_t		adv_prefix_timer(struct adv_prefix *adv_pr,
2850Sstevel@tonic-gate 			    uint_t elapsed);
2860Sstevel@tonic-gate extern struct prefix	*prefix_lookup_addr(struct phyint *pi,
2870Sstevel@tonic-gate 			    struct in6_addr prefix);
2880Sstevel@tonic-gate 
2890Sstevel@tonic-gate extern struct adv_prefix *adv_prefix_lookup(struct phyint *pi,
2900Sstevel@tonic-gate 			    struct in6_addr addr, int addrlen);
2910Sstevel@tonic-gate extern struct adv_prefix *adv_prefix_create(struct phyint *pi,
2920Sstevel@tonic-gate 			    struct in6_addr addr, int addrlen);
2930Sstevel@tonic-gate 
2940Sstevel@tonic-gate extern struct router	*router_lookup(struct phyint *pi, struct in6_addr addr);
2950Sstevel@tonic-gate extern struct router	*router_create(struct phyint *pi, struct in6_addr addr,
2960Sstevel@tonic-gate 			    uint_t lifetime);
2970Sstevel@tonic-gate extern void		router_update_k(struct router *dr);
2980Sstevel@tonic-gate extern uint_t		router_timer(struct router *dr, uint_t elapsed);
2990Sstevel@tonic-gate 
3000Sstevel@tonic-gate extern void	check_to_advertise(struct phyint *pi, enum adv_events event);
3010Sstevel@tonic-gate extern void	check_to_solicit(struct phyint *pi,
3020Sstevel@tonic-gate 		    enum solicit_events event);
3030Sstevel@tonic-gate extern uint_t	advertise_event(struct phyint *pi, enum adv_events event,
3040Sstevel@tonic-gate 		    uint_t elapsed);
3050Sstevel@tonic-gate extern uint_t	solicit_event(struct phyint *pi, enum solicit_events event,
3060Sstevel@tonic-gate 		    uint_t elapsed);
3070Sstevel@tonic-gate 
3080Sstevel@tonic-gate extern void	print_route_sol(char *str, struct phyint *pi,
3090Sstevel@tonic-gate 		    struct nd_router_solicit *rs, int len,
3100Sstevel@tonic-gate 		    struct sockaddr_in6 *addr);
3110Sstevel@tonic-gate extern void	print_route_adv(char *str, struct phyint *pi,
3120Sstevel@tonic-gate 		    struct nd_router_advert *ra, int len,
3130Sstevel@tonic-gate 		    struct sockaddr_in6 *addr);
3140Sstevel@tonic-gate extern void	print_iflist(struct confvar *confvar);
3150Sstevel@tonic-gate extern void	print_prefixlist(struct confvar *confvar);
3160Sstevel@tonic-gate 
3170Sstevel@tonic-gate extern void	in_data(struct phyint *pi);
3180Sstevel@tonic-gate 
3193431Scarlsonj extern void	start_dhcp(struct phyint *pi);
320*12016SGirish.Moodalbail@Sun.COM extern void	release_dhcp(struct phyint *pi);
3213431Scarlsonj 
3220Sstevel@tonic-gate extern void	incoming_ra(struct phyint *pi, struct nd_router_advert *ra,
3230Sstevel@tonic-gate 		    int len, struct sockaddr_in6 *from, boolean_t loopback);
3240Sstevel@tonic-gate 
3250Sstevel@tonic-gate extern boolean_t incoming_prefix_addrconf_process(struct phyint *pi,
3260Sstevel@tonic-gate 		    struct prefix *pr, uchar_t *opt,
3270Sstevel@tonic-gate 		    struct sockaddr_in6 *from, boolean_t loopback,
3280Sstevel@tonic-gate 		    boolean_t new_prefix);
3290Sstevel@tonic-gate 
3300Sstevel@tonic-gate extern void	incoming_prefix_onlink_process(struct prefix *pr,
3310Sstevel@tonic-gate 		    uchar_t *opt);
3320Sstevel@tonic-gate 
333*12016SGirish.Moodalbail@Sun.COM extern void	check_autoconf_var_consistency(struct phyint *, boolean_t,
334*12016SGirish.Moodalbail@Sun.COM     boolean_t);
335*12016SGirish.Moodalbail@Sun.COM extern void	prefix_update_ipadm_addrobj(struct prefix *pr, boolean_t add);
3360Sstevel@tonic-gate #ifdef	__cplusplus
3370Sstevel@tonic-gate }
3380Sstevel@tonic-gate #endif
3390Sstevel@tonic-gate 
3400Sstevel@tonic-gate #endif	/* _NDPD_TABLES_H */
341