replaced decode_boolean_bitfield calls with itemized filters

svn path=/trunk/; revision=45059
This commit is contained in:
Michael Mann 2012-09-23 00:12:14 +00:00
parent 37b6ca2ce8
commit b89a06a3e1
10 changed files with 810 additions and 556 deletions

View File

@ -129,10 +129,14 @@ static int hf_a11_max_num_serv_opt = -1;
/* Forward QoS Information */
static int hf_a11_fqi_srid = -1;
static int hf_a11_fqi_flags = -1;
static int hf_a11_fqi_flags_ip_flow = -1;
static int hf_a11_fqi_flags_dscp = -1;
static int hf_a11_fqi_entry_flag = -1;
static int hf_a11_fqi_entry_flag_dscp = -1;
static int hf_a11_fqi_entry_flag_flow_state = -1;
static int hf_a11_fqi_flowcount = -1;
static int hf_a11_fqi_flowid = -1;
static int hf_a11_fqi_entrylen = -1;
static int hf_a11_fqi_dscp = -1;
static int hf_a11_fqi_flowstate = -1;
static int hf_a11_fqi_requested_qoslen = -1;
static int hf_a11_fqi_flow_priority = -1;
@ -149,6 +153,8 @@ static int hf_a11_rqi_srid = -1;
static int hf_a11_rqi_flowcount = -1;
static int hf_a11_rqi_flowid = -1;
static int hf_a11_rqi_entrylen = -1;
static int hf_a11_rqi_entry_flag = -1;
static int hf_a11_rqi_entry_flag_flow_state = -1;
static int hf_a11_rqi_flowstate = -1;
static int hf_a11_rqi_requested_qoslen = -1;
static int hf_a11_rqi_flow_priority = -1;
@ -401,6 +407,7 @@ static const value_string a11_airlink_types[]= {
{0, NULL},
};
static const true_false_string tfs_included_not_included = { "Included", "Not Included" };
#define A11_MSG_MSID_ELEM_LEN_MAX 8
#define A11_MSG_MSID_LEN_MAX 15
@ -821,20 +828,13 @@ static void
dissect_fwd_qosinfo_flags(tvbuff_t *tvb, int offset, proto_tree *ext_tree, guint8 *p_dscp_included)
{
guint8 flags = tvb_get_guint8(tvb, offset);
guint8 nbits = sizeof(flags) * 8;
proto_item *ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(flags),
"Flags: %#02x", flags);
proto_item *ti = proto_tree_add_item(ext_tree, hf_a11_fqi_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree *flags_tree = proto_item_add_subtree(ti, ett_a11_fqi_flags);
proto_tree_add_text(flags_tree, tvb, offset, sizeof(flags), "%s",
decode_boolean_bitfield(flags, A11_FQI_IPFLOW_DISC_ENABLED, nbits,
"IP Flow Discriminator Enabled", "IP Flow Discriminator Disabled"));
proto_tree_add_item(flags_tree, hf_a11_fqi_flags_ip_flow, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flags_tree, hf_a11_fqi_flags_dscp, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_text(flags_tree, tvb, offset, sizeof(flags), "%s",
decode_boolean_bitfield(flags, A11_FQI_DSCP_INCLUDED, nbits,
"DSCP Included", "DSCP Not Included"));
if (flags & A11_FQI_DSCP_INCLUDED)
{
*p_dscp_included = 1;
@ -844,50 +844,27 @@ dissect_fwd_qosinfo_flags(tvbuff_t *tvb, int offset, proto_tree *ext_tree, guint
}
}
#define A11_FQI_DSCP 0x7E
#define A11_FQI_FLOW_STATE 0x01
static void
dissect_fqi_entry_flags(tvbuff_t *tvb, int offset, proto_tree *ext_tree, guint8 dscp_enabled)
{
guint8 dscp = tvb_get_guint8(tvb, offset);
guint8 nbits = sizeof(dscp) * 8;
proto_item *ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(dscp),
"DSCP and Flow State: %#02x", dscp);
proto_item *ti = proto_tree_add_item(ext_tree, hf_a11_fqi_entry_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree *flags_tree = proto_item_add_subtree(ti, ett_a11_fqi_entry_flags);
if (dscp_enabled)
{
proto_tree_add_text(flags_tree, tvb, offset, sizeof(dscp), "%s",
decode_numeric_bitfield(dscp, A11_FQI_DSCP, nbits,
"DSCP: %u"));
proto_tree_add_item(flags_tree, hf_a11_fqi_entry_flag_dscp, tvb, offset, 1, ENC_BIG_ENDIAN);
}
proto_tree_add_text(flags_tree, tvb, offset, sizeof(dscp), "%s",
decode_boolean_bitfield(dscp, A11_FQI_FLOW_STATE, nbits,
"Flow State: Active", "Flow State: Inactive"));
proto_tree_add_item(flags_tree, hf_a11_fqi_entry_flag_flow_state, tvb, offset, 1, ENC_BIG_ENDIAN);
}
#define A11_RQI_FLOW_STATE 0x01
static void
dissect_rqi_entry_flags(tvbuff_t *tvb, int offset, proto_tree *ext_tree)
{
guint8 flags = tvb_get_guint8(tvb, offset);
guint8 nbits = sizeof(flags) * 8;
proto_item *ti = proto_tree_add_text(ext_tree, tvb, offset, sizeof(flags),
"Flags: %#02x", flags);
proto_item *ti = proto_tree_add_item(ext_tree, hf_a11_rqi_entry_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree *flags_tree = proto_item_add_subtree(ti, ett_a11_rqi_entry_flags);
proto_tree_add_text(flags_tree, tvb, offset, sizeof(flags), "%s",
decode_boolean_bitfield(flags, A11_RQI_FLOW_STATE, nbits,
"Flow State: Active", "Flow State: Inactive"));
proto_tree_add_item(flags_tree, hf_a11_rqi_entry_flag_flow_state, tvb, offset, 1, ENC_BIG_ENDIAN);
}
/* Code to dissect Forward QoS Info */
@ -2023,6 +2000,31 @@ proto_register_a11(void)
FT_UINT8, BASE_HEX, NULL, 0,
"Forward Flow Entry Flags", HFILL }
},
{ &hf_a11_fqi_flags_ip_flow,
{ "IP Flow Discriminator", "a11.ext.fqi.flags.ip_flow",
FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), A11_FQI_IPFLOW_DISC_ENABLED,
NULL, HFILL }
},
{ &hf_a11_fqi_flags_dscp,
{ "DSCP", "a11.ext.fqi.flags.dscp",
FT_BOOLEAN, 8, TFS(&tfs_included_not_included), A11_FQI_DSCP_INCLUDED,
NULL, HFILL }
},
{ &hf_a11_fqi_entry_flag,
{ "DSCP and Flow State", "a11.ext.fqi.entry_flag",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_a11_fqi_entry_flag_dscp,
{ "DSCP", "a11.ext.fqi.entry_flag.dscp",
FT_UINT8, BASE_HEX, NULL, 0x7E,
NULL, HFILL }
},
{ &hf_a11_fqi_entry_flag_flow_state,
{ "Flow State", "a11.ext.fqi.entry_flag.flow_state",
FT_BOOLEAN, 8, TFS(&tfs_active_inactive), 0x01,
NULL, HFILL }
},
{ &hf_a11_fqi_flowcount,
{ "Forward Flow Count", "a11.ext.fqi.flowcount",
FT_UINT8, BASE_DEC, NULL, 0,
@ -2038,11 +2040,6 @@ proto_register_a11(void)
FT_UINT8, BASE_DEC, NULL, 0,
"Forward Entry Length", HFILL }
},
{ &hf_a11_fqi_dscp,
{ "Forward DSCP", "a11.ext.fqi.dscp",
FT_UINT8, BASE_HEX, NULL, 0,
"Forward Flow DSCP", HFILL }
},
{ &hf_a11_fqi_flowstate,
{ "Forward Flow State", "a11.ext.fqi.flowstate",
FT_UINT8, BASE_HEX, NULL, 0,
@ -2148,6 +2145,16 @@ proto_register_a11(void)
FT_UINT8, BASE_DEC, NULL, 0,
"Reverse Flow Entry Length", HFILL }
},
{ &hf_a11_rqi_entry_flag,
{ "Flags", "a11.ext.rqi.entry_flag",
FT_UINT8, BASE_HEX, NULL, 0,
NULL, HFILL }
},
{ &hf_a11_rqi_entry_flag_flow_state,
{ "Flow State", "a11.ext.rqi.entry_flag.flow_state",
FT_BOOLEAN, 8, TFS(&tfs_active_inactive), 0x01,
NULL, HFILL }
},
{ &hf_a11_rqi_flowstate,
{ "Flow State", "a11.ext.rqi.flowstate",
FT_UINT8, BASE_HEX, NULL, 0,

View File

@ -79,22 +79,6 @@ enum {
#define P9_OTRUNC 0x10
#define P9_ORCLOSE 0x40
/* stat mode flags */
#define DMDIR 0x80000000 /* Directory */
#define DMAPPEND 0x40000000 /* Append only */
#define DMEXCL 0x20000000 /* Exclusive use */
#define DMMOUNT 0x10000000 /* Mounted channel */
#define DMAUTH 0x08000000 /* Authentication */
#define DMTMP 0x04000000 /* Temporary */
#define QTDIR 0x80 /* Directory */
#define QTAPPEND 0x40 /* Append only */
#define QTEXCL 0x20 /* Exclusive use */
#define QTMOUNT 0x10 /* Mounted channel */
#define QTAUTH 0x08 /* Authentication */
#define QTTMP 0x04 /* Temporary */
#define QTFILE 0x00 /* plain file ?? */
/* Initialize the protocol and registered fields */
static int proto_9P = -1;
static int hf_9P_msgsz = -1;
@ -114,8 +98,29 @@ static int hf_9P_count = -1;
static int hf_9P_offset = -1;
static int hf_9P_perm = -1;
static int hf_9P_qidtype = -1;
static int hf_9P_qidtype_dir = -1;
static int hf_9P_qidtype_append = -1;
static int hf_9P_qidtype_exclusive = -1;
static int hf_9P_qidtype_mount = -1;
static int hf_9P_qidtype_auth_file = -1;
static int hf_9P_qidtype_temp_file = -1;
static int hf_9P_qidvers = -1;
static int hf_9P_qidpath = -1;
static int hf_9P_dm_dir = -1;
static int hf_9P_dm_append = -1;
static int hf_9P_dm_exclusive = -1;
static int hf_9P_dm_mount = -1;
static int hf_9P_dm_auth_file = -1;
static int hf_9P_dm_temp_file = -1;
static int hf_9P_dm_read_owner = -1;
static int hf_9P_dm_write_owner = -1;
static int hf_9P_dm_exec_owner = -1;
static int hf_9P_dm_read_group = -1;
static int hf_9P_dm_write_group = -1;
static int hf_9P_dm_exec_group = -1;
static int hf_9P_dm_read_others = -1;
static int hf_9P_dm_write_others = -1;
static int hf_9P_dm_exec_others = -1;
static int hf_9P_stattype = -1;
static int hf_9P_statmode = -1;
static int hf_9P_atime = -1;
@ -606,18 +611,12 @@ static void dissect_9P_qid(tvbuff_t * tvb, proto_tree * tree,int offset)
qidtype_item = proto_tree_add_item(qid_tree, hf_9P_qidtype, tvb, offset, 1, ENC_LITTLE_ENDIAN);
qidtype_tree = proto_item_add_subtree(qidtype_item,ett_9P_qidtype);
proto_tree_add_text(qidtype_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(type, QTDIR, 8, "Directory", "not a Directory"));
proto_tree_add_text(qidtype_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(type, QTAPPEND, 8, "Append only", "not Append only"));
proto_tree_add_text(qidtype_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(type, QTEXCL, 8, "Exclusive use", "not Exclusive use"));
proto_tree_add_text(qidtype_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(type, QTMOUNT, 8, "Mounted channel", "not a Mounted channel"));
proto_tree_add_text(qidtype_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(type, QTAUTH, 8, "Authentication file", "not an Authentication file"));
proto_tree_add_text(qidtype_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(type, QTTMP, 8, "Temporary file (not backed up)", "not a Temporary file"));
proto_tree_add_item(qidtype_tree, hf_9P_qidtype_dir, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(qidtype_tree, hf_9P_qidtype_append, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(qidtype_tree, hf_9P_qidtype_exclusive, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(qidtype_tree, hf_9P_qidtype_mount, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(qidtype_tree, hf_9P_qidtype_auth_file, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(qidtype_tree, hf_9P_qidtype_temp_file, tvb, offset, 1, ENC_LITTLE_ENDIAN);
proto_tree_add_item(qid_tree, hf_9P_qidvers, tvb, offset+1, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(qid_tree, hf_9P_qidpath, tvb, offset+1+4, 8, ENC_LITTLE_ENDIAN);
@ -635,39 +634,24 @@ static void dissect_9P_dm(tvbuff_t * tvb, proto_item * item,int offset,int iscr
if(!mode_tree)
return;
proto_tree_add_text(mode_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(dm, DMDIR, 32, "Directory", "not a Directory"));
proto_tree_add_item(mode_tree, hf_9P_dm_dir, tvb, offset, 4, ENC_LITTLE_ENDIAN);
if(!iscreate) { /* Not applicable to Tcreate (?) */
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, DMAPPEND, 32, "Append only", "not Append only"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, DMEXCL, 32, "Exclusive use", "not Exclusive use"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, DMMOUNT, 32, "Mounted channel", "not a Mounted channel"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, DMAUTH, 32, "Authentication file", "not an Authentication file"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, DMTMP, 32, "Temporary file (not backed up)", "not a Temporary file"));
proto_tree_add_item(mode_tree, hf_9P_dm_append, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_exclusive, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_mount, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_auth_file, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_temp_file, tvb, offset, 4, ENC_LITTLE_ENDIAN);
}
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 0400, 32, "Read permission for owner", "no Read permission for owner"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 0200, 32, "Write permission for owner", "no Write permission for owner"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 0100, 32, "Execute permission for owner", "no Execute permission for owner"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 040, 32, "Read permission for group", "no Read permission for group"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 020, 32, "Write permission for group", "no Write permission for group"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 010, 32, "Execute permission for group", "no Execute permission for group"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 04, 32, "Read permission for others", "no Read permission for others"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 02, 32, "Write permission for others", "no Write permission for others"));
proto_tree_add_text(mode_tree, tvb, offset, 4, "%s",
decode_boolean_bitfield(dm, 01, 32, "Execute permission for others", "no Execute permission for others"));
proto_tree_add_item(mode_tree, hf_9P_dm_read_owner, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_write_owner, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_exec_owner, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_read_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_write_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_exec_group, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_read_others, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_write_others, tvb, offset, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(mode_tree, hf_9P_dm_exec_others, tvb, offset, 4, ENC_LITTLE_ENDIAN);
}
/* Register 9P with Wireshark */
@ -725,12 +709,66 @@ void proto_register_9P(void)
{&hf_9P_qidpath,
{"Qid path", "9p.qidpath", FT_UINT64, BASE_DEC, NULL, 0x0,
NULL, HFILL}},
{&hf_9P_dm_dir,
{"Directory", "9p.dm.dir", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x80000000,
NULL, HFILL}},
{&hf_9P_dm_append,
{"Append only", "9p.dm.append", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x40000000,
NULL, HFILL}},
{&hf_9P_dm_exclusive,
{"Exclusive use", "9p.dm.exclusive", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x20000000,
NULL, HFILL}},
{&hf_9P_dm_mount,
{"Mounted channel", "9p.dm.mount", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x10000000,
NULL, HFILL}},
{&hf_9P_dm_auth_file,
{"Authentication file", "9p.dm.auth_file", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x08000000,
NULL, HFILL}},
{&hf_9P_dm_temp_file,
{"Temporary file (not backed up)", "9p.dm.temp_file", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x04000000,
NULL, HFILL}},
{&hf_9P_dm_read_owner,
{"Read permission for owner", "9p.dm.read_owner", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000400,
NULL, HFILL}},
{&hf_9P_dm_write_owner,
{"Write permission for owner", "9p.dm.write_owner", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000200,
NULL, HFILL}},
{&hf_9P_dm_exec_owner,
{"Execute permission for owner", "9p.dm.exec_owner", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000100,
NULL, HFILL}},
{&hf_9P_dm_read_others,
{"Read permission for others", "9p.dm.read_others", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000004,
NULL, HFILL}},
{&hf_9P_dm_write_others,
{"Write permission for others", "9p.dm.write_others", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000002,
NULL, HFILL}},
{&hf_9P_dm_exec_others,
{"Execute permission for others", "9p.dm.exec_others", FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x00000001,
NULL, HFILL}},
{&hf_9P_qidvers,
{"Qid version", "9p.qidvers", FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL}},
{&hf_9P_qidtype,
{"Qid type", "9p.qidtype", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}},
{&hf_9P_qidtype_dir,
{"Directory", "9p.qidtype.dir", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
NULL, HFILL}},
{&hf_9P_qidtype_append,
{"Append only", "9p.qidtype.append", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
NULL, HFILL}},
{&hf_9P_qidtype_exclusive,
{"Exclusive use", "9p.qidtype.exclusive", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20,
NULL, HFILL}},
{&hf_9P_qidtype_mount,
{"Mounted channel", "9p.qidtype.mount", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x10,
NULL, HFILL}},
{&hf_9P_qidtype_auth_file,
{"Authentication file", "9p.qidtype.auth_file", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x08,
NULL, HFILL}},
{&hf_9P_qidtype_temp_file,
{"Temporary file (not backed up)", "9p.qidtype.temp_file", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04,
NULL, HFILL}},
{&hf_9P_statmode,
{"Mode", "9p.statmode", FT_UINT32, BASE_OCT, NULL, 0x0,
"File mode flags", HFILL}},

View File

@ -49,6 +49,14 @@ static int proto_aal1 = -1;
static int proto_aal3_4 = -1;
static int proto_oamaal = -1;
static int hf_atm_le_control_flag_v2_capable = -1;
static int hf_atm_le_control_flag_selective_multicast = -1;
static int hf_atm_le_control_flag_v2_required = -1;
static int hf_atm_le_control_flag_proxy = -1;
static int hf_atm_le_control_flag_exclude_explorer_frames = -1;
static int hf_atm_le_control_flag_address = -1;
static int hf_atm_le_control_topology_change = -1;
static gint ett_atm = -1;
static gint ett_atm_lane = -1;
static gint ett_atm_lane_lc_lan_dest = -1;
@ -181,6 +189,8 @@ static const value_string le_control_frame_size_vals[] = {
{ 0, NULL }
};
static const true_false_string tfs_remote_local = { "Remote", "Local" };
static void
dissect_le_client(tvbuff_t *tvb, proto_tree *tree)
{
@ -554,34 +564,23 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case LE_CONFIGURE_REQUEST:
case LE_CONFIGURE_RESPONSE:
proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
decode_boolean_bitfield(flags, 0x0002, 8*2,
"V2 capable", "Not V2 capable"));
proto_tree_add_item(flags_tree, hf_atm_le_control_flag_v2_capable, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
dissect_le_configure_join_frame(tvb, offset, lane_tree);
break;
case LE_JOIN_REQUEST:
case LE_JOIN_RESPONSE:
proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
decode_boolean_bitfield(flags, 0x0002, 8*2,
"V2 capable", "Not V2 capable"));
proto_tree_add_item(flags_tree, hf_atm_le_control_flag_v2_capable, tvb, offset, 2, ENC_BIG_ENDIAN);
if (opcode == LE_JOIN_REQUEST) {
proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
decode_boolean_bitfield(flags, 0x0004, 8*2,
"Selective multicast", "No selective multicast"));
proto_tree_add_item(flags_tree, hf_atm_le_control_flag_selective_multicast, tvb, offset, 2, ENC_BIG_ENDIAN);
} else {
proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
decode_boolean_bitfield(flags, 0x0008, 8*2,
"V2 required", "V2 not required"));
proto_tree_add_item(flags_tree, hf_atm_le_control_flag_v2_required, tvb, offset, 2, ENC_BIG_ENDIAN);
}
proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
decode_boolean_bitfield(flags, 0x0080, 8*2,
"Proxy", "Not proxy"));
proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
decode_boolean_bitfield(flags, 0x0200, 8*2,
"Exclude explorer frames",
"Don't exclude explorer frames"));
proto_tree_add_item(flags_tree, hf_atm_le_control_flag_proxy, tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(flags_tree, hf_atm_le_control_flag_exclude_explorer_frames, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
dissect_le_configure_join_frame(tvb, offset, lane_tree);
break;
@ -598,18 +597,14 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case LE_ARP_RESPONSE:
case LE_NARP_REQUEST:
if (opcode != LE_NARP_REQUEST) {
proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
decode_boolean_bitfield(flags, 0x0001, 8*2,
"Remote address", "Local address"));
proto_tree_add_item(flags_tree, hf_atm_le_control_flag_address, tvb, offset, 2, ENC_BIG_ENDIAN);
}
offset += 2;
dissect_le_arp_frame(tvb, offset, lane_tree);
break;
case LE_TOPOLOGY_REQUEST:
proto_tree_add_text(flags_tree, tvb, offset, 2, "%s",
decode_boolean_bitfield(flags, 0x0100, 8*2,
"Topology change", "No topology change"));
proto_tree_add_item(flags_tree, hf_atm_le_control_topology_change, tvb, offset, 2, ENC_BIG_ENDIAN);
/* 92 reserved bytes */
break;
@ -1946,7 +1941,29 @@ proto_register_atm(void)
{ "CID", "atm.cid", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_atm_le_control_flag_v2_capable,
{ "V2 capable", "atm.le_control.flag.v2_capable", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0002,
NULL, HFILL }},
{ &hf_atm_le_control_flag_selective_multicast,
{ "Selective multicast", "atm.le_control.flag.selective_multicast", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0004,
NULL, HFILL }},
{ &hf_atm_le_control_flag_v2_required,
{ "V2 required", "atm.le_control.flag.v2_required", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0008,
NULL, HFILL }},
{ &hf_atm_le_control_flag_proxy,
{ "Proxy", "atm.le_control.flag.flag_proxy", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0080,
NULL, HFILL }},
{ &hf_atm_le_control_flag_exclude_explorer_frames,
{ "Exclude explorer frames", "atm.le_control.flag.exclude_explorer_frames", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0200,
NULL, HFILL }},
{ &hf_atm_le_control_flag_address,
{ "Address", "atm.le_control.flag.address", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0001,
NULL, HFILL }},
{ &hf_atm_le_control_topology_change,
{ "Topology change", "atm.le_control.flag.topology_change", FT_BOOLEAN, 16, TFS(&tfs_remote_local), 0x0100,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_atm,
&ett_ilmi,

View File

@ -371,6 +371,14 @@ static int hf_cast_originalCdpnRedirectReason = -1;
static int hf_cast_lastRedirectingReason = -1;
static int hf_cast_callInstance = -1;
static int hf_cast_callSecurityStatus = -1;
static int hf_cast_partyPIRestrictionBits_CallingPartyName = -1;
static int hf_cast_partyPIRestrictionBits_CallingPartyNumber = -1;
static int hf_cast_partyPIRestrictionBits_CalledPartyName = -1;
static int hf_cast_partyPIRestrictionBits_CalledPartyNumber = -1;
static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyName = -1;
static int hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber = -1;
static int hf_cast_partyPIRestrictionBits_LastRedirectPartyName = -1;
static int hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber = -1;
static int hf_cast_directoryNumber = -1;
static int hf_cast_requestorIpAddress = -1;
static int hf_cast_stationIpAddress = -1;
@ -841,25 +849,16 @@ dissect_cast_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
i += 4;
proto_tree_add_item(cast_tree, hf_cast_callSecurityStatus, tvb, i, 4, ENC_LITTLE_ENDIAN);
i += 4;
val = tvb_get_letohl( tvb, i);
ti_sub = proto_tree_add_text(cast_tree, tvb, offset, 8, "partyPIRestrictionBits");
cast_sub_tree = proto_item_add_subtree(ti_sub, ett_cast_tree);
proto_tree_add_text(cast_sub_tree, tvb, i, 4, "%s",
decode_boolean_bitfield( val, 0x01, 4*8, "Does RestrictCallingPartyName", "Doesn't RestrictCallingPartyName"));
proto_tree_add_text(cast_sub_tree, tvb, i, 4, "%s",
decode_boolean_bitfield( val, 0x02, 4*8, "Does RestrictCallingPartyNumber", "Doesn't RestrictCallingPartyNumber"));
proto_tree_add_text(cast_sub_tree, tvb, i, 4, "%s",
decode_boolean_bitfield( val, 0x04, 4*8, "Does RestrictCalledPartyName", "Doesn't RestrictCalledPartyName"));
proto_tree_add_text(cast_sub_tree, tvb, i, 4, "%s",
decode_boolean_bitfield( val, 0x08, 4*8, "Does RestrictCalledPartyNumber", "Doesn't RestrictCalledPartyNumber"));
proto_tree_add_text(cast_sub_tree, tvb, i, 4, "%s",
decode_boolean_bitfield( val, 0x10, 4*8, "Does RestrictOriginalCalledPartyName", "Doesn't RestrictOriginalCalledPartyName"));
proto_tree_add_text(cast_sub_tree, tvb, i, 4, "%s",
decode_boolean_bitfield( val, 0x20, 4*8, "Does RestrictOriginalCalledPartyNumber", "Doesn't RestrictOriginalCalledPartyNumber"));
proto_tree_add_text(cast_sub_tree, tvb, i, 4, "%s",
decode_boolean_bitfield( val, 0x40, 4*8, "Does RestrictLastRedirectPartyName", "Doesn't RestrictLastRedirectPartyName"));
proto_tree_add_text(cast_sub_tree, tvb, i, 4, "%s",
decode_boolean_bitfield( val, 0x80, 4*8, "Does RestrictLastRedirectPartyNumber", "Doesn't RestrictLastRedirectPartyNumber"));
proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_CallingPartyName, tvb, i, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_CallingPartyNumber, tvb, i, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_CalledPartyName, tvb, i, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_CalledPartyNumber, tvb, i, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_OriginalCalledPartyName, tvb, i, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber, tvb, i, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_LastRedirectPartyName, tvb, i, 4, ENC_LITTLE_ENDIAN);
proto_tree_add_item(cast_sub_tree, hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber, tvb, i, 4, ENC_LITTLE_ENDIAN);
break;
case 0x11 : /* RequestCallInfo */
@ -1126,22 +1125,19 @@ proto_register_cast(void)
{ &hf_cast_ipAddress,
{ "IP Address", "cast.ipAddress",
FT_IPv4, BASE_NONE, NULL, 0x0,
"An IP address",
HFILL }
NULL, HFILL }
},
{ &hf_cast_portNumber,
{ "Port Number", "cast.portNumber",
FT_UINT32, BASE_DEC, NULL, 0x0,
"A port number",
HFILL }
NULL, HFILL }
},
{ &hf_cast_passThruPartyID,
{ "PassThruPartyID", "cast.passThruPartyID",
FT_UINT32, BASE_DEC, NULL, 0x0,
"The pass thru party id",
HFILL }
NULL, HFILL }
},
{ &hf_cast_callIdentifier,
@ -1154,15 +1150,13 @@ proto_register_cast(void)
{ &hf_cast_conferenceID,
{ "Conference ID", "cast.conferenceID",
FT_UINT32, BASE_DEC, NULL, 0x0,
"The conference ID",
HFILL }
NULL, HFILL }
},
{ &hf_cast_payloadType,
{ "PayloadType", "cast.payloadType",
FT_UINT32, BASE_DEC, NULL, 0x0,
"PayloadType.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_lineInstance,
@ -1182,253 +1176,217 @@ proto_register_cast(void)
{ &hf_cast_isConferenceCreator,
{ "IsConferenceCreator", "cast.isConferenceCreator",
FT_UINT32, BASE_DEC, NULL, 0x0,
"IsConferenceCreator.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_payload_rfc_number,
{ "Payload_rfc_number", "cast.payload_rfc_number",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Payload_rfc_number.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_videoCapCount,
{ "VideoCapCount", "cast.videoCapCount",
FT_UINT32, BASE_DEC, NULL, 0x0,
"VideoCapCount.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_dataCapCount,
{ "DataCapCount", "cast.dataCapCount",
FT_UINT32, BASE_DEC, NULL, 0x0,
"DataCapCount.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_RTPPayloadFormat,
{ "RTPPayloadFormat", "cast.RTPPayloadFormat",
FT_UINT32, BASE_DEC, NULL, 0x0,
"RTPPayloadFormat.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_customPictureFormatCount,
{ "CustomPictureFormatCount", "cast.customPictureFormatCount",
FT_UINT32, BASE_DEC, NULL, 0x0,
"CustomPictureFormatCount.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_pictureWidth,
{ "PictureWidth", "cast.pictureWidth",
FT_UINT32, BASE_DEC, NULL, 0x0,
"PictureWidth.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_pictureHeight,
{ "PictureHeight", "cast.pictureHeight",
FT_UINT32, BASE_DEC, NULL, 0x0,
"PictureHeight.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_pixelAspectRatio,
{ "PixelAspectRatio", "cast.pixelAspectRatio",
FT_UINT32, BASE_DEC, NULL, 0x0,
"PixelAspectRatio.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_clockConversionCode,
{ "ClockConversionCode", "cast.clockConversionCode",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ClockConversionCode.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_clockDivisor,
{ "ClockDivisor", "cast.clockDivisor",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Clock Divisor.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_activeStreamsOnRegistration,
{ "ActiveStreamsOnRegistration", "cast.activeStreamsOnRegistration",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ActiveStreamsOnRegistration.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_maxBW,
{ "MaxBW", "cast.maxBW",
FT_UINT32, BASE_DEC, NULL, 0x0,
"MaxBW.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_serviceResourceCount,
{ "ServiceResourceCount", "cast.serviceResourceCount",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ServiceResourceCount.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_layoutCount,
{ "LayoutCount", "cast.layoutCount",
FT_UINT32, BASE_DEC, NULL, 0x0,
"LayoutCount.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_layout,
{ "Layout", "cast.layout",
FT_UINT32, BASE_DEC, VALS(cast_Layouts), 0x0,
NULL,
HFILL }
NULL, HFILL }
},
{ &hf_cast_maxConferences,
{ "MaxConferences", "cast.maxConferences",
FT_UINT32, BASE_DEC, NULL, 0x0,
"MaxConferences.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_activeConferenceOnRegistration,
{ "ActiveConferenceOnRegistration", "cast.activeConferenceOnRegistration",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ActiveConferenceOnRegistration.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_transmitOrReceive,
{ "TransmitOrReceive", "cast.transmitOrReceive",
FT_UINT32, BASE_DEC, VALS(cast_transmitOrReceive), 0x0,
NULL,
HFILL }
NULL, HFILL }
},
{ &hf_cast_levelPreferenceCount,
{ "LevelPreferenceCount", "cast.levelPreferenceCount",
FT_UINT32, BASE_DEC, NULL, 0x0,
"LevelPreferenceCount.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_transmitPreference,
{ "TransmitPreference", "cast.transmitPreference",
FT_UINT32, BASE_DEC, NULL, 0x0,
"TransmitPreference.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_format,
{ "Format", "cast.format",
FT_UINT32, BASE_DEC, VALS(cast_formatTypes), 0x0,
"Format.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_maxBitRate,
{ "MaxBitRate", "cast.maxBitRate",
FT_UINT32, BASE_DEC, NULL, 0x0,
"MaxBitRate.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_minBitRate,
{ "MinBitRate", "cast.minBitRate",
FT_UINT32, BASE_DEC, NULL, 0x0,
"MinBitRate.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_MPI,
{ "MPI", "cast.MPI",
FT_UINT32, BASE_DEC, NULL, 0x0,
"MPI.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_serviceNumber,
{ "ServiceNumber", "cast.serviceNumber",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ServiceNumber.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_temporalSpatialTradeOffCapability,
{ "TemporalSpatialTradeOffCapability", "cast.temporalSpatialTradeOffCapability",
FT_UINT32, BASE_DEC, NULL, 0x0,
"TemporalSpatialTradeOffCapability.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_stillImageTransmission,
{ "StillImageTransmission", "cast.stillImageTransmission",
FT_UINT32, BASE_DEC, NULL, 0x0,
"StillImageTransmission.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_h263_capability_bitfield,
{ "H263_capability_bitfield", "cast.h263_capability_bitfield",
FT_UINT32, BASE_DEC, NULL, 0x0,
"H263_capability_bitfield.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_annexNandWFutureUse,
{ "AnnexNandWFutureUse", "cast.annexNandWFutureUse",
FT_UINT32, BASE_DEC, NULL, 0x0,
"AnnexNandWFutureUse.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_modelNumber,
{ "ModelNumber", "cast.modelNumber",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ModelNumber.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_bandwidth,
{ "Bandwidth", "cast.bandwidth",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Bandwidth.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_protocolDependentData,
{ "ProtocolDependentData", "cast.protocolDependentData",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ProtocolDependentData.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_DSCPValue,
{ "DSCPValue", "cast.DSCPValue",
FT_UINT32, BASE_DEC, NULL, 0x0,
"DSCPValue.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_serviceNum,
{ "ServiceNum", "cast.serviceNum",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ServiceNum.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_precedenceValue,
{ "Precedence", "cast.precedenceValue",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Precedence value",
HFILL }
NULL, HFILL }
},
{ &hf_cast_maxStreams,
@ -1462,64 +1420,55 @@ proto_register_cast(void)
{ &hf_cast_pictureFormatCount,
{ "PictureFormatCount", "cast.pictureFormatCount",
FT_UINT32, BASE_DEC, NULL, 0x0,
"PictureFormatCount.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_confServiceNum,
{ "ConfServiceNum", "cast.confServiceNum",
FT_UINT32, BASE_DEC, NULL, 0x0,
"ConfServiceNum.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_miscCommandType,
{ "MiscCommandType", "cast.miscCommandType",
FT_UINT32, BASE_DEC, VALS(cast_miscCommandType), 0x0,
NULL,
HFILL }
NULL, HFILL }
},
{ &hf_cast_temporalSpatialTradeOff,
{ "TemporalSpatialTradeOff", "cast.temporalSpatialTradeOff",
FT_UINT32, BASE_DEC, NULL, 0x0,
"TemporalSpatialTradeOff.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_firstGOB,
{ "FirstGOB", "cast.firstGOB",
FT_UINT32, BASE_DEC, NULL, 0x0,
"FirstGOB.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_numberOfGOBs,
{ "NumberOfGOBs", "cast.numberOfGOBs",
FT_UINT32, BASE_DEC, NULL, 0x0,
"NumberOfGOBs.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_firstMB,
{ "FirstMB", "cast.firstMB",
FT_UINT32, BASE_DEC, NULL, 0x0,
"FirstMB.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_numberOfMBs,
{ "NumberOfMBs", "cast.numberOfMBs",
FT_UINT32, BASE_DEC, NULL, 0x0,
"NumberOfMBs.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_pictureNumber,
{ "PictureNumber", "cast.pictureNumber",
FT_UINT32, BASE_DEC, NULL, 0x0,
"PictureNumber.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_longTermPictureIndex,
@ -1546,29 +1495,25 @@ proto_register_cast(void)
{ &hf_cast_privacy,
{ "Privacy", "cast.privacy",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Privacy.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_precedenceLv,
{ "PrecedenceLv", "cast.precedenceLv",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Precedence Level.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_precedenceDm,
{ "PrecedenceDm", "cast.precedenceDm",
FT_UINT32, BASE_DEC, NULL, 0x0,
"Precedence Domain.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_callState,
{ "CallState", "cast.callState",
FT_UINT32, BASE_DEC, VALS(cast_callStateTypes), 0x0,
"CallState.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_callingPartyName,
@ -1616,71 +1561,109 @@ proto_register_cast(void)
{ &hf_cast_lastRedirectingPartyName,
{ "LastRedirectingPartyName", "cast.lastRedirectingPartyName",
FT_STRING, BASE_NONE, NULL, 0x0,
"LastRedirectingPartyName.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_lastRedirectingParty,
{ "LastRedirectingParty", "cast.lastRedirectingParty",
FT_STRING, BASE_NONE, NULL, 0x0,
"LastRedirectingParty.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_cgpnVoiceMailbox,
{ "CgpnVoiceMailbox", "cast.cgpnVoiceMailbox",
FT_STRING, BASE_NONE, NULL, 0x0,
"CgpnVoiceMailbox.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_cdpnVoiceMailbox,
{ "CdpnVoiceMailbox", "cast.cdpnVoiceMailbox",
FT_STRING, BASE_NONE, NULL, 0x0,
"CdpnVoiceMailbox.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_originalCdpnVoiceMailbox,
{ "OriginalCdpnVoiceMailbox", "cast.originalCdpnVoiceMailbox",
FT_STRING, BASE_NONE, NULL, 0x0,
"OriginalCdpnVoiceMailbox.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_lastRedirectingVoiceMailbox,
{ "LastRedirectingVoiceMailbox", "cast.lastRedirectingVoiceMailbox",
FT_STRING, BASE_NONE, NULL, 0x0,
"LastRedirectingVoiceMailbox.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_originalCdpnRedirectReason,
{ "OriginalCdpnRedirectReason", "cast.originalCdpnRedirectReason",
FT_UINT32, BASE_DEC, NULL, 0x0,
"OriginalCdpnRedirectReason.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_lastRedirectingReason,
{ "LastRedirectingReason", "cast.lastRedirectingReason",
FT_UINT32, BASE_DEC, NULL, 0x0,
"LastRedirectingReason.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_callInstance,
{ "CallInstance", "cast.callInstance",
FT_UINT32, BASE_DEC, NULL, 0x0,
"CallInstance.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_callSecurityStatus,
{ "CallSecurityStatus", "cast.callSecurityStatus",
FT_UINT32, BASE_DEC, VALS(cast_callSecurityStatusTypes), 0x0,
"CallSecurityStatus.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_CallingPartyName,
{ "RestrictCallingPartyName", "cast.partyPIRestrictionBits.CallingPartyName",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x01,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_CallingPartyNumber,
{ "RestrictCallingPartyNumber", "cast.partyPIRestrictionBits.CallingPartyNumber",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x02,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_CalledPartyName,
{ "RestrictCalledPartyName", "cast.partyPIRestrictionBits.CalledPartyName",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x04,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_CalledPartyNumber,
{ "RestrictCalledPartyNumber", "cast.partyPIRestrictionBits.CalledPartyNumber",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x08,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_OriginalCalledPartyName,
{ "RestrictOriginalCalledPartyName", "cast.partyPIRestrictionBits.OriginalCalledPartyName",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x10,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_OriginalCalledPartyNumber,
{ "RestrictOriginalCalledPartyNumber", "cast.partyPIRestrictionBits.OriginalCalledPartyNumber",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x20,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_LastRedirectPartyName,
{ "RestrictLastRedirectPartyName", "cast.partyPIRestrictionBits.LastRedirectPartyName",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x40,
NULL, HFILL }
},
{ &hf_cast_partyPIRestrictionBits_LastRedirectPartyNumber,
{ "RestrictLastRedirectPartyNumber", "cast.partyPIRestrictionBits.LastRedirectPartyNumber",
FT_BOOLEAN, 32, TFS(&tfs_yes_no), 0x80,
NULL, HFILL }
},
{ &hf_cast_directoryNumber,
@ -1693,29 +1676,25 @@ proto_register_cast(void)
{ &hf_cast_requestorIpAddress,
{ "RequestorIpAddress", "cast.requestorIpAddress",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL,
HFILL }
NULL, HFILL }
},
{ &hf_cast_stationIpAddress,
{ "StationIpAddress", "cast.stationIpAddress",
FT_IPv4, BASE_NONE, NULL, 0x0,
NULL,
HFILL }
NULL, HFILL }
},
{ &hf_cast_stationFriendlyName,
{ "StationFriendlyName", "cast.stationFriendlyName",
FT_STRING, BASE_NONE, NULL, 0x0,
"StationFriendlyName.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_stationGUID,
{ "stationGUID", "cast.stationGUID",
FT_STRING, BASE_NONE, NULL, 0x0,
"stationGUID.",
HFILL }
NULL, HFILL }
},
{ &hf_cast_audio,
@ -1728,8 +1707,7 @@ proto_register_cast(void)
{ &hf_cast_bitRate,
{ "BitRate", "cast.bitRate",
FT_UINT32, BASE_DEC, NULL, 0x0,
"BitRate.",
HFILL }
NULL, HFILL }
},
};

View File

@ -52,6 +52,10 @@ static int hf_clnp_length = -1;
static int hf_clnp_version = -1;
static int hf_clnp_ttl = -1;
static int hf_clnp_type = -1;
static int hf_clnp_cnf_segmentation = -1;
static int hf_clnp_cnf_more_segments = -1;
static int hf_clnp_cnf_report_error = -1;
static int hf_clnp_cnf_type = -1;
static int hf_clnp_pdu_length = -1;
static int hf_clnp_checksum = -1;
static int hf_clnp_dest_length = -1;
@ -281,21 +285,10 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
flag_string,
pdu_type_string);
type_tree = proto_item_add_subtree(ti, ett_clnp_type);
proto_tree_add_text(type_tree, tvb, P_CLNP_TYPE, 1, "%s",
decode_boolean_bitfield(cnf_type, CNF_SEG_OK, 8,
"Segmentation permitted",
"Segmentation not permitted"));
proto_tree_add_text(type_tree, tvb, P_CLNP_TYPE, 1, "%s",
decode_boolean_bitfield(cnf_type, CNF_MORE_SEGS, 8,
"More segments",
"Last segment"));
proto_tree_add_text(type_tree, tvb, P_CLNP_TYPE, 1, "%s",
decode_boolean_bitfield(cnf_type, CNF_ERR_OK, 8,
"Report error if PDU discarded",
"Don't report error if PDU discarded"));
proto_tree_add_text(type_tree, tvb, P_CLNP_TYPE, 1, "%s",
decode_enumerated_bitfield(cnf_type, CNF_TYPE, 8,
npdu_type_vals, "%s"));
proto_tree_add_item(type_tree, hf_clnp_cnf_segmentation, tvb, P_CLNP_TYPE, 1, ENC_NA);
proto_tree_add_item(type_tree, hf_clnp_cnf_more_segments, tvb, P_CLNP_TYPE, 1, ENC_NA);
proto_tree_add_item(type_tree, hf_clnp_cnf_report_error, tvb, P_CLNP_TYPE, 1, ENC_NA);
proto_tree_add_item(type_tree, hf_clnp_cnf_type, tvb, P_CLNP_TYPE, 1, ENC_NA);
}
/* If we don't have the full header - i.e., not enough to see the
@ -572,6 +565,18 @@ proto_register_clnp(void)
{ &hf_clnp_type,
{ "PDU Type", "clnp.type", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
{ &hf_clnp_cnf_segmentation,
{ "Segmentation permitted", "clnp.cnf.segmentation", FT_BOOLEAN, 8, TFS(&tfs_yes_no), CNF_SEG_OK, NULL, HFILL }},
{ &hf_clnp_cnf_more_segments,
{ "More segments", "clnp.cnf.more_segments", FT_BOOLEAN, 8, TFS(&tfs_yes_no), CNF_MORE_SEGS, NULL, HFILL }},
{ &hf_clnp_cnf_report_error,
{ "Report error if PDU discarded", "clnp.cnf.report_error", FT_BOOLEAN, 8, TFS(&tfs_yes_no), CNF_ERR_OK, NULL, HFILL }},
{ &hf_clnp_cnf_type,
{ "Type", "clnp.cnf.type", FT_UINT8, BASE_DEC, VALS(npdu_type_vals), CNF_TYPE, NULL, HFILL }},
{ &hf_clnp_pdu_length,
{ "PDU length", "clnp.pdu.len", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},

View File

@ -669,6 +669,8 @@ static gint hf_cops_pc_dfccc_id = -1;
static gint hf_cops_pcmm_amid_app_type = -1;
static gint hf_cops_pcmm_amid_am_tag = -1;
static gint hf_cops_pcmm_gate_spec_flags = -1;
static gint hf_cops_pcmm_gate_spec_flags_gate = -1;
static gint hf_cops_pcmm_gate_spec_flags_dscp_overwrite = -1;
static gint hf_cops_pcmm_gate_spec_dscp_tos_field = -1;
static gint hf_cops_pcmm_gate_spec_dscp_tos_mask = -1;
static gint hf_cops_pcmm_gate_spec_session_class_id = -1;
@ -843,6 +845,8 @@ struct _COPS_CNV
int* hfidp;
};
static const true_false_string tfs_upstream_downstream = { "Upstream", "Downstream" };
static COPS_CNV CopsCnv [] =
{
{BER_CLASS_UNI, BER_UNI_TAG_NULL, COPS_NULL, "NULL" , &hf_cops_epd_null},
@ -2094,6 +2098,19 @@ void proto_register_cops(void)
FT_UINT8, BASE_HEX, NULL, 0,
"PacketCable Multimedia GateSpec Flags", HFILL }
},
{ &hf_cops_pcmm_gate_spec_flags_gate,
{ "Gate", "cops.pc_mm_gs_flags.gate",
FT_BOOLEAN, 8, TFS(&tfs_upstream_downstream), 0x1,
NULL, HFILL }
},
{ &hf_cops_pcmm_gate_spec_flags_dscp_overwrite,
{ "DSCP/TOS overwrite", "cops.pc_mm_gs_flags.dscp_overwrite",
FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x2,
NULL, HFILL }
},
{ &hf_cops_pcmm_gate_spec_dscp_tos_field,
{ "DSCP/TOS Field", "cops.pc_mm_gs_dscp",
FT_UINT8, BASE_HEX, NULL, 0,
@ -3208,12 +3225,8 @@ cops_mm_gate_spec(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset) {
gs_flags = tvb_get_guint8(tvb, offset);
ti = info_to_display(tvb,stt,offset,1,"Flags",NULL,FMT_HEX,&hf_cops_pcmm_gate_spec_flags);
object_tree = proto_item_add_subtree(ti, ett_cops_subtree );
proto_tree_add_text(object_tree, tvb, offset, 1, "%s gate",
decode_boolean_bitfield(gs_flags, 1 << 0, 8,
"Upstream", "Downstream"));
proto_tree_add_text(object_tree, tvb, offset, 1, "%s DSCP/TOS overwrite",
decode_boolean_bitfield(gs_flags, 1 << 1, 8,
"Enable", "Disable"));
proto_tree_add_item(object_tree, hf_cops_pcmm_gate_spec_flags_gate, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(object_tree, hf_cops_pcmm_gate_spec_flags_dscp_overwrite, tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
/* DiffServ Code Point */

View File

@ -32,6 +32,9 @@
#include "packet-tcp.h"
static int proto_dlsw = -1;
static int hf_dlsw_flow_control_indication = -1;
static int hf_dlsw_flow_control_ack = -1;
static int hf_dlsw_flow_control_operator = -1;
static gint ett_dlsw = -1;
static gint ett_dlsw_header = -1;
@ -261,20 +264,11 @@ dissect_dlsw_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
flags = tvb_get_guint8(tvb,15);
ti2 = proto_tree_add_text (dlsw_header_tree, tvb, 15,1,"Flow ctrl byte = 0x%02x",flags);
dlsw_flags_tree = proto_item_add_subtree(ti2, ett_dlsw_fc);
proto_tree_add_text (dlsw_flags_tree, tvb, 15, 1, "%s",
decode_boolean_bitfield(flags, 0x80, 8,
"Flow Control Indication: yes",
"Flow Control Indication: no"));
proto_tree_add_item(dlsw_flags_tree, hf_dlsw_flow_control_indication, tvb, 15, 1, ENC_BIG_ENDIAN);
if (flags & 0x80)
{
proto_tree_add_text (dlsw_flags_tree, tvb, 15, 1, "%s",
decode_boolean_bitfield(flags, 0x40, 8,
"Flow Control Acknowledgment: yes",
"Flow Control Acknowledgment: no"));
proto_tree_add_text (dlsw_flags_tree, tvb, 15, 1, "%s",
decode_enumerated_bitfield(flags, 0x07, 8,
dlsw_fc_cmd_vals,
"Flow Control Operator: %s"));
proto_tree_add_item(dlsw_flags_tree, hf_dlsw_flow_control_ack, tvb, 15, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(dlsw_flags_tree, hf_dlsw_flow_control_operator, tvb, 15, 1, ENC_BIG_ENDIAN);
}
}
if (hlen != DLSW_INFO_HEADER)
@ -521,6 +515,18 @@ dissect_dlsw_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
void
proto_register_dlsw(void)
{
static hf_register_info hf[] = {
{&hf_dlsw_flow_control_indication,
{"Flow Control Indication", "dlsw.flow_control_indication", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x80,
NULL, HFILL}},
{&hf_dlsw_flow_control_ack,
{"Flow Control Acknowledgment", "dlsw.flow_control_ack", FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
NULL, HFILL}},
{&hf_dlsw_flow_control_operator,
{"Flow Control Operator", "dlsw.flow_control_operator", FT_UINT8, BASE_DEC, VALS(dlsw_fc_cmd_vals), 0x07,
NULL, HFILL}},
};
static gint *ett[] = {
&ett_dlsw,
&ett_dlsw_header,
@ -531,7 +537,7 @@ proto_register_dlsw(void)
};
proto_dlsw = proto_register_protocol("Data Link SWitching", "DLSw", "dlsw");
/* proto_register_field_array(proto_dlsw, hf, array_length(hf)); */
proto_register_field_array(proto_dlsw, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}

View File

@ -53,6 +53,7 @@ static int hf_q2931_message_type_ext = -1;
static int hf_q2931_message_flag = -1;
static int hf_q2931_message_action_indicator = -1;
static int hf_q2931_message_len = -1;
static int hf_q2931_ie_handling_instructions = -1;
static gint ett_q2931 = -1;
static gint ett_q2931_ext = -1;
@ -248,6 +249,9 @@ static const value_string q2931_codeset_vals[] = {
{ 0x00, NULL },
};
static const true_false_string tfs_q2931_handling_instructions = { "Follow explicit error handling instructions",
"Regular error handling procedures apply" };
static void
dissect_q2931_shift_ie(tvbuff_t *tvb, int offset, int len,
proto_tree *tree, guint8 info_element)
@ -1990,11 +1994,7 @@ dissect_q2931_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree,
decode_enumerated_bitfield(info_element_ext,
Q2931_IE_COMPAT_CODING_STD, 8,
coding_std_vals, "Coding standard: %s"));
proto_tree_add_text(ie_ext_tree, tvb, offset + 1, 1, "%s",
decode_boolean_bitfield(info_element_ext,
Q2931_IE_COMPAT_FOLLOW_INST, 8,
"Follow explicit error handling instructions",
"Regular error handling procedures apply"));
proto_tree_add_item(ie_ext_tree, hf_q2931_ie_handling_instructions, tvb, offset+1, 1, ENC_BIG_ENDIAN);
if (info_element_ext & Q2931_IE_COMPAT_FOLLOW_INST) {
proto_tree_add_text(ie_ext_tree, tvb, offset + 1, 1, "%s",
decode_enumerated_bitfield(info_element_ext,
@ -2173,6 +2173,10 @@ proto_register_q2931(void)
{ "Message length", "q2931.message_len", FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_q2931_ie_handling_instructions,
{ "Handling Instructions", "q2931.ie_handling_instructions", FT_BOOLEAN, 8, TFS(&tfs_q2931_handling_instructions), Q2931_IE_COMPAT_FOLLOW_INST,
NULL, HFILL }},
};
static gint *ett[] = {
&ett_q2931,

View File

@ -109,6 +109,13 @@ static int proto_vines_ip = -1;
static int hf_vines_ip_protocol = -1;
static int hf_vines_ip_checksum = -1;
static int hf_vines_ip_length = -1;
static int hf_vines_tctl = -1;
static int hf_vines_tctl_node = -1;
static int hf_vines_tctl_class = -1;
static int hf_vines_tctl_forward_router = -1;
static int hf_vines_tctl_metric = -1;
static int hf_vines_tctl_notif_packet = -1;
static int hf_vines_tctl_hop_count = -1;
static gint ett_vines_ip = -1;
static gint ett_vines_ip_tctl = -1;
@ -118,11 +125,32 @@ static int proto_vines_echo = -1;
static gint ett_vines_echo = -1;
static int proto_vines_ipc = -1;
static int hf_vines_ipc_src_port = -1;
static int hf_vines_ipc_dest_port = -1;
static int hf_vines_ipc_packet_type = -1;
static int hf_vines_ipc_control = -1;
static int hf_vines_ipc_control_ack = -1;
static int hf_vines_ipc_control_end_msg = -1;
static int hf_vines_ipc_control_beg_msg = -1;
static int hf_vines_ipc_control_abort_msg = -1;
static gint ett_vines_ipc = -1;
static gint ett_vines_ipc_control = -1;
static int proto_vines_spp = -1;
static int hf_vines_spp_src_port = -1;
static int hf_vines_spp_dest_port = -1;
static int hf_vines_spp_packet_type = -1;
static int hf_vines_spp_control = -1;
static int hf_vines_spp_control_ack = -1;
static int hf_vines_spp_control_end_msg = -1;
static int hf_vines_spp_control_beg_msg = -1;
static int hf_vines_spp_control_abort_msg = -1;
static int hf_vines_spp_local_id = -1;
static int hf_vines_spp_remote_id = -1;
static int hf_vines_spp_seq_num = -1;
static int hf_vines_spp_ack_num = -1;
static int hf_vines_spp_window = -1;
static gint ett_vines_spp = -1;
static gint ett_vines_spp_control = -1;
@ -132,6 +160,23 @@ static int proto_vines_arp = -1;
static gint ett_vines_arp = -1;
static int proto_vines_rtp = -1;
static int hf_vines_rtp_comp_flag = -1;
static int hf_vines_rtp_comp_flag_neighbor_router = -1;
static int hf_vines_rtp_comp_flag_sequence_rtp = -1;
static int hf_vines_rtp_comp_flag_sequence_rtp_version = -1;
static int hf_vines_rtp_control = -1;
static int hf_vines_rtp_control_sync_broadcast = -1;
static int hf_vines_rtp_control_topology_update = -1;
static int hf_vines_rtp_control_specific_request = -1;
static int hf_vines_rtp_control_end_msg = -1;
static int hf_vines_rtp_control_beg_msg = -1;
static int hf_vines_rtp_machine_rtp = -1;
static int hf_vines_rtp_machine_tcpip = -1;
static int hf_vines_rtp_machine_bus = -1;
static int hf_vines_rtp_flag_sequence_rtp = -1;
static int hf_vines_rtp_flag_network_p2p = -1;
static int hf_vines_rtp_flag_data_link_p2p = -1;
static int hf_vines_rtp_flag_broadcast_medium = -1;
static gint ett_vines_rtp = -1;
static gint ett_vines_rtp_compatibility_flags = -1;
@ -154,15 +199,6 @@ enum {
VIP_PROTO_ICP = 6 /* Internet Control Protocol (ICP) */
};
typedef struct _e_vip {
guint16 vip_chksum;
guint16 vip_pktlen;
guint8 vip_tctl; /* Transport Control */
guint8 vip_proto;
guint8 vip_dst[VINES_ADDR_LEN];
guint8 vip_src[VINES_ADDR_LEN];
} e_vip;
/* VINES SPP and IPC structs and definitions */
enum {
@ -373,10 +409,10 @@ proto_reg_handoff_vines_llc(void)
static dissector_table_t vines_ip_dissector_table;
static const value_string class_vals[] = {
{ 0x00, "Reachable regardless of cost" },
{ 0x10, "Reachable without cost" },
{ 0x20, "Reachable with low cost (>= 4800 bps)" },
{ 0x30, "Reachable via LAN" },
{ 0x00, "Regardless of cost" },
{ 0x10, "Without cost" },
{ 0x20, "With low cost (>= 4800 bps)" },
{ 0x30, "Via LAN" },
{ 0, NULL }
};
@ -393,11 +429,18 @@ static const guint8 bcast_addr[VINES_ADDR_LEN] = {
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
static const true_false_string tfs_vine_tctl_router_all = { "Router nodes", "All nodes" };
static const true_false_string tfs_vine_tctl_forward_router = { "Can handle redirect packets", "Cannot handle redirect packets" };
static const true_false_string tfs_vine_tctl_return_not_return = { "Return", "Do not return" };
static void
dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0;
e_vip viph;
guint16 vip_chksum;
guint16 vip_pktlen;
guint8 vip_tctl; /* Transport Control */
guint8 vip_proto;
proto_tree *vip_tree, *tctl_tree;
proto_item *ti;
const guint8 *dst_addr, *src_addr;
@ -409,17 +452,16 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* To do: check for runts, errs, etc. */
/* Avoids alignment problems on many architectures. */
tvb_memcpy(tvb, (guint8 *)&viph, offset, sizeof(e_vip));
viph.vip_chksum = g_ntohs(viph.vip_chksum);
viph.vip_pktlen = g_ntohs(viph.vip_pktlen);
/* capture the necessary parts of the header */
vip_chksum = tvb_get_letohs(tvb, offset);
vip_pktlen = tvb_get_letohs(tvb, offset+2);
vip_tctl = tvb_get_guint8(tvb, offset+3);
vip_proto = tvb_get_guint8(tvb, offset+4);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s (0x%02x)",
val_to_str_const(viph.vip_proto, proto_vals,
"Unknown VIP protocol"),
viph.vip_proto);
val_to_str_const(vip_tctl, proto_vals, "Unknown VIP protocol"),
vip_tctl);
}
src_addr = tvb_get_ptr(tvb, offset+12, VINES_ADDR_LEN);
@ -430,19 +472,18 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SET_ADDRESS(&pinfo->dst, AT_VINES, VINES_ADDR_LEN, dst_addr);
/* helpers to transport control */
if (memcmp(viph.vip_dst, bcast_addr, VINES_ADDR_LEN) == 0)
if (memcmp(dst_addr, bcast_addr, VINES_ADDR_LEN) == 0)
is_broadcast = TRUE;
/*
* Adjust the length of this tvbuff to include only the Vines IP
* datagram.
*/
set_actual_length(tvb, viph.vip_pktlen < 18 ? 18 : viph.vip_pktlen);
set_actual_length(tvb, vip_pktlen < 18 ? 18 : vip_pktlen);
if (tree) {
ti = proto_tree_add_item(tree, proto_vines_ip, tvb,
offset, viph.vip_pktlen,
ENC_NA);
offset, vip_pktlen, ENC_NA);
vip_tree = proto_item_add_subtree(ti, ett_vines_ip);
proto_tree_add_item(vip_tree, hf_vines_ip_checksum,
tvb, offset, 2, ENC_BIG_ENDIAN);
@ -452,38 +493,29 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
ti = proto_tree_add_text(vip_tree, tvb, offset, 1,
"Transport control: 0x%02x",
viph.vip_tctl);
ti = proto_tree_add_item(vip_tree, hf_vines_tctl,
tvb, offset, 1, ENC_BIG_ENDIAN);
tctl_tree = proto_item_add_subtree(ti, ett_vines_ip_tctl);
/*
* XXX - bit 0x80 is "Normal" if 0; what is it if 1?
*/
if (is_broadcast) {
proto_tree_add_text(tctl_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(viph.vip_tctl, 0x40, 1*8,
"Router nodes",
"All nodes"));
proto_tree_add_text(tctl_tree, tvb, offset, 1, "%s",
decode_enumerated_bitfield(viph.vip_tctl, 0x30, 1*8,
class_vals, "%s"));
proto_tree_add_item(tctl_tree, hf_vines_tctl_node,
tvb, offset, 1, ENC_NA);
proto_tree_add_item(tctl_tree, hf_vines_tctl_class,
tvb, offset, 1, ENC_NA);
} else {
proto_tree_add_text(tctl_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(viph.vip_tctl, 0x40, 1*8,
"Forwarding router can handle redirect packets",
"Forwarding router cannot handle redirect packets"));
proto_tree_add_text(tctl_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(viph.vip_tctl, 0x20, 1*8,
"Return metric notification packet",
"Do not return metric notification packet"));
proto_tree_add_text(tctl_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(viph.vip_tctl, 0x10, 1*8,
"Return exception notification packet",
"Do not return exception notification packet"));
proto_tree_add_item(tctl_tree, hf_vines_tctl_forward_router,
tvb, offset, 1, ENC_NA);
proto_tree_add_item(tctl_tree, hf_vines_tctl_metric,
tvb, offset, 1, ENC_NA);
proto_tree_add_item(tctl_tree, hf_vines_tctl_notif_packet,
tvb, offset, 1, ENC_NA);
}
proto_tree_add_text(tctl_tree, tvb, offset, 1, "%s",
decode_numeric_bitfield(viph.vip_tctl, 0x0F, 1*8,
"Hop count remaining = %u"));
proto_tree_add_item(tctl_tree, hf_vines_tctl_hop_count,
tvb, offset, 1, ENC_NA);
offset += 1;
proto_tree_add_item(vip_tree, hf_vines_ip_protocol, tvb,
@ -505,7 +537,7 @@ dissect_vines_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 18;
}
next_tvb = tvb_new_subset_remaining(tvb, offset);
if (!dissector_try_uint(vines_ip_dissector_table, viph.vip_proto,
if (!dissector_try_uint(vines_ip_dissector_table, vip_proto,
next_tvb, pinfo, tree))
call_dissector(data_handle, next_tvb, pinfo, tree);
}
@ -534,6 +566,40 @@ proto_register_vines_ip(void)
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_tctl,
{ "Transport control", "vines_ip.tctl",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_tctl_node,
{ "Nodes", "vines_ip.tctl.node",
FT_BOOLEAN, 8, TFS(&tfs_vine_tctl_router_all), 0x40,
NULL, HFILL }},
{ &hf_vines_tctl_class,
{ "Reachable", "vines_ip.tctl.class",
FT_UINT8, BASE_DEC, VALS(class_vals), 0x30,
NULL, HFILL }},
{ &hf_vines_tctl_forward_router,
{ "Forwarding Router", "vines_ip.tctl.forward_router",
FT_BOOLEAN, 8, TFS(&tfs_vine_tctl_forward_router), 0x40,
NULL, HFILL }},
{ &hf_vines_tctl_metric,
{ "Metric notification packet", "vines_ip.tctl.metric",
FT_BOOLEAN, 8, TFS(&tfs_vine_tctl_return_not_return), 0x20,
NULL, HFILL }},
{ &hf_vines_tctl_notif_packet,
{ "Exception notification packet", "vines_ip.tctl.notif_packet",
FT_BOOLEAN, 8, TFS(&tfs_vine_tctl_return_not_return), 0x10,
NULL, HFILL }},
{ &hf_vines_tctl_hop_count,
{ "Hop count remaining", "vines_ip.tctl.hop_count",
FT_UINT8, BASE_DEC, NULL, 0x0F,
NULL, HFILL }},
};
proto_vines_ip = proto_register_protocol("Banyan Vines IP", "Vines IP",
@ -633,6 +699,9 @@ static const value_string vipc_err_vals[] = {
{ 0, NULL }
};
static const true_false_string tfs_vine_ipc_send_not_send = { "Send", "Do not Send" };
static const true_false_string tfs_vine_ipc_abort_not_abort = { "Abort", "Do not abort" };
static void
dissect_vines_ipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
@ -695,59 +764,35 @@ dissect_vines_ipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
if (tree) {
ti = proto_tree_add_item(tree, proto_vines_ipc, tvb, offset,
sizeof(viph), ENC_NA);
vipc_tree = proto_item_add_subtree(ti, ett_vines_ipc);
proto_tree_add_text(vipc_tree, tvb, offset, 2,
"Source port: 0x%04x", viph.vipc_sport);
}
ti = proto_tree_add_item(tree, proto_vines_ipc, tvb, offset,
sizeof(viph), ENC_NA);
vipc_tree = proto_item_add_subtree(ti, ett_vines_ipc);
proto_tree_add_item(vipc_tree, hf_vines_ipc_src_port,
tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (tree) {
proto_tree_add_text(vipc_tree, tvb, offset, 2,
"Destination port: 0x%04x",
viph.vipc_dport);
}
proto_tree_add_item(vipc_tree, hf_vines_ipc_dest_port,
tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
if (tree) {
proto_tree_add_text(vipc_tree, tvb, offset, 1,
"Packet type: 0x%02x (%s)",
viph.vipc_pkttype,
val_to_str_const(viph.vipc_pkttype, pkttype_vals,
"Unknown"));
}
proto_tree_add_item(vipc_tree, hf_vines_ipc_packet_type,
tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
if (viph.vipc_pkttype != PKTTYPE_DGRAM) {
if (tree) {
ti = proto_tree_add_text(vipc_tree, tvb, offset, 1,
"Control: 0x%02x",
viph.vipc_control);
control_tree = proto_item_add_subtree(ti,
ett_vines_ipc_control);
/*
* XXX - do reassembly based on BOM/EOM bits.
*/
proto_tree_add_text(control_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(viph.vipc_control, 0x80,
1*8,
"Send immediate acknowledgment",
"Do not send immediate acknowledgement"));
proto_tree_add_text(control_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(viph.vipc_control, 0x40,
1*8,
"End of message",
"Not end of message"));
proto_tree_add_text(control_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(viph.vipc_control, 0x20,
1*8,
"Beginning of message",
"Not beginning of message"));
proto_tree_add_text(control_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(viph.vipc_control, 0x10,
1*8,
"Abort current message",
"Do not abort current message"));
}
ti = proto_tree_add_item(vipc_tree, hf_vines_ipc_control,
tvb, offset, 1, ENC_BIG_ENDIAN);
control_tree = proto_item_add_subtree(ti, ett_vines_ipc_control);
/*
* XXX - do reassembly based on BOM/EOM bits.
*/
proto_tree_add_item(control_tree, hf_vines_ipc_control_ack,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(control_tree, hf_vines_ipc_control_end_msg,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(control_tree, hf_vines_ipc_control_beg_msg,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(control_tree, hf_vines_ipc_control_abort_msg,
tvb, offset, 1, ENC_BIG_ENDIAN);
}
offset += 1;
if (viph.vipc_pkttype != PKTTYPE_DGRAM) {
@ -806,6 +851,48 @@ dissect_vines_ipc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_vines_ipc(void)
{
static hf_register_info hf[] = {
{ &hf_vines_ipc_src_port,
{ "Source port", "vines_ipc.src_port",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_ipc_dest_port,
{ "Destination port", "vines_ipc.dest_port",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_ipc_packet_type,
{ "Packet type", "vines_ipc.packet_type",
FT_UINT8, BASE_HEX, VALS(pkttype_vals), 0x0,
NULL, HFILL }},
{ &hf_vines_ipc_control,
{ "Control", "vines_ipc.control",
FT_UINT8, BASE_HEX, VALS(pkttype_vals), 0x0,
NULL, HFILL }},
{ &hf_vines_ipc_control_ack,
{ "Immediate acknowledgment", "vines_ipc.control.ack",
FT_BOOLEAN, 8, TFS(&tfs_vine_ipc_send_not_send), 0x80,
NULL, HFILL }},
{ &hf_vines_ipc_control_end_msg,
{ "End of message", "vines_ipc.control.end_msg",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
NULL, HFILL }},
{ &hf_vines_ipc_control_beg_msg,
{ "Beginning of message", "vines_ipc.control.beg_msg",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20,
NULL, HFILL }},
{ &hf_vines_ipc_control_abort_msg,
{ "Current message", "vines_ipc.control.abort_msg",
FT_BOOLEAN, 8, TFS(&tfs_vine_ipc_abort_not_abort), 0x10,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_vines_ipc,
&ett_vines_ipc_control,
@ -813,6 +900,7 @@ proto_register_vines_ipc(void)
proto_vines_ipc = proto_register_protocol("Banyan Vines IPC",
"Vines IPC", "vines_ipc");
proto_register_field_array(proto_vines_ipc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_heur_dissector_list("vines_ipc",
@ -870,51 +958,37 @@ dissect_vines_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tree, proto_vines_spp, tvb, offset,
sizeof(viph), ENC_NA);
vspp_tree = proto_item_add_subtree(ti, ett_vines_spp);
proto_tree_add_text(vspp_tree, tvb, offset, 2,
"Source port: 0x%04x", viph.vspp_sport);
proto_tree_add_text(vspp_tree, tvb, offset + 2, 2,
"Destination port: 0x%04x",
viph.vspp_dport);
proto_tree_add_text(vspp_tree, tvb, offset + 4, 1,
"Packet type: 0x%02x (%s)",
viph.vspp_pkttype,
val_to_str_const(viph.vspp_pkttype, pkttype_vals,
"Unknown"));
ti = proto_tree_add_text(vspp_tree, tvb, offset + 5, 1,
"Control: 0x%02x", viph.vspp_control);
proto_tree_add_item(vspp_tree, hf_vines_spp_src_port,
tvb, offset, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(vspp_tree, hf_vines_spp_dest_port,
tvb, offset+2, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(vspp_tree, hf_vines_spp_packet_type,
tvb, offset+4, 1, ENC_BIG_ENDIAN);
ti = proto_tree_add_item(vspp_tree, hf_vines_spp_control,
tvb, offset+5, 1, ENC_BIG_ENDIAN);
control_tree = proto_item_add_subtree(ti, ett_vines_spp_control);
/*
* XXX - do reassembly based on BOM/EOM bits.
*/
proto_tree_add_text(control_tree, tvb, offset + 5, 1, "%s",
decode_boolean_bitfield(viph.vspp_control, 0x80, 1*8,
"Send immediate acknowledgment",
"Do not send immediate acknowledgement"));
proto_tree_add_text(control_tree, tvb, offset + 5, 1, "%s",
decode_boolean_bitfield(viph.vspp_control, 0x40, 1*8,
"End of message",
"Not end of message"));
proto_tree_add_text(control_tree, tvb, offset + 5, 1, "%s",
decode_boolean_bitfield(viph.vspp_control, 0x20, 1*8,
"Beginning of message",
"Not beginning of message"));
proto_tree_add_text(control_tree, tvb, offset + 5, 1, "%s",
decode_boolean_bitfield(viph.vspp_control, 0x10, 1*8,
"Abort current message",
"Do not abort current message"));
proto_tree_add_text(vspp_tree, tvb, offset + 6, 2,
"Local Connection ID: 0x%04x",
viph.vspp_lclid);
proto_tree_add_text(vspp_tree, tvb, offset + 8, 2,
"Remote Connection ID: 0x%04x",
viph.vspp_rmtid);
proto_tree_add_text(vspp_tree, tvb, offset + 10, 2,
"Sequence number: %u",
viph.vspp_seqno);
proto_tree_add_text(vspp_tree, tvb, offset + 12, 2,
"Ack number: %u", viph.vspp_ack);
proto_tree_add_text(vspp_tree, tvb, offset + 14, 2,
"Window: %u", viph.vspp_win);
proto_tree_add_item(control_tree, hf_vines_spp_control_ack,
tvb, offset+5, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(control_tree, hf_vines_spp_control_end_msg,
tvb, offset+5, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(control_tree, hf_vines_spp_control_beg_msg,
tvb, offset+5, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(control_tree, hf_vines_spp_control_abort_msg,
tvb, offset+5, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(vspp_tree, hf_vines_spp_local_id,
tvb, offset+6, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(vspp_tree, hf_vines_spp_remote_id,
tvb, offset+8, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(vspp_tree, hf_vines_spp_seq_num,
tvb, offset+10, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(vspp_tree, hf_vines_spp_ack_num,
tvb, offset+12, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(vspp_tree, hf_vines_spp_window,
tvb, offset+14, 2, ENC_BIG_ENDIAN);
}
offset += 16; /* sizeof SPP */
@ -933,6 +1007,73 @@ dissect_vines_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_vines_spp(void)
{
static hf_register_info hf[] = {
{ &hf_vines_spp_src_port,
{ "Source port", "vines_spp.src_port",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_spp_dest_port,
{ "Destination port", "vines_spp.dest_port",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_spp_packet_type,
{ "Packet type", "vines_spp.packet_type",
FT_UINT8, BASE_HEX, VALS(pkttype_vals), 0x0,
NULL, HFILL }},
{ &hf_vines_spp_control,
{ "Control", "vines_spp.control",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_spp_control_ack,
{ "Immediate acknowledgment", "vines_spp.control.ack",
FT_BOOLEAN, 8, TFS(&tfs_vine_ipc_send_not_send), 0x80,
NULL, HFILL }},
{ &hf_vines_spp_control_end_msg,
{ "End of message", "vines_spp.control.end_msg",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x40,
NULL, HFILL }},
{ &hf_vines_spp_control_beg_msg,
{ "Beginning of message", "vines_spp.control.beg_msg",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x20,
NULL, HFILL }},
{ &hf_vines_spp_control_abort_msg,
{ "Current message", "vines_spp.control.abort_msg",
FT_BOOLEAN, 8, TFS(&tfs_vine_ipc_abort_not_abort), 0x10,
NULL, HFILL }},
{ &hf_vines_spp_local_id,
{ "Local Connection ID", "vines_spp.local_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_spp_remote_id,
{ "Remote Connection ID", "vines_spp.remote_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_spp_seq_num,
{ "Sequence number", "vines_spp.seq_num",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_spp_ack_num,
{ "Ack number", "vines_spp.ack_num",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_spp_window,
{ "Window", "vines_spp.window",
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_vines_spp,
&ett_vines_spp_control,
@ -940,6 +1081,7 @@ proto_register_vines_spp(void)
proto_vines_spp = proto_register_protocol("Banyan Vines SPP",
"Vines SPP", "vines_spp");
proto_register_field_array(proto_vines_spp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
register_heur_dissector_list("vines_spp",
@ -1137,6 +1279,13 @@ static const value_string vines_rtp_info_type_vals[] = {
{ 0, NULL }
};
static const true_false_string tfs_vine_auto_config_not_auto_config = { "Auto-configured", "Not an auto-configured" };
static const true_false_string tfs_vine_rtp_not_all_neighbor_all_neighbor = { "Not all neighbor routers support", "All neighbor routers support" };
static const true_false_string tfs_vine_rtp_sequenced_not_sequenced = { "Sequenced", "Not Sequenced" };
static const true_false_string tfs_part_not_part = { "Part of", "Not part of" };
static const true_false_string tfs_fast_bus_slow_bus = { "Fast bus", "Slow bus" };
static const true_false_string tfs_vine_rtp_no_yes = { "No", "Yes" };
static void rtp_show_machine_type(proto_tree *tree, tvbuff_t *tvb, int offset,
const char *tag);
static void rtp_show_flags(proto_tree *tree, tvbuff_t *tvb, int offset,
@ -1157,12 +1306,10 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 operation_type;
guint8 node_type;
guint8 controller_type;
guint8 compatibility_flags;
guint8 link_addr_length;
guint8 source_route_length;
guint8 requested_info;
guint8 info_type;
guint8 control_flags;
guint16 metric;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Vines RTP");
@ -1294,30 +1441,16 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Unknown"),
node_type);
offset += 1;
compatibility_flags = tvb_get_guint8(tvb, offset);
ti = proto_tree_add_text(vines_rtp_tree, tvb, offset, 1,
"Compatibility Flags: 0x%02x",
compatibility_flags);
subtree = proto_item_add_subtree(ti,
ett_vines_rtp_compatibility_flags);
proto_tree_add_text(subtree, tvb,
offset, 1, "%s",
decode_boolean_bitfield(compatibility_flags,
0x04, 1*8,
"Auto-configured non-Vines-reachable neighbor router",
"Not an auto-configured non-Vines-reachable neighbor router"));
proto_tree_add_text(subtree, tvb,
offset, 1, "%s",
decode_boolean_bitfield(compatibility_flags,
0x02, 1*8,
"Not all neighbor routers support Sequenced RTP",
"All neighbor routers support Sequenced RTP"));
proto_tree_add_text(subtree, tvb,
offset, 1, "%s",
decode_boolean_bitfield(compatibility_flags,
0x01, 1*8,
"Sequenced RTP version mismatch",
"No Sequenced RTP version mismatch"));
ti = proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_comp_flag,
tvb, offset, 1, ENC_BIG_ENDIAN);
subtree = proto_item_add_subtree(ti, ett_vines_rtp_compatibility_flags);
proto_tree_add_item(subtree, hf_vines_rtp_comp_flag_neighbor_router,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_vines_rtp_comp_flag_sequence_rtp,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_vines_rtp_comp_flag_sequence_rtp_version,
tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
offset += 1; /* reserved */
switch (operation_type) {
@ -1340,44 +1473,21 @@ dissect_vines_rtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
"Unknown"),
info_type);
offset += 1;
control_flags = tvb_get_guint8(tvb, offset);
ti = proto_tree_add_text(vines_rtp_tree, tvb,
offset, 1,
"Control Flags: 0x%02x",
control_flags);
ti = proto_tree_add_item(vines_rtp_tree, hf_vines_rtp_control,
tvb, offset, 1, ENC_BIG_ENDIAN);
subtree = proto_item_add_subtree(ti,
ett_vines_rtp_control_flags);
proto_tree_add_text(subtree, tvb,
offset, 1, "%s",
decode_boolean_bitfield(control_flags,
0x10, 1*8,
"Part of routing table synchronization broadcast",
"Not part of routing table synchronization broadcast"));
proto_tree_add_text(subtree, tvb,
offset, 1, "%s",
decode_boolean_bitfield(control_flags,
0x08, 1*8,
"Part of full topology update",
"Not part of full topology update"));
proto_tree_add_text(subtree, tvb,
offset, 1, "%s",
decode_boolean_bitfield(control_flags,
0x04, 1*8,
"Contains info specifically requested or network changes",
"Not a response to a specific request"));
proto_tree_add_item(subtree, hf_vines_rtp_control_sync_broadcast,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_vines_rtp_control_topology_update,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_vines_rtp_control_specific_request,
tvb, offset, 1, ENC_BIG_ENDIAN);
/* XXX - need reassembly? */
proto_tree_add_text(subtree, tvb,
offset, 1, "%s",
decode_boolean_bitfield(control_flags,
0x02, 1*8,
"End of message",
"Not end of message"));
proto_tree_add_text(subtree, tvb,
offset, 1, "%s",
decode_boolean_bitfield(control_flags,
0x01, 1*8,
"Beginning of message",
"Not beginning of message"));
proto_tree_add_item(subtree, hf_vines_rtp_control_end_msg,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_vines_rtp_control_beg_msg,
tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
proto_tree_add_text(vines_rtp_tree, tvb,
offset, 2,
@ -1526,18 +1636,12 @@ rtp_show_machine_type(proto_tree *tree, tvbuff_t *tvb, int offset, const char *t
tag == NULL ? "" : " ",
machine_type);
subtree = proto_item_add_subtree(ti, ett_vines_rtp_mtype);
proto_tree_add_text(subtree, tvb, offset, 1, "%s",
decode_boolean_bitfield(machine_type, 0x04, 1*8,
"Sequenced RTP supported",
"Sequenced RTP not supported"));
proto_tree_add_text(subtree, tvb, offset, 1, "%s",
decode_boolean_bitfield(machine_type, 0x02, 1*8,
"TCP/IP supported",
"TCP/IP not supported"));
proto_tree_add_text(subtree, tvb, offset, 1, "%s",
decode_boolean_bitfield(machine_type, 0x01, 1*8,
"Fast bus",
"Slow bus"));
proto_tree_add_item(subtree, hf_vines_rtp_machine_rtp,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_vines_rtp_machine_tcpip,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(subtree, hf_vines_rtp_machine_bus,
tvb, offset, 1, ENC_BIG_ENDIAN);
}
static void
@ -1551,22 +1655,14 @@ rtp_show_flags(proto_tree *tree, tvbuff_t *tvb, int offset, const char *tag)
ti = proto_tree_add_text(tree, tvb, offset, 1, "%s Flags: 0x%02x",
tag, flags);
flags_tree = proto_item_add_subtree(ti, ett_vines_rtp_flags);
proto_tree_add_text(flags_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(flags, 0x08, 1*8,
"Network doesn't support Sequenced RTP",
"Network supports Sequenced RTP"));
proto_tree_add_text(flags_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(flags, 0x04, 1*8,
"Network accessed point-to-point on non-Vines network",
"Network not accessed point-to-point on non-Vines network"));
proto_tree_add_text(flags_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(flags, 0x02, 1*8,
"Data link to network uses point-to-point connection",
"Data link to network doesn't use point-to-point connection"));
proto_tree_add_text(flags_tree, tvb, offset, 1, "%s",
decode_boolean_bitfield(flags, 0x01, 1*8,
"Network accessed across broadcast medium",
"Network not accessed across broadcast medium"));
proto_tree_add_item(flags_tree, hf_vines_rtp_flag_sequence_rtp,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flags_tree, hf_vines_rtp_flag_network_p2p,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flags_tree, hf_vines_rtp_flag_data_link_p2p,
tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(flags_tree, hf_vines_rtp_flag_broadcast_medium,
tvb, offset, 1, ENC_BIG_ENDIAN);
}
static int
@ -1625,6 +1721,93 @@ rtp_show_gateway_info(proto_tree *tree, tvbuff_t *tvb, int offset,
void
proto_register_vines_rtp(void)
{
static hf_register_info hf[] = {
{ &hf_vines_rtp_comp_flag,
{ "Compatibility Flags", "vines_rtp.comp_flag",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_rtp_comp_flag_neighbor_router,
{ "non-Vines-reachable neighbor router", "vines_rtp.comp_flag.neighbor_router",
FT_BOOLEAN, 8, TFS(&tfs_vine_auto_config_not_auto_config), 0x04,
NULL, HFILL }},
{ &hf_vines_rtp_comp_flag_sequence_rtp,
{ "Sequenced RTP", "vines_rtp.comp_flag.sequence_rtp",
FT_BOOLEAN, 8, TFS(&tfs_vine_rtp_not_all_neighbor_all_neighbor), 0x02,
NULL, HFILL }},
{ &hf_vines_rtp_comp_flag_sequence_rtp_version,
{ "RTP version mismatch", "vines_rtp.comp_flag.rtp_version",
FT_BOOLEAN, 8, TFS(&tfs_vine_rtp_sequenced_not_sequenced), 0x01,
NULL, HFILL }},
{ &hf_vines_rtp_control,
{ "Control Flags", "vines_rtp.control",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ &hf_vines_rtp_control_sync_broadcast,
{ "Routing table synchronization broadcast", "vines_rtp.control.sync_broadcast",
FT_BOOLEAN, 8, TFS(&tfs_part_not_part), 0x10,
NULL, HFILL }},
{ &hf_vines_rtp_control_topology_update,
{ "Full topology update", "vines_rtp.control.topology_update",
FT_BOOLEAN, 8, TFS(&tfs_part_not_part), 0x08,
NULL, HFILL }},
{ &hf_vines_rtp_control_specific_request,
{ "Contains info specifically requested", "vines_rtp.control.specific_request",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04,
NULL, HFILL }},
{ &hf_vines_rtp_control_end_msg,
{ "End of message", "vines_rtp.control.end_msg",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
NULL, HFILL }},
{ &hf_vines_rtp_control_beg_msg,
{ "Beginning of message", "vines_rtp.control.beg_msg",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
NULL, HFILL }},
{ &hf_vines_rtp_machine_rtp,
{ "Sequenced RTP", "vines_rtp.machine.rtp",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x04,
NULL, HFILL }},
{ &hf_vines_rtp_machine_tcpip,
{ "TCP/IP", "vines_rtp.machine.tcpip",
FT_BOOLEAN, 8, TFS(&tfs_supported_not_supported), 0x02,
NULL, HFILL }},
{ &hf_vines_rtp_machine_bus,
{ "Bus", "vines_rtp.machine.bus",
FT_BOOLEAN, 8, TFS(&tfs_fast_bus_slow_bus), 0x01,
NULL, HFILL }},
{ &hf_vines_rtp_flag_sequence_rtp,
{ "Network supports Sequenced RTP", "vines_rtp.flag.sequence_rtp",
FT_BOOLEAN, 8, TFS(&tfs_vine_rtp_no_yes), 0x08,
NULL, HFILL }},
{ &hf_vines_rtp_flag_network_p2p,
{ "Network accessed point-to-point on non-Vines network", "vines_rtp.flag.network_p2p",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x04,
NULL, HFILL }},
{ &hf_vines_rtp_flag_data_link_p2p,
{ "Data link to network uses point-to-point connection", "vines_rtp.flag.data_link_p2p",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x02,
NULL, HFILL }},
{ &hf_vines_rtp_flag_broadcast_medium,
{ "Network accessed across broadcast medium", "vines_rtp.flag.broadcast_medium",
FT_BOOLEAN, 8, TFS(&tfs_yes_no), 0x01,
NULL, HFILL }}
};
static gint *ett[] = {
&ett_vines_rtp,
&ett_vines_rtp_compatibility_flags,
@ -1636,6 +1819,7 @@ proto_register_vines_rtp(void)
proto_vines_rtp = proto_register_protocol(
"Banyan Vines RTP", "Vines RTP", "vines_rtp");
proto_register_field_array(proto_vines_rtp, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
}

View File

@ -182,6 +182,7 @@ static gint hf_x25_reassembled_length = -1;
static gint hf_x25_fast_select = -1;
static gint hf_x25_icrd = -1;
static gint hf_x25_reverse_charging = -1;
static gint hf_x25_charging_info = -1;
static const value_string vals_modulo[] = {
{ 1, "8" },
@ -712,10 +713,7 @@ dump_facilities(proto_tree *tree, int *offset, tvbuff_t *tvb)
byte1 = tvb_get_guint8(tvb, *offset + 1);
proto_tree_add_text(fac_subtree, tvb, *offset+1, 1,
"Parameter : %02X", byte1);
proto_tree_add_text(fac_subtree, tvb, *offset+1, 1, "%s",
decode_boolean_bitfield(byte1, 0x01, 1*8,
"Charging information requested",
"Charging information not requested"));
proto_tree_add_item(fac_subtree, hf_x25_charging_info, tvb, *offset+1, 1, ENC_BIG_ENDIAN);
}
break;
case X25_FAC_THROUGHPUT:
@ -2682,6 +2680,10 @@ proto_register_x25(void)
{ &hf_x25_reverse_charging,
{ "Reverse charging", "x25.reverse_charging", FT_BOOLEAN, 8, TFS(&x25_reverse_charging_val), 0x01,
NULL, HFILL }},
{ &hf_x25_charging_info,
{ "Charging information", "x25.charging_info", FT_BOOLEAN, 8, TFS(&tfs_requested_not_requested), 0x01,
NULL, HFILL }},
};
static gint *ett[] = {
&ett_x25,