1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _INET_IP_NDP_H 28*7c478bd9Sstevel@tonic-gate #define _INET_IP_NDP_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate /* 33*7c478bd9Sstevel@tonic-gate * Internal definitions for the kernel implementation of the IPv6 34*7c478bd9Sstevel@tonic-gate * Neighbor Discovery Protocol (NDP). 35*7c478bd9Sstevel@tonic-gate */ 36*7c478bd9Sstevel@tonic-gate 37*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 38*7c478bd9Sstevel@tonic-gate extern "C" { 39*7c478bd9Sstevel@tonic-gate #endif 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gate #ifdef _KERNEL 42*7c478bd9Sstevel@tonic-gate /* 43*7c478bd9Sstevel@tonic-gate * ndp_g_lock protects neighbor cache tables access and 44*7c478bd9Sstevel@tonic-gate * insertion/removal of cache entries into/from these tables. 45*7c478bd9Sstevel@tonic-gate * nce_lock protects nce_pcnt, nce_rcnt, nce_qd_mp nce_state, 46*7c478bd9Sstevel@tonic-gate * nce_res_mp, nce_refcnt and nce_last. 47*7c478bd9Sstevel@tonic-gate * nce_refcnt is incremented for every ire pointing to this nce and 48*7c478bd9Sstevel@tonic-gate * every time ndp_lookup() finds an nce. 49*7c478bd9Sstevel@tonic-gate * Should there be a need to obtain nce_lock and ndp_g_lock, ndp_g_lock is 50*7c478bd9Sstevel@tonic-gate * acquired first. 51*7c478bd9Sstevel@tonic-gate * To avoid becoming exclusive when deleting NCEs, ndp_walk() routine holds 52*7c478bd9Sstevel@tonic-gate * the ndp_g_lock (i.e global lock) and marks NCEs to be deleted with 53*7c478bd9Sstevel@tonic-gate * NCE_F_CONDEMNED. When all active users of such NCEs are gone the walk 54*7c478bd9Sstevel@tonic-gate * routine passes a list for deletion to nce_ire_delete_list(). 55*7c478bd9Sstevel@tonic-gate */ 56*7c478bd9Sstevel@tonic-gate kmutex_t ndp_g_lock; /* Lock protecting nighbor cache hash table */ 57*7c478bd9Sstevel@tonic-gate /* NDP Cache Entry */ 58*7c478bd9Sstevel@tonic-gate typedef struct nce_s { 59*7c478bd9Sstevel@tonic-gate struct nce_s *nce_next; /* Hash chain next pointer */ 60*7c478bd9Sstevel@tonic-gate struct nce_s **nce_ptpn; /* Pointer to previous next */ 61*7c478bd9Sstevel@tonic-gate struct ill_s *nce_ill; /* Associated ill */ 62*7c478bd9Sstevel@tonic-gate uint16_t nce_flags; /* See below */ 63*7c478bd9Sstevel@tonic-gate uint16_t nce_state; /* See reachability states in if.h */ 64*7c478bd9Sstevel@tonic-gate int16_t nce_pcnt; /* Probe counter */ 65*7c478bd9Sstevel@tonic-gate uint16_t nce_rcnt; /* Retransmit counter */ 66*7c478bd9Sstevel@tonic-gate in6_addr_t nce_addr; /* address of the nighbor */ 67*7c478bd9Sstevel@tonic-gate in6_addr_t nce_mask; /* If not all ones, mask allows an */ 68*7c478bd9Sstevel@tonic-gate /* entry to respond to requests for a group of addresses, for */ 69*7c478bd9Sstevel@tonic-gate /* instantance multicast addresses */ 70*7c478bd9Sstevel@tonic-gate in6_addr_t nce_extract_mask; /* For mappings */ 71*7c478bd9Sstevel@tonic-gate uint32_t nce_ll_extract_start; /* For mappings */ 72*7c478bd9Sstevel@tonic-gate #define nce_first_mp_to_free nce_fp_mp 73*7c478bd9Sstevel@tonic-gate mblk_t *nce_fp_mp; /* link layer fast path mp */ 74*7c478bd9Sstevel@tonic-gate mblk_t *nce_res_mp; /* DL_UNITDATA_REQ or link layer mp */ 75*7c478bd9Sstevel@tonic-gate mblk_t *nce_qd_mp; /* Head outgoing queued packets */ 76*7c478bd9Sstevel@tonic-gate #define nce_last_mp_to_free nce_qd_mp 77*7c478bd9Sstevel@tonic-gate mblk_t *nce_timer_mp; /* NDP timer mblk */ 78*7c478bd9Sstevel@tonic-gate mblk_t *nce_mp; /* mblk we are in, last to be freed */ 79*7c478bd9Sstevel@tonic-gate uint64_t nce_last; /* Time last reachable in msec */ 80*7c478bd9Sstevel@tonic-gate uint32_t nce_refcnt; /* nce active usage count */ 81*7c478bd9Sstevel@tonic-gate kmutex_t nce_lock; /* See comments on top for what */ 82*7c478bd9Sstevel@tonic-gate /* this field protects */ 83*7c478bd9Sstevel@tonic-gate int nce_unsolicit_count; /* Unsolicited Adv count */ 84*7c478bd9Sstevel@tonic-gate struct nce_s *nce_fastpath; /* for fastpath list */ 85*7c478bd9Sstevel@tonic-gate timeout_id_t nce_timeout_id; 86*7c478bd9Sstevel@tonic-gate #ifdef NCE_DEBUG 87*7c478bd9Sstevel@tonic-gate th_trace_t *nce_trace[IP_TR_HASH_MAX]; 88*7c478bd9Sstevel@tonic-gate boolean_t nce_trace_disable; /* True when alloc fails */ 89*7c478bd9Sstevel@tonic-gate #endif 90*7c478bd9Sstevel@tonic-gate } nce_t; 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate /* nce_flags */ 93*7c478bd9Sstevel@tonic-gate #define NCE_F_PERMANENT 0x1 94*7c478bd9Sstevel@tonic-gate #define NCE_F_MAPPING 0x2 95*7c478bd9Sstevel@tonic-gate #define NCE_F_ISROUTER 0x4 96*7c478bd9Sstevel@tonic-gate #define NCE_F_PROXY 0x8 97*7c478bd9Sstevel@tonic-gate #define NCE_F_NONUD 0x10 98*7c478bd9Sstevel@tonic-gate #define NCE_F_ANYCAST 0x20 99*7c478bd9Sstevel@tonic-gate #define NCE_F_CONDEMNED 0x40 100*7c478bd9Sstevel@tonic-gate #define NCE_F_UNSOL_ADV 0x80 101*7c478bd9Sstevel@tonic-gate 102*7c478bd9Sstevel@tonic-gate #define NCE_EXTERNAL_FLAGS_MASK \ 103*7c478bd9Sstevel@tonic-gate (NCE_F_PERMANENT | NCE_F_MAPPING | NCE_F_ISROUTER | NCE_F_NONUD | \ 104*7c478bd9Sstevel@tonic-gate NCE_F_ANYCAST | NCE_F_UNSOL_ADV) 105*7c478bd9Sstevel@tonic-gate 106*7c478bd9Sstevel@tonic-gate /* State REACHABLE, STALE, DELAY or PROBE */ 107*7c478bd9Sstevel@tonic-gate #define NCE_ISREACHABLE(nce) \ 108*7c478bd9Sstevel@tonic-gate (((((nce)->nce_state) >= ND_REACHABLE) && \ 109*7c478bd9Sstevel@tonic-gate ((nce)->nce_state) <= ND_PROBE)) 110*7c478bd9Sstevel@tonic-gate 111*7c478bd9Sstevel@tonic-gate /* NDP flags set in SOL/ADV requests */ 112*7c478bd9Sstevel@tonic-gate #define NDP_UNICAST 0x1 113*7c478bd9Sstevel@tonic-gate #define NDP_ISROUTER 0x2 114*7c478bd9Sstevel@tonic-gate #define NDP_SOLICITED 0x4 115*7c478bd9Sstevel@tonic-gate #define NDP_ORIDE 0x8 116*7c478bd9Sstevel@tonic-gate 117*7c478bd9Sstevel@tonic-gate /* Number of packets queued in NDP for a neighbor */ 118*7c478bd9Sstevel@tonic-gate #define ND_MAX_Q 4 119*7c478bd9Sstevel@tonic-gate 120*7c478bd9Sstevel@tonic-gate 121*7c478bd9Sstevel@tonic-gate #ifdef NCE_DEBUG 122*7c478bd9Sstevel@tonic-gate #define NCE_TRACE_REF(nce) nce_trace_ref(nce) 123*7c478bd9Sstevel@tonic-gate #define NCE_UNTRACE_REF(nce) nce_untrace_ref(nce) 124*7c478bd9Sstevel@tonic-gate #else 125*7c478bd9Sstevel@tonic-gate #define NCE_TRACE_REF(nce) 126*7c478bd9Sstevel@tonic-gate #define NCE_UNTRACE_REF(nce) 127*7c478bd9Sstevel@tonic-gate #endif 128*7c478bd9Sstevel@tonic-gate 129*7c478bd9Sstevel@tonic-gate #define NCE_REFHOLD(nce) { \ 130*7c478bd9Sstevel@tonic-gate mutex_enter(&(nce)->nce_lock); \ 131*7c478bd9Sstevel@tonic-gate (nce)->nce_refcnt++; \ 132*7c478bd9Sstevel@tonic-gate ASSERT((nce)->nce_refcnt != 0); \ 133*7c478bd9Sstevel@tonic-gate NCE_TRACE_REF(nce); \ 134*7c478bd9Sstevel@tonic-gate mutex_exit(&(nce)->nce_lock); \ 135*7c478bd9Sstevel@tonic-gate } 136*7c478bd9Sstevel@tonic-gate 137*7c478bd9Sstevel@tonic-gate #define NCE_REFHOLD_NOTR(nce) { \ 138*7c478bd9Sstevel@tonic-gate mutex_enter(&(nce)->nce_lock); \ 139*7c478bd9Sstevel@tonic-gate (nce)->nce_refcnt++; \ 140*7c478bd9Sstevel@tonic-gate ASSERT((nce)->nce_refcnt != 0); \ 141*7c478bd9Sstevel@tonic-gate mutex_exit(&(nce)->nce_lock); \ 142*7c478bd9Sstevel@tonic-gate } 143*7c478bd9Sstevel@tonic-gate 144*7c478bd9Sstevel@tonic-gate #define NCE_REFHOLD_LOCKED(nce) { \ 145*7c478bd9Sstevel@tonic-gate ASSERT(MUTEX_HELD(&(nce)->nce_lock)); \ 146*7c478bd9Sstevel@tonic-gate (nce)->nce_refcnt++; \ 147*7c478bd9Sstevel@tonic-gate NCE_TRACE_REF(nce); \ 148*7c478bd9Sstevel@tonic-gate } 149*7c478bd9Sstevel@tonic-gate 150*7c478bd9Sstevel@tonic-gate /* nce_inactive destroys the mutex thus no mutex_exit is needed */ 151*7c478bd9Sstevel@tonic-gate #define NCE_REFRELE(nce) { \ 152*7c478bd9Sstevel@tonic-gate mutex_enter(&(nce)->nce_lock); \ 153*7c478bd9Sstevel@tonic-gate NCE_UNTRACE_REF(nce); \ 154*7c478bd9Sstevel@tonic-gate ASSERT((nce)->nce_refcnt != 0); \ 155*7c478bd9Sstevel@tonic-gate if (--(nce)->nce_refcnt == 0) \ 156*7c478bd9Sstevel@tonic-gate ndp_inactive(nce); \ 157*7c478bd9Sstevel@tonic-gate else { \ 158*7c478bd9Sstevel@tonic-gate mutex_exit(&(nce)->nce_lock);\ 159*7c478bd9Sstevel@tonic-gate } \ 160*7c478bd9Sstevel@tonic-gate } 161*7c478bd9Sstevel@tonic-gate 162*7c478bd9Sstevel@tonic-gate #define NCE_REFRELE_NOTR(nce) { \ 163*7c478bd9Sstevel@tonic-gate mutex_enter(&(nce)->nce_lock); \ 164*7c478bd9Sstevel@tonic-gate ASSERT((nce)->nce_refcnt != 0); \ 165*7c478bd9Sstevel@tonic-gate if (--(nce)->nce_refcnt == 0) \ 166*7c478bd9Sstevel@tonic-gate ndp_inactive(nce); \ 167*7c478bd9Sstevel@tonic-gate else { \ 168*7c478bd9Sstevel@tonic-gate mutex_exit(&(nce)->nce_lock);\ 169*7c478bd9Sstevel@tonic-gate } \ 170*7c478bd9Sstevel@tonic-gate } 171*7c478bd9Sstevel@tonic-gate 172*7c478bd9Sstevel@tonic-gate #define NDP_RESTART_TIMER(nce, ms) { \ 173*7c478bd9Sstevel@tonic-gate ASSERT(!MUTEX_HELD(&(nce)->nce_lock)); \ 174*7c478bd9Sstevel@tonic-gate if ((nce)->nce_timeout_id != 0) { \ 175*7c478bd9Sstevel@tonic-gate /* Ok to untimeout bad id. we don't hold a lock. */ \ 176*7c478bd9Sstevel@tonic-gate (void) untimeout((nce)->nce_timeout_id); \ 177*7c478bd9Sstevel@tonic-gate } \ 178*7c478bd9Sstevel@tonic-gate mutex_enter(&(nce)->nce_lock); \ 179*7c478bd9Sstevel@tonic-gate /* Don't start the timer if the nce has been deleted */ \ 180*7c478bd9Sstevel@tonic-gate if (!((nce)->nce_flags & NCE_F_CONDEMNED)) \ 181*7c478bd9Sstevel@tonic-gate nce->nce_timeout_id = timeout(ndp_timer, nce, \ 182*7c478bd9Sstevel@tonic-gate MSEC_TO_TICK(ms) == 0 ? 1 : MSEC_TO_TICK(ms)); \ 183*7c478bd9Sstevel@tonic-gate mutex_exit(&(nce)->nce_lock); \ 184*7c478bd9Sstevel@tonic-gate } 185*7c478bd9Sstevel@tonic-gate 186*7c478bd9Sstevel@tonic-gate /* Structure for ndp_cache_count() */ 187*7c478bd9Sstevel@tonic-gate typedef struct { 188*7c478bd9Sstevel@tonic-gate int ncc_total; /* Total number of NCEs */ 189*7c478bd9Sstevel@tonic-gate int ncc_host; /* NCE entries without R bit set */ 190*7c478bd9Sstevel@tonic-gate } ncc_cache_count_t; 191*7c478bd9Sstevel@tonic-gate 192*7c478bd9Sstevel@tonic-gate /* 193*7c478bd9Sstevel@tonic-gate * Structure of ndp_cache_reclaim(). Each field is a fraction i.e. 1 means 194*7c478bd9Sstevel@tonic-gate * reclaim all, N means reclaim 1/Nth of all entries, 0 means reclaim none. 195*7c478bd9Sstevel@tonic-gate */ 196*7c478bd9Sstevel@tonic-gate typedef struct { 197*7c478bd9Sstevel@tonic-gate int ncr_host; /* Fraction for host entries */ 198*7c478bd9Sstevel@tonic-gate } nce_cache_reclaim_t; 199*7c478bd9Sstevel@tonic-gate 200*7c478bd9Sstevel@tonic-gate /* When SAP is greater than zero address appears before SAP */ 201*7c478bd9Sstevel@tonic-gate #define NCE_LL_ADDR_OFFSET(ill) (((ill)->ill_sap_length) < 0 ? \ 202*7c478bd9Sstevel@tonic-gate (sizeof (dl_unitdata_req_t)) : \ 203*7c478bd9Sstevel@tonic-gate ((sizeof (dl_unitdata_req_t)) + (ABS((ill)->ill_sap_length)))) 204*7c478bd9Sstevel@tonic-gate 205*7c478bd9Sstevel@tonic-gate #define NCE_LL_SAP_OFFSET(ill) (((ill)->ill_sap_length) < 0 ? \ 206*7c478bd9Sstevel@tonic-gate ((sizeof (dl_unitdata_req_t)) + ((ill)->ill_phys_addr_length)) : \ 207*7c478bd9Sstevel@tonic-gate (sizeof (dl_unitdata_req_t))) 208*7c478bd9Sstevel@tonic-gate 209*7c478bd9Sstevel@tonic-gate #ifdef _BIG_ENDIAN 210*7c478bd9Sstevel@tonic-gate #define NCE_LL_SAP_COPY(ill, mp) \ 211*7c478bd9Sstevel@tonic-gate { \ 212*7c478bd9Sstevel@tonic-gate size_t abs_sap_len = ABS((ill)->ill_sap_length); \ 213*7c478bd9Sstevel@tonic-gate if (abs_sap_len > 0) { \ 214*7c478bd9Sstevel@tonic-gate ASSERT(abs_sap_len <= sizeof (uint32_t)); \ 215*7c478bd9Sstevel@tonic-gate ASSERT((mp)->b_rptr + NCE_LL_SAP_OFFSET(ill) + \ 216*7c478bd9Sstevel@tonic-gate abs_sap_len <= ((mp)->b_wptr)); \ 217*7c478bd9Sstevel@tonic-gate bcopy((uint8_t *)&(ill)->ill_sap + sizeof (ill->ill_sap) - \ 218*7c478bd9Sstevel@tonic-gate abs_sap_len, \ 219*7c478bd9Sstevel@tonic-gate ((mp)->b_rptr + NCE_LL_SAP_OFFSET(ill)), \ 220*7c478bd9Sstevel@tonic-gate abs_sap_len); \ 221*7c478bd9Sstevel@tonic-gate } \ 222*7c478bd9Sstevel@tonic-gate } 223*7c478bd9Sstevel@tonic-gate #else 224*7c478bd9Sstevel@tonic-gate #define NCE_LL_SAP_COPY(ill, mp) \ 225*7c478bd9Sstevel@tonic-gate { \ 226*7c478bd9Sstevel@tonic-gate size_t abs_sap_len = ABS((ill)->ill_sap_length); \ 227*7c478bd9Sstevel@tonic-gate if (abs_sap_len > 0) { \ 228*7c478bd9Sstevel@tonic-gate uint32_t abs_sap_len = ABS((ill)->ill_sap_length); \ 229*7c478bd9Sstevel@tonic-gate ASSERT(abs_sap_len <= sizeof (uint32_t)); \ 230*7c478bd9Sstevel@tonic-gate ASSERT((mp)->b_rptr + NCE_LL_SAP_OFFSET(ill) + \ 231*7c478bd9Sstevel@tonic-gate abs_sap_len <= ((mp)->b_wptr)); \ 232*7c478bd9Sstevel@tonic-gate bcopy(&((ill)->ill_sap), \ 233*7c478bd9Sstevel@tonic-gate ((mp)->b_rptr + NCE_LL_SAP_OFFSET(ill)), \ 234*7c478bd9Sstevel@tonic-gate abs_sap_len); \ 235*7c478bd9Sstevel@tonic-gate } \ 236*7c478bd9Sstevel@tonic-gate } 237*7c478bd9Sstevel@tonic-gate #endif 238*7c478bd9Sstevel@tonic-gate 239*7c478bd9Sstevel@tonic-gate /* 240*7c478bd9Sstevel@tonic-gate * Exclusive-or the 6 bytes that are likely to contain the MAC 241*7c478bd9Sstevel@tonic-gate * address. Assumes table_size does not exceed 256. 242*7c478bd9Sstevel@tonic-gate * Assumes EUI-64 format for good hashing. 243*7c478bd9Sstevel@tonic-gate */ 244*7c478bd9Sstevel@tonic-gate #define NCE_ADDR_HASH_V6(addr, table_size) \ 245*7c478bd9Sstevel@tonic-gate (((addr).s6_addr8[8] ^ (addr).s6_addr8[9] ^ \ 246*7c478bd9Sstevel@tonic-gate (addr).s6_addr8[10] ^ (addr).s6_addr8[13] ^ \ 247*7c478bd9Sstevel@tonic-gate (addr).s6_addr8[14] ^ (addr).s6_addr8[15]) % (table_size)) 248*7c478bd9Sstevel@tonic-gate 249*7c478bd9Sstevel@tonic-gate extern void ndp_cache_count(nce_t *, char *); 250*7c478bd9Sstevel@tonic-gate extern void ndp_cache_reclaim(nce_t *, char *); 251*7c478bd9Sstevel@tonic-gate extern void ndp_delete(nce_t *); 252*7c478bd9Sstevel@tonic-gate extern void ndp_delete_per_ill(nce_t *, uchar_t *); 253*7c478bd9Sstevel@tonic-gate extern void ndp_fastpath_flush(nce_t *, char *); 254*7c478bd9Sstevel@tonic-gate extern boolean_t ndp_fastpath_update(nce_t *, void *); 255*7c478bd9Sstevel@tonic-gate extern nd_opt_hdr_t *ndp_get_option(nd_opt_hdr_t *, int, int); 256*7c478bd9Sstevel@tonic-gate extern void ndp_inactive(nce_t *); 257*7c478bd9Sstevel@tonic-gate extern void ndp_input(ill_t *, mblk_t *); 258*7c478bd9Sstevel@tonic-gate extern nce_t *ndp_lookup(ill_t *, const in6_addr_t *, boolean_t); 259*7c478bd9Sstevel@tonic-gate extern int ndp_lookup_then_add(ill_t *, uchar_t *, const in6_addr_t *, 260*7c478bd9Sstevel@tonic-gate const in6_addr_t *, const in6_addr_t *, uint32_t, uint16_t, 261*7c478bd9Sstevel@tonic-gate uint16_t, nce_t **); 262*7c478bd9Sstevel@tonic-gate extern int ndp_mcastreq(ill_t *, const in6_addr_t *, uint32_t, uint32_t, 263*7c478bd9Sstevel@tonic-gate mblk_t *); 264*7c478bd9Sstevel@tonic-gate extern int ndp_noresolver(ill_t *, const in6_addr_t *); 265*7c478bd9Sstevel@tonic-gate extern void ndp_process(nce_t *, uchar_t *, uint32_t, boolean_t); 266*7c478bd9Sstevel@tonic-gate extern int ndp_query(ill_t *, lif_nd_req_t *); 267*7c478bd9Sstevel@tonic-gate extern int ndp_report(queue_t *, mblk_t *, caddr_t, cred_t *); 268*7c478bd9Sstevel@tonic-gate extern int ndp_resolver(ill_t *, const in6_addr_t *, mblk_t *, zoneid_t); 269*7c478bd9Sstevel@tonic-gate extern int ndp_sioc_update(ill_t *, lif_nd_req_t *); 270*7c478bd9Sstevel@tonic-gate extern boolean_t ndp_verify_optlen(nd_opt_hdr_t *, int); 271*7c478bd9Sstevel@tonic-gate extern void ndp_timer(void *); 272*7c478bd9Sstevel@tonic-gate extern void ndp_walk(ill_t *, pfi_t, uchar_t *); 273*7c478bd9Sstevel@tonic-gate extern void ndp_walk_impl(ill_t *, pfi_t, uchar_t *, boolean_t); 274*7c478bd9Sstevel@tonic-gate extern int ndp_add(ill_t *, uchar_t *, const in6_addr_t *, 275*7c478bd9Sstevel@tonic-gate const in6_addr_t *, const in6_addr_t *, 276*7c478bd9Sstevel@tonic-gate uint32_t, uint16_t, uint16_t, nce_t **); 277*7c478bd9Sstevel@tonic-gate extern void nce_resolv_failed(nce_t *); 278*7c478bd9Sstevel@tonic-gate extern void nce_fastpath_list_add(nce_t *); 279*7c478bd9Sstevel@tonic-gate extern void nce_fastpath_list_delete(nce_t *); 280*7c478bd9Sstevel@tonic-gate extern void nce_fastpath_list_dispatch(ill_t *, 281*7c478bd9Sstevel@tonic-gate boolean_t (*)(nce_t *, void *), void *); 282*7c478bd9Sstevel@tonic-gate #ifdef NCE_DEBUG 283*7c478bd9Sstevel@tonic-gate extern void nce_trace_inactive(nce_t *); 284*7c478bd9Sstevel@tonic-gate extern void nce_trace_ref(nce_t *); 285*7c478bd9Sstevel@tonic-gate extern void nce_untrace_ref(nce_t *); 286*7c478bd9Sstevel@tonic-gate extern int nce_thread_exit(nce_t *, caddr_t); 287*7c478bd9Sstevel@tonic-gate #endif 288*7c478bd9Sstevel@tonic-gate 289*7c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 290*7c478bd9Sstevel@tonic-gate 291*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 292*7c478bd9Sstevel@tonic-gate } 293*7c478bd9Sstevel@tonic-gate #endif 294*7c478bd9Sstevel@tonic-gate 295*7c478bd9Sstevel@tonic-gate #endif /* _INET_IP_NDP_H */ 296