3 * $Id: packet-mip6.h,v 1.3 2003/07/11 21:03:13 guy Exp $
5 * Definitions for Mobile IPv6 dissection (draft-ietf-mobileip-ipv6-20.txt)
6 * Copyright 2003 Oy L M Ericsson Ab <teemu.rinta-aho@ericsson.fi>
8 * Ethereal - Network traffic analyzer
9 * By Gerald Combs <gerald@ethereal.com>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #ifndef __PACKET_MIP6_H_DEFINED__
28 #define __PACKET_MIP6_H_DEFINED__
30 /* Mobility Header types */
42 static const value_string mip6_mh_types[] = {
43 {BRR, "Binding Refresh Request"},
44 {HOTI, "Home Test Init"},
45 {COTI, "Care-of Test Init"},
47 {COT, "Care-of Test"},
48 {BU, "Binding Update"},
49 {BA, "Binding Acknowledgement"},
50 {BE, "Binding Error"},
54 /* Mobility Option types */
64 /* Binding Update flag description */
65 static const true_false_string mip6_bu_a_flag_value = {
66 "Binding Acknowledgement requested",
67 "Binding Acknowledgement not requested"
70 static const true_false_string mip6_bu_h_flag_value = {
72 "No Home Registration"
75 static const true_false_string mip6_bu_l_flag_value = {
76 "Link-Local Address Compatibility",
77 "No Link-Local Address Compatibility"
80 static const true_false_string mip6_bu_k_flag_value = {
81 "Key Management Mobility Compatibility",
82 "No Key Management Mobility Compatibility"
85 /* Binding Acknowledgement status values */
86 static const value_string mip6_ba_status_value[] = {
87 { 0, "Binding Update accepted" },
88 { 128, "Reason unspecified" },
89 { 129, "Adminstratively prohibited" },
90 { 130, "Insufficient resources" },
91 { 131, "Home registration not supported" },
92 { 132, "Not home subnet" },
93 { 133, "Not home agent for this mobile node" },
94 { 134, "Duplicate address detection failed" },
95 { 135, "Sequence number out of window" },
96 { 136, "Expired home nonce index" },
97 { 137, "Expired care-of nonce index" },
98 { 138, "Expired nonces" },
102 /* Binding Error status values */
103 static const value_string mip6_be_status_value[] = {
104 { 1, "Unknown binding for Home Address destination option" },
105 { 2, "Unrecognized MH type value" },
109 /* Message lengths */
110 #define MIP6_BRR_LEN 2
111 #define MIP6_HOTI_LEN 10
112 #define MIP6_COTI_LEN 10
113 #define MIP6_HOT_LEN 18
114 #define MIP6_COT_LEN 18
115 #define MIP6_BU_LEN 6
116 #define MIP6_BA_LEN 6
117 #define MIP6_BE_LEN 18
119 /* Field offsets & lengths for mobility headers */
120 #define MIP6_PROTO_OFF 0
121 #define MIP6_HLEN_OFF 1
122 #define MIP6_TYPE_OFF 2
123 #define MIP6_RES_OFF 3
124 #define MIP6_CSUM_OFF 4
125 #define MIP6_DATA_OFF 6
126 #define MIP6_PROTO_LEN 1
127 #define MIP6_HLEN_LEN 1
128 #define MIP6_TYPE_LEN 1
129 #define MIP6_RES_LEN 1
130 #define MIP6_CSUM_LEN 2
132 #define MIP6_BRR_RES_OFF 6
133 #define MIP6_BRR_OPTS_OFF 8
134 #define MIP6_BRR_RES_LEN 2
136 #define MIP6_HOTI_RES_OFF 6
137 #define MIP6_HOTI_COOKIE_OFF 8
138 #define MIP6_HOTI_OPTS_OFF 16
139 #define MIP6_HOTI_RES_LEN 2
140 #define MIP6_HOTI_COOKIE_LEN 8
142 #define MIP6_COTI_RES_OFF 6
143 #define MIP6_COTI_COOKIE_OFF 8
144 #define MIP6_COTI_OPTS_OFF 16
145 #define MIP6_COTI_RES_LEN 2
146 #define MIP6_COTI_COOKIE_LEN 8
148 #define MIP6_HOT_INDEX_OFF 6
149 #define MIP6_HOT_COOKIE_OFF 8
150 #define MIP6_HOT_TOKEN_OFF 16
151 #define MIP6_HOT_OPTS_OFF 24
152 #define MIP6_HOT_INDEX_LEN 2
153 #define MIP6_HOT_COOKIE_LEN 8
154 #define MIP6_HOT_TOKEN_LEN 8
156 #define MIP6_COT_INDEX_OFF 6
157 #define MIP6_COT_COOKIE_OFF 8
158 #define MIP6_COT_TOKEN_OFF 16
159 #define MIP6_COT_OPTS_OFF 24
160 #define MIP6_COT_INDEX_LEN 2
161 #define MIP6_COT_COOKIE_LEN 8
162 #define MIP6_COT_TOKEN_LEN 8
164 #define MIP6_BU_SEQNR_OFF 6
165 #define MIP6_BU_FLAGS_OFF 8
166 #define MIP6_BU_RES_OFF 9
167 #define MIP6_BU_LIFETIME_OFF 10
168 #define MIP6_BU_OPTS_OFF 12
169 #define MIP6_BU_SEQNR_LEN 2
170 #define MIP6_BU_FLAGS_LEN 1
171 #define MIP6_BU_RES_LEN 1
172 #define MIP6_BU_LIFETIME_LEN 2
174 #define MIP6_BA_STATUS_OFF 6
175 #define MIP6_BA_FLAGS_OFF 7
176 #define MIP6_BA_SEQNR_OFF 8
177 #define MIP6_BA_LIFETIME_OFF 10
178 #define MIP6_BA_OPTS_OFF 12
179 #define MIP6_BA_STATUS_LEN 1
180 #define MIP6_BA_FLAGS_LEN 1
181 #define MIP6_BA_SEQNR_LEN 2
182 #define MIP6_BA_LIFETIME_LEN 2
184 #define MIP6_BE_STATUS_OFF 6
185 #define MIP6_BE_RES_OFF 7
186 #define MIP6_BE_HOA_OFF 8
187 #define MIP6_BE_OPTS_OFF 24
188 #define MIP6_BE_STATUS_LEN 1
189 #define MIP6_BE_RES_LEN 1
190 #define MIP6_BE_HOA_LEN 16
192 /* Field offsets & field and option lengths for mobility options */
193 #define MIP6_BRA_LEN 2
194 #define MIP6_BRA_RI_OFF 2
195 #define MIP6_BRA_RI_LEN 2
197 #define MIP6_ACOA_LEN 16
198 #define MIP6_ACOA_ACOA_OFF 2
199 #define MIP6_ACOA_ACOA_LEN 16
201 #define MIP6_NI_LEN 4
202 #define MIP6_NI_HNI_OFF 2
203 #define MIP6_NI_CNI_OFF 4
204 #define MIP6_NI_HNI_LEN 2
205 #define MIP6_NI_CNI_LEN 2
207 #define MIP6_BAD_AUTH_OFF 2
209 #endif /* __PACKET_MIP6_H_DEFINED__ */