Print this page
5042 stop using deprecated atomic functions


  88 /*
  89  * IPSECAH stack instances
  90  */
  91 struct ipsecah_stack {
  92         netstack_t              *ipsecah_netstack;      /* Common netstack */
  93 
  94         caddr_t                 ipsecah_g_nd;
  95         ipsecahparam_t          *ipsecah_params;
  96         kmutex_t                ipsecah_param_lock;     /* Protects params */
  97 
  98         sadbp_t                 ah_sadb;
  99 
 100         /* Packet dropper for AH drops. */
 101         ipdropper_t             ah_dropper;
 102 
 103         kstat_t                 *ah_ksp;
 104         ah_kstats_t             *ah_kstats;
 105 
 106         /*
 107          * Keysock instance of AH.  There can be only one per stack instance.
 108          * Use casptr() on this because I don't set it until KEYSOCK_HELLO
 109          * comes down.
 110          * Paired up with the ah_pfkey_q is the ah_event, which will age SAs.
 111          */
 112         queue_t                 *ah_pfkey_q;
 113         timeout_id_t            ah_event;
 114 };
 115 typedef struct ipsecah_stack ipsecah_stack_t;
 116 
 117 #endif  /* _KERNEL */
 118 
 119 /*
 120  * For now, only provide "aligned" version of header.
 121  * If aligned version is needed, we'll go with the naming conventions then.
 122  */
 123 
 124 typedef struct ah {
 125         uint8_t ah_nexthdr;
 126         uint8_t ah_length;
 127         uint16_t ah_reserved;
 128         uint32_t ah_spi;
 129         uint32_t ah_replay;




  88 /*
  89  * IPSECAH stack instances
  90  */
  91 struct ipsecah_stack {
  92         netstack_t              *ipsecah_netstack;      /* Common netstack */
  93 
  94         caddr_t                 ipsecah_g_nd;
  95         ipsecahparam_t          *ipsecah_params;
  96         kmutex_t                ipsecah_param_lock;     /* Protects params */
  97 
  98         sadbp_t                 ah_sadb;
  99 
 100         /* Packet dropper for AH drops. */
 101         ipdropper_t             ah_dropper;
 102 
 103         kstat_t                 *ah_ksp;
 104         ah_kstats_t             *ah_kstats;
 105 
 106         /*
 107          * Keysock instance of AH.  There can be only one per stack instance.
 108          * Use atomic_cas_ptr() on this because I don't set it until
 109          * KEYSOCK_HELLO comes down.
 110          * Paired up with the ah_pfkey_q is the ah_event, which will age SAs.
 111          */
 112         queue_t                 *ah_pfkey_q;
 113         timeout_id_t            ah_event;
 114 };
 115 typedef struct ipsecah_stack ipsecah_stack_t;
 116 
 117 #endif  /* _KERNEL */
 118 
 119 /*
 120  * For now, only provide "aligned" version of header.
 121  * If aligned version is needed, we'll go with the naming conventions then.
 122  */
 123 
 124 typedef struct ah {
 125         uint8_t ah_nexthdr;
 126         uint8_t ah_length;
 127         uint16_t ah_reserved;
 128         uint32_t ah_spi;
 129         uint32_t ah_replay;