puname: do not support modifying arbitrary processes
[unleashed.git] / include / inet / ipsecesp.h
blob96e139add01bcd303907d93df0dfb89d9677cb62
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
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.
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]
19 * CDDL HEADER END
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _INET_IPSECESP_H
27 #define _INET_IPSECESP_H
29 #include <inet/ip.h>
30 #include <inet/ipdrop.h>
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 #ifdef _KERNEL
38 /* Named Dispatch Parameter Management Structure */
39 typedef struct ipsecespparam_s {
40 uint_t ipsecesp_param_min;
41 uint_t ipsecesp_param_max;
42 uint_t ipsecesp_param_value;
43 char *ipsecesp_param_name;
44 } ipsecespparam_t;
47 * IPSECESP stack instances
49 struct ipsecesp_stack {
50 netstack_t *ipsecesp_netstack; /* Common netstack */
52 caddr_t ipsecesp_g_nd;
53 struct ipsecespparam_s *ipsecesp_params;
54 kmutex_t ipsecesp_param_lock; /* Protects params */
56 /* Packet dropper for ESP drops. */
57 ipdropper_t esp_dropper;
59 kstat_t *esp_ksp;
60 struct esp_kstats_s *esp_kstats;
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.
68 queue_t *esp_pfkey_q;
69 timeout_id_t esp_event;
71 sadbp_t esp_sadb;
73 typedef struct ipsecesp_stack ipsecesp_stack_t;
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
79 #endif /* _KERNEL */
82 * For now, only provide "aligned" version of header.
83 * If aligned version is needed, we'll go with the naming conventions then.
86 typedef struct esph {
87 uint32_t esph_spi;
88 uint32_t esph_replay;
89 } esph_t;
91 /* No need for "old" ESP, just point a uint32_t *. */
93 #ifdef __cplusplus
95 #endif
97 #endif /* _INET_IPSECESP_H */