Print this page
5042 stop using deprecated atomic functions
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/inet/ipsecesp.h
+++ new/usr/src/uts/common/inet/ipsecesp.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /*
22 22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 * Use is subject to license terms.
24 24 */
25 25
26 26 #ifndef _INET_IPSECESP_H
27 27 #define _INET_IPSECESP_H
28 28
29 29 #include <inet/ip.h>
30 30 #include <inet/ipdrop.h>
31 31
32 32 #ifdef __cplusplus
33 33 extern "C" {
34 34 #endif
35 35
36 36 #ifdef _KERNEL
37 37
38 38 /* Named Dispatch Parameter Management Structure */
39 39 typedef struct ipsecespparam_s {
40 40 uint_t ipsecesp_param_min;
41 41 uint_t ipsecesp_param_max;
42 42 uint_t ipsecesp_param_value;
43 43 char *ipsecesp_param_name;
44 44 } ipsecespparam_t;
45 45
46 46 /*
47 47 * IPSECESP stack instances
48 48 */
49 49 struct ipsecesp_stack {
50 50 netstack_t *ipsecesp_netstack; /* Common netstack */
51 51
52 52 caddr_t ipsecesp_g_nd;
53 53 struct ipsecespparam_s *ipsecesp_params;
↓ open down ↓ |
53 lines elided |
↑ open up ↑ |
54 54 kmutex_t ipsecesp_param_lock; /* Protects params */
55 55
56 56 /* Packet dropper for ESP drops. */
57 57 ipdropper_t esp_dropper;
58 58
59 59 kstat_t *esp_ksp;
60 60 struct esp_kstats_s *esp_kstats;
61 61
62 62 /*
63 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.
64 + * Use atomic_cas_ptr() on this because I don't set it until
65 + * KEYSOCK_HELLO comes down.
66 66 * Paired up with the esp_pfkey_q is the esp_event, which will age SAs.
67 67 */
68 68 queue_t *esp_pfkey_q;
69 69 timeout_id_t esp_event;
70 70
71 71 sadbp_t esp_sadb;
72 72 };
73 73 typedef struct ipsecesp_stack ipsecesp_stack_t;
74 74
75 75 /* Define *this* NDD variable here because we use it outside ESP proper. */
76 76 #define ipsecesp_nat_keepalive_interval \
77 77 ipsecesp_params[14].ipsecesp_param_value
78 78
79 79 #endif /* _KERNEL */
80 80
81 81 /*
82 82 * For now, only provide "aligned" version of header.
83 83 * If aligned version is needed, we'll go with the naming conventions then.
84 84 */
85 85
86 86 typedef struct esph {
87 87 uint32_t esph_spi;
88 88 uint32_t esph_replay;
89 89 } esph_t;
90 90
91 91 /* No need for "old" ESP, just point a uint32_t *. */
92 92
93 93 #ifdef __cplusplus
94 94 }
95 95 #endif
96 96
97 97 #endif /* _INET_IPSECESP_H */
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX