2000-05-27 13:53:26 +00:00
|
|
|
/* packet-mip.c
|
|
|
|
* Routines for Mobile IP dissection
|
2001-02-14 17:01:44 +00:00
|
|
|
* Copyright 2000, Stefan Raab <sraab@cisco.com>
|
2000-05-27 13:53:26 +00:00
|
|
|
*
|
2001-09-14 07:10:13 +00:00
|
|
|
* $Id: packet-mip.c,v 1.19 2001/09/14 07:10:05 guy Exp $
|
2000-05-27 13:53:26 +00:00
|
|
|
*
|
|
|
|
* Ethereal - Network traffic analyzer
|
2001-04-20 20:34:31 +00:00
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
2000-05-27 13:53:26 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
# include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
|
2000-08-11 13:37:21 +00:00
|
|
|
#include <string.h>
|
|
|
|
#include <glib.h>
|
2001-02-14 17:01:44 +00:00
|
|
|
#include <time.h>
|
2000-08-11 13:37:21 +00:00
|
|
|
|
2000-05-27 13:53:26 +00:00
|
|
|
#ifdef NEED_SNPRINTF_H
|
|
|
|
# include "snprintf.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "packet.h"
|
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
|
|
|
static int proto_mip = -1;
|
|
|
|
static int hf_mip_type = -1;
|
|
|
|
static int hf_mip_s = -1;
|
|
|
|
static int hf_mip_b = -1;
|
|
|
|
static int hf_mip_d = -1;
|
|
|
|
static int hf_mip_m = -1;
|
|
|
|
static int hf_mip_g = -1;
|
|
|
|
static int hf_mip_v = -1;
|
2001-02-27 00:27:27 +00:00
|
|
|
static int hf_mip_t = -1;
|
2000-05-27 13:53:26 +00:00
|
|
|
static int hf_mip_code = -1;
|
|
|
|
static int hf_mip_life = -1;
|
|
|
|
static int hf_mip_homeaddr = -1;
|
|
|
|
static int hf_mip_haaddr = -1;
|
|
|
|
static int hf_mip_coa = -1;
|
|
|
|
static int hf_mip_ident = -1;
|
2001-02-14 17:01:44 +00:00
|
|
|
static int hf_mip_ext_type = -1;
|
|
|
|
static int hf_mip_ext_len = -1;
|
|
|
|
static int hf_mip_aext_spi = -1;
|
|
|
|
static int hf_mip_aext_auth = -1;
|
|
|
|
static int hf_mip_next_nai = -1;
|
2000-05-27 13:53:26 +00:00
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
static gint ett_mip = -1;
|
2001-02-14 17:01:44 +00:00
|
|
|
static gint ett_mip_ext = -1;
|
2000-05-27 13:53:26 +00:00
|
|
|
|
|
|
|
/* Port used for Mobile IP */
|
|
|
|
#define UDP_PORT_MIP 434
|
2001-02-14 17:01:44 +00:00
|
|
|
#define NTP_BASETIME 2208988800ul
|
2000-05-27 13:53:26 +00:00
|
|
|
|
|
|
|
static const value_string mip_types[] = {
|
|
|
|
{1, "Registration Request"},
|
2001-01-03 16:41:08 +00:00
|
|
|
{3, "Registration Reply"},
|
|
|
|
{0, NULL},
|
2000-05-27 13:53:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string mip_reply_codes[]= {
|
2001-02-14 17:01:44 +00:00
|
|
|
{0, "Reg Accepted"},
|
|
|
|
{1, "Reg Accepted, but Simultaneous Bindings Unsupported."},
|
|
|
|
{64, "Reg Deny (FA)- Unspecified Reason"},
|
|
|
|
{65, "Reg Deny (FA)- Administratively Prohibited"},
|
|
|
|
{66, "Reg Deny (FA)- Insufficient Resources"},
|
|
|
|
{67, "Reg Deny (FA)- MN failed Authentication"},
|
|
|
|
{68, "Reg Deny (FA)- HA failed Authentication"},
|
|
|
|
{69, "Reg Deny (FA)- Requested Lifetime too Long"},
|
|
|
|
{70, "Reg Deny (FA)- Poorly Formed Request"},
|
|
|
|
{71, "Reg Deny (FA)- Poorly Formed Reply"},
|
|
|
|
{72, "Reg Deny (FA)- Requested Encapsulation Unavailable"},
|
|
|
|
{73, "Reg Deny (FA)- VJ Compression Unavailable"},
|
2001-02-27 00:27:27 +00:00
|
|
|
{74, "Reg Deny (FA)- Requested Reverse Tunnel Unavailable"},
|
|
|
|
{75, "Reg Deny (FA)- Reverse Tunnel is Mandatory and 'T' Bit Not Set"},
|
|
|
|
{76, "Reg Deny (FA)- Mobile Node Too Distant"},
|
|
|
|
{79, "Reg Deny (FA)- Delivery Style Not Supported"},
|
2001-02-14 17:01:44 +00:00
|
|
|
{80, "Reg Deny (FA)- Home Network Unreachable"},
|
|
|
|
{81, "Reg Deny (FA)- HA Host Unreachable"},
|
|
|
|
{82, "Reg Deny (FA)- HA Port Unreachable"},
|
|
|
|
{88, "Reg Deny (FA)- HA Unreachable"},
|
|
|
|
{96, "Reg Deny (FA)(NAI) - Non Zero Home Address Required"},
|
|
|
|
{97, "Reg Deny (FA)(NAI) - Missing NAI"},
|
|
|
|
{98, "Reg Deny (FA)(NAI) - Missing Home Agent"},
|
|
|
|
{99, "Reg Deny (FA)(NAI) - Missing Home Address"},
|
|
|
|
{128, "Reg Deny (HA)- Unspecified"},
|
|
|
|
{129, "Reg Deny (HA)- Administratively Prohibited"},
|
|
|
|
{130, "Reg Deny (HA)- Insufficient Resources"},
|
|
|
|
{131, "Reg Deny (HA)- MN Failed Authentication"},
|
|
|
|
{132, "Reg Deny (HA)- FA Failed Authentication"},
|
|
|
|
{133, "Reg Deny (HA)- Registration ID Mismatch"},
|
|
|
|
{134, "Reg Deny (HA)- Poorly Formed Request"},
|
|
|
|
{135, "Reg Deny (HA)- Too Many Simultaneous Bindings"},
|
|
|
|
{136, "Reg Deny (HA)- Unknown HA Address"},
|
2001-02-27 00:27:27 +00:00
|
|
|
{137, "Reg Deny (HA)- Requested Reverse Tunnel Unavailable"},
|
|
|
|
{138, "Reg Deny (HA)- Reverse Tunnel is Mandatory and 'T' Bit Not Set"},
|
|
|
|
{139, "Reg Deny (HA)- Requested Encapsulation Unavailable"},
|
2001-02-14 17:01:44 +00:00
|
|
|
{0, NULL},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string mip_ext_types[]= {
|
|
|
|
{32, "Mobile-Home Authentication Extension"},
|
|
|
|
{33, "Mobile-Foreign Authentication Extension"},
|
|
|
|
{34, "Foreign-Home Authentication Extension"},
|
|
|
|
{131, "Mobile Node NAI Extension"},
|
2001-01-03 16:41:08 +00:00
|
|
|
{0, NULL},
|
2000-05-27 13:53:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Code to actually dissect the packets */
|
|
|
|
static void
|
2001-02-14 17:01:44 +00:00
|
|
|
dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2000-05-27 13:53:26 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
/* Set up structures we will need to add the protocol subtree and manage it */
|
|
|
|
proto_item *ti;
|
2001-02-14 17:01:44 +00:00
|
|
|
proto_tree *mip_tree=NULL, *ext_tree=NULL;
|
2000-05-27 13:53:26 +00:00
|
|
|
guint8 type, code;
|
2001-09-14 07:10:13 +00:00
|
|
|
nstime_t ident_time;
|
|
|
|
int eoffset, elen;
|
2001-02-14 17:01:44 +00:00
|
|
|
|
2000-05-27 13:53:26 +00:00
|
|
|
/* Make entries in Protocol column and Info column on summary display */
|
|
|
|
|
2001-02-14 17:01:44 +00:00
|
|
|
if (check_col(pinfo->fd, COL_PROTOCOL))
|
|
|
|
col_set_str(pinfo->fd, COL_PROTOCOL, "MobileIP");
|
2001-02-14 20:03:05 +00:00
|
|
|
if (check_col(pinfo->fd, COL_INFO))
|
|
|
|
col_clear(pinfo->fd, COL_INFO);
|
2000-05-27 13:53:26 +00:00
|
|
|
|
|
|
|
type = tvb_get_guint8(tvb, 0);
|
|
|
|
|
|
|
|
if (type==1) {
|
|
|
|
|
Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements.
Move the setting of the Protocol column in various dissectors before
anything is fetched from the packet, and also clear the Info column at
that point in those and some other dissectors, so that if an exception
is thrown, the columns don't reflect the previous protocol.
"Tvbuffify" the Mobile IP dissector (it took old-style arguments, and
then converted them into tvbuff arguments, so there wasn't much to do,
other than to fix references to "fd" to refer to "pinfo->fd").
In the SCTP dissector, refer to the port type and source and destination
ports through "pinfo" rather than through the global "pi", as it's a
tvbuffified dissector.
In the SMTP and Time Protocol dissectors, use "pinfo->match_port" rather
than "TCP_PORT_SMTP" when checking whether the packet is a request or
reply, just in case somebody makes a non-standard port be dissected as
SMTP or Time. (Also, remove a bogus comment from the Time dissector; it
was probably cut-and-pasted from the TFTP dissector.)
svn path=/trunk/; revision=2938
2001-01-25 06:14:14 +00:00
|
|
|
if (check_col(pinfo->fd, COL_INFO))
|
2001-02-14 17:01:44 +00:00
|
|
|
col_add_fstr(pinfo->fd, COL_INFO, "Reg Request: HAddr=%s COA=%s",
|
|
|
|
ip_to_str(tvb_get_ptr(tvb, 4, 4)), ip_to_str(tvb_get_ptr(tvb,12,4)));
|
2000-05-27 13:53:26 +00:00
|
|
|
|
|
|
|
if (tree) {
|
2000-05-31 05:09:07 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_mip, tvb, 0, tvb_length(tvb), FALSE);
|
2000-05-27 13:53:26 +00:00
|
|
|
mip_tree = proto_item_add_subtree(ti, ett_mip);
|
2000-05-31 05:09:07 +00:00
|
|
|
proto_tree_add_int(mip_tree, hf_mip_type, tvb, 0, 1, type);
|
2000-05-27 13:53:26 +00:00
|
|
|
|
|
|
|
code = tvb_get_guint8(tvb, 1);
|
2000-05-31 05:09:07 +00:00
|
|
|
proto_tree_add_boolean(mip_tree, hf_mip_s, tvb, 1, 1, code);
|
|
|
|
proto_tree_add_boolean(mip_tree, hf_mip_b, tvb, 1, 1, code);
|
|
|
|
proto_tree_add_boolean(mip_tree, hf_mip_d, tvb, 1, 1, code);
|
|
|
|
proto_tree_add_boolean(mip_tree, hf_mip_m, tvb, 1, 1, code);
|
|
|
|
proto_tree_add_boolean(mip_tree, hf_mip_g, tvb, 1, 1, code);
|
|
|
|
proto_tree_add_boolean(mip_tree, hf_mip_v, tvb, 1, 1, code);
|
2001-02-27 00:27:27 +00:00
|
|
|
proto_tree_add_boolean(mip_tree, hf_mip_t, tvb, 1, 1, code);
|
2001-02-14 17:01:44 +00:00
|
|
|
|
|
|
|
proto_tree_add_item(mip_tree, hf_mip_life, tvb, 2, 2, FALSE);
|
|
|
|
proto_tree_add_item(mip_tree, hf_mip_homeaddr, tvb, 4, 4, FALSE);
|
|
|
|
proto_tree_add_item(mip_tree, hf_mip_haaddr, tvb, 8, 4, FALSE);
|
|
|
|
proto_tree_add_item(mip_tree, hf_mip_coa, tvb, 12, 4, FALSE);
|
2001-09-14 07:10:13 +00:00
|
|
|
ident_time.secs = tvb_get_ntohl(tvb,16)-(guint32) NTP_BASETIME;
|
|
|
|
ident_time.nsecs = tvb_get_ntohl(tvb,20)*1000;
|
2001-02-14 17:01:44 +00:00
|
|
|
proto_tree_add_time(mip_tree, hf_mip_ident, tvb, 16, 8, &ident_time);
|
|
|
|
|
|
|
|
eoffset = 24;
|
2001-09-14 07:10:13 +00:00
|
|
|
while (tvb_reported_length_remaining(tvb, eoffset) > 0) {
|
|
|
|
/* Registration Extensions */
|
2001-02-14 17:01:44 +00:00
|
|
|
if (eoffset ==24) {
|
|
|
|
ti = proto_tree_add_text(mip_tree, tvb, 24, tvb_length(tvb)-24, "Extensions");
|
|
|
|
ext_tree = proto_item_add_subtree(ti, ett_mip_ext);
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_tree_add_item(ext_tree, hf_mip_ext_type, tvb, eoffset, 1, FALSE);
|
|
|
|
elen = tvb_get_guint8(tvb, eoffset+1);
|
|
|
|
proto_tree_add_int(ext_tree, hf_mip_ext_len, tvb, eoffset+1, 1, elen);
|
|
|
|
|
|
|
|
switch (tvb_get_guint8(tvb, eoffset)) {
|
2001-02-14 20:03:05 +00:00
|
|
|
case 32:
|
|
|
|
case 33:
|
|
|
|
case 34:
|
2001-02-14 17:01:44 +00:00
|
|
|
proto_tree_add_item(ext_tree, hf_mip_aext_spi, tvb, eoffset+2, 4, FALSE);
|
|
|
|
proto_tree_add_item(ext_tree, hf_mip_aext_auth, tvb, eoffset+6, elen-4, FALSE);
|
|
|
|
break;
|
|
|
|
case 131:
|
|
|
|
proto_tree_add_string(ext_tree, hf_mip_next_nai, tvb, eoffset+2,
|
|
|
|
tvb_get_guint8(tvb, eoffset+1),
|
|
|
|
tvb_get_ptr(tvb, eoffset+2,tvb_get_guint8(tvb, eoffset+1)));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_text(ext_tree, tvb, eoffset + 2, tvb_get_guint8(tvb, eoffset+1),
|
|
|
|
"Unknown Extension");
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
eoffset += tvb_get_guint8(tvb, eoffset+1) + 2;
|
|
|
|
}
|
2000-05-27 13:53:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-02-14 17:01:44 +00:00
|
|
|
|
2000-05-27 13:53:26 +00:00
|
|
|
if (type==3){
|
Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements.
Move the setting of the Protocol column in various dissectors before
anything is fetched from the packet, and also clear the Info column at
that point in those and some other dissectors, so that if an exception
is thrown, the columns don't reflect the previous protocol.
"Tvbuffify" the Mobile IP dissector (it took old-style arguments, and
then converted them into tvbuff arguments, so there wasn't much to do,
other than to fix references to "fd" to refer to "pinfo->fd").
In the SCTP dissector, refer to the port type and source and destination
ports through "pinfo" rather than through the global "pi", as it's a
tvbuffified dissector.
In the SMTP and Time Protocol dissectors, use "pinfo->match_port" rather
than "TCP_PORT_SMTP" when checking whether the packet is a request or
reply, just in case somebody makes a non-standard port be dissected as
SMTP or Time. (Also, remove a bogus comment from the Time dissector; it
was probably cut-and-pasted from the TFTP dissector.)
svn path=/trunk/; revision=2938
2001-01-25 06:14:14 +00:00
|
|
|
if (check_col(pinfo->fd, COL_INFO))
|
2001-02-14 17:01:44 +00:00
|
|
|
col_add_fstr(pinfo->fd, COL_INFO, "Reg Reply: HAddr=%s, Code=%u",
|
|
|
|
ip_to_str(tvb_get_ptr(tvb,4,4)), tvb_get_guint8(tvb,1));
|
|
|
|
|
2000-05-27 13:53:26 +00:00
|
|
|
if (tree) {
|
2000-05-31 05:09:07 +00:00
|
|
|
ti = proto_tree_add_item(tree, proto_mip, tvb, 0, tvb_length(tvb), FALSE);
|
2001-02-14 17:01:44 +00:00
|
|
|
mip_tree = proto_item_add_subtree(ti, ett_mip);
|
2000-05-31 05:09:07 +00:00
|
|
|
proto_tree_add_int(mip_tree, hf_mip_type, tvb, 0, 1, type);
|
2001-02-14 17:01:44 +00:00
|
|
|
|
|
|
|
/* code = tvb_get_guint8(tvb, 1);
|
|
|
|
proto_tree_add_uint(mip_tree, hf_mip_code, tvb, 1, 1, code);*/
|
|
|
|
proto_tree_add_item(mip_tree, hf_mip_code, tvb, 1, 1, FALSE);
|
|
|
|
proto_tree_add_item(mip_tree, hf_mip_life, tvb, 2, 2, FALSE);
|
|
|
|
proto_tree_add_item(mip_tree, hf_mip_homeaddr, tvb, 4, 4, FALSE);
|
|
|
|
proto_tree_add_item(mip_tree, hf_mip_haaddr, tvb, 8, 4, FALSE);
|
2001-09-14 07:10:13 +00:00
|
|
|
ident_time.secs = tvb_get_ntohl(tvb,12)-(guint32) NTP_BASETIME;
|
|
|
|
ident_time.nsecs = tvb_get_ntohl(tvb,16)*1000;
|
2001-02-14 17:01:44 +00:00
|
|
|
proto_tree_add_time(mip_tree, hf_mip_ident, tvb, 12, 8, &ident_time);
|
|
|
|
|
|
|
|
eoffset = 20;
|
2001-09-14 07:10:13 +00:00
|
|
|
while (tvb_reported_length_remaining(tvb, eoffset) > 0) {
|
|
|
|
/* Registration Extensions */
|
2001-02-14 17:01:44 +00:00
|
|
|
if (eoffset==20) {
|
|
|
|
ti = proto_tree_add_text(mip_tree, tvb, 20, tvb_length(tvb)-20, "Extensions");
|
|
|
|
ext_tree = proto_item_add_subtree(ti, ett_mip_ext);
|
|
|
|
}
|
|
|
|
|
|
|
|
proto_tree_add_int(ext_tree, hf_mip_ext_type, tvb, eoffset, 1,
|
|
|
|
tvb_get_guint8(tvb, eoffset));
|
|
|
|
elen = tvb_get_guint8(tvb, eoffset+1);
|
|
|
|
proto_tree_add_int(ext_tree, hf_mip_ext_len, tvb, eoffset+1, 1, elen);
|
|
|
|
|
|
|
|
switch (tvb_get_guint8(tvb, eoffset)) {
|
2001-02-14 20:03:05 +00:00
|
|
|
case 32:
|
|
|
|
case 33:
|
|
|
|
case 34:
|
2001-02-14 17:01:44 +00:00
|
|
|
proto_tree_add_item(ext_tree, hf_mip_aext_spi, tvb, eoffset+2, 4, FALSE);
|
|
|
|
proto_tree_add_item(ext_tree, hf_mip_aext_auth, tvb, eoffset+6, elen-4, FALSE);
|
|
|
|
break;
|
|
|
|
case 131:
|
|
|
|
proto_tree_add_item(ext_tree, hf_mip_next_nai, tvb, eoffset+2,
|
|
|
|
tvb_get_guint8(tvb, eoffset+1), FALSE);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
proto_tree_add_text(ext_tree, tvb, eoffset + 2, tvb_get_guint8(tvb, eoffset+1),
|
|
|
|
"Unknown Extension");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
eoffset += tvb_get_guint8(tvb, eoffset+1) + 2;
|
|
|
|
}
|
2000-05-27 13:53:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Register the protocol with Ethereal */
|
|
|
|
void proto_register_mip(void)
|
|
|
|
{
|
|
|
|
|
|
|
|
/* Setup list of header fields */
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_mip_type,
|
|
|
|
{ "Message Type", "mip.type",
|
|
|
|
FT_INT8, BASE_DEC, VALS(mip_types), 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Mobile IP Message type.", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_s,
|
|
|
|
{"Simultaneous Bindings", "mip.s",
|
2001-02-14 17:01:44 +00:00
|
|
|
|
2000-05-27 13:53:26 +00:00
|
|
|
FT_BOOLEAN, 8, NULL, 128,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Simultaneous Bindings Allowed", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
2000-05-27 17:51:15 +00:00
|
|
|
{ &hf_mip_b,
|
2000-05-27 13:53:26 +00:00
|
|
|
{"Broadcast Datagrams", "mip.b",
|
|
|
|
FT_BOOLEAN, 8, NULL, 64,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Broadcast Datagrams requested", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_d,
|
|
|
|
{ "Co-lcated Care-of Address", "mip.d",
|
|
|
|
FT_BOOLEAN, 8, NULL, 32,
|
2001-06-18 02:18:27 +00:00
|
|
|
"MN using Co-located Care-of address", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_m,
|
|
|
|
{"Minimal Encapsulation", "mip.m",
|
|
|
|
FT_BOOLEAN, 8, NULL, 16,
|
2001-06-18 02:18:27 +00:00
|
|
|
"MN wants Minimal encapsulation", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_g,
|
|
|
|
{"GRE", "mip.g",
|
|
|
|
FT_BOOLEAN, 8, NULL, 8,
|
2001-06-18 02:18:27 +00:00
|
|
|
"MN wants GRE encapsulation", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_v,
|
|
|
|
{ "Van Jacobson", "mip.v",
|
|
|
|
FT_BOOLEAN, 8, NULL, 4,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Van Jacobson", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
2001-02-27 00:27:27 +00:00
|
|
|
{ &hf_mip_t,
|
|
|
|
{ "Reverse Tunneling", "mip.t",
|
|
|
|
FT_BOOLEAN, 8, NULL, 2,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Reverse tunneling requested", HFILL }
|
2001-02-27 00:27:27 +00:00
|
|
|
},
|
2000-05-27 13:53:26 +00:00
|
|
|
{ &hf_mip_code,
|
|
|
|
{ "Reply Code", "mip.code",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(mip_reply_codes), 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Mobile IP Reply code.", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_life,
|
|
|
|
{ "Lifetime", "mip.life",
|
2001-02-14 17:01:44 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Mobile IP Lifetime.", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_homeaddr,
|
|
|
|
{ "Home Address", "mip.homeaddr",
|
|
|
|
FT_IPv4, BASE_NONE, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Mobile Node's home address.", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{ &hf_mip_haaddr,
|
|
|
|
{ "Home Agent", "mip.haaddr",
|
|
|
|
FT_IPv4, BASE_NONE, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Home agent IP Address.", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_coa,
|
|
|
|
{ "Care of Address", "mip.coa",
|
|
|
|
FT_IPv4, BASE_NONE, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Care of Address.", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_ident,
|
|
|
|
{ "Identification", "mip.ident",
|
2001-02-14 17:01:44 +00:00
|
|
|
FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"MN Identification.", HFILL }
|
2000-05-27 13:53:26 +00:00
|
|
|
},
|
2001-02-14 17:01:44 +00:00
|
|
|
{ &hf_mip_ext_type,
|
|
|
|
{ "Extension Type", "mip.ext.type",
|
|
|
|
FT_INT8, BASE_DEC, VALS(mip_ext_types), 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Mobile IP Extension Type.", HFILL }
|
2001-02-14 17:01:44 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_ext_len,
|
|
|
|
{ "Extension Length", "mip.ext.len",
|
|
|
|
FT_INT8, BASE_DEC, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Mobile IP Extension Length.", HFILL }
|
2001-02-14 17:01:44 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_aext_spi,
|
|
|
|
{ "SPI", "mip.auth.spi",
|
|
|
|
FT_INT32, BASE_HEX, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Authentication Header Security Parameter Index.", HFILL }
|
2001-02-14 17:01:44 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_aext_auth,
|
|
|
|
{ "Authenticator", "mip.auth.auth",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"Authenticator.", HFILL }
|
2001-02-14 17:01:44 +00:00
|
|
|
},
|
|
|
|
{ &hf_mip_next_nai,
|
|
|
|
{ "NAI", "mip.nai",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
2001-06-18 02:18:27 +00:00
|
|
|
"NAI", HFILL }
|
2001-02-14 17:01:44 +00:00
|
|
|
},
|
2000-05-27 13:53:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Setup protocol subtree array */
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_mip,
|
2001-02-14 17:01:44 +00:00
|
|
|
&ett_mip_ext,
|
2000-05-27 13:53:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Register the protocol name and description */
|
2001-01-03 06:56:03 +00:00
|
|
|
proto_mip = proto_register_protocol("Mobile IP", "Mobile IP", "mip");
|
2000-05-27 13:53:26 +00:00
|
|
|
|
|
|
|
/* Required function calls to register the header fields and subtrees used */
|
|
|
|
proto_register_field_array(proto_mip, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
};
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_mip(void)
|
|
|
|
{
|
2001-02-14 20:03:05 +00:00
|
|
|
dissector_add("udp.port", UDP_PORT_MIP, dissect_mip, proto_mip);
|
2000-05-27 13:53:26 +00:00
|
|
|
}
|