Print this page
11378 ncec_last_time_defended needs to be clock_t
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by:


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 




  26 #ifndef _INET_IP_NDP_H
  27 #define _INET_IP_NDP_H
  28 
  29 #include <sys/mutex.h>
  30 #include <sys/stream.h>
  31 #include <netinet/in.h>
  32 #include <netinet/icmp6.h>
  33 #include <inet/ip.h>
  34 #include <inet/ip2mac.h>
  35 
  36 /*
  37  * Internal definitions for the kernel implementation of the IPv6
  38  * Neighbor Discovery Protocol (NDP) and Address Resolution Protocol (ARP).
  39  */
  40 
  41 #ifdef  __cplusplus
  42 extern "C" {
  43 #endif
  44 
  45 #ifdef _KERNEL


  66  */
  67 struct ncec_s {
  68         struct  ncec_s  *ncec_next;     /* Hash chain next pointer */
  69         struct  ncec_s  **ncec_ptpn;    /* Pointer to previous next */
  70         struct  ill_s   *ncec_ill;      /* Associated ill */
  71         uint16_t        ncec_flags;     /* See below */
  72         uint16_t        ncec_state;     /* See reachability states in if.h */
  73         int16_t         ncec_pcnt;      /* Probe counter */
  74         uint16_t        ncec_rcnt;      /* Retransmit counter */
  75         in6_addr_t      ncec_addr;      /* address of the nighbor */
  76         uchar_t         *ncec_lladdr;
  77         mblk_t          *ncec_qd_mp;    /* Head outgoing queued packets */
  78         uint64_t        ncec_last;      /* Time last reachable in msec */
  79         uint32_t        ncec_refcnt;    /* ncec active usage count */
  80         kmutex_t        ncec_lock;      /* See comments on top for what */
  81                                         /* this field protects */
  82         int             ncec_unsolicit_count; /* Unsolicited Adv count */
  83         timeout_id_t    ncec_timeout_id;
  84         uchar_t         ncec_ipversion; /* IPv4(ARP)/IPv6(NDP) version */
  85         uint_t          ncec_defense_count;     /* number of NDP conflicts */
  86         uint_t          ncec_last_time_defended; /* last time defended (secs) */
  87         uint64_t        ncec_init_time; /* time when it was set to ND_INITIAL */
  88         boolean_t       ncec_trace_disable;     /* True when alloc fails */
  89         /*
  90          * interval to keep track of DAD probes.
  91          */
  92         clock_t         ncec_xmit_interval;
  93         ip_stack_t      *ncec_ipst;     /* Does not have a netstack_hold */
  94         list_t          ncec_cb;        /* callbacks waiting for resolution */
  95         uint_t          ncec_cb_walker_cnt;
  96         uint_t          ncec_nprobes;
  97         uint_t          ncec_lladdr_length;
  98 };
  99 
 100 /*
 101  * The nce_t list hangs off the ill_s and tracks information that depends
 102  * on the underlying physical link. Thus when the ill goes down,
 103  * the nce_t list has to be flushed. This is  done as part of ill_delete()
 104  *
 105  * When the fastpath ack comes back in ill_fastpath_ack we call
 106  * nce_fastpath_update to update the nce_t. We never actually




   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 /*
  27  * Copyright 2019 Joyent, Inc.
  28  */
  29 
  30 #ifndef _INET_IP_NDP_H
  31 #define _INET_IP_NDP_H
  32 
  33 #include <sys/mutex.h>
  34 #include <sys/stream.h>
  35 #include <netinet/in.h>
  36 #include <netinet/icmp6.h>
  37 #include <inet/ip.h>
  38 #include <inet/ip2mac.h>
  39 
  40 /*
  41  * Internal definitions for the kernel implementation of the IPv6
  42  * Neighbor Discovery Protocol (NDP) and Address Resolution Protocol (ARP).
  43  */
  44 
  45 #ifdef  __cplusplus
  46 extern "C" {
  47 #endif
  48 
  49 #ifdef _KERNEL


  70  */
  71 struct ncec_s {
  72         struct  ncec_s  *ncec_next;     /* Hash chain next pointer */
  73         struct  ncec_s  **ncec_ptpn;    /* Pointer to previous next */
  74         struct  ill_s   *ncec_ill;      /* Associated ill */
  75         uint16_t        ncec_flags;     /* See below */
  76         uint16_t        ncec_state;     /* See reachability states in if.h */
  77         int16_t         ncec_pcnt;      /* Probe counter */
  78         uint16_t        ncec_rcnt;      /* Retransmit counter */
  79         in6_addr_t      ncec_addr;      /* address of the nighbor */
  80         uchar_t         *ncec_lladdr;
  81         mblk_t          *ncec_qd_mp;    /* Head outgoing queued packets */
  82         uint64_t        ncec_last;      /* Time last reachable in msec */
  83         uint32_t        ncec_refcnt;    /* ncec active usage count */
  84         kmutex_t        ncec_lock;      /* See comments on top for what */
  85                                         /* this field protects */
  86         int             ncec_unsolicit_count; /* Unsolicited Adv count */
  87         timeout_id_t    ncec_timeout_id;
  88         uchar_t         ncec_ipversion; /* IPv4(ARP)/IPv6(NDP) version */
  89         uint_t          ncec_defense_count;     /* number of NDP conflicts */
  90         clock_t         ncec_last_time_defended; /* defended last (ticks) */
  91         uint64_t        ncec_init_time; /* time when it was set to ND_INITIAL */
  92         boolean_t       ncec_trace_disable;     /* True when alloc fails */
  93         /*
  94          * interval to keep track of DAD probes.
  95          */
  96         clock_t         ncec_xmit_interval;
  97         ip_stack_t      *ncec_ipst;     /* Does not have a netstack_hold */
  98         list_t          ncec_cb;        /* callbacks waiting for resolution */
  99         uint_t          ncec_cb_walker_cnt;
 100         uint_t          ncec_nprobes;
 101         uint_t          ncec_lladdr_length;
 102 };
 103 
 104 /*
 105  * The nce_t list hangs off the ill_s and tracks information that depends
 106  * on the underlying physical link. Thus when the ill goes down,
 107  * the nce_t list has to be flushed. This is  done as part of ill_delete()
 108  *
 109  * When the fastpath ack comes back in ill_fastpath_ack we call
 110  * nce_fastpath_update to update the nce_t. We never actually