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