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