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]
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
30 #include <inet/ipdrop.h>
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
;
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
;
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.
69 timeout_id_t esp_event
;
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
82 * For now, only provide "aligned" version of header.
83 * If aligned version is needed, we'll go with the naming conventions then.
91 /* No need for "old" ESP, just point a uint32_t *. */
97 #endif /* _INET_IPSECESP_H */