Print this page
5042 stop using deprecated atomic functions


  44 } ipsecespparam_t;
  45 
  46 /*
  47  * IPSECESP stack instances
  48  */
  49 struct ipsecesp_stack {
  50         netstack_t              *ipsecesp_netstack;     /* Common netstack */
  51 
  52         caddr_t                 ipsecesp_g_nd;
  53         struct ipsecespparam_s  *ipsecesp_params;
  54         kmutex_t                ipsecesp_param_lock;    /* Protects params */
  55 
  56         /* Packet dropper for ESP drops. */
  57         ipdropper_t             esp_dropper;
  58 
  59         kstat_t                 *esp_ksp;
  60         struct esp_kstats_s     *esp_kstats;
  61 
  62         /*
  63          * Keysock instance of ESP.  There can be only one per stack instance.
  64          * Use casptr() on this because I don't set it until KEYSOCK_HELLO
  65          * comes down.
  66          * Paired up with the esp_pfkey_q is the esp_event, which will age SAs.
  67          */
  68         queue_t                 *esp_pfkey_q;
  69         timeout_id_t            esp_event;
  70 
  71         sadbp_t                 esp_sadb;
  72 };
  73 typedef struct ipsecesp_stack ipsecesp_stack_t;
  74 
  75 /* Define *this* NDD variable here because we use it outside ESP proper. */
  76 #define ipsecesp_nat_keepalive_interval \
  77         ipsecesp_params[14].ipsecesp_param_value
  78 
  79 #endif  /* _KERNEL */
  80 
  81 /*
  82  * For now, only provide "aligned" version of header.
  83  * If aligned version is needed, we'll go with the naming conventions then.
  84  */
  85 


  44 } ipsecespparam_t;
  45 
  46 /*
  47  * IPSECESP stack instances
  48  */
  49 struct ipsecesp_stack {
  50         netstack_t              *ipsecesp_netstack;     /* Common netstack */
  51 
  52         caddr_t                 ipsecesp_g_nd;
  53         struct ipsecespparam_s  *ipsecesp_params;
  54         kmutex_t                ipsecesp_param_lock;    /* Protects params */
  55 
  56         /* Packet dropper for ESP drops. */
  57         ipdropper_t             esp_dropper;
  58 
  59         kstat_t                 *esp_ksp;
  60         struct esp_kstats_s     *esp_kstats;
  61 
  62         /*
  63          * Keysock instance of ESP.  There can be only one per stack instance.
  64          * Use atomic_cas_ptr() on this because I don't set it until
  65          * KEYSOCK_HELLO comes down.
  66          * Paired up with the esp_pfkey_q is the esp_event, which will age SAs.
  67          */
  68         queue_t                 *esp_pfkey_q;
  69         timeout_id_t            esp_event;
  70 
  71         sadbp_t                 esp_sadb;
  72 };
  73 typedef struct ipsecesp_stack ipsecesp_stack_t;
  74 
  75 /* Define *this* NDD variable here because we use it outside ESP proper. */
  76 #define ipsecesp_nat_keepalive_interval \
  77         ipsecesp_params[14].ipsecesp_param_value
  78 
  79 #endif  /* _KERNEL */
  80 
  81 /*
  82  * For now, only provide "aligned" version of header.
  83  * If aligned version is needed, we'll go with the naming conventions then.
  84  */
  85