From KATAOKA Toshihiro:
MIPv6 Heartbeat svn path=/trunk/; revision=33335
This commit is contained in:
parent
abb629c4f8
commit
dfc1f80e70
|
@ -96,6 +96,10 @@ static int hf_fmip6_fback_k_flag = -1;
|
|||
static int hf_fmip6_fback_seqnr = -1;
|
||||
static int hf_fmip6_fback_lifetime = -1;
|
||||
|
||||
static int hf_mip6_hb_u_flag = -1;
|
||||
static int hf_mip6_hb_r_flag = -1;
|
||||
static int hf_mip6_hb_seqnr = -1;
|
||||
|
||||
static int hf_mip6_bra_interval = -1;
|
||||
|
||||
static int hf_mip6_acoa_acoa = -1;
|
||||
|
@ -342,6 +346,32 @@ dissect_mip6_be(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo)
|
|||
return MIP6_DATA_OFF + MIP6_BE_LEN;
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_mip6_hb(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo)
|
||||
{
|
||||
proto_tree *data_tree = NULL;
|
||||
proto_item *ti;
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "Heartbeat");
|
||||
|
||||
if (mip6_tree) {
|
||||
ti = proto_tree_add_text(mip6_tree, tvb, MIP6_DATA_OFF,
|
||||
MIP6_HB_LEN, "Heartbeat");
|
||||
data_tree = proto_item_add_subtree(ti, ett_mip6);
|
||||
|
||||
proto_tree_add_item(data_tree, hf_mip6_hb_u_flag, tvb,
|
||||
MIP6_HB_FLAGS_OFF, MIP6_HB_FLAGS_LEN, FALSE);
|
||||
proto_tree_add_item(data_tree, hf_mip6_hb_r_flag, tvb,
|
||||
MIP6_HB_FLAGS_OFF, MIP6_HB_FLAGS_LEN, FALSE);
|
||||
|
||||
proto_tree_add_item(data_tree, hf_mip6_hb_seqnr, tvb,
|
||||
MIP6_HB_SEQNR_OFF, MIP6_HB_SEQNR_LEN, FALSE);
|
||||
|
||||
}
|
||||
|
||||
return MIP6_DATA_OFF + MIP6_HB_LEN;
|
||||
}
|
||||
|
||||
static int
|
||||
dissect_mip6_unknown(tvbuff_t *tvb, proto_tree *mip6_tree, packet_info *pinfo)
|
||||
{
|
||||
|
@ -966,6 +996,9 @@ dissect_mip6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
case FNA:
|
||||
offset = dissect_fmip6_fna(tvb, mip6_tree, pinfo);
|
||||
break;
|
||||
case HB:
|
||||
offset = dissect_mip6_hb(tvb, mip6_tree, pinfo);
|
||||
break;
|
||||
default:
|
||||
dissect_mip6_unknown(tvb, mip6_tree, pinfo);
|
||||
offset = len;
|
||||
|
@ -1157,6 +1190,16 @@ proto_register_mip6(void)
|
|||
FT_UINT16, BASE_DEC, NULL, 0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_mip6_hb_u_flag, { "Unsolicited (U) flag", "mip6.hb.u_flag",
|
||||
FT_BOOLEAN, 8, TFS(&mip6_hb_u_flag_value),
|
||||
0x02, NULL, HFILL }},
|
||||
{ &hf_mip6_hb_r_flag, { "Response (R) flag", "mip6.hb.r_flag",
|
||||
FT_BOOLEAN, 8, TFS(&mip6_hb_r_flag_value),
|
||||
0x01, NULL, HFILL }},
|
||||
{ &hf_mip6_hb_seqnr, { "Sequence number", "mip6.hb.seqnr",
|
||||
FT_UINT32, BASE_DEC, NULL, 0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_mip6_bra_interval, { "Refresh interval", "mip6.bra.interval",
|
||||
FT_UINT16, BASE_DEC, NULL, 0,
|
||||
NULL, HFILL }},
|
||||
|
|
|
@ -46,7 +46,13 @@ typedef enum {
|
|||
BE = 7,
|
||||
FBU = 8,
|
||||
FBACK = 9,
|
||||
FNA = 10
|
||||
FNA = 10,
|
||||
EMH = 11,
|
||||
HAS = 12,
|
||||
HB = 13,
|
||||
HI = 14,
|
||||
HAck = 15,
|
||||
BR = 16,
|
||||
} mhTypes;
|
||||
|
||||
static const value_string mip6_mh_types[] = {
|
||||
|
@ -61,6 +67,12 @@ static const value_string mip6_mh_types[] = {
|
|||
{FBU, "Fast Binding Update"},
|
||||
{FBACK, "Fast Binding Acknowledgment"},
|
||||
{FNA, "Fast Neighbor Advertisement"},
|
||||
{EMH, "Experimental Mobility Header"},
|
||||
{HAS, "Home Agent Switch"},
|
||||
{HB, "Heartbeat"},
|
||||
{HI, "Handover Initiate"},
|
||||
{HAck, "Handover Acknowledge"},
|
||||
{BR, "Binding Revocation"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
||||
|
@ -210,6 +222,17 @@ static const value_string fmip6_fback_status_value[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
/* Heartbeat flag description */
|
||||
static const true_false_string mip6_hb_u_flag_value = {
|
||||
"Unsolicited Heartbeat Response",
|
||||
"Otherwise"
|
||||
};
|
||||
|
||||
static const true_false_string mip6_hb_r_flag_value = {
|
||||
"Heartbeat Response",
|
||||
"Heartbeat Request"
|
||||
};
|
||||
|
||||
/* MH LLA Option code */
|
||||
static const value_string fmip6_lla_optcode_value[] = {
|
||||
{ 2, "Link Layer Address of the MN" },
|
||||
|
@ -234,6 +257,12 @@ static const value_string mip6_mnid_subtype_value[] = {
|
|||
#define FMIP6_FBU_LEN 6
|
||||
#define FMIP6_FBACK_LEN 6
|
||||
#define FMIP6_FNA_LEN 2
|
||||
#define MIP6_EMH_LEN 0
|
||||
#define MIP6_HAS_LEN 18
|
||||
#define MIP6_HB_LEN 6
|
||||
#define MIP6_HI_LEN 4
|
||||
#define MIP6_HAck_LEN 4
|
||||
#define MIP6_BR_LEN 6
|
||||
|
||||
/* Field offsets & lengths for mobility headers */
|
||||
#define MIP6_PROTO_OFF 0
|
||||
|
@ -332,6 +361,51 @@ static const value_string mip6_mnid_subtype_value[] = {
|
|||
#define FMIP6_FNA_OPTS_OFF 8
|
||||
#define FMIP6_FNA_RES_LEN 2
|
||||
|
||||
#define MIP6_HAS_NRADR_OFF 6
|
||||
#define MIP6_HAS_RES_OFF 7
|
||||
#define MIP6_HAS_HAA_OFF 8
|
||||
#define MIP6_HAS_OPTS_OFF 24
|
||||
#define MIP6_HAS_NRADR_LEN 1
|
||||
#define MIP6_HAS_RES_LEN 1
|
||||
#define MIP6_HAS_HAA_LEN 16
|
||||
|
||||
#define MIP6_HB_RES_OFF 6
|
||||
#define MIP6_HB_FLAGS_OFF 7
|
||||
#define MIP6_HB_SEQNR_OFF 8
|
||||
#define MIP6_HB_OPTS_OFF 12
|
||||
#define MIP6_HB_RES_LEN 1
|
||||
#define MIP6_HB_FLAGS_LEN 1
|
||||
#define MIP6_HB_SEQNR_LEN 4
|
||||
|
||||
#define MIP6_HI_SEQNR_OFF 6
|
||||
#define MIP6_HI_FLAGS_OFF 8
|
||||
#define MIP6_HI_CODE_OFF 9
|
||||
#define MIP6_HI_OPTS_OFF 10
|
||||
#define MIP6_HI_SEQNR_LEN 2
|
||||
#define MIP6_HI_FLAGS_LEN 1
|
||||
#define MIP6_HI_CODE_LEN 1
|
||||
|
||||
#define MIP6_HAck_SEQNR_OFF 6
|
||||
#define MIP6_HAck_RES_OFF 8
|
||||
#define MIP6_HAck_CODE_OFF 9
|
||||
#define MIP6_HAck_OPTS_OFF 10
|
||||
#define MIP6_HAck_SEQNR_LEN 2
|
||||
#define MIP6_HAck_RES_LEN 1
|
||||
#define MIP6_HAck_CODE_LEN 1
|
||||
|
||||
#define MIP6_BR_TYPE_OFF 6
|
||||
#define MIP6_BR_TRGR_OFF 7
|
||||
#define MIP6_BR_SEQNR_OFF 8
|
||||
#define MIP6_BR_FLAGS_OFF 10
|
||||
#define MIP6_BR_RES_OFF 11
|
||||
#define MIP6_BR_OPTS_OFF 12
|
||||
#define MIP6_BR_TYPE_LEN 1
|
||||
#define MIP6_BR_TRGR_LEN 1
|
||||
#define MIP6_BR_SEQNR_LEN 2
|
||||
#define MIP6_BR_FLAGS_LEN 1
|
||||
#define MIP6_BR_RES_LEN 1
|
||||
|
||||
|
||||
/* Field offsets & field and option lengths for mobility options.
|
||||
* The option length does *not* include the option type and length
|
||||
* fields. The field offsets, however, do include the type and
|
||||
|
|
Loading…
Reference in New Issue