3 * $Id: packet-mip6.h,v 1.4 2003/12/16 19:31:40 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 { 1, "Accepted but prefix discovery necessary" },
89 { 128, "Reason unspecified" },
90 { 129, "Administratively prohibited" },
91 { 130, "Insufficient resources" },
92 { 131, "Home registration not supported" },
93 { 132, "Not home subnet" },
94 { 133, "Not home agent for this mobile node" },
95 { 134, "Duplicate Address Detection failed" },
96 { 135, "Sequence number out of window" },
97 { 136, "Expired home nonce index" },
98 { 137, "Expired care-of nonce index" },
99 { 138, "Expired nonces" },
100 { 139, "Registration type change disallowed" },
104 /* Binding Error status values */
105 static const value_string mip6_be_status_value[] = {
106 { 1, "Unknown binding for Home Address destination option" },
107 { 2, "Unrecognized MH type value" },
111 /* Message lengths */
112 #define MIP6_BRR_LEN 2
113 #define MIP6_HOTI_LEN 10
114 #define MIP6_COTI_LEN 10
115 #define MIP6_HOT_LEN 18
116 #define MIP6_COT_LEN 18
117 #define MIP6_BU_LEN 6
118 #define MIP6_BA_LEN 6
119 #define MIP6_BE_LEN 18
121 /* Field offsets & lengths for mobility headers */
122 #define MIP6_PROTO_OFF 0
123 #define MIP6_HLEN_OFF 1
124 #define MIP6_TYPE_OFF 2
125 #define MIP6_RES_OFF 3
126 #define MIP6_CSUM_OFF 4
127 #define MIP6_DATA_OFF 6
128 #define MIP6_PROTO_LEN 1
129 #define MIP6_HLEN_LEN 1
130 #define MIP6_TYPE_LEN 1
131 #define MIP6_RES_LEN 1
132 #define MIP6_CSUM_LEN 2
134 #define MIP6_BRR_RES_OFF 6
135 #define MIP6_BRR_OPTS_OFF 8
136 #define MIP6_BRR_RES_LEN 2
138 #define MIP6_HOTI_RES_OFF 6
139 #define MIP6_HOTI_COOKIE_OFF 8
140 #define MIP6_HOTI_OPTS_OFF 16
141 #define MIP6_HOTI_RES_LEN 2
142 #define MIP6_HOTI_COOKIE_LEN 8
144 #define MIP6_COTI_RES_OFF 6
145 #define MIP6_COTI_COOKIE_OFF 8
146 #define MIP6_COTI_OPTS_OFF 16
147 #define MIP6_COTI_RES_LEN 2
148 #define MIP6_COTI_COOKIE_LEN 8
150 #define MIP6_HOT_INDEX_OFF 6
151 #define MIP6_HOT_COOKIE_OFF 8
152 #define MIP6_HOT_TOKEN_OFF 16
153 #define MIP6_HOT_OPTS_OFF 24
154 #define MIP6_HOT_INDEX_LEN 2
155 #define MIP6_HOT_COOKIE_LEN 8
156 #define MIP6_HOT_TOKEN_LEN 8
158 #define MIP6_COT_INDEX_OFF 6
159 #define MIP6_COT_COOKIE_OFF 8
160 #define MIP6_COT_TOKEN_OFF 16
161 #define MIP6_COT_OPTS_OFF 24
162 #define MIP6_COT_INDEX_LEN 2
163 #define MIP6_COT_COOKIE_LEN 8
164 #define MIP6_COT_TOKEN_LEN 8
166 #define MIP6_BU_SEQNR_OFF 6
167 #define MIP6_BU_FLAGS_OFF 8
168 #define MIP6_BU_RES_OFF 9
169 #define MIP6_BU_LIFETIME_OFF 10
170 #define MIP6_BU_OPTS_OFF 12
171 #define MIP6_BU_SEQNR_LEN 2
172 #define MIP6_BU_FLAGS_LEN 1
173 #define MIP6_BU_RES_LEN 1
174 #define MIP6_BU_LIFETIME_LEN 2
176 #define MIP6_BA_STATUS_OFF 6
177 #define MIP6_BA_FLAGS_OFF 7
178 #define MIP6_BA_SEQNR_OFF 8
179 #define MIP6_BA_LIFETIME_OFF 10
180 #define MIP6_BA_OPTS_OFF 12
181 #define MIP6_BA_STATUS_LEN 1
182 #define MIP6_BA_FLAGS_LEN 1
183 #define MIP6_BA_SEQNR_LEN 2
184 #define MIP6_BA_LIFETIME_LEN 2
186 #define MIP6_BE_STATUS_OFF 6
187 #define MIP6_BE_RES_OFF 7
188 #define MIP6_BE_HOA_OFF 8
189 #define MIP6_BE_OPTS_OFF 24
190 #define MIP6_BE_STATUS_LEN 1
191 #define MIP6_BE_RES_LEN 1
192 #define MIP6_BE_HOA_LEN 16
194 /* Field offsets & field and option lengths for mobility options */
195 #define MIP6_BRA_LEN 2
196 #define MIP6_BRA_RI_OFF 2
197 #define MIP6_BRA_RI_LEN 2
199 #define MIP6_ACOA_LEN 16
200 #define MIP6_ACOA_ACOA_OFF 2
201 #define MIP6_ACOA_ACOA_LEN 16
203 #define MIP6_NI_LEN 4
204 #define MIP6_NI_HNI_OFF 2
205 #define MIP6_NI_CNI_OFF 4
206 #define MIP6_NI_HNI_LEN 2
207 #define MIP6_NI_CNI_LEN 2
209 #define MIP6_BAD_AUTH_OFF 2
211 #endif /* __PACKET_MIP6_H_DEFINED__ */