Explicitly request literal mode after .Xr.
[netbsd-mini2440.git] / dist / tcpdump / ipsec_doi.h
blobfd56bcf58ab12fb864e87593a75af75b7895a166
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the project nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
31 /* YIPS @(#)Id: ipsec_doi.h,v 1.7 2002/12/11 07:13:53 guy Exp */
33 /* refer to RFC 2407 */
35 #if !defined(_IPSEC_DOI_H_)
36 #define _IPSEC_DOI_H_
38 #define IPSEC_DOI 1
40 /* 4.2 IPSEC Situation Definition */
41 #define IPSECDOI_SIT_IDENTITY_ONLY 0x00000001
42 #define IPSECDOI_SIT_SECRECY 0x00000002
43 #define IPSECDOI_SIT_INTEGRITY 0x00000004
45 /* 4.4.1 IPSEC Security Protocol Identifiers */
46 /* 4.4.2 IPSEC ISAKMP Transform Values */
47 #define IPSECDOI_PROTO_ISAKMP 1
48 #define IPSECDOI_KEY_IKE 1
50 /* 4.4.1 IPSEC Security Protocol Identifiers */
51 #define IPSECDOI_PROTO_IPSEC_AH 2
52 /* 4.4.3 IPSEC AH Transform Values */
53 #define IPSECDOI_AH_MD5 2
54 #define IPSECDOI_AH_SHA 3
55 #define IPSECDOI_AH_DES 4
56 #define IPSECDOI_AH_SHA2_256 5
57 #define IPSECDOI_AH_SHA2_384 6
58 #define IPSECDOI_AH_SHA2_512 7
60 /* 4.4.1 IPSEC Security Protocol Identifiers */
61 #define IPSECDOI_PROTO_IPSEC_ESP 3
62 /* 4.4.4 IPSEC ESP Transform Identifiers */
63 #define IPSECDOI_ESP_DES_IV64 1
64 #define IPSECDOI_ESP_DES 2
65 #define IPSECDOI_ESP_3DES 3
66 #define IPSECDOI_ESP_RC5 4
67 #define IPSECDOI_ESP_IDEA 5
68 #define IPSECDOI_ESP_CAST 6
69 #define IPSECDOI_ESP_BLOWFISH 7
70 #define IPSECDOI_ESP_3IDEA 8
71 #define IPSECDOI_ESP_DES_IV32 9
72 #define IPSECDOI_ESP_RC4 10
73 #define IPSECDOI_ESP_NULL 11
74 #define IPSECDOI_ESP_RIJNDAEL 12
75 #define IPSECDOI_ESP_AES 12
77 /* 4.4.1 IPSEC Security Protocol Identifiers */
78 #define IPSECDOI_PROTO_IPCOMP 4
79 /* 4.4.5 IPSEC IPCOMP Transform Identifiers */
80 #define IPSECDOI_IPCOMP_OUI 1
81 #define IPSECDOI_IPCOMP_DEFLATE 2
82 #define IPSECDOI_IPCOMP_LZS 3
84 /* 4.5 IPSEC Security Association Attributes */
85 #define IPSECDOI_ATTR_SA_LTYPE 1 /* B */
86 #define IPSECDOI_ATTR_SA_LTYPE_DEFAULT 1
87 #define IPSECDOI_ATTR_SA_LTYPE_SEC 1
88 #define IPSECDOI_ATTR_SA_LTYPE_KB 2
89 #define IPSECDOI_ATTR_SA_LDUR 2 /* V */
90 #define IPSECDOI_ATTR_SA_LDUR_DEFAULT 28800 /* 8 hours */
91 #define IPSECDOI_ATTR_GRP_DESC 3 /* B */
92 #define IPSECDOI_ATTR_ENC_MODE 4 /* B */
93 /* default value: host dependent */
94 #define IPSECDOI_ATTR_ENC_MODE_TUNNEL 1
95 #define IPSECDOI_ATTR_ENC_MODE_TRNS 2
96 #define IPSECDOI_ATTR_AUTH 5 /* B */
97 /* 0 means not to use authentication. */
98 #define IPSECDOI_ATTR_AUTH_HMAC_MD5 1
99 #define IPSECDOI_ATTR_AUTH_HMAC_SHA1 2
100 #define IPSECDOI_ATTR_AUTH_DES_MAC 3
101 #define IPSECDOI_ATTR_AUTH_KPDK 4 /*RFC-1826(Key/Pad/Data/Key)*/
103 * When negotiating ESP without authentication, the Auth
104 * Algorithm attribute MUST NOT be included in the proposal.
105 * When negotiating ESP without confidentiality, the Auth
106 * Algorithm attribute MUST be included in the proposal and
107 * the ESP transform ID must be ESP_NULL.
109 #define IPSECDOI_ATTR_KEY_LENGTH 6 /* B */
110 #define IPSECDOI_ATTR_KEY_ROUNDS 7 /* B */
111 #define IPSECDOI_ATTR_COMP_DICT_SIZE 8 /* B */
112 #define IPSECDOI_ATTR_COMP_PRIVALG 9 /* V */
114 /* 4.6.1 Security Association Payload */
115 struct ipsecdoi_sa {
116 struct isakmp_gen h;
117 u_int32_t doi; /* Domain of Interpretation */
118 u_int32_t sit; /* Situation */
121 struct ipsecdoi_secrecy_h {
122 u_int16_t len;
123 u_int16_t reserved;
126 /* 4.6.2.1 Identification Type Values */
127 struct ipsecdoi_id {
128 struct isakmp_gen h;
129 u_int8_t type; /* ID Type */
130 u_int8_t proto_id; /* Protocol ID */
131 u_int16_t port; /* Port */
132 /* Identification Data */
135 #define IPSECDOI_ID_IPV4_ADDR 1
136 #define IPSECDOI_ID_FQDN 2
137 #define IPSECDOI_ID_USER_FQDN 3
138 #define IPSECDOI_ID_IPV4_ADDR_SUBNET 4
139 #define IPSECDOI_ID_IPV6_ADDR 5
140 #define IPSECDOI_ID_IPV6_ADDR_SUBNET 6
141 #define IPSECDOI_ID_IPV4_ADDR_RANGE 7
142 #define IPSECDOI_ID_IPV6_ADDR_RANGE 8
143 #define IPSECDOI_ID_DER_ASN1_DN 9
144 #define IPSECDOI_ID_DER_ASN1_GN 10
145 #define IPSECDOI_ID_KEY_ID 11
147 /* 4.6.3 IPSEC DOI Notify Message Types */
148 /* Notify Messages - Status Types */
149 #define IPSECDOI_NTYPE_RESPONDER_LIFETIME 24576
150 #define IPSECDOI_NTYPE_REPLAY_STATUS 24577
151 #define IPSECDOI_NTYPE_INITIAL_CONTACT 24578
153 #endif /* !defined(_IPSEC_DOI_H_) */