forked from osmocom/wireshark
Convert proto_tree_add_boolean to proto_tree_add_bitmask_[value|value_with_flags|list]
Part 2 of a few Change-Id: Ic1f1aafe2ed02dce95b15c03a91cbd68807a5cf4 Reviewed-on: https://code.wireshark.org/review/8165 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
825aa502e7
commit
8d6324f759
|
@ -765,7 +765,6 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
|
|||
gint32 tag;
|
||||
guint32 len;
|
||||
gint32 val;
|
||||
header_field_info *hfinfo;
|
||||
|
||||
int otheroffset = offset;
|
||||
if(!implicit_tag){
|
||||
|
@ -778,25 +777,16 @@ offset = dissect_ber_boolean(implicit_tag, actx, tree, tvb, offset, hf_index, &v
|
|||
|
||||
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, -1, &val);
|
||||
|
||||
hfinfo = proto_registrar_get_nth(hf_index);
|
||||
|
||||
if (val >0) {
|
||||
proto_tree *subtree;
|
||||
subtree = proto_tree_add_subtree_format(tree, tvb, otheroffset+1, len,
|
||||
ett_ldap_DirSyncFlagsSubEntry, NULL, "%s: 0x%08x", hfinfo->name, val);
|
||||
const int * flags[] = {
|
||||
&hf_ldap_object_security_flag,
|
||||
&hf_ldap_ancestor_first_flag,
|
||||
&hf_ldap_public_data_only_flag,
|
||||
&hf_ldap_incremental_value_flag,
|
||||
};
|
||||
|
||||
if (val & 0x1) {
|
||||
proto_tree_add_boolean(subtree, hf_ldap_object_security_flag, tvb, otheroffset+1, len, TRUE);
|
||||
}
|
||||
if (val & 0x800) {
|
||||
proto_tree_add_boolean(subtree, hf_ldap_ancestor_first_flag, tvb, otheroffset+1, len, TRUE);
|
||||
}
|
||||
if (val & 0x2000) {
|
||||
proto_tree_add_boolean(subtree, hf_ldap_public_data_only_flag, tvb, otheroffset+1, len, TRUE);
|
||||
}
|
||||
if (val & 0x80000000) {
|
||||
proto_tree_add_boolean(subtree, hf_ldap_incremental_value_flag, tvb, otheroffset+1, len, TRUE);
|
||||
}
|
||||
proto_tree_add_bitmask_value_with_flags(tree, tvb, otheroffset+1, hf_index,
|
||||
ett_ldap_DirSyncFlagsSubEntry, flags, val, BMT_NO_APPEND);
|
||||
} else {
|
||||
proto_tree_add_uint(tree, hf_index, tvb, otheroffset+len, len, 0);
|
||||
}
|
||||
|
|
|
@ -529,52 +529,22 @@ attribute_types_initialize_cb(void)
|
|||
/* MS-ADTS specification, section 7.3.1.1, NETLOGON_NT_VERSION Options Bits */
|
||||
static int dissect_mscldap_ntver_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
guint32 flags;
|
||||
proto_item *item;
|
||||
proto_tree *tree=NULL;
|
||||
guint *field;
|
||||
header_field_info *hfi;
|
||||
gboolean one_bit_set = FALSE;
|
||||
guint fields[11];
|
||||
fields[0] = hf_mscldap_ntver_flags_v1;
|
||||
fields[1] = hf_mscldap_ntver_flags_v5;
|
||||
fields[2] = hf_mscldap_ntver_flags_v5ex;
|
||||
fields[3] = hf_mscldap_ntver_flags_v5ep;
|
||||
fields[4] = hf_mscldap_ntver_flags_vcs;
|
||||
fields[5] = hf_mscldap_ntver_flags_vnt4;
|
||||
fields[6] = hf_mscldap_ntver_flags_vpdc;
|
||||
fields[7] = hf_mscldap_ntver_flags_vip;
|
||||
fields[8] = hf_mscldap_ntver_flags_vl;
|
||||
fields[9] = hf_mscldap_ntver_flags_vgc;
|
||||
fields[10] = 0;
|
||||
|
||||
|
||||
flags=tvb_get_letohl(tvb, offset);
|
||||
item=proto_tree_add_item(parent_tree, hf_mscldap_ntver_flags, tvb, offset, 4, ENC_LITTLE_ENDIAN);
|
||||
if(parent_tree){
|
||||
tree = proto_item_add_subtree(item, ett_mscldap_ntver_flags);
|
||||
}
|
||||
|
||||
proto_item_append_text(item, " (");
|
||||
|
||||
for(field = fields; *field; field++) {
|
||||
proto_tree_add_boolean(tree, *field, tvb, offset, 4, flags);
|
||||
hfi = proto_registrar_get_nth(*field);
|
||||
|
||||
if(flags & hfi->bitmask) {
|
||||
|
||||
if(one_bit_set)
|
||||
proto_item_append_text(item, ", ");
|
||||
else
|
||||
one_bit_set = TRUE;
|
||||
|
||||
proto_item_append_text(item, "%s", hfi->name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
proto_item_append_text(item, ")");
|
||||
static const int * flags[] = {
|
||||
&hf_mscldap_ntver_flags_v1,
|
||||
&hf_mscldap_ntver_flags_v5,
|
||||
&hf_mscldap_ntver_flags_v5ex,
|
||||
&hf_mscldap_ntver_flags_v5ep,
|
||||
&hf_mscldap_ntver_flags_vcs,
|
||||
&hf_mscldap_ntver_flags_vnt4,
|
||||
&hf_mscldap_ntver_flags_vpdc,
|
||||
&hf_mscldap_ntver_flags_vip,
|
||||
&hf_mscldap_ntver_flags_vl,
|
||||
&hf_mscldap_ntver_flags_vgc,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_mscldap_ntver_flags,
|
||||
ett_mscldap_ntver_flags, flags, ENC_LITTLE_ENDIAN, BMT_NO_FALSE);
|
||||
offset += 4;
|
||||
|
||||
return offset;
|
||||
|
@ -1359,54 +1329,27 @@ static const true_false_string tfs_ads_fnc = {
|
|||
};
|
||||
static int dissect_mscldap_netlogon_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
guint32 flags;
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint *field;
|
||||
header_field_info *hfi;
|
||||
gboolean one_bit_set = FALSE;
|
||||
guint fields[16];
|
||||
fields[0] = hf_mscldap_netlogon_flags_fnc;
|
||||
fields[1] = hf_mscldap_netlogon_flags_dnc;
|
||||
fields[2] = hf_mscldap_netlogon_flags_dns;
|
||||
fields[3] = hf_mscldap_netlogon_flags_wdc;
|
||||
fields[4] = hf_mscldap_netlogon_flags_rodc;
|
||||
fields[5] = hf_mscldap_netlogon_flags_ndnc;
|
||||
fields[6] = hf_mscldap_netlogon_flags_good_timeserv;
|
||||
fields[7] = hf_mscldap_netlogon_flags_writable;
|
||||
fields[8] = hf_mscldap_netlogon_flags_closest;
|
||||
fields[9] = hf_mscldap_netlogon_flags_timeserv;
|
||||
fields[10] = hf_mscldap_netlogon_flags_kdc;
|
||||
fields[11] = hf_mscldap_netlogon_flags_ds;
|
||||
fields[12] = hf_mscldap_netlogon_flags_ldap;
|
||||
fields[13] = hf_mscldap_netlogon_flags_gc;
|
||||
fields[14] = hf_mscldap_netlogon_flags_pdc;
|
||||
fields[15] = 0;
|
||||
|
||||
flags=tvb_get_letohl(tvb, offset);
|
||||
item=proto_tree_add_item(parent_tree, hf_mscldap_netlogon_flags, tvb, offset, 4, ENC_LITTLE_ENDIAN);
|
||||
tree = proto_item_add_subtree(item, ett_mscldap_netlogon_flags);
|
||||
|
||||
proto_item_append_text(item, " (");
|
||||
|
||||
for(field = fields; *field; field++) {
|
||||
proto_tree_add_boolean(tree, *field, tvb, offset, 4, flags);
|
||||
hfi = proto_registrar_get_nth(*field);
|
||||
|
||||
if(flags & hfi->bitmask) {
|
||||
|
||||
if(one_bit_set)
|
||||
proto_item_append_text(item, ", ");
|
||||
else
|
||||
one_bit_set = TRUE;
|
||||
|
||||
proto_item_append_text(item, "%s", hfi->name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
proto_item_append_text(item, ")");
|
||||
static const int * flags[] = {
|
||||
&hf_mscldap_netlogon_flags_fnc,
|
||||
&hf_mscldap_netlogon_flags_dnc,
|
||||
&hf_mscldap_netlogon_flags_dns,
|
||||
&hf_mscldap_netlogon_flags_wdc,
|
||||
&hf_mscldap_netlogon_flags_rodc,
|
||||
&hf_mscldap_netlogon_flags_ndnc,
|
||||
&hf_mscldap_netlogon_flags_good_timeserv,
|
||||
&hf_mscldap_netlogon_flags_writable,
|
||||
&hf_mscldap_netlogon_flags_closest,
|
||||
&hf_mscldap_netlogon_flags_timeserv,
|
||||
&hf_mscldap_netlogon_flags_kdc,
|
||||
&hf_mscldap_netlogon_flags_ds,
|
||||
&hf_mscldap_netlogon_flags_ldap,
|
||||
&hf_mscldap_netlogon_flags_gc,
|
||||
&hf_mscldap_netlogon_flags_pdc,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_mscldap_netlogon_flags,
|
||||
ett_mscldap_netlogon_flags, flags, ENC_LITTLE_ENDIAN, BMT_NO_FALSE);
|
||||
offset += 4;
|
||||
|
||||
return offset;
|
||||
|
|
|
@ -179,6 +179,7 @@ static int hf_gtp_qos_guar_ul = -1;
|
|||
static int hf_gtp_qos_guar_dl = -1;
|
||||
static int hf_gtp_qos_src_stat_desc = -1;
|
||||
static int hf_gtp_qos_sig_ind = -1;
|
||||
static int hf_gtp_qos_arp = -1;
|
||||
static int hf_gtp_qos_arp_pvi = -1;
|
||||
static int hf_gtp_qos_arp_pl = -1;
|
||||
static int hf_gtp_qos_arp_pci = -1;
|
||||
|
@ -4235,7 +4236,7 @@ decode_qos_umts(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tr
|
|||
guint8 trans_delay, traf_handl_prio;
|
||||
guint8 guar_ul, guar_dl, guar_ul_ext, guar_dl_ext, guar_ul_ext2 = 0, guar_dl_ext2 = 0;
|
||||
guint8 src_stat_desc, sig_ind;
|
||||
proto_tree *ext_tree_qos, *ext_tree_qos_arp;
|
||||
proto_tree *ext_tree_qos;
|
||||
int mss, mu, md, gu, gd;
|
||||
guint8 arp, qci;
|
||||
guint32 apn_ambr;
|
||||
|
@ -4321,13 +4322,19 @@ decode_qos_umts(tvbuff_t * tvb, int offset, packet_info * pinfo, proto_tree * tr
|
|||
|
||||
if ((type == 3) && (rel_ind == 8)) {
|
||||
/* Release 8 or higher P-GW QoS profile */
|
||||
static const int * arp_flags[] = {
|
||||
&hf_gtp_qos_arp_pci,
|
||||
&hf_gtp_qos_arp_pl,
|
||||
&hf_gtp_qos_arp_pvi,
|
||||
NULL
|
||||
};
|
||||
|
||||
offset++;
|
||||
arp = wrapped_tvb_get_guint8(tvb, offset, 2);
|
||||
ext_tree_qos_arp = proto_tree_add_subtree(ext_tree_qos, tvb, offset, 2, ett_gtp_qos_arp, NULL, "Allocation/Retention Priority");
|
||||
proto_tree_add_boolean(ext_tree_qos_arp, hf_gtp_qos_arp_pci, tvb, offset, 2, arp);
|
||||
proto_tree_add_uint(ext_tree_qos_arp, hf_gtp_qos_arp_pl, tvb, offset, 2, arp);
|
||||
proto_tree_add_boolean(ext_tree_qos_arp, hf_gtp_qos_arp_pvi, tvb, offset, 2, arp);
|
||||
proto_tree_add_bitmask_value_with_flags(ext_tree_qos, tvb, offset, hf_gtp_qos_arp,
|
||||
ett_gtp_qos_arp, arp_flags, arp, BMT_NO_APPEND);
|
||||
offset += 2;
|
||||
|
||||
qci = wrapped_tvb_get_guint8(tvb, offset, 2);
|
||||
proto_tree_add_uint(ext_tree_qos, hf_gtp_qos_qci, tvb, offset, 2, qci);
|
||||
offset += 2;
|
||||
|
@ -7984,19 +7991,28 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
break;
|
||||
}
|
||||
if (tree) {
|
||||
proto_tree *flags_tree;
|
||||
ti = proto_tree_add_item(tree, proto_gtp, tvb, 0, -1, ENC_NA);
|
||||
gtp_tree = proto_item_add_subtree(ti, ett_gtp);
|
||||
|
||||
tf = proto_tree_add_uint(gtp_tree, hf_gtp_flags, tvb, offset, 1, gtp_hdr->flags);
|
||||
flags_tree = proto_item_add_subtree(tf, ett_gtp_flags);
|
||||
if(gtp_prime) {
|
||||
const int * gtp_prime_flags[] = {
|
||||
&hf_gtp_prime_flags_ver,
|
||||
&hf_gtp_flags_pt,
|
||||
&hf_gtp_flags_spare1,
|
||||
NULL
|
||||
};
|
||||
const int * gtp_prime_v0_flags[] = {
|
||||
&hf_gtp_prime_flags_ver,
|
||||
&hf_gtp_flags_pt,
|
||||
&hf_gtp_flags_spare1,
|
||||
&hf_gtp_flags_hdr_length,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Octet 8 7 6 5 4 3 2 1
|
||||
* 1 Version | PT| Spare '1 1 1 '| ' 0/1 '
|
||||
*/
|
||||
proto_tree_add_uint(flags_tree, hf_gtp_prime_flags_ver, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_uint(flags_tree, hf_gtp_flags_pt, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_uint(flags_tree, hf_gtp_flags_spare1, tvb, offset, 1, gtp_hdr->flags);
|
||||
|
||||
/* Bit 1 of octet 1 is not used in GTP' (except in v0), and it is marked '0'
|
||||
* in the GTP' header. It is in use in GTP' v0 and distinguishes the used header-length.
|
||||
* In the case of GTP' v0, this bit being marked one (1) indicates the usage of the 6
|
||||
|
@ -8005,19 +8021,36 @@ dissect_gtp_common(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
* this does not suggest the use of the 20-octet header, rather a shorter 6-octet header.
|
||||
*/
|
||||
if(gtp_version == 0) {
|
||||
proto_tree_add_item(flags_tree, hf_gtp_flags_hdr_length, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_bitmask_value_with_flags(gtp_tree, tvb, offset, hf_gtp_flags,
|
||||
ett_gtp_flags, gtp_prime_v0_flags, gtp_hdr->flags, BMT_NO_APPEND);
|
||||
} else {
|
||||
proto_tree_add_bitmask_value_with_flags(gtp_tree, tvb, offset, hf_gtp_flags,
|
||||
ett_gtp_flags, gtp_prime_flags, gtp_hdr->flags, BMT_NO_APPEND);
|
||||
}
|
||||
} else {
|
||||
proto_tree_add_uint(flags_tree, hf_gtp_flags_ver, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_uint(flags_tree, hf_gtp_flags_pt, tvb, offset, 1, gtp_hdr->flags);
|
||||
const int * gtp_flags[] = {
|
||||
&hf_gtp_flags_ver,
|
||||
&hf_gtp_flags_pt,
|
||||
&hf_gtp_flags_spare2,
|
||||
&hf_gtp_flags_e,
|
||||
&hf_gtp_flags_s,
|
||||
&hf_gtp_flags_pn,
|
||||
NULL
|
||||
};
|
||||
const int * gtp_v0_flags[] = {
|
||||
&hf_gtp_flags_ver,
|
||||
&hf_gtp_flags_pt,
|
||||
&hf_gtp_flags_spare1,
|
||||
&hf_gtp_flags_snn,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(gtp_version == 0) {
|
||||
proto_tree_add_uint(flags_tree, hf_gtp_flags_spare1, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_boolean(flags_tree, hf_gtp_flags_snn, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_bitmask_value_with_flags(gtp_tree, tvb, offset, hf_gtp_flags,
|
||||
ett_gtp_flags, gtp_v0_flags, gtp_hdr->flags, BMT_NO_APPEND);
|
||||
} else {
|
||||
proto_tree_add_uint(flags_tree, hf_gtp_flags_spare2, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_boolean(flags_tree, hf_gtp_flags_e, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_boolean(flags_tree, hf_gtp_flags_s, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_boolean(flags_tree, hf_gtp_flags_pn, tvb, offset, 1, gtp_hdr->flags);
|
||||
proto_tree_add_bitmask_value_with_flags(gtp_tree, tvb, offset, hf_gtp_flags,
|
||||
ett_gtp_flags, gtp_flags, gtp_hdr->flags, BMT_NO_APPEND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8756,19 +8789,24 @@ proto_register_gtp(void)
|
|||
FT_BOOLEAN, 8, TFS(>p_sig_ind), GTP_EXT_QOS_SIG_IND_MASK,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_gtp_qos_arp,
|
||||
{"Allocation/Retention Priority", "gtp.qos_arp",
|
||||
FT_UINT16, BASE_HEX, NULL, 0x0,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_gtp_qos_arp_pci,
|
||||
{"Pre-emption Capability (PCI)", "gtp.qos_arp_pci",
|
||||
FT_BOOLEAN, 8, TFS(&tfs_disabled_enabled), 0x40,
|
||||
FT_BOOLEAN, 16, TFS(&tfs_disabled_enabled), 0x40,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_gtp_qos_arp_pl,
|
||||
{"Priority Level", "gtp.qos_arp_pl",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x3c,
|
||||
FT_UINT16, BASE_DEC, NULL, 0x3c,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{ &hf_gtp_qos_arp_pvi,
|
||||
{"Pre-emption Vulnerability (PVI)", "gtp.qos_arp_pvi",
|
||||
FT_BOOLEAN, 8, TFS(&tfs_disabled_enabled), 0x01,
|
||||
FT_BOOLEAN, 16, TFS(&tfs_disabled_enabled), 0x01,
|
||||
NULL, HFILL}
|
||||
},
|
||||
{&hf_gtp_qos_qci,
|
||||
|
|
|
@ -62,6 +62,17 @@ dissect_h261( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
|||
proto_item *ti = NULL;
|
||||
proto_tree *h261_tree = NULL;
|
||||
unsigned int offset = 0;
|
||||
static const int * bits[] = {
|
||||
/* SBIT 1st octet, 3 bits */
|
||||
&hf_h261_sbit,
|
||||
/* EBIT 1st octet, 3 bits */
|
||||
&hf_h261_ebit,
|
||||
/* I flag, 1 bit */
|
||||
&hf_h261_ibit,
|
||||
/* V flag, 1 bit */
|
||||
&hf_h261_vbit,
|
||||
NULL
|
||||
};
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "H.261");
|
||||
|
||||
|
@ -70,14 +81,8 @@ dissect_h261( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
|||
if ( tree ) {
|
||||
ti = proto_tree_add_item( tree, proto_h261, tvb, offset, -1, ENC_NA );
|
||||
h261_tree = proto_item_add_subtree( ti, ett_h261 );
|
||||
/* SBIT 1st octet, 3 bits */
|
||||
proto_tree_add_uint( h261_tree, hf_h261_sbit, tvb, offset, 1, tvb_get_guint8( tvb, offset ) >> 5 );
|
||||
/* EBIT 1st octet, 3 bits */
|
||||
proto_tree_add_uint( h261_tree, hf_h261_ebit, tvb, offset, 1, ( tvb_get_guint8( tvb, offset ) >> 2 ) & 7 );
|
||||
/* I flag, 1 bit */
|
||||
proto_tree_add_boolean( h261_tree, hf_h261_ibit, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 2 );
|
||||
/* V flag, 1 bit */
|
||||
proto_tree_add_boolean( h261_tree, hf_h261_vbit, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 1 );
|
||||
|
||||
proto_tree_add_bitmask_list(h261_tree, tvb, offset, 1, bits, ENC_NA);
|
||||
offset++;
|
||||
|
||||
/* GOBN 2nd octet, 4 bits */
|
||||
|
|
|
@ -15452,8 +15452,6 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
|
|||
{
|
||||
guint8 flags = tvb_get_guint8(tvb, offset + 2);
|
||||
guint8 targs, i;
|
||||
proto_item *item;
|
||||
proto_tree *subtree;
|
||||
|
||||
offset += 2;
|
||||
proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
|
@ -15481,10 +15479,15 @@ add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset
|
|||
targs = tvb_get_guint8 (tvb, offset);
|
||||
offset += 1;
|
||||
for (i = 0; i < targs; i++) {
|
||||
item = proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
subtree = proto_item_add_subtree(item, ett_hwmp_targ_flags_tree);
|
||||
proto_tree_add_boolean(subtree, hf_ieee80211_ff_hwmp_targ_to_flags, tvb, offset, 1, flags);
|
||||
proto_tree_add_boolean(subtree, hf_ieee80211_ff_hwmp_targ_usn_flags, tvb, offset, 1, flags);
|
||||
const int * targ_flags[] = {
|
||||
&hf_ieee80211_ff_hwmp_targ_to_flags,
|
||||
&hf_ieee80211_ff_hwmp_targ_usn_flags,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_ieee80211_ff_hwmp_targ_flags,
|
||||
ett_hwmp_targ_flags_tree, targ_flags, ENC_LITTLE_ENDIAN, BMT_NO_APPEND);
|
||||
|
||||
offset += 1;
|
||||
proto_tree_add_item (tree, hf_ieee80211_ff_hwmp_targ_sta, tvb, offset, 6, ENC_NA);
|
||||
offset += 6;
|
||||
|
|
|
@ -207,6 +207,7 @@ static int hf_ieee802154_nonask_phr = -1;
|
|||
|
||||
static int proto_ieee802154 = -1;
|
||||
static int hf_ieee802154_frame_length = -1;
|
||||
static int hf_ieee802154_fcf = -1;
|
||||
static int hf_ieee802154_frame_type = -1;
|
||||
static int hf_ieee802154_security = -1;
|
||||
static int hf_ieee802154_pending = -1;
|
||||
|
@ -443,7 +444,17 @@ static void
|
|||
dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet, guint *offset)
|
||||
{
|
||||
guint16 fcf;
|
||||
proto_tree *field_tree;
|
||||
static const int * fields[] = {
|
||||
&hf_ieee802154_frame_type,
|
||||
&hf_ieee802154_security,
|
||||
&hf_ieee802154_pending,
|
||||
&hf_ieee802154_ack_request,
|
||||
&hf_ieee802154_intra_pan,
|
||||
&hf_ieee802154_dst_addr_mode,
|
||||
&hf_ieee802154_version,
|
||||
&hf_ieee802154_src_addr_mode,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Get the FCF field. */
|
||||
fcf = tvb_get_letohs(tvb, *offset);
|
||||
|
@ -462,23 +473,8 @@ dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee
|
|||
proto_item_append_text(tree, " %s", val_to_str_const(packet->frame_type, ieee802154_frame_types, "Reserved"));
|
||||
col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(packet->frame_type, ieee802154_frame_types, "Reserved"));
|
||||
|
||||
/* Add the FCF to the protocol tree. */
|
||||
if (tree) {
|
||||
/* Create the FCF subtree. */
|
||||
field_tree = proto_tree_add_subtree_format(tree, tvb, *offset, 2, ett_ieee802154_fcf, NULL,
|
||||
"Frame Control Field: %s (0x%04x)",
|
||||
val_to_str_const(packet->frame_type, ieee802154_frame_types, "Unknown"), fcf);
|
||||
|
||||
/* FCF Fields. */
|
||||
proto_tree_add_uint(field_tree, hf_ieee802154_frame_type, tvb, *offset, 1, fcf & IEEE802154_FCF_TYPE_MASK);
|
||||
proto_tree_add_boolean(field_tree, hf_ieee802154_security, tvb, *offset, 1, fcf & IEEE802154_FCF_SEC_EN);
|
||||
proto_tree_add_boolean(field_tree, hf_ieee802154_pending, tvb, *offset, 1, fcf & IEEE802154_FCF_FRAME_PND);
|
||||
proto_tree_add_boolean(field_tree, hf_ieee802154_ack_request, tvb, *offset, 1, fcf & IEEE802154_FCF_ACK_REQ);
|
||||
proto_tree_add_boolean(field_tree, hf_ieee802154_intra_pan, tvb, *offset, 1, fcf & IEEE802154_FCF_INTRA_PAN);
|
||||
proto_tree_add_uint(field_tree, hf_ieee802154_dst_addr_mode, tvb, (*offset)+1, 1, fcf & IEEE802154_FCF_DADDR_MASK);
|
||||
proto_tree_add_uint(field_tree, hf_ieee802154_version, tvb, (*offset)+1, 1, fcf & IEEE802154_FCF_VERSION);
|
||||
proto_tree_add_uint(field_tree, hf_ieee802154_src_addr_mode, tvb, (*offset)+1, 1, fcf & IEEE802154_FCF_SADDR_MASK);
|
||||
}
|
||||
proto_tree_add_bitmask(tree, tvb, *offset, hf_ieee802154_fcf,
|
||||
ett_ieee802154_fcf, fields, ENC_LITTLE_ENDIAN);
|
||||
|
||||
*offset += 2;
|
||||
} /* dissect_ieee802154_fcf */
|
||||
|
@ -1397,35 +1393,32 @@ dissect_ieee802154_pendaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
|
|||
* void
|
||||
*---------------------------------------------------------------
|
||||
*/
|
||||
static const true_false_string tfs_cinfo_device_type = { "FFD", "RFD" };
|
||||
static const true_false_string tfs_cinfo_power_src = { "AC/Mains Power", "Battery" };
|
||||
|
||||
static void
|
||||
dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
|
||||
{
|
||||
proto_tree *subtree;
|
||||
proto_item *ti;
|
||||
guint8 capability;
|
||||
static const int * capability[] = {
|
||||
&hf_ieee802154_cinfo_alt_coord,
|
||||
&hf_ieee802154_cinfo_device_type,
|
||||
&hf_ieee802154_cinfo_power_src,
|
||||
&hf_ieee802154_cinfo_idle_rx,
|
||||
&hf_ieee802154_cinfo_sec_capable,
|
||||
&hf_ieee802154_cinfo_alloc_addr,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Create a subtree for this command frame. */
|
||||
subtree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ieee802154_cmd, NULL,
|
||||
val_to_str_const(packet->command_id, ieee802154_cmd_names, "Unknown Command"));
|
||||
|
||||
/* Get and display capability info. */
|
||||
capability = tvb_get_guint8(tvb, 0);
|
||||
if (tree) {
|
||||
/* Enter the capability bits. */
|
||||
proto_tree_add_boolean(subtree, hf_ieee802154_cinfo_alt_coord, tvb, 0, 1, capability & IEEE802154_CMD_CINFO_ALT_PAN_COORD);
|
||||
ti = proto_tree_add_boolean(subtree, hf_ieee802154_cinfo_device_type, tvb, 0, 1, capability & IEEE802154_CMD_CINFO_DEVICE_TYPE);
|
||||
if (capability & IEEE802154_CMD_CINFO_DEVICE_TYPE) proto_item_append_text(ti, " (FFD)");
|
||||
else proto_item_append_text(ti, " (RFD)");
|
||||
ti = proto_tree_add_boolean(subtree, hf_ieee802154_cinfo_power_src, tvb, 0, 1, capability & IEEE802154_CMD_CINFO_POWER_SRC);
|
||||
if (capability & IEEE802154_CMD_CINFO_POWER_SRC) proto_item_append_text(ti, " (AC/Mains Power)");
|
||||
else proto_item_append_text(ti, " (Battery)");
|
||||
proto_tree_add_boolean(subtree, hf_ieee802154_cinfo_idle_rx, tvb, 0, 1, capability & IEEE802154_CMD_CINFO_IDLE_RX);
|
||||
proto_tree_add_boolean(subtree, hf_ieee802154_cinfo_sec_capable, tvb, 0, 1, capability & IEEE802154_CMD_CINFO_SEC_CAPABLE);
|
||||
proto_tree_add_boolean(subtree, hf_ieee802154_cinfo_alloc_addr, tvb, 0, 1, capability & IEEE802154_CMD_CINFO_ALLOC_ADDR);
|
||||
}
|
||||
proto_tree_add_bitmask_list(subtree, tvb, 0, 1, capability, ENC_NA);
|
||||
|
||||
/* Call the data dissector for any leftover bytes. */
|
||||
if (tvb_length(tvb) > 1) {
|
||||
if (tvb_reported_length(tvb) > 1) {
|
||||
call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
|
||||
}
|
||||
} /* dissect_ieee802154_assoc_req */
|
||||
|
@ -1659,39 +1652,28 @@ dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
* void
|
||||
*---------------------------------------------------------------
|
||||
*/
|
||||
static const true_false_string tfs_gtsreq_dir = { "Receive", "Transmit" };
|
||||
static const true_false_string tfs_gtsreq_type= { "Allocate GTS", "Deallocate GTS" };
|
||||
|
||||
static void
|
||||
dissect_ieee802154_gtsreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
|
||||
{
|
||||
proto_tree *subtree;
|
||||
proto_item *ti;
|
||||
guint8 characteristics;
|
||||
guint8 length;
|
||||
guint8 direction;
|
||||
guint8 type;
|
||||
static const int * characteristics[] = {
|
||||
&hf_ieee802154_gtsreq_len,
|
||||
&hf_ieee802154_gtsreq_dir,
|
||||
&hf_ieee802154_gtsreq_type,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Create a subtree for this command frame. */
|
||||
subtree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ieee802154_cmd, NULL,
|
||||
val_to_str_const(packet->command_id, ieee802154_cmd_names, "Unknown Command"));
|
||||
|
||||
/* Get the characteristics field. */
|
||||
characteristics = tvb_get_guint8(tvb, 0);
|
||||
length = characteristics & IEEE802154_CMD_GTS_REQ_LEN;
|
||||
direction = characteristics & IEEE802154_CMD_GTS_REQ_DIR;
|
||||
type = characteristics & IEEE802154_CMD_GTS_REQ_TYPE;
|
||||
|
||||
/* Display the characteristics field. */
|
||||
if (tree) {
|
||||
proto_tree_add_uint(subtree, hf_ieee802154_gtsreq_len, tvb, 0, 1, length);
|
||||
ti = proto_tree_add_boolean(subtree, hf_ieee802154_gtsreq_dir, tvb, 0, 1, direction);
|
||||
if (direction) proto_item_append_text(ti, " (Receive)");
|
||||
else proto_item_append_text(ti, " (Transmit)");
|
||||
ti = proto_tree_add_boolean(subtree, hf_ieee802154_gtsreq_type, tvb, 0, 1, type);
|
||||
if (type) proto_item_append_text(ti, " (Allocate GTS)");
|
||||
else proto_item_append_text(ti, " (Deallocate GTS)");
|
||||
}
|
||||
proto_tree_add_bitmask_list(subtree, tvb, 0, 1, characteristics, ENC_NA);
|
||||
|
||||
/* Call the data dissector for any leftover bytes. */
|
||||
if (tvb_length(tvb) > 1) {
|
||||
if (tvb_reported_length(tvb) > 1) {
|
||||
call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
|
||||
}
|
||||
} /* dissect_ieee802154_gtsreq */
|
||||
|
@ -2479,6 +2461,10 @@ void proto_register_ieee802154(void)
|
|||
{ "Frame Length", "wpan.frame_length", FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
"Frame Length as reported from lower layer", HFILL }},
|
||||
|
||||
{ &hf_ieee802154_fcf,
|
||||
{ "Frame Control Field", "wpan.fcf", FT_UINT16, BASE_HEX, NULL,
|
||||
0x0, NULL, HFILL }},
|
||||
|
||||
{ &hf_ieee802154_frame_type,
|
||||
{ "Frame Type", "wpan.frame_type", FT_UINT16, BASE_HEX, VALS(ieee802154_frame_types),
|
||||
IEEE802154_FCF_TYPE_MASK, NULL, HFILL }},
|
||||
|
@ -2572,11 +2558,11 @@ void proto_register_ieee802154(void)
|
|||
"Whether this device can act as a PAN coordinator or not.", HFILL }},
|
||||
|
||||
{ &hf_ieee802154_cinfo_device_type,
|
||||
{ "Device Type", "wpan.cinfo.device_type", FT_BOOLEAN, 8, NULL, IEEE802154_CMD_CINFO_DEVICE_TYPE,
|
||||
{ "Device Type", "wpan.cinfo.device_type", FT_BOOLEAN, 8, TFS(&tfs_cinfo_device_type), IEEE802154_CMD_CINFO_DEVICE_TYPE,
|
||||
"Whether this device is RFD (reduced-function device) or FFD (full-function device).", HFILL }},
|
||||
|
||||
{ &hf_ieee802154_cinfo_power_src,
|
||||
{ "Power Source", "wpan.cinfo.power_src", FT_BOOLEAN, 8, NULL, IEEE802154_CMD_CINFO_POWER_SRC,
|
||||
{ "Power Source", "wpan.cinfo.power_src", FT_BOOLEAN, 8, TFS(&tfs_cinfo_power_src), IEEE802154_CMD_CINFO_POWER_SRC,
|
||||
"Whether this device is operating on AC/mains or battery power.", HFILL }},
|
||||
|
||||
{ &hf_ieee802154_cinfo_idle_rx,
|
||||
|
@ -2630,11 +2616,11 @@ void proto_register_ieee802154(void)
|
|||
"Number of superframe slots the device is requesting.", HFILL }},
|
||||
|
||||
{ &hf_ieee802154_gtsreq_dir,
|
||||
{ "GTS Direction", "wpan.gtsreq.direction", FT_BOOLEAN, 8, NULL, IEEE802154_CMD_GTS_REQ_DIR,
|
||||
{ "GTS Direction", "wpan.gtsreq.direction", FT_BOOLEAN, 8, TFS(&tfs_gtsreq_dir), IEEE802154_CMD_GTS_REQ_DIR,
|
||||
"The direction of traffic in the guaranteed timeslot.", HFILL }},
|
||||
|
||||
{ &hf_ieee802154_gtsreq_type,
|
||||
{ "Characteristic Type", "wpan.gtsreq.type", FT_BOOLEAN, 8, NULL, IEEE802154_CMD_GTS_REQ_TYPE,
|
||||
{ "Characteristic Type", "wpan.gtsreq.type", FT_BOOLEAN, 8, TFS(&tfs_gtsreq_type), IEEE802154_CMD_GTS_REQ_TYPE,
|
||||
"Whether this request is to allocate or deallocate a timeslot.", HFILL }},
|
||||
|
||||
/* Beacon Frame Specific Fields */
|
||||
|
|
|
@ -241,35 +241,14 @@ static const true_false_string ifcp_flags_spc_tfs = {
|
|||
static int
|
||||
dissect_ifcpflags(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint8 flags;
|
||||
|
||||
item=proto_tree_add_item(parent_tree, hf_ifcp_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
tree=proto_item_add_subtree (item, ett_ifcp_flags);
|
||||
|
||||
flags=tvb_get_guint8(tvb, offset);
|
||||
|
||||
/* SES */
|
||||
proto_tree_add_boolean(tree, hf_ifcp_flags_ses, tvb, offset, 1, flags);
|
||||
if(flags&IFCP_FLAGS_SES){
|
||||
proto_item_append_text(item, " SES");
|
||||
}
|
||||
flags&=(~IFCP_FLAGS_SES);
|
||||
|
||||
/* TRP */
|
||||
proto_tree_add_boolean(tree, hf_ifcp_flags_trp, tvb, offset, 1, flags);
|
||||
if(flags&IFCP_FLAGS_TRP){
|
||||
proto_item_append_text(item, " TRP");
|
||||
}
|
||||
flags&=(~IFCP_FLAGS_TRP);
|
||||
|
||||
/* SPC */
|
||||
proto_tree_add_boolean(tree, hf_ifcp_flags_spc, tvb, offset, 1, flags);
|
||||
if(flags&IFCP_FLAGS_SPC){
|
||||
proto_item_append_text(item, " SPC");
|
||||
}
|
||||
|
||||
static const int * flags[] = {
|
||||
&hf_ifcp_flags_ses,
|
||||
&hf_ifcp_flags_trp,
|
||||
&hf_ifcp_flags_spc,
|
||||
NULL
|
||||
};
|
||||
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_ifcp_flags,
|
||||
ett_ifcp_flags, flags, ENC_BIG_ENDIAN);
|
||||
|
||||
offset++;
|
||||
return offset;
|
||||
|
@ -278,28 +257,16 @@ dissect_ifcpflags(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
|
|||
|
||||
#define IFCP_COMMON_FLAGS_CRCV 0x04
|
||||
|
||||
static const true_false_string ifcp_common_flags_crcv_tfs = {
|
||||
"CRC is VALID",
|
||||
"Crc is NOT valid"
|
||||
};
|
||||
|
||||
static void
|
||||
dissect_commonflags(tvbuff_t *tvb, int offset, proto_tree *parent_tree)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint8 flags;
|
||||
static const int * flags[] = {
|
||||
&hf_ifcp_common_flags_crcv,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_item(parent_tree, hf_ifcp_common_flags, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
tree=proto_item_add_subtree (item, ett_ifcp_common_flags);
|
||||
|
||||
flags=tvb_get_guint8(tvb, offset);
|
||||
|
||||
/* CRCV */
|
||||
proto_tree_add_boolean(tree, hf_ifcp_common_flags_crcv, tvb, offset, 1, flags);
|
||||
if(flags&IFCP_COMMON_FLAGS_CRCV){
|
||||
proto_item_append_text(item, " CRCV");
|
||||
}
|
||||
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_ifcp_common_flags,
|
||||
ett_ifcp_common_flags, flags, ENC_BIG_ENDIAN);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -593,7 +560,7 @@ proto_register_ifcp (void)
|
|||
{"Flags", "ifcp.common_flags", FT_UINT8, BASE_HEX , NULL, 0xfc,
|
||||
NULL, HFILL }},
|
||||
{ &hf_ifcp_common_flags_crcv,
|
||||
{"CRCV", "ifcp.common_flags.crcv", FT_BOOLEAN, 8, TFS(&ifcp_common_flags_crcv_tfs), IFCP_COMMON_FLAGS_CRCV,
|
||||
{"CRC", "ifcp.common_flags.crcv", FT_BOOLEAN, 8, TFS(&tfs_valid_not_valid), IFCP_COMMON_FLAGS_CRCV,
|
||||
"Is the CRC field valid?", HFILL }},
|
||||
{ &hf_ifcp_flags,
|
||||
{"iFCP Flags", "ifcp.flags", FT_UINT8, BASE_HEX , NULL, 0,
|
||||
|
|
|
@ -165,7 +165,6 @@ static int hf_mtrace_q_fwd_code = -1;
|
|||
|
||||
static int ett_igmp = -1;
|
||||
static int ett_group_record = -1;
|
||||
static int ett_sqrv_bits = -1;
|
||||
static int ett_max_resp = -1;
|
||||
static int ett_mtrace_block = -1;
|
||||
|
||||
|
@ -422,19 +421,13 @@ dissect_v3_max_resp(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
|
|||
static int
|
||||
dissect_v3_sqrv_bits(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
|
||||
{
|
||||
proto_tree *tree;
|
||||
guint8 bits;
|
||||
static const int * bits[] = {
|
||||
&hf_suppress,
|
||||
&hf_qrv,
|
||||
NULL
|
||||
};
|
||||
|
||||
bits = tvb_get_guint8(tvb, offset);
|
||||
|
||||
tree = proto_tree_add_subtree_format(parent_tree, tvb, offset, 1,
|
||||
ett_sqrv_bits, NULL, "QRV=%d S=%s", bits&IGMP_V3_QRV_MASK,
|
||||
(bits&IGMP_V3_S)?tfs_s.true_string:tfs_s.false_string);
|
||||
|
||||
/* S flag */
|
||||
proto_tree_add_boolean(tree, hf_suppress, tvb, offset, 1, bits);
|
||||
/* QRV */
|
||||
proto_tree_add_uint(tree, hf_qrv, tvb, offset, 1, bits);
|
||||
proto_tree_add_bitmask_list(parent_tree, tvb, offset, 1, bits, ENC_NA);
|
||||
offset += 1;
|
||||
|
||||
return offset;
|
||||
|
@ -1105,7 +1098,6 @@ proto_register_igmp(void)
|
|||
static gint *ett[] = {
|
||||
&ett_igmp,
|
||||
&ett_group_record,
|
||||
&ett_sqrv_bits,
|
||||
&ett_max_resp,
|
||||
&ett_mtrace_block,
|
||||
};
|
||||
|
|
|
@ -576,31 +576,16 @@ spx_hash_lookup(conversation_t *conversation, guint32 spx_src, guint32 spx_seq)
|
|||
#define SPX_RESERVED 0x02
|
||||
#define SPX_EXT_HEADER 0x01
|
||||
|
||||
static const char*
|
||||
spx_conn_ctrl(guint8 ctrl)
|
||||
{
|
||||
const char *p;
|
||||
|
||||
static const value_string conn_vals[] = {
|
||||
{ 0x00, "Data, No Ack Required" },
|
||||
{ SPX_EOM, "End-of-Message" },
|
||||
{ SPX_ATTN, "Attention" },
|
||||
{ SPX_SEND_ACK, "Acknowledgment Required"},
|
||||
{ SPX_SEND_ACK|SPX_EOM, "Send Ack: End Message"},
|
||||
{ SPX_SYS_PACKET, "System Packet"},
|
||||
{ SPX_SYS_PACKET|SPX_SEND_ACK, "System Packet: Send Ack"},
|
||||
{ 0x00, NULL }
|
||||
};
|
||||
|
||||
p = try_val_to_str((ctrl & 0xf0), conn_vals );
|
||||
|
||||
if (p) {
|
||||
return p;
|
||||
}
|
||||
else {
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
static const value_string conn_vals[] = {
|
||||
{ 0x00, "Data, No Ack Required" },
|
||||
{ SPX_EOM, "End-of-Message" },
|
||||
{ SPX_ATTN, "Attention" },
|
||||
{ SPX_SEND_ACK, "Acknowledgment Required"},
|
||||
{ SPX_SEND_ACK|SPX_EOM, "Send Ack: End Message"},
|
||||
{ SPX_SYS_PACKET, "System Packet"},
|
||||
{ SPX_SYS_PACKET|SPX_SEND_ACK, "System Packet: Send Ack"},
|
||||
{ 0x00, NULL }
|
||||
};
|
||||
|
||||
static const char*
|
||||
spx_datastream(guint8 type)
|
||||
|
@ -621,11 +606,10 @@ spx_datastream(guint8 type)
|
|||
static void
|
||||
dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
proto_tree *spx_tree = NULL;
|
||||
proto_tree *spx_tree;
|
||||
proto_item *ti;
|
||||
tvbuff_t *next_tvb;
|
||||
guint8 conn_ctrl;
|
||||
proto_tree *cc_tree;
|
||||
guint8 hdr_len = SPX_HEADER_LEN;
|
||||
guint8 datastream_type;
|
||||
const char *datastream_type_string;
|
||||
|
@ -648,36 +632,38 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
hdr_len = SPX2_HEADER_LEN;
|
||||
}
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_spx, tvb, 0, hdr_len, ENC_NA);
|
||||
spx_tree = proto_item_add_subtree(ti, ett_spx);
|
||||
}
|
||||
ti = proto_tree_add_item(tree, proto_spx, tvb, 0, hdr_len, ENC_NA);
|
||||
spx_tree = proto_item_add_subtree(ti, ett_spx);
|
||||
|
||||
spx_msg_string = spx_conn_ctrl(conn_ctrl);
|
||||
spx_msg_string = val_to_str_const((conn_ctrl & 0xf0), conn_vals, "Unknown" );
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, " %s", spx_msg_string);
|
||||
if (tree) {
|
||||
ti = proto_tree_add_uint_format_value(spx_tree, hf_spx_connection_control, tvb,
|
||||
0, 1, conn_ctrl,
|
||||
"%s (0x%02X)",
|
||||
spx_msg_string, conn_ctrl);
|
||||
cc_tree = proto_item_add_subtree(ti, ett_spx_connctrl);
|
||||
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_sys, tvb,
|
||||
0, 1, conn_ctrl);
|
||||
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_send_ack, tvb,
|
||||
0, 1, conn_ctrl);
|
||||
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_attn, tvb,
|
||||
0, 1, conn_ctrl);
|
||||
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_eom, tvb,
|
||||
0, 1, conn_ctrl);
|
||||
const int * spx_flags[] = {
|
||||
&hf_spx_connection_control_sys,
|
||||
&hf_spx_connection_control_send_ack,
|
||||
&hf_spx_connection_control_attn,
|
||||
&hf_spx_connection_control_eom,
|
||||
NULL
|
||||
};
|
||||
|
||||
const int * spx_vii_flags[] = {
|
||||
&hf_spx_connection_control_sys,
|
||||
&hf_spx_connection_control_send_ack,
|
||||
&hf_spx_connection_control_attn,
|
||||
&hf_spx_connection_control_eom,
|
||||
&hf_spx_connection_control_v2,
|
||||
&hf_spx_connection_control_neg_size,
|
||||
&hf_spx_connection_control_reserved,
|
||||
&hf_spx_connection_control_ext_header,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (conn_ctrl & SPX_VII_PACKET) {
|
||||
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_v2, tvb,
|
||||
0, 1, conn_ctrl);
|
||||
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_neg_size, tvb,
|
||||
0, 1, conn_ctrl);
|
||||
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_reserved, tvb,
|
||||
0, 1, conn_ctrl);
|
||||
proto_tree_add_boolean(cc_tree, hf_spx_connection_control_ext_header, tvb,
|
||||
0, 1, conn_ctrl);
|
||||
proto_tree_add_bitmask_with_flags(spx_tree, tvb, 0, hf_spx_connection_control,
|
||||
ett_spx_connctrl, spx_vii_flags, ENC_NA, BMT_NO_APPEND);
|
||||
} else {
|
||||
proto_tree_add_bitmask_with_flags(spx_tree, tvb, 0, hf_spx_connection_control,
|
||||
ett_spx_connctrl, spx_flags, ENC_NA, BMT_NO_APPEND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1392,7 +1378,7 @@ proto_register_ipx(void)
|
|||
static hf_register_info hf_spx[] = {
|
||||
{ &hf_spx_connection_control,
|
||||
{ "Connection Control", "spx.ctl",
|
||||
FT_UINT8, BASE_HEX, NULL, 0x0,
|
||||
FT_UINT8, BASE_HEX, VALS(conn_vals), 0xF0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_spx_connection_control_sys,
|
||||
|
|
|
@ -1295,10 +1295,33 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
} else if(opcode == ISCSI_OPCODE_SCSI_DATA_IN) {
|
||||
/* SCSI Data In (read) */
|
||||
{
|
||||
gint b = tvb_get_guint8(tvb, offset + 1);
|
||||
proto_item *tf = proto_tree_add_uint(ti, hf_iscsi_Flags, tvb, offset + 1, 1, b);
|
||||
proto_tree *tt = proto_item_add_subtree(tf, ett_iscsi_Flags);
|
||||
const int * scsi_data_in[] = {
|
||||
&hf_iscsi_SCSIData_F,
|
||||
&hf_iscsi_SCSIData_O,
|
||||
&hf_iscsi_SCSIData_U,
|
||||
&hf_iscsi_SCSIData_S,
|
||||
NULL
|
||||
};
|
||||
|
||||
const int * scsi_data_in_draft08[] = {
|
||||
&hf_iscsi_SCSIData_F,
|
||||
&hf_iscsi_SCSIData_A,
|
||||
&hf_iscsi_SCSIData_O,
|
||||
&hf_iscsi_SCSIData_U,
|
||||
&hf_iscsi_SCSIData_S,
|
||||
NULL
|
||||
};
|
||||
gint b;
|
||||
|
||||
if(iscsi_protocol_version > ISCSI_PROTOCOL_DRAFT08) {
|
||||
proto_tree_add_bitmask_with_flags(ti, tvb, offset+1, hf_iscsi_Flags,
|
||||
ett_iscsi_Flags, scsi_data_in_draft08, ENC_NA, BMT_NO_APPEND);
|
||||
} else {
|
||||
proto_tree_add_bitmask_with_flags(ti, tvb, offset+1, hf_iscsi_Flags,
|
||||
ett_iscsi_Flags, scsi_data_in, ENC_NA, BMT_NO_APPEND);
|
||||
}
|
||||
|
||||
b = tvb_get_guint8(tvb, offset + 1);
|
||||
if(b&ISCSI_SCSI_DATA_FLAG_S){
|
||||
S_bit=TRUE;
|
||||
}
|
||||
|
@ -1306,13 +1329,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
|
|||
if(b&ISCSI_SCSI_DATA_FLAG_A){
|
||||
A_bit=TRUE;
|
||||
}
|
||||
proto_tree_add_boolean(tt, hf_iscsi_SCSIData_F, tvb, offset + 1, 1, b);
|
||||
if(iscsi_protocol_version > ISCSI_PROTOCOL_DRAFT08) {
|
||||
proto_tree_add_boolean(tt, hf_iscsi_SCSIData_A, tvb, offset + 1, 1, b);
|
||||
}
|
||||
proto_tree_add_boolean(tt, hf_iscsi_SCSIData_O, tvb, offset + 1, 1, b);
|
||||
proto_tree_add_boolean(tt, hf_iscsi_SCSIData_U, tvb, offset + 1, 1, b);
|
||||
proto_tree_add_boolean(tt, hf_iscsi_SCSIData_S, tvb, offset + 1, 1, b);
|
||||
|
||||
}
|
||||
if(S_bit){
|
||||
proto_tree_add_item(ti, hf_iscsi_SCSIResponse_Status, tvb, offset + 3, 1, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -3120,8 +3120,8 @@ static void
|
|||
dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
|
||||
const isis_clv_handle_t *opts, int header_length, int id_length)
|
||||
{
|
||||
proto_item *ti, *ta;
|
||||
proto_tree *lsp_tree, *info_tree, *att_tree;
|
||||
proto_item *ti;
|
||||
proto_tree *lsp_tree, *info_tree;
|
||||
guint16 pdu_length, lifetime, checksum, cacl_checksum=0;
|
||||
guint8 lsp_info;
|
||||
int len, offset_checksum;
|
||||
|
@ -3187,6 +3187,14 @@ dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset
|
|||
offset += 2;
|
||||
|
||||
if (tree) {
|
||||
static const int * attach_flags[] = {
|
||||
&hf_isis_lsp_error_metric,
|
||||
&hf_isis_lsp_expense_metric,
|
||||
&hf_isis_lsp_delay_metric,
|
||||
&hf_isis_lsp_default_metric,
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* P | ATT | HIPPITY | IS TYPE description.
|
||||
*/
|
||||
|
@ -3201,12 +3209,8 @@ dissect_isis_lsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset
|
|||
);
|
||||
|
||||
proto_tree_add_boolean(info_tree, hf_isis_lsp_p, tvb, offset, 1, lsp_info);
|
||||
ta = proto_tree_add_uint(info_tree, hf_isis_lsp_att, tvb, offset, 1, lsp_info);
|
||||
att_tree = proto_item_add_subtree(ta, ett_isis_lsp_att);
|
||||
proto_tree_add_item(att_tree, hf_isis_lsp_error_metric, tvb, offset, 1, ENC_NA);
|
||||
proto_tree_add_item(att_tree, hf_isis_lsp_expense_metric, tvb, offset, 1, ENC_NA);
|
||||
proto_tree_add_item(att_tree, hf_isis_lsp_delay_metric, tvb, offset, 1, ENC_NA);
|
||||
proto_tree_add_item(att_tree, hf_isis_lsp_default_metric, tvb, offset, 1, ENC_NA);
|
||||
proto_tree_add_bitmask_with_flags(info_tree, tvb, offset, hf_isis_lsp_att,
|
||||
ett_isis_lsp_att, attach_flags, ENC_NA, BMT_NO_APPEND);
|
||||
proto_tree_add_boolean(info_tree, hf_isis_lsp_hippity, tvb, offset, 1, lsp_info);
|
||||
proto_tree_add_uint(info_tree, hf_isis_lsp_is_type, tvb, offset, 1, lsp_info);
|
||||
}
|
||||
|
|
|
@ -3234,14 +3234,15 @@ static void
|
|||
dissect_isup_nature_of_connection_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
guint8 nature_of_connection_ind;
|
||||
static const int * indicators[] = {
|
||||
&hf_isup_satellite_indicator,
|
||||
&hf_isup_continuity_check_indicator,
|
||||
&hf_isup_echo_control_device_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
nature_of_connection_ind = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_item(parameter_tree, hf_isup_satellite_indicator,
|
||||
parameter_tvb, 0, NATURE_OF_CONNECTION_IND_LENGTH, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_continuity_check_indicator,
|
||||
parameter_tvb, 0, NATURE_OF_CONNECTION_IND_LENGTH, nature_of_connection_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_echo_control_device_indicator,
|
||||
parameter_tvb, 0, NATURE_OF_CONNECTION_IND_LENGTH, nature_of_connection_ind);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, NATURE_OF_CONNECTION_IND_LENGTH, indicators, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_item_set_text(parameter_item, "Nature of Connection Indicators: 0x%x", nature_of_connection_ind);
|
||||
}
|
||||
|
@ -3252,29 +3253,22 @@ dissect_isup_nature_of_connection_indicators_parameter(tvbuff_t *parameter_tvb,
|
|||
static void
|
||||
dissect_isup_forward_call_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
guint16 forward_call_ind;
|
||||
guint16 forward_call_ind = tvb_get_ntohs(parameter_tvb, 0);
|
||||
static const int * indicators[] = {
|
||||
&hf_isup_forw_call_natnl_inatnl_call_indicator,
|
||||
&hf_isup_forw_call_end_to_end_method_indicator,
|
||||
&hf_isup_forw_call_interworking_indicator,
|
||||
&hf_isup_forw_call_end_to_end_info_indicator,
|
||||
&hf_isup_forw_call_isdn_user_part_indicator,
|
||||
&hf_isup_forw_call_preferences_indicator,
|
||||
&hf_isup_forw_call_isdn_access_indicator,
|
||||
&hf_isup_forw_call_sccp_method_indicator,
|
||||
&hf_isup_forw_call_ported_num_trans_indicator,
|
||||
&hf_isup_forw_call_qor_attempt_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
forward_call_ind = tvb_get_ntohs(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_forw_call_natnl_inatnl_call_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_forw_call_end_to_end_method_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_forw_call_interworking_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_forw_call_end_to_end_info_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_forw_call_isdn_user_part_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_forw_call_preferences_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_forw_call_isdn_access_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_forw_call_sccp_method_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_forw_call_ported_num_trans_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_forw_call_qor_attempt_indicator,
|
||||
parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, forward_call_ind);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, FORWARD_CALL_IND_LENGTH, indicators, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_item_set_text(parameter_item, "Forward Call Indicators: 0x%x", forward_call_ind);
|
||||
}
|
||||
|
@ -3344,14 +3338,24 @@ dissect_isup_called_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree *
|
|||
char called_number[MAXDIGITS + 1] = "";
|
||||
e164_info_t e164_info;
|
||||
gint number_plan;
|
||||
static const int * indicators1_flags[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_called_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const int * indicators2_flags[] = {
|
||||
&hf_isup_inn_indicator,
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_called_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_flags, ENC_NA);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
number_plan = (indicators2 & 0x70)>> 4;
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_inn_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_flags, ENC_NA);
|
||||
offset = 2;
|
||||
|
||||
if (tvb_reported_length_remaining(parameter_tvb, offset) == 0) {
|
||||
|
@ -3465,21 +3469,18 @@ dissect_isup_subsequent_number_parameter(tvbuff_t *parameter_tvb, proto_tree *pa
|
|||
static void
|
||||
dissect_isup_information_request_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
guint16 information_request_indicators;
|
||||
static const int * indicators[] = {
|
||||
&hf_isup_calling_party_address_request_indicator,
|
||||
&hf_isup_info_req_holding_indicator,
|
||||
&hf_isup_calling_partys_category_request_indicator,
|
||||
&hf_isup_charge_information_request_indicator,
|
||||
&hf_isup_malicious_call_identification_request_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
information_request_indicators = tvb_get_ntohs(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_calling_party_address_request_indicator,
|
||||
parameter_tvb, 0, INFO_REQUEST_IND_LENGTH, information_request_indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_info_req_holding_indicator,
|
||||
parameter_tvb, 0, INFO_REQUEST_IND_LENGTH, information_request_indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_calling_partys_category_request_indicator,
|
||||
parameter_tvb, 0, INFO_REQUEST_IND_LENGTH, information_request_indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_charge_information_request_indicator,
|
||||
parameter_tvb, 0, INFO_REQUEST_IND_LENGTH, information_request_indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_malicious_call_identification_request_indicator,
|
||||
parameter_tvb, 0, INFO_REQUEST_IND_LENGTH, information_request_indicators);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, INFO_REQUEST_IND_LENGTH, indicators, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_item_set_text(parameter_item, "Information request indicators: 0x%x", information_request_indicators);
|
||||
proto_item_set_text(parameter_item, "Information request indicators: 0x%x", tvb_get_ntohs(parameter_tvb, 0));
|
||||
}
|
||||
/* ------------------------------------------------------------------
|
||||
Dissector Parameter Information Indicators
|
||||
|
@ -3487,21 +3488,18 @@ dissect_isup_information_request_indicators_parameter(tvbuff_t *parameter_tvb, p
|
|||
static void
|
||||
dissect_isup_information_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
guint16 information_indicators;
|
||||
static const int * indicators[] = {
|
||||
&hf_isup_calling_party_address_response_indicator,
|
||||
&hf_isup_hold_provided_indicator,
|
||||
&hf_isup_calling_partys_category_response_indicator,
|
||||
&hf_isup_charge_information_response_indicator,
|
||||
&hf_isup_solicited_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
information_indicators = tvb_get_ntohs(parameter_tvb, 0);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_calling_party_address_response_indicator,
|
||||
parameter_tvb, 0, INFO_IND_LENGTH, information_indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_hold_provided_indicator, parameter_tvb, 0, INFO_IND_LENGTH, information_indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_calling_partys_category_response_indicator,
|
||||
parameter_tvb, 0, INFO_IND_LENGTH, information_indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_charge_information_response_indicator,
|
||||
parameter_tvb, 0, INFO_IND_LENGTH, information_indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_solicited_indicator,
|
||||
parameter_tvb, 0, INFO_IND_LENGTH, information_indicators);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, INFO_IND_LENGTH, indicators, ENC_BIG_ENDIAN);
|
||||
|
||||
|
||||
proto_item_set_text(parameter_item, "Information indicators: 0x%x", information_indicators);
|
||||
proto_item_set_text(parameter_item, "Information indicators: 0x%x", tvb_get_ntohs(parameter_tvb, 0));
|
||||
}
|
||||
/* ------------------------------------------------------------------
|
||||
Dissector Parameter Continuity Indicators
|
||||
|
@ -3522,35 +3520,23 @@ dissect_isup_continuity_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree
|
|||
static void
|
||||
dissect_isup_backward_call_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
guint16 backward_call_ind;
|
||||
static const int * indicators[] = {
|
||||
&hf_isup_backw_call_charge_ind,
|
||||
&hf_isup_backw_call_called_partys_status_ind,
|
||||
&hf_isup_backw_call_called_partys_category_ind,
|
||||
&hf_isup_backw_call_end_to_end_method_ind,
|
||||
&hf_isup_backw_call_interworking_ind,
|
||||
&hf_isup_backw_call_end_to_end_info_ind,
|
||||
&hf_isup_backw_call_isdn_user_part_ind,
|
||||
&hf_isup_backw_call_holding_ind,
|
||||
&hf_isup_backw_call_isdn_access_ind,
|
||||
&hf_isup_backw_call_echo_control_device_ind,
|
||||
&hf_isup_backw_call_sccp_method_ind,
|
||||
NULL
|
||||
};
|
||||
|
||||
backward_call_ind = tvb_get_ntohs(parameter_tvb, 0);
|
||||
|
||||
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_backw_call_charge_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_backw_call_called_partys_status_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_backw_call_called_partys_category_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_backw_call_end_to_end_method_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_backw_call_interworking_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_backw_call_end_to_end_info_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_backw_call_isdn_user_part_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_backw_call_holding_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_backw_call_isdn_access_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_backw_call_echo_control_device_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_backw_call_sccp_method_ind,
|
||||
parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, backward_call_ind);
|
||||
|
||||
proto_item_set_text(parameter_item, "Backward Call Indicators: 0x%x", backward_call_ind);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, BACKWARD_CALL_IND_LENGTH, indicators, ENC_BIG_ENDIAN);
|
||||
proto_item_set_text(parameter_item, "Backward Call Indicators: 0x%x", tvb_get_ntohs(parameter_tvb, 0));
|
||||
}
|
||||
/* ------------------------------------------------------------------
|
||||
Dissector Parameter Cause Indicators - no detailed dissection since defined in Rec. Q.850
|
||||
|
@ -4540,9 +4526,29 @@ static const value_string BAT_ASE_Report_Reason_vals[] = {
|
|||
*/
|
||||
extern int dissect_codec_mode(proto_tree *tree, tvbuff_t *tvb, int offset, int len) {
|
||||
guint8 tempdata;
|
||||
proto_tree *scs_item, *acs_item;
|
||||
proto_tree *scs_tree, *acs_tree;
|
||||
static const int * active_code_sets[] = {
|
||||
&hf_active_code_set_12_2,
|
||||
&hf_active_code_set_10_2,
|
||||
&hf_active_code_set_7_95,
|
||||
&hf_active_code_set_7_40,
|
||||
&hf_active_code_set_6_70,
|
||||
&hf_active_code_set_5_90,
|
||||
&hf_active_code_set_5_15,
|
||||
&hf_active_code_set_4_75,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const int * supported_code_sets[] = {
|
||||
&hf_supported_code_set_12_2,
|
||||
&hf_supported_code_set_10_2,
|
||||
&hf_supported_code_set_7_95,
|
||||
&hf_supported_code_set_7_40,
|
||||
&hf_supported_code_set_6_70,
|
||||
&hf_supported_code_set_5_90,
|
||||
&hf_supported_code_set_5_15,
|
||||
&hf_supported_code_set_4_75,
|
||||
NULL
|
||||
};
|
||||
|
||||
tempdata = tvb_get_guint8(tvb, offset);
|
||||
proto_tree_add_uint(tree, hf_Organization_Identifier , tvb, offset, 1, tempdata);
|
||||
|
@ -4591,31 +4597,14 @@ extern int dissect_codec_mode(proto_tree *tree, tvbuff_t *tvb, int offset, int l
|
|||
if (len > 2) {
|
||||
offset = offset + 1;
|
||||
|
||||
acs_item = proto_tree_add_item(tree, hf_active_code_set, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
acs_tree = proto_item_add_subtree(acs_item, ett_acs);
|
||||
proto_tree_add_item(acs_tree, hf_active_code_set_12_2, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(acs_tree, hf_active_code_set_10_2, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(acs_tree, hf_active_code_set_7_95, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(acs_tree, hf_active_code_set_7_40, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(acs_tree, hf_active_code_set_6_70, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(acs_tree, hf_active_code_set_5_90, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(acs_tree, hf_active_code_set_5_15, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(acs_tree, hf_active_code_set_4_75, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
|
||||
proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_active_code_set,
|
||||
ett_acs, active_code_sets, ENC_LITTLE_ENDIAN, BMT_NO_APPEND);
|
||||
}
|
||||
if (len > 3) {
|
||||
offset = offset + 1;
|
||||
|
||||
scs_item = proto_tree_add_item(tree, hf_supported_code_set, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
scs_tree = proto_item_add_subtree(scs_item, ett_scs);
|
||||
proto_tree_add_item(scs_tree, hf_supported_code_set_12_2, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(scs_tree, hf_supported_code_set_10_2, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(scs_tree, hf_supported_code_set_7_95, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(scs_tree, hf_supported_code_set_7_40, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(scs_tree, hf_supported_code_set_6_70, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(scs_tree, hf_supported_code_set_5_90, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(scs_tree, hf_supported_code_set_5_15, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(scs_tree, hf_supported_code_set_4_75, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_bitmask_with_flags(tree, tvb, offset, hf_supported_code_set,
|
||||
ett_acs, supported_code_sets, ENC_LITTLE_ENDIAN, BMT_NO_APPEND);
|
||||
}
|
||||
if (len > 4) {
|
||||
offset = offset + 1;
|
||||
|
@ -4639,20 +4628,20 @@ static int
|
|||
dissect_codec(tvbuff_t *parameter_tvb, proto_tree *bat_ase_element_tree, gint length_indicator, gint offset, gint identifier)
|
||||
{
|
||||
/* offset is at length indicator e.g 1 step past identifier */
|
||||
guint8 compatibility_info;
|
||||
static const int * compatibility_info[] = {
|
||||
&hf_Instruction_ind_for_general_action,
|
||||
&hf_Send_notification_ind_for_general_action,
|
||||
&hf_Instruction_ind_for_pass_on_not_possible,
|
||||
&hf_Send_notification_ind_for_pass_on_not_possible,
|
||||
&hf_isup_extension_ind,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_uint(bat_ase_element_tree , hf_bat_ase_identifier , parameter_tvb, offset - 1, 1, identifier);
|
||||
proto_tree_add_uint(bat_ase_element_tree , hf_length_indicator , parameter_tvb, offset, 1, length_indicator);
|
||||
offset = offset + 1;
|
||||
compatibility_info = tvb_get_guint8(parameter_tvb, offset);
|
||||
proto_tree_add_uint(bat_ase_element_tree, hf_Instruction_ind_for_general_action , parameter_tvb, offset, 1, compatibility_info);
|
||||
proto_tree_add_boolean(bat_ase_element_tree, hf_Send_notification_ind_for_general_action,
|
||||
parameter_tvb, offset, 1, compatibility_info);
|
||||
proto_tree_add_uint(bat_ase_element_tree, hf_Instruction_ind_for_pass_on_not_possible,
|
||||
parameter_tvb, offset, 1, compatibility_info);
|
||||
proto_tree_add_boolean(bat_ase_element_tree, hf_Send_notification_ind_for_pass_on_not_possible,
|
||||
parameter_tvb, offset, 1, compatibility_info);
|
||||
proto_tree_add_boolean(bat_ase_element_tree, hf_isup_extension_ind , parameter_tvb, offset, 1, compatibility_info);
|
||||
|
||||
proto_tree_add_bitmask_list(bat_ase_element_tree, parameter_tvb, offset, 1, compatibility_info, ENC_NA);
|
||||
|
||||
offset = dissect_codec_mode(bat_ase_element_tree, parameter_tvb, offset+1, length_indicator-1);
|
||||
return offset;
|
||||
|
@ -5158,19 +5147,20 @@ dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_inf
|
|||
static void
|
||||
dissect_isup_optional_forward_call_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
guint8 indicators;
|
||||
|
||||
indicators = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_cug_call_ind, parameter_tvb, 0, OPTIONAL_FORWARD_CALL_IND_LENGTH, indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_simple_segmentation_ind,
|
||||
parameter_tvb, 0, OPTIONAL_FORWARD_CALL_IND_LENGTH, indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_connected_line_identity_request_ind,
|
||||
parameter_tvb, 0, OPTIONAL_FORWARD_CALL_IND_LENGTH, indicators);
|
||||
guint8 ind;
|
||||
static const int * indicators[] = {
|
||||
&hf_isup_cug_call_ind,
|
||||
&hf_isup_simple_segmentation_ind,
|
||||
&hf_isup_connected_line_identity_request_ind,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, OPTIONAL_FORWARD_CALL_IND_LENGTH, indicators, ENC_NA);
|
||||
|
||||
ind = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_item_set_text(parameter_item, "Optional forward call indicators: %s (%u)",
|
||||
val_to_str_const(indicators & BA_8BIT_MASK, isup_CUG_call_ind_value, "spare"),
|
||||
indicators);
|
||||
val_to_str_const(ind & BA_8BIT_MASK, isup_CUG_call_ind_value, "spare"),
|
||||
ind);
|
||||
}
|
||||
/* ------------------------------------------------------------------
|
||||
Dissector Parameter calling party number
|
||||
|
@ -5189,16 +5179,24 @@ dissect_isup_calling_party_number_parameter(tvbuff_t *parameter_tvb, proto_tree
|
|||
char calling_number[MAXDIGITS + 1] = "";
|
||||
e164_info_t e164_info;
|
||||
gint number_plan;
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_calling_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields[] = {
|
||||
&hf_isup_ni_indicator,
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
&hf_isup_screening_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_calling_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_fields, ENC_NA);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
number_plan = (indicators2 & 0x70)>> 4;
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_ni_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
offset = 2;
|
||||
|
||||
length = tvb_reported_length_remaining(parameter_tvb, offset);
|
||||
|
@ -5265,19 +5263,27 @@ dissect_isup_original_called_number_parameter(tvbuff_t *parameter_tvb, packet_in
|
|||
{
|
||||
proto_item *address_digits_item;
|
||||
proto_tree *address_digits_tree;
|
||||
guint8 indicators1, indicators2;
|
||||
guint8 indicators1;
|
||||
guint8 address_digit_pair = 0;
|
||||
gint offset = 0;
|
||||
gint i = 0;
|
||||
gint length;
|
||||
char calling_number[MAXDIGITS + 1] = "";
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_calling_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields[] = {
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_calling_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_fields, ENC_NA);
|
||||
offset = 2;
|
||||
|
||||
length = tvb_reported_length_remaining(parameter_tvb, offset);
|
||||
|
@ -5333,19 +5339,27 @@ dissect_isup_redirecting_number_parameter(tvbuff_t *parameter_tvb, proto_tree *p
|
|||
{
|
||||
proto_item *address_digits_item;
|
||||
proto_tree *address_digits_tree;
|
||||
guint8 indicators1, indicators2;
|
||||
guint8 indicators1;
|
||||
guint8 address_digit_pair = 0;
|
||||
gint offset = 0;
|
||||
gint i = 0;
|
||||
gint length;
|
||||
char calling_number[MAXDIGITS + 1] = "";
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_calling_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields[] = {
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_calling_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_fields, ENC_NA);
|
||||
offset = 2;
|
||||
|
||||
length = tvb_reported_length_remaining(parameter_tvb, offset);
|
||||
|
@ -5401,19 +5415,27 @@ dissect_isup_redirection_number_parameter(tvbuff_t *parameter_tvb, proto_tree *p
|
|||
{
|
||||
proto_item *address_digits_item;
|
||||
proto_tree *address_digits_tree;
|
||||
guint8 indicators1, indicators2;
|
||||
guint8 indicators1;
|
||||
guint8 address_digit_pair = 0;
|
||||
gint offset = 0;
|
||||
gint i = 0;
|
||||
gint length;
|
||||
char called_number[MAXDIGITS + 1] = "";
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_called_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields[] = {
|
||||
&hf_isup_inn_indicator,
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_called_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_inn_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_fields, ENC_NA);
|
||||
offset = 2;
|
||||
|
||||
address_digits_tree = proto_tree_add_subtree(parameter_tree, parameter_tvb,
|
||||
|
@ -5557,20 +5579,28 @@ dissect_isup_connected_number_parameter(tvbuff_t *parameter_tvb, proto_tree *par
|
|||
{
|
||||
proto_item *address_digits_item;
|
||||
proto_tree *address_digits_tree;
|
||||
guint8 indicators1, indicators2;
|
||||
guint8 indicators1;
|
||||
guint8 address_digit_pair = 0;
|
||||
gint offset = 0;
|
||||
gint i = 0;
|
||||
gint length;
|
||||
char calling_number[MAXDIGITS + 1] = "";
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_calling_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields[] = {
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
&hf_isup_screening_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_calling_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_fields, ENC_NA);
|
||||
offset = 2;
|
||||
|
||||
length = tvb_reported_length_remaining(parameter_tvb, offset);
|
||||
|
@ -5626,11 +5656,15 @@ dissect_isup_transit_network_selection_parameter(tvbuff_t *parameter_tvb, proto_
|
|||
gint i = 0;
|
||||
gint length;
|
||||
char network_id[MAXDIGITS + 1] = "";
|
||||
static const int * indicators_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_type_of_network_identification,
|
||||
&hf_isup_network_identification_plan,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators_fields, ENC_NA);
|
||||
indicators = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_type_of_network_identification, parameter_tvb, 0, 1, indicators);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_network_identification_plan, parameter_tvb, 0, 1, indicators);
|
||||
offset = 1;
|
||||
|
||||
address_digits_tree = proto_tree_add_subtree(parameter_tree, parameter_tvb,
|
||||
|
@ -5699,16 +5733,17 @@ dissect_isup_automatic_congestion_level_parameter(tvbuff_t *parameter_tvb, proto
|
|||
static void
|
||||
dissect_isup_optional_backward_call_indicators_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
guint8 indicators;
|
||||
static const int * indicators[] = {
|
||||
&hf_isup_inband_information_ind,
|
||||
&hf_isup_call_diversion_may_occur_ind,
|
||||
&hf_isup_simple_segmentation_ind,
|
||||
&hf_isup_mlpp_user_ind,
|
||||
NULL
|
||||
};
|
||||
|
||||
indicators = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_inband_information_ind, parameter_tvb, 0, OPTIONAL_BACKWARD_CALL_IND_LENGTH, indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_call_diversion_may_occur_ind, parameter_tvb, 0, OPTIONAL_BACKWARD_CALL_IND_LENGTH, indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_simple_segmentation_ind, parameter_tvb, 0, OPTIONAL_BACKWARD_CALL_IND_LENGTH, indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_mlpp_user_ind, parameter_tvb, 0, OPTIONAL_BACKWARD_CALL_IND_LENGTH, indicators);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, OPTIONAL_BACKWARD_CALL_IND_LENGTH, indicators, ENC_NA);
|
||||
|
||||
|
||||
proto_item_set_text(parameter_item, "Optional backward call indicators: 0x%x", indicators);
|
||||
proto_item_set_text(parameter_item, "Optional backward call indicators: 0x%x", tvb_get_guint8(parameter_tvb, 0));
|
||||
}
|
||||
/* ------------------------------------------------------------------
|
||||
Dissector Parameter User-to-user indicators
|
||||
|
@ -5743,22 +5778,31 @@ dissect_isup_user_to_user_indicators_parameter(tvbuff_t *parameter_tvb,
|
|||
proto_item *parameter_item)
|
||||
{
|
||||
guint8 indicators;
|
||||
static const int * req_fields[] = {
|
||||
&hf_isup_UUI_type,
|
||||
&hf_isup_UUI_req_service1,
|
||||
&hf_isup_UUI_req_service2,
|
||||
&hf_isup_UUI_req_service3,
|
||||
NULL
|
||||
};
|
||||
static const int * res_fields[] = {
|
||||
&hf_isup_UUI_type,
|
||||
&hf_isup_UUI_res_service1,
|
||||
&hf_isup_UUI_res_service2,
|
||||
&hf_isup_UUI_res_service3,
|
||||
&hf_isup_UUI_network_discard_ind,
|
||||
NULL
|
||||
};
|
||||
|
||||
indicators = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_UUI_type, parameter_tvb, 0, 1, indicators);
|
||||
if ((indicators & 0x01) == 0) {
|
||||
/* Request */
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_UUI_req_service1, parameter_tvb, 0, 1, indicators);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_UUI_req_service2, parameter_tvb, 0, 1, indicators);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_UUI_req_service3, parameter_tvb, 0, 1, indicators);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, req_fields, ENC_NA);
|
||||
}
|
||||
else {
|
||||
/* Response */
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_UUI_res_service1, parameter_tvb, 0, 1, indicators);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_UUI_res_service2, parameter_tvb, 0, 1, indicators);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_UUI_res_service3, parameter_tvb, 0, 1, indicators);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_UUI_network_discard_ind, parameter_tvb, 0, 1, indicators);
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, res_fields, ENC_NA);
|
||||
}
|
||||
proto_item_set_text(parameter_item, "User-to-user indicators: 0x%x", indicators);
|
||||
}
|
||||
|
@ -6309,18 +6353,35 @@ dissect_isup_location_number_parameter(tvbuff_t *parameter_tvb, proto_tree *para
|
|||
gint i = 0;
|
||||
gint length;
|
||||
char calling_number[MAXDIGITS + 1] = "";
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_calling_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields[] = {
|
||||
&hf_isup_inn_indicator,
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
&hf_isup_screening_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields_gfe[] = {
|
||||
&hf_isup_inn_indicator,
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_number_different_meaning,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
&hf_isup_screening_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_calling_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_inn_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
if ((indicators2 & GFE_8BIT_MASK) == 0x50)
|
||||
proto_tree_add_uint_format_value(parameter_tree, hf_isup_number_different_meaning, parameter_tvb, 1, 1, indicators2 & GFE_8BIT_MASK,
|
||||
"Numbering plan indicator = private numbering plan");
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
if ((indicators2 & GFE_8BIT_MASK) == 0x50) {
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_fields_gfe, ENC_NA);
|
||||
} else {
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_fields, ENC_NA);
|
||||
}
|
||||
|
||||
/* NOTE When the address presentation restricted indicator indicates address not available, the
|
||||
* subfields in items a), b), c) and d) are coded with 0's, and the screening indicator is set to 11
|
||||
|
@ -6612,19 +6673,26 @@ dissect_isup_called_in_number_parameter(tvbuff_t *parameter_tvb, proto_tree *par
|
|||
{
|
||||
proto_item *address_digits_item;
|
||||
proto_tree *address_digits_tree;
|
||||
guint8 indicators1, indicators2;
|
||||
guint8 indicators1;
|
||||
guint8 address_digit_pair = 0;
|
||||
gint offset = 0;
|
||||
gint i = 0;
|
||||
gint length;
|
||||
char calling_number[MAXDIGITS + 1] = "";
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_calling_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields[] = {
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_calling_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 1, 1, indicators2_fields, ENC_NA);
|
||||
offset = 2;
|
||||
|
||||
address_digits_tree = proto_tree_add_subtree(parameter_tree, parameter_tvb,
|
||||
|
@ -6796,9 +6864,7 @@ dissect_isup_calling_geodetic_location_parameter(tvbuff_t *parameter_tvb, packet
|
|||
proto_tree_add_uint(parameter_tree, hf_isup_geo_loc_presentation_restricted_ind, parameter_tvb, 0, 1, oct);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_geo_loc_screening_ind, parameter_tvb, 0, 1, oct);
|
||||
|
||||
oct = tvb_get_guint8(parameter_tvb, 1);
|
||||
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_extension_ind, parameter_tvb, 1, 1, oct);
|
||||
proto_tree_add_item(parameter_tree, hf_isup_extension_ind, parameter_tvb, 1, 1, ENC_NA);
|
||||
proto_tree_add_item(parameter_tree, hf_isup_geo_loc_shape, parameter_tvb, 1, 1, ENC_NA);
|
||||
|
||||
if (length > 2)
|
||||
|
@ -6850,19 +6916,36 @@ dissect_isup_generic_number_parameter(tvbuff_t *parameter_tvb, packet_info *pinf
|
|||
gint i = 0;
|
||||
gint length;
|
||||
char calling_number[MAXDIGITS + 1] = "";
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_calling_party_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields[] = {
|
||||
&hf_isup_ni_indicator,
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
&hf_isup_screening_indicator_enhanced,
|
||||
NULL
|
||||
};
|
||||
static const int * indicators2_fields_gfe[] = {
|
||||
&hf_isup_ni_indicator,
|
||||
&hf_isup_numbering_plan_indicator,
|
||||
&hf_isup_number_different_meaning,
|
||||
&hf_isup_address_presentation_restricted_indicator,
|
||||
&hf_isup_screening_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_item(parameter_tree, hf_isup_number_qualifier_indicator, parameter_tvb, 0, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb,1 , 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 1);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 1, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_calling_party_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 2);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_ni_indicator, parameter_tvb, 2, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 2, 1, indicators2);
|
||||
if ((indicators2 & GFE_8BIT_MASK) == 0x50)
|
||||
proto_tree_add_uint_format_value(parameter_tree, hf_isup_number_different_meaning, parameter_tvb, 2, 1, indicators2 & GFE_8BIT_MASK,
|
||||
"Numbering plan indicator = private numbering plan");
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_address_presentation_restricted_indicator, parameter_tvb, 2, 1, indicators2);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_screening_indicator_enhanced, parameter_tvb, 2, 1, indicators2);
|
||||
if ((indicators2 & GFE_8BIT_MASK) == 0x50) {
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 2, 1, indicators2_fields_gfe, ENC_NA);
|
||||
} else {
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 2, 1, indicators2_fields, ENC_NA);
|
||||
}
|
||||
offset = 3;
|
||||
|
||||
length = tvb_reported_length_remaining(parameter_tvb, offset);
|
||||
|
@ -6971,17 +7054,21 @@ dissect_isup_jurisdiction_parameter(tvbuff_t *parameter_tvb, proto_tree *paramet
|
|||
static void
|
||||
dissect_isup_generic_name_parameter(tvbuff_t *parameter_tvb, proto_tree *parameter_tree, proto_item *parameter_item)
|
||||
{
|
||||
guint8 indicator;
|
||||
gint gen_name_length;
|
||||
char *gen_name = NULL;
|
||||
static const int * indicators[] = {
|
||||
&hf_isup_generic_name_presentation,
|
||||
&hf_isup_generic_name_availability,
|
||||
&hf_isup_generic_name_type,
|
||||
NULL
|
||||
};
|
||||
|
||||
gen_name = (char *)wmem_alloc(wmem_packet_scope(), MAXGNAME + 1);
|
||||
gen_name[0] = '\0';
|
||||
gen_name_length = tvb_reported_length(parameter_tvb) - 1;
|
||||
indicator = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_generic_name_presentation, parameter_tvb, 1, 1, indicator);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_generic_name_availability, parameter_tvb, 1, 1, indicator);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_generic_name_type, parameter_tvb, 1, 1, indicator);
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators, ENC_NA);
|
||||
|
||||
gen_name = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 1, gen_name_length, ENC_ASCII);
|
||||
gen_name[gen_name_length] = '\0';
|
||||
proto_tree_add_string(parameter_tree, hf_isup_generic_name_ia5, parameter_tvb, 2, gen_name_length, gen_name);
|
||||
|
@ -7007,18 +7094,21 @@ dissect_isup_charge_number_parameter(tvbuff_t *parameter_tvb, proto_tree *parame
|
|||
{
|
||||
proto_item *address_digits_item;
|
||||
proto_tree *address_digits_tree;
|
||||
guint8 indicators1, indicators2;
|
||||
guint8 indicators1;
|
||||
guint8 address_digit_pair = 0;
|
||||
gint offset = 0;
|
||||
gint i = 0;
|
||||
gint length;
|
||||
char calling_number[MAXDIGITS + 1] = "";
|
||||
static const int * indicators1_fields[] = {
|
||||
&hf_isup_odd_even_indicator,
|
||||
&hf_isup_charge_number_nature_of_address_indicator,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_list(parameter_tree, parameter_tvb, 0, 1, indicators1_fields, ENC_NA);
|
||||
indicators1 = tvb_get_guint8(parameter_tvb, 0);
|
||||
proto_tree_add_boolean(parameter_tree, hf_isup_odd_even_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_charge_number_nature_of_address_indicator, parameter_tvb, 0, 1, indicators1);
|
||||
indicators2 = tvb_get_guint8(parameter_tvb, 1);
|
||||
proto_tree_add_uint(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, indicators2);
|
||||
proto_tree_add_item(parameter_tree, hf_isup_numbering_plan_indicator, parameter_tvb, 1, 1, ENC_NA);
|
||||
offset = 2;
|
||||
|
||||
address_digits_tree = proto_tree_add_subtree(parameter_tree, parameter_tvb,
|
||||
|
|
|
@ -2206,6 +2206,14 @@ process_l2tpv3_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
}
|
||||
}
|
||||
|
||||
static const int * l2tp_control_fields[] = {
|
||||
&hf_l2tp_type,
|
||||
&hf_l2tp_length_bit,
|
||||
&hf_l2tp_seq_bit,
|
||||
&hf_l2tp_version,
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* Processes v3 data message over UDP, to then call process_l2tpv3_data
|
||||
* from the common part (Session ID)
|
||||
|
@ -2216,14 +2224,9 @@ process_l2tpv3_data_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
{
|
||||
proto_tree *l2tp_tree, *ctrl_tree;
|
||||
proto_item *l2tp_item;
|
||||
|
||||
int idx = 0;
|
||||
int control;
|
||||
int idx = 4; /* skip to sid */
|
||||
int sid;
|
||||
|
||||
control = tvb_get_ntohs(tvb, idx);
|
||||
idx += 2; /* skip ahead */
|
||||
idx += 2; /* Skip the reserved */
|
||||
sid = tvb_get_ntohl(tvb, idx);
|
||||
|
||||
l2tp_item = proto_tree_add_item(tree, proto_l2tp, tvb, 0, -1, ENC_NA);
|
||||
|
@ -2235,11 +2238,8 @@ process_l2tpv3_data_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
ctrl_tree = proto_tree_add_subtree_format(l2tp_tree, tvb, 0, 2,
|
||||
ett_l2tp_ctrl, NULL, "Packet Type: %s Session Id=%u",
|
||||
data_msg, sid);
|
||||
proto_tree_add_bitmask_list(ctrl_tree, tvb, 0, 2, l2tp_control_fields, ENC_BIG_ENDIAN);
|
||||
|
||||
proto_tree_add_uint(ctrl_tree, hf_l2tp_type, tvb, 0, 2, control);
|
||||
proto_tree_add_boolean(ctrl_tree, hf_l2tp_length_bit, tvb, 0, 2, control);
|
||||
proto_tree_add_boolean(ctrl_tree, hf_l2tp_seq_bit, tvb, 0, 2, control);
|
||||
proto_tree_add_uint(ctrl_tree, hf_l2tp_version, tvb, 0, 2, control);
|
||||
/* Data in v3 over UDP has this reserved */
|
||||
proto_tree_add_item(l2tp_tree, hf_l2tp_res, tvb, 2, 2, ENC_BIG_ENDIAN);
|
||||
}
|
||||
|
@ -2378,11 +2378,7 @@ process_l2tpv3_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
|
|||
ctrl_tree = proto_tree_add_subtree_format(l2tp_tree, tvb, baseIdx, 2,
|
||||
ett_l2tp_ctrl, NULL, "Packet Type: %s Control Connection Id=%d",
|
||||
(CONTROL_BIT(control) ? control_msg : data_msg), ccid);
|
||||
|
||||
proto_tree_add_uint(ctrl_tree, hf_l2tp_type, tvb, baseIdx, 2, control);
|
||||
proto_tree_add_boolean(ctrl_tree, hf_l2tp_length_bit, tvb, baseIdx, 2, control);
|
||||
proto_tree_add_boolean(ctrl_tree, hf_l2tp_seq_bit, tvb, baseIdx, 2, control);
|
||||
proto_tree_add_uint(ctrl_tree, hf_l2tp_version, tvb, baseIdx, 2, control);
|
||||
proto_tree_add_bitmask_list(ctrl_tree, tvb, baseIdx, 2, l2tp_control_fields, ENC_BIG_ENDIAN);
|
||||
}
|
||||
idx = baseIdx + 2;
|
||||
if (LENGTH_BIT(control)) {
|
||||
|
@ -2592,16 +2588,21 @@ dissect_l2tp_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
|
|||
l2tp_tree = proto_item_add_subtree(l2tp_item, ett_l2tp);
|
||||
|
||||
if (tree) {
|
||||
static const int * control_fields[] = {
|
||||
&hf_l2tp_type,
|
||||
&hf_l2tp_length_bit,
|
||||
&hf_l2tp_seq_bit,
|
||||
&hf_l2tp_offset_bit,
|
||||
&hf_l2tp_priority,
|
||||
&hf_l2tp_version,
|
||||
NULL
|
||||
};
|
||||
|
||||
ctrl_tree = proto_tree_add_subtree_format(l2tp_tree, tvb, 0, 2, ett_l2tp_ctrl, NULL,
|
||||
"Packet Type: %s Tunnel Id=%d Session Id=%d",
|
||||
(CONTROL_BIT(control) ? control_msg : data_msg), tid, cid);
|
||||
|
||||
proto_tree_add_uint(ctrl_tree, hf_l2tp_type, tvb, 0, 2, control);
|
||||
proto_tree_add_boolean(ctrl_tree, hf_l2tp_length_bit, tvb, 0, 2, control);
|
||||
proto_tree_add_boolean(ctrl_tree, hf_l2tp_seq_bit, tvb, 0, 2, control);
|
||||
proto_tree_add_boolean(ctrl_tree, hf_l2tp_offset_bit, tvb, 0, 2, control);
|
||||
proto_tree_add_boolean(ctrl_tree, hf_l2tp_priority, tvb, 0, 2, control);
|
||||
proto_tree_add_uint(ctrl_tree, hf_l2tp_version, tvb, 0, 2, control);
|
||||
proto_tree_add_bitmask_list(ctrl_tree, tvb, 0, 2, control_fields, ENC_BIG_ENDIAN);
|
||||
}
|
||||
idx = 2;
|
||||
if (LENGTH_BIT(control)) {
|
||||
|
|
|
@ -97,16 +97,6 @@ static gint ett_lacp = -1;
|
|||
static gint ett_lacp_a_flags = -1;
|
||||
static gint ett_lacp_p_flags = -1;
|
||||
|
||||
static const char initial_sep[] = " (";
|
||||
static const char cont_sep[] = ", ";
|
||||
|
||||
#define APPEND_BOOLEAN_FLAG(flag, item, string) \
|
||||
if(flag){ \
|
||||
if(item) \
|
||||
proto_item_append_text(item, string, sep); \
|
||||
sep = cont_sep; \
|
||||
}
|
||||
|
||||
/*
|
||||
* Name: dissect_lacp
|
||||
*
|
||||
|
@ -130,17 +120,30 @@ dissect_lacp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint16 raw_word;
|
||||
guint8 raw_octet;
|
||||
|
||||
guint8 flags;
|
||||
|
||||
proto_tree *lacpdu_tree;
|
||||
proto_item *lacpdu_item;
|
||||
proto_tree *actor_flags_tree;
|
||||
proto_item *actor_flags_item;
|
||||
proto_tree *partner_flags_tree;
|
||||
proto_item *partner_flags_item;
|
||||
|
||||
const char *sep;
|
||||
|
||||
static const int * actor_flags[] = {
|
||||
&hf_lacp_flags_a_activity,
|
||||
&hf_lacp_flags_a_timeout,
|
||||
&hf_lacp_flags_a_aggregation,
|
||||
&hf_lacp_flags_a_sync,
|
||||
&hf_lacp_flags_a_collecting,
|
||||
&hf_lacp_flags_a_distrib,
|
||||
&hf_lacp_flags_a_defaulted,
|
||||
&hf_lacp_flags_a_expired,
|
||||
NULL
|
||||
};
|
||||
static const int * partner_flags[] = {
|
||||
&hf_lacp_flags_p_activity,
|
||||
&hf_lacp_flags_p_timeout,
|
||||
&hf_lacp_flags_p_aggregation,
|
||||
&hf_lacp_flags_p_sync,
|
||||
&hf_lacp_flags_p_collecting,
|
||||
&hf_lacp_flags_p_distrib,
|
||||
&hf_lacp_flags_p_defaulted,
|
||||
&hf_lacp_flags_p_expired,
|
||||
NULL
|
||||
};
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LACP");
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "Link Aggregation Control Protocol");
|
||||
|
@ -203,75 +206,8 @@ dissect_lacp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset += 2;
|
||||
|
||||
/* Actor State */
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
actor_flags_item = proto_tree_add_uint(lacpdu_tree, hf_lacp_actor_state, tvb,
|
||||
offset, 1, flags);
|
||||
actor_flags_tree = proto_item_add_subtree(actor_flags_item, ett_lacp_a_flags);
|
||||
|
||||
sep = initial_sep;
|
||||
|
||||
/* Activity Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_ACTIVITY, actor_flags_item,
|
||||
"%sActivity");
|
||||
proto_tree_add_boolean(actor_flags_tree, hf_lacp_flags_a_activity, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Timeout Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_TIMEOUT, actor_flags_item,
|
||||
"%sTimeout");
|
||||
proto_tree_add_boolean(actor_flags_tree, hf_lacp_flags_a_timeout, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Aggregation Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_AGGREGATION, actor_flags_item,
|
||||
"%sAggregation");
|
||||
proto_tree_add_boolean(actor_flags_tree, hf_lacp_flags_a_aggregation, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Synchronization Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_SYNC, actor_flags_item,
|
||||
"%sSynchronization");
|
||||
proto_tree_add_boolean(actor_flags_tree, hf_lacp_flags_a_sync, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Collecting Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_COLLECTING, actor_flags_item,
|
||||
"%sCollecting");
|
||||
proto_tree_add_boolean(actor_flags_tree, hf_lacp_flags_a_collecting, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Distributing Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_DISTRIB, actor_flags_item,
|
||||
"%sDistributing");
|
||||
proto_tree_add_boolean(actor_flags_tree, hf_lacp_flags_a_distrib, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Defaulted Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_DEFAULTED, actor_flags_item,
|
||||
"%sDefaulted");
|
||||
proto_tree_add_boolean(actor_flags_tree, hf_lacp_flags_a_defaulted, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Expired Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_EXPIRED, actor_flags_item,
|
||||
"%sExpired");
|
||||
proto_tree_add_boolean(actor_flags_tree, hf_lacp_flags_a_expired, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
if (sep != initial_sep)
|
||||
{
|
||||
/* We put something in; put in the terminating ")" */
|
||||
proto_item_append_text(actor_flags_item, ")");
|
||||
}
|
||||
proto_tree_add_bitmask_with_flags(lacpdu_tree, tvb, offset, hf_lacp_actor_state,
|
||||
ett_lacp_a_flags, actor_flags, ENC_NA, BMT_NO_INT|BMT_NO_TFS|BMT_NO_FALSE);
|
||||
offset += 1;
|
||||
|
||||
/* Actor Reserved */
|
||||
|
@ -326,76 +262,9 @@ dissect_lacp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (tree)
|
||||
{
|
||||
/* Partner State */
|
||||
proto_tree_add_bitmask_with_flags(lacpdu_tree, tvb, offset, hf_lacp_partner_state,
|
||||
ett_lacp_p_flags, partner_flags, ENC_NA, BMT_NO_INT|BMT_NO_TFS|BMT_NO_FALSE);
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
partner_flags_item = proto_tree_add_uint(lacpdu_tree, hf_lacp_partner_state, tvb,
|
||||
offset, 1, flags);
|
||||
partner_flags_tree = proto_item_add_subtree(partner_flags_item, ett_lacp_p_flags);
|
||||
|
||||
sep = initial_sep;
|
||||
|
||||
/* Activity Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_ACTIVITY, partner_flags_item,
|
||||
"%sActivity");
|
||||
proto_tree_add_boolean(partner_flags_tree, hf_lacp_flags_p_activity, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Timeout Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_TIMEOUT, partner_flags_item,
|
||||
"%sTimeout");
|
||||
proto_tree_add_boolean(partner_flags_tree, hf_lacp_flags_p_timeout, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Aggregation Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_AGGREGATION, partner_flags_item,
|
||||
"%sAggregation");
|
||||
proto_tree_add_boolean(partner_flags_tree, hf_lacp_flags_p_aggregation, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Synchronization Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_SYNC, partner_flags_item,
|
||||
"%sSynchronization");
|
||||
proto_tree_add_boolean(partner_flags_tree, hf_lacp_flags_p_sync, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Collecting Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_COLLECTING, partner_flags_item,
|
||||
"%sCollecting");
|
||||
proto_tree_add_boolean(partner_flags_tree, hf_lacp_flags_p_collecting, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Distributing Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_DISTRIB, partner_flags_item,
|
||||
"%sDistributing");
|
||||
proto_tree_add_boolean(partner_flags_tree, hf_lacp_flags_p_distrib, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Defaulted Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_DEFAULTED, partner_flags_item,
|
||||
"%sDefaulted");
|
||||
proto_tree_add_boolean(partner_flags_tree, hf_lacp_flags_p_defaulted, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
/* Expired Flag */
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & LACPDU_FLAGS_EXPIRED, partner_flags_item,
|
||||
"%sExpired");
|
||||
proto_tree_add_boolean(partner_flags_tree, hf_lacp_flags_p_expired, tvb,
|
||||
offset, 1, flags);
|
||||
|
||||
if (sep != initial_sep)
|
||||
{
|
||||
/* We put something in; put in the terminating ")" */
|
||||
proto_item_append_text(partner_flags_item, ")");
|
||||
}
|
||||
offset += 1;
|
||||
|
||||
/* Partner Reserved */
|
||||
|
|
|
@ -743,52 +743,22 @@ attribute_types_initialize_cb(void)
|
|||
/* MS-ADTS specification, section 7.3.1.1, NETLOGON_NT_VERSION Options Bits */
|
||||
static int dissect_mscldap_ntver_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
guint32 flags;
|
||||
proto_item *item;
|
||||
proto_tree *tree=NULL;
|
||||
guint *field;
|
||||
header_field_info *hfi;
|
||||
gboolean one_bit_set = FALSE;
|
||||
guint fields[11];
|
||||
fields[0] = hf_mscldap_ntver_flags_v1;
|
||||
fields[1] = hf_mscldap_ntver_flags_v5;
|
||||
fields[2] = hf_mscldap_ntver_flags_v5ex;
|
||||
fields[3] = hf_mscldap_ntver_flags_v5ep;
|
||||
fields[4] = hf_mscldap_ntver_flags_vcs;
|
||||
fields[5] = hf_mscldap_ntver_flags_vnt4;
|
||||
fields[6] = hf_mscldap_ntver_flags_vpdc;
|
||||
fields[7] = hf_mscldap_ntver_flags_vip;
|
||||
fields[8] = hf_mscldap_ntver_flags_vl;
|
||||
fields[9] = hf_mscldap_ntver_flags_vgc;
|
||||
fields[10] = 0;
|
||||
|
||||
|
||||
flags=tvb_get_letohl(tvb, offset);
|
||||
item=proto_tree_add_item(parent_tree, hf_mscldap_ntver_flags, tvb, offset, 4, ENC_LITTLE_ENDIAN);
|
||||
if(parent_tree){
|
||||
tree = proto_item_add_subtree(item, ett_mscldap_ntver_flags);
|
||||
}
|
||||
|
||||
proto_item_append_text(item, " (");
|
||||
|
||||
for(field = fields; *field; field++) {
|
||||
proto_tree_add_boolean(tree, *field, tvb, offset, 4, flags);
|
||||
hfi = proto_registrar_get_nth(*field);
|
||||
|
||||
if(flags & hfi->bitmask) {
|
||||
|
||||
if(one_bit_set)
|
||||
proto_item_append_text(item, ", ");
|
||||
else
|
||||
one_bit_set = TRUE;
|
||||
|
||||
proto_item_append_text(item, "%s", hfi->name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
proto_item_append_text(item, ")");
|
||||
static const int * flags[] = {
|
||||
&hf_mscldap_ntver_flags_v1,
|
||||
&hf_mscldap_ntver_flags_v5,
|
||||
&hf_mscldap_ntver_flags_v5ex,
|
||||
&hf_mscldap_ntver_flags_v5ep,
|
||||
&hf_mscldap_ntver_flags_vcs,
|
||||
&hf_mscldap_ntver_flags_vnt4,
|
||||
&hf_mscldap_ntver_flags_vpdc,
|
||||
&hf_mscldap_ntver_flags_vip,
|
||||
&hf_mscldap_ntver_flags_vl,
|
||||
&hf_mscldap_ntver_flags_vgc,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_mscldap_ntver_flags,
|
||||
ett_mscldap_ntver_flags, flags, ENC_LITTLE_ENDIAN, BMT_NO_FALSE);
|
||||
offset += 4;
|
||||
|
||||
return offset;
|
||||
|
@ -2550,7 +2520,7 @@ dissect_ldap_SEQUENCE_OF_LDAPURL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
|
|||
|
||||
static int
|
||||
dissect_ldap_SearchResultReference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 805 "../../asn1/ldap/ldap.cnf"
|
||||
#line 795 "../../asn1/ldap/ldap.cnf"
|
||||
|
||||
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
|
||||
hf_index, BER_CLASS_APP, 19, TRUE, dissect_ldap_SEQUENCE_OF_LDAPURL);
|
||||
|
@ -2827,7 +2797,7 @@ dissect_ldap_CompareResponse(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
|
|||
|
||||
static int
|
||||
dissect_ldap_AbandonRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
|
||||
#line 812 "../../asn1/ldap/ldap.cnf"
|
||||
#line 802 "../../asn1/ldap/ldap.cnf"
|
||||
|
||||
offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
|
||||
hf_index, BER_CLASS_APP, 16, TRUE, dissect_ldap_MessageID);
|
||||
|
@ -3402,7 +3372,6 @@ dissect_ldap_DirSyncFlags(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
|
|||
gint32 tag;
|
||||
guint32 len;
|
||||
gint32 val;
|
||||
header_field_info *hfinfo;
|
||||
|
||||
int otheroffset = offset;
|
||||
if(!implicit_tag){
|
||||
|
@ -3415,25 +3384,16 @@ dissect_ldap_DirSyncFlags(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs
|
|||
|
||||
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, -1, &val);
|
||||
|
||||
hfinfo = proto_registrar_get_nth(hf_index);
|
||||
|
||||
if (val >0) {
|
||||
proto_tree *subtree;
|
||||
subtree = proto_tree_add_subtree_format(tree, tvb, otheroffset+1, len,
|
||||
ett_ldap_DirSyncFlagsSubEntry, NULL, "%s: 0x%08x", hfinfo->name, val);
|
||||
const int * flags[] = {
|
||||
&hf_ldap_object_security_flag,
|
||||
&hf_ldap_ancestor_first_flag,
|
||||
&hf_ldap_public_data_only_flag,
|
||||
&hf_ldap_incremental_value_flag,
|
||||
};
|
||||
|
||||
if (val & 0x1) {
|
||||
proto_tree_add_boolean(subtree, hf_ldap_object_security_flag, tvb, otheroffset+1, len, TRUE);
|
||||
}
|
||||
if (val & 0x800) {
|
||||
proto_tree_add_boolean(subtree, hf_ldap_ancestor_first_flag, tvb, otheroffset+1, len, TRUE);
|
||||
}
|
||||
if (val & 0x2000) {
|
||||
proto_tree_add_boolean(subtree, hf_ldap_public_data_only_flag, tvb, otheroffset+1, len, TRUE);
|
||||
}
|
||||
if (val & 0x80000000) {
|
||||
proto_tree_add_boolean(subtree, hf_ldap_incremental_value_flag, tvb, otheroffset+1, len, TRUE);
|
||||
}
|
||||
proto_tree_add_bitmask_value_with_flags(tree, tvb, otheroffset+1, hf_index,
|
||||
ett_ldap_DirSyncFlagsSubEntry, flags, val, BMT_NO_APPEND);
|
||||
} else {
|
||||
proto_tree_add_uint(tree, hf_index, tvb, otheroffset+len, len, 0);
|
||||
}
|
||||
|
@ -3807,7 +3767,7 @@ static int dissect_PasswordPolicyResponseValue_PDU(tvbuff_t *tvb _U_, packet_inf
|
|||
|
||||
|
||||
/*--- End of included file: packet-ldap-fn.c ---*/
|
||||
#line 883 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 853 "../../asn1/ldap/packet-ldap-template.c"
|
||||
static int dissect_LDAPMessage_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ldap_conv_info_t *ldap_info) {
|
||||
|
||||
int offset = 0;
|
||||
|
@ -4287,54 +4247,27 @@ static const true_false_string tfs_ads_fnc = {
|
|||
};
|
||||
static int dissect_mscldap_netlogon_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
guint32 flags;
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint *field;
|
||||
header_field_info *hfi;
|
||||
gboolean one_bit_set = FALSE;
|
||||
guint fields[16];
|
||||
fields[0] = hf_mscldap_netlogon_flags_fnc;
|
||||
fields[1] = hf_mscldap_netlogon_flags_dnc;
|
||||
fields[2] = hf_mscldap_netlogon_flags_dns;
|
||||
fields[3] = hf_mscldap_netlogon_flags_wdc;
|
||||
fields[4] = hf_mscldap_netlogon_flags_rodc;
|
||||
fields[5] = hf_mscldap_netlogon_flags_ndnc;
|
||||
fields[6] = hf_mscldap_netlogon_flags_good_timeserv;
|
||||
fields[7] = hf_mscldap_netlogon_flags_writable;
|
||||
fields[8] = hf_mscldap_netlogon_flags_closest;
|
||||
fields[9] = hf_mscldap_netlogon_flags_timeserv;
|
||||
fields[10] = hf_mscldap_netlogon_flags_kdc;
|
||||
fields[11] = hf_mscldap_netlogon_flags_ds;
|
||||
fields[12] = hf_mscldap_netlogon_flags_ldap;
|
||||
fields[13] = hf_mscldap_netlogon_flags_gc;
|
||||
fields[14] = hf_mscldap_netlogon_flags_pdc;
|
||||
fields[15] = 0;
|
||||
|
||||
flags=tvb_get_letohl(tvb, offset);
|
||||
item=proto_tree_add_item(parent_tree, hf_mscldap_netlogon_flags, tvb, offset, 4, ENC_LITTLE_ENDIAN);
|
||||
tree = proto_item_add_subtree(item, ett_mscldap_netlogon_flags);
|
||||
|
||||
proto_item_append_text(item, " (");
|
||||
|
||||
for(field = fields; *field; field++) {
|
||||
proto_tree_add_boolean(tree, *field, tvb, offset, 4, flags);
|
||||
hfi = proto_registrar_get_nth(*field);
|
||||
|
||||
if(flags & hfi->bitmask) {
|
||||
|
||||
if(one_bit_set)
|
||||
proto_item_append_text(item, ", ");
|
||||
else
|
||||
one_bit_set = TRUE;
|
||||
|
||||
proto_item_append_text(item, "%s", hfi->name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
proto_item_append_text(item, ")");
|
||||
static const int * flags[] = {
|
||||
&hf_mscldap_netlogon_flags_fnc,
|
||||
&hf_mscldap_netlogon_flags_dnc,
|
||||
&hf_mscldap_netlogon_flags_dns,
|
||||
&hf_mscldap_netlogon_flags_wdc,
|
||||
&hf_mscldap_netlogon_flags_rodc,
|
||||
&hf_mscldap_netlogon_flags_ndnc,
|
||||
&hf_mscldap_netlogon_flags_good_timeserv,
|
||||
&hf_mscldap_netlogon_flags_writable,
|
||||
&hf_mscldap_netlogon_flags_closest,
|
||||
&hf_mscldap_netlogon_flags_timeserv,
|
||||
&hf_mscldap_netlogon_flags_kdc,
|
||||
&hf_mscldap_netlogon_flags_ds,
|
||||
&hf_mscldap_netlogon_flags_ldap,
|
||||
&hf_mscldap_netlogon_flags_gc,
|
||||
&hf_mscldap_netlogon_flags_pdc,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_mscldap_netlogon_flags,
|
||||
ett_mscldap_netlogon_flags, flags, ENC_LITTLE_ENDIAN, BMT_NO_FALSE);
|
||||
offset += 4;
|
||||
|
||||
return offset;
|
||||
|
@ -5700,7 +5633,7 @@ void proto_register_ldap(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-ldap-hfarr.c ---*/
|
||||
#line 2207 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2150 "../../asn1/ldap/packet-ldap-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -5774,7 +5707,7 @@ void proto_register_ldap(void) {
|
|||
&ett_ldap_T_warning,
|
||||
|
||||
/*--- End of included file: packet-ldap-ettarr.c ---*/
|
||||
#line 2221 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2164 "../../asn1/ldap/packet-ldap-template.c"
|
||||
};
|
||||
/* UAT for header fields */
|
||||
static uat_field_t custom_attribute_types_uat_fields[] = {
|
||||
|
@ -5940,7 +5873,7 @@ proto_reg_handoff_ldap(void)
|
|||
|
||||
|
||||
/*--- End of included file: packet-ldap-dis-tab.c ---*/
|
||||
#line 2370 "../../asn1/ldap/packet-ldap-template.c"
|
||||
#line 2313 "../../asn1/ldap/packet-ldap-template.c"
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -38,26 +38,8 @@
|
|||
void proto_register_mpeg1(void);
|
||||
void proto_reg_handoff_mpeg1(void);
|
||||
|
||||
#define RTP_MPG_MBZ(word) ( word >> 11)
|
||||
#define RTP_MPG_T(word) ( (word >> 10) & 1 )
|
||||
#define RTP_MPG_TR(word) ( word & 0x3ff )
|
||||
|
||||
#define RTP_MPG_AN(octet) ( octet >> 7)
|
||||
#define RTP_MPG_N(octet) ( (octet >> 6) & 1 )
|
||||
#define RTP_MPG_S(octet) ( (octet >> 5) & 1 )
|
||||
#define RTP_MPG_B(octet) ( (octet >> 4) & 1 )
|
||||
#define RTP_MPG_E(octet) ( (octet >> 3) & 1 )
|
||||
#define RTP_MPG_P(octet) ( octet & 7 )
|
||||
|
||||
#define RTP_MPG_FBV(octet) ( (octet >> 7) & 1 )
|
||||
#define RTP_MPG_BFC(octet) ( (octet >> 4) & 7 )
|
||||
#define RTP_MPG_FFV(octet) ( (octet >> 3) & 1 )
|
||||
#define RTP_MPG_FFC(octet) ( octet & 7 )
|
||||
|
||||
|
||||
/* MPEG1 header fields */
|
||||
|
||||
|
||||
static int proto_mpg = -1;
|
||||
|
||||
static int hf_rtp_mpg_mbz = -1;
|
||||
|
@ -78,7 +60,6 @@ static int hf_rtp_mpg_ffc = -1;
|
|||
static int hf_rtp_mpg_data = -1;
|
||||
|
||||
|
||||
|
||||
/* MPEG-1 fields defining a sub tree */
|
||||
static gint ett_mpg = -1;
|
||||
|
||||
|
@ -98,84 +79,52 @@ static const value_string rtp_mpg_picture_types_vals[] =
|
|||
static void
|
||||
dissect_mpeg1( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
|
||||
{
|
||||
proto_item *ti = NULL;
|
||||
proto_tree *mpg_tree = NULL;
|
||||
proto_item *ti;
|
||||
proto_tree *mpg_tree;
|
||||
unsigned int offset = 0;
|
||||
|
||||
guint8 octet;
|
||||
guint16 word;
|
||||
|
||||
|
||||
guint16 mpg_mbz;
|
||||
guint16 mpg_T;
|
||||
guint16 mpg_tr;
|
||||
guint16 mpg_an;
|
||||
guint16 mpg_n;
|
||||
gboolean mpg_s;
|
||||
gboolean mpg_b;
|
||||
gboolean mpg_e;
|
||||
guint16 mpg_p;
|
||||
guint16 mpg_fbv;
|
||||
guint16 mpg_bfc;
|
||||
guint16 mpg_ffv;
|
||||
guint16 mpg_ffc;
|
||||
static const int * mpg_fields1[] = {
|
||||
&hf_rtp_mpg_mbz,
|
||||
&hf_rtp_mpg_T,
|
||||
&hf_rtp_mpg_tr,
|
||||
NULL
|
||||
};
|
||||
static const int * mpg_fields2[] = {
|
||||
&hf_rtp_mpg_an,
|
||||
&hf_rtp_mpg_n,
|
||||
&hf_rtp_mpg_s,
|
||||
&hf_rtp_mpg_b,
|
||||
&hf_rtp_mpg_e,
|
||||
&hf_rtp_mpg_p,
|
||||
NULL
|
||||
};
|
||||
static const int * mpg_fields3[] = {
|
||||
&hf_rtp_mpg_fbv,
|
||||
&hf_rtp_mpg_bfc,
|
||||
&hf_rtp_mpg_ffv,
|
||||
&hf_rtp_mpg_ffc,
|
||||
NULL
|
||||
};
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MPEG-1");
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "MPEG-1 message");
|
||||
|
||||
/* Get MPEG-1 fields */
|
||||
|
||||
word = tvb_get_guint8( tvb, offset );
|
||||
word = (word << 8) | tvb_get_guint8( tvb, offset +1 );
|
||||
mpg_mbz = RTP_MPG_MBZ(word);
|
||||
mpg_T = RTP_MPG_T(word);
|
||||
mpg_tr = RTP_MPG_TR(word);
|
||||
ti = proto_tree_add_item( tree, proto_mpg, tvb, offset, -1, ENC_NA );
|
||||
mpg_tree = proto_item_add_subtree( ti, ett_mpg );
|
||||
|
||||
octet = tvb_get_guint8( tvb, offset + 2 );
|
||||
mpg_an = RTP_MPG_AN(octet);
|
||||
mpg_n = RTP_MPG_N(octet);
|
||||
mpg_s = RTP_MPG_S(octet);
|
||||
mpg_b = RTP_MPG_B(octet);
|
||||
mpg_e = RTP_MPG_E(octet);
|
||||
mpg_p = RTP_MPG_P(octet);
|
||||
proto_tree_add_bitmask_list(mpg_tree, tvb, offset, 2, mpg_fields1, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
|
||||
octet = tvb_get_guint8( tvb, offset + 3 );
|
||||
proto_tree_add_bitmask_list(mpg_tree, tvb, offset, 2, mpg_fields2, ENC_BIG_ENDIAN);
|
||||
offset += 1;
|
||||
|
||||
mpg_fbv = RTP_MPG_FBV(octet);
|
||||
mpg_bfc = RTP_MPG_BFC(octet);
|
||||
mpg_ffv = RTP_MPG_FFV(octet);
|
||||
mpg_ffc = RTP_MPG_FFC(octet);
|
||||
proto_tree_add_bitmask_list(mpg_tree, tvb, offset, 1, mpg_fields3, ENC_NA);
|
||||
offset += 1;
|
||||
|
||||
|
||||
if ( tree )
|
||||
{
|
||||
ti = proto_tree_add_item( tree, proto_mpg, tvb, offset, -1, ENC_NA );
|
||||
mpg_tree = proto_item_add_subtree( ti, ett_mpg );
|
||||
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_mbz, tvb, offset, 1, mpg_mbz );
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_T , tvb, offset, 1, mpg_T );
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_tr , tvb, offset, 2, mpg_tr );
|
||||
offset += 2;
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_an, tvb, offset, 1, mpg_an );
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_n , tvb, offset, 1, mpg_n );
|
||||
proto_tree_add_boolean( mpg_tree, hf_rtp_mpg_s , tvb, offset, 1, mpg_s );
|
||||
proto_tree_add_boolean( mpg_tree, hf_rtp_mpg_b , tvb, offset, 1, mpg_b );
|
||||
proto_tree_add_boolean( mpg_tree, hf_rtp_mpg_e , tvb, offset, 1, mpg_e );
|
||||
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_p, tvb , offset, 1, mpg_p );
|
||||
offset += 1;
|
||||
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_fbv, tvb, offset, 1, mpg_fbv );
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_bfc, tvb, offset, 1, mpg_bfc );
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_ffv, tvb, offset, 1, mpg_ffv );
|
||||
proto_tree_add_uint( mpg_tree, hf_rtp_mpg_ffc, tvb, offset, 1, mpg_ffc );
|
||||
offset += 1;
|
||||
|
||||
/* The rest of the packet is the MPEG-1 stream */
|
||||
proto_tree_add_item( mpg_tree, hf_rtp_mpg_data, tvb, offset, -1, ENC_NA );
|
||||
|
||||
}
|
||||
/* The rest of the packet is the MPEG-1 stream */
|
||||
proto_tree_add_item( mpg_tree, hf_rtp_mpg_data, tvb, offset, -1, ENC_NA );
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -191,7 +140,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0xF800,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -203,7 +152,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0x0400,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -215,7 +164,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0x03FF,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -227,7 +176,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0x80,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -240,7 +189,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0x40,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -251,9 +200,9 @@ proto_register_mpeg1(void)
|
|||
"Sequence Header",
|
||||
"rtp.payload_mpeg_s",
|
||||
FT_BOOLEAN,
|
||||
BASE_NONE,
|
||||
16,
|
||||
NULL,
|
||||
0x0,
|
||||
0x20,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -264,9 +213,9 @@ proto_register_mpeg1(void)
|
|||
"Beginning-of-slice",
|
||||
"rtp.payload_mpeg_b",
|
||||
FT_BOOLEAN,
|
||||
BASE_NONE,
|
||||
16,
|
||||
NULL,
|
||||
0x0,
|
||||
0x10,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -277,9 +226,9 @@ proto_register_mpeg1(void)
|
|||
"End-of-slice",
|
||||
"rtp.payload_mpeg_e",
|
||||
FT_BOOLEAN,
|
||||
BASE_NONE,
|
||||
16,
|
||||
NULL,
|
||||
0x0,
|
||||
0x08,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -292,7 +241,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
VALS(rtp_mpg_picture_types_vals),
|
||||
0x0,
|
||||
0x07,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -305,7 +254,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0x80,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -318,7 +267,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0x70,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -330,7 +279,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0x08,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
@ -343,7 +292,7 @@ proto_register_mpeg1(void)
|
|||
FT_UINT16,
|
||||
BASE_DEC,
|
||||
NULL,
|
||||
0x0,
|
||||
0x07,
|
||||
NULL, HFILL
|
||||
}
|
||||
},
|
||||
|
|
|
@ -5345,8 +5345,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
|
|||
foffset += 4;
|
||||
proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
|
||||
foffset += 4;
|
||||
supplier_flag = tvb_get_ntohl(tvb, foffset);
|
||||
proto_tree_add_boolean(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, supplier_flag);
|
||||
proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &supplier_flag);
|
||||
foffset += 4;
|
||||
if (supplier_flag)
|
||||
{
|
||||
|
@ -5361,16 +5360,14 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
|
|||
foffset += length;
|
||||
proto_item_set_end(aitem, tvb, foffset);
|
||||
}
|
||||
language_flag = tvb_get_ntohl(tvb, foffset);
|
||||
proto_tree_add_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, language_flag);
|
||||
proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &language_flag);
|
||||
foffset += 4;
|
||||
if (language_flag)
|
||||
{
|
||||
proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
|
||||
foffset += 4;
|
||||
}
|
||||
method_flag = tvb_get_ntohl(tvb, foffset);
|
||||
proto_tree_add_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, method_flag);
|
||||
proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &method_flag);
|
||||
foffset += 4;
|
||||
if (method_flag)
|
||||
{
|
||||
|
@ -5380,8 +5377,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
|
|||
proto_item_set_end(aitem, tvb, foffset);
|
||||
/* End of NameorID */
|
||||
}
|
||||
delivery_address_flag = tvb_get_ntohl(tvb, foffset);
|
||||
proto_tree_add_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, delivery_address_flag);
|
||||
proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &delivery_address_flag);
|
||||
foffset += 4;
|
||||
if (delivery_address_flag)
|
||||
{
|
||||
|
@ -5903,8 +5899,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
|
|||
foffset += 4;
|
||||
proto_tree_add_item(ndps_tree, hf_ndps_profile_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
|
||||
foffset += 4;
|
||||
supplier_flag = tvb_get_ntohl(tvb, foffset);
|
||||
proto_tree_add_boolean(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, supplier_flag);
|
||||
proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_supplier_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &supplier_flag);
|
||||
foffset += 4;
|
||||
if (supplier_flag)
|
||||
{
|
||||
|
@ -5919,16 +5914,14 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
|
|||
foffset += length;
|
||||
proto_item_set_end(aitem, tvb, foffset);
|
||||
}
|
||||
language_flag = tvb_get_ntohl(tvb, foffset);
|
||||
proto_tree_add_boolean(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, language_flag);
|
||||
proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_language_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &language_flag);
|
||||
foffset += 4;
|
||||
if (language_flag)
|
||||
{
|
||||
proto_tree_add_item(ndps_tree, hf_ndps_language_id, tvb, foffset, 4, ENC_BIG_ENDIAN);
|
||||
foffset += 4;
|
||||
}
|
||||
method_flag = tvb_get_ntohl(tvb, foffset);
|
||||
proto_tree_add_boolean(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, method_flag);
|
||||
proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_method_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &method_flag);
|
||||
foffset += 4;
|
||||
if (method_flag)
|
||||
{
|
||||
|
@ -5938,8 +5931,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
|
|||
proto_item_set_end(aitem, tvb, foffset);
|
||||
/* End of NameorID */
|
||||
}
|
||||
delivery_address_flag = tvb_get_ntohl(tvb, foffset);
|
||||
proto_tree_add_boolean(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, delivery_address_flag);
|
||||
proto_tree_add_item_ret_uint(ndps_tree, hf_ndps_delivery_address_flag, tvb, foffset, 4, ENC_BIG_ENDIAN, &delivery_address_flag);
|
||||
foffset += 4;
|
||||
if (delivery_address_flag)
|
||||
{
|
||||
|
@ -9200,7 +9192,7 @@ proto_register_ndps(void)
|
|||
|
||||
{ &hf_ndps_supplier_flag,
|
||||
{ "Supplier Data?", "ndps.supplier_flag",
|
||||
FT_BOOLEAN, BASE_NONE, NULL, 0x0,
|
||||
FT_UINT32, BASE_HEX, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
|
||||
{ &hf_ndps_language_flag,
|
||||
|
|
|
@ -54,11 +54,13 @@ static int hf_nsip_max_num_ns_vc = -1;
|
|||
static int hf_nsip_num_ip4_endpoints = -1;
|
||||
static int hf_nsip_num_ip6_endpoints = -1;
|
||||
static int hf_nsip_reset_flag = -1;
|
||||
static int hf_nsip_reset_flag_bit = -1;
|
||||
static int hf_nsip_reset_flag_spare = -1;
|
||||
static int hf_nsip_ip_address_type = -1;
|
||||
static int hf_nsip_ip_address_ipv4 = -1;
|
||||
static int hf_nsip_ip_address_ipv6 = -1;
|
||||
static int hf_nsip_end_flag = -1;
|
||||
static int hf_nsip_end_flag_bit = -1;
|
||||
static int hf_nsip_end_flag_spare = -1;
|
||||
static int hf_nsip_control_bits = -1;
|
||||
static int hf_nsip_control_bits_r = -1;
|
||||
|
@ -500,28 +502,19 @@ decode_iei_num_ip6_endpoints(nsip_ie_t *ie, build_info_t *bi, int ie_start_offse
|
|||
}
|
||||
|
||||
static void
|
||||
decode_iei_reset_flag(nsip_ie_t *ie, build_info_t *bi, int ie_start_offset) {
|
||||
decode_iei_reset_flag(nsip_ie_t *ie _U_, build_info_t *bi, int ie_start_offset) {
|
||||
guint8 flag;
|
||||
proto_tree *field_tree;
|
||||
static const int * reset_flags[] = {
|
||||
&hf_nsip_reset_flag_bit,
|
||||
&hf_nsip_reset_flag_spare,
|
||||
};
|
||||
|
||||
flag = tvb_get_guint8(bi->tvb, bi->offset);
|
||||
if (bi->nsip_tree) {
|
||||
proto_tree_add_bitmask(bi->nsip_tree, bi->tvb, ie_start_offset, hf_nsip_reset_flag,
|
||||
ett_nsip_reset_flag, reset_flags, ENC_NA);
|
||||
|
||||
field_tree = proto_tree_add_subtree_format(bi->nsip_tree, bi->tvb, ie_start_offset,
|
||||
ie->total_length, ett_nsip_reset_flag, NULL,
|
||||
"Reset Flag: %#02x", flag);
|
||||
|
||||
proto_tree_add_boolean(field_tree, hf_nsip_reset_flag, bi->tvb,
|
||||
bi->offset, 1,
|
||||
flag & NSIP_MASK_RESET_FLAG);
|
||||
if (flag & NSIP_MASK_RESET_FLAG) {
|
||||
col_append_sep_fstr(bi->pinfo->cinfo, COL_INFO, NSIP_SEP,
|
||||
"Reset");
|
||||
proto_item_append_text(bi->ti, ", Reset");
|
||||
}
|
||||
proto_tree_add_uint(field_tree, hf_nsip_reset_flag_spare,
|
||||
bi->tvb, bi->offset, 1,
|
||||
flag & NSIP_MASK_RESET_FLAG_SPARE);
|
||||
if (flag & NSIP_MASK_RESET_FLAG) {
|
||||
col_append_sep_fstr(bi->pinfo->cinfo, COL_INFO, NSIP_SEP, "Reset");
|
||||
}
|
||||
bi->offset += 1;
|
||||
}
|
||||
|
@ -568,27 +561,14 @@ decode_iei_transaction_id(nsip_ie_t *ie, build_info_t *bi, int ie_start_offset)
|
|||
}
|
||||
|
||||
static void
|
||||
decode_iei_end_flag(nsip_ie_t *ie, build_info_t *bi, int ie_start_offset) {
|
||||
guint8 flag;
|
||||
proto_tree *field_tree;
|
||||
decode_iei_end_flag(nsip_ie_t *ie _U_, build_info_t *bi, int ie_start_offset) {
|
||||
static const int * end_flags[] = {
|
||||
&hf_nsip_end_flag_bit,
|
||||
&hf_nsip_end_flag_spare,
|
||||
};
|
||||
|
||||
if (bi->nsip_tree) {
|
||||
flag = tvb_get_guint8(bi->tvb, bi->offset);
|
||||
|
||||
field_tree = proto_tree_add_subtree_format(bi->nsip_tree, bi->tvb, ie_start_offset,
|
||||
ie->total_length, ett_nsip_end_flag, NULL,
|
||||
"End Flag: %#02x", flag);
|
||||
|
||||
proto_tree_add_boolean(field_tree, hf_nsip_end_flag, bi->tvb,
|
||||
bi->offset, 1,
|
||||
flag & NSIP_MASK_END_FLAG);
|
||||
if (flag & NSIP_MASK_END_FLAG) {
|
||||
proto_item_append_text(bi->ti, ", End");
|
||||
}
|
||||
proto_tree_add_uint(field_tree, hf_nsip_end_flag_spare,
|
||||
bi->tvb, bi->offset, 1,
|
||||
flag & NSIP_MASK_END_FLAG_SPARE);
|
||||
}
|
||||
proto_tree_add_bitmask(bi->nsip_tree, bi->tvb, ie_start_offset, hf_nsip_end_flag,
|
||||
ett_nsip_end_flag, end_flags, ENC_NA);
|
||||
bi->offset += 1;
|
||||
}
|
||||
|
||||
|
@ -1036,6 +1016,11 @@ proto_register_nsip(void)
|
|||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_nsip_reset_flag,
|
||||
{ "Reset flag", "nsip.reset_flag",
|
||||
FT_UINT8, BASE_HEX, NULL, 0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_nsip_reset_flag_bit,
|
||||
{ "Reset flag", "nsip.reset_flag.flag",
|
||||
FT_BOOLEAN, 8, TFS(&tfs_set_notset), NSIP_MASK_RESET_FLAG,
|
||||
NULL, HFILL }
|
||||
|
@ -1061,6 +1046,11 @@ proto_register_nsip(void)
|
|||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_nsip_end_flag,
|
||||
{ "End flag", "nsip.end_flag",
|
||||
FT_UINT8, BASE_HEX, NULL, 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &hf_nsip_end_flag_bit,
|
||||
{ "End flag", "nsip.end_flag.flag",
|
||||
FT_BOOLEAN, 8, TFS(&tfs_set_notset), NSIP_MASK_END_FLAG,
|
||||
NULL, HFILL }
|
||||
|
|
|
@ -406,11 +406,8 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
struct nstr_phdr *pnstr = &(pinfo->pseudo_header->nstr);
|
||||
tvbuff_t *next_tvb_eth_client;
|
||||
guint8 offset;
|
||||
guint i, bpos;
|
||||
wmem_strbuf_t *flags_strbuf = wmem_strbuf_new_label(wmem_packet_scope());
|
||||
static const gchar *flags[] = {"FP", "FR", "DFD", "SRSS", "RSSH"};
|
||||
gboolean first_flag = TRUE;
|
||||
guint8 flagoffset, flagval;
|
||||
guint8 flagoffset;
|
||||
guint8 src_vmname_len = 0, dst_vmname_len = 0;
|
||||
guint8 variable_ns_len = 0;
|
||||
|
||||
|
@ -456,34 +453,22 @@ dissect_nstrace(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
|
||||
case NSPR_HEADER_VERSION204:
|
||||
|
||||
flagoffset = pnstr->clflags_offset;
|
||||
flagval = tvb_get_guint8(tvb, flagoffset);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
bpos = 1 << i;
|
||||
if (flagval & bpos) {
|
||||
if (first_flag) {
|
||||
wmem_strbuf_truncate(flags_strbuf, 0);
|
||||
}
|
||||
wmem_strbuf_append_printf(flags_strbuf, "%s%s", first_flag ? "" : ", ", flags[i]);
|
||||
first_flag = FALSE;
|
||||
}
|
||||
}
|
||||
{
|
||||
static const int * clflags[] = {
|
||||
&hf_ns_clflags_res,
|
||||
&hf_ns_clflags_rssh,
|
||||
&hf_ns_clflags_rss,
|
||||
&hf_ns_clflags_dfd,
|
||||
&hf_ns_clflags_fr,
|
||||
&hf_ns_clflags_fp,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_item(ns_tree, hf_ns_snode, tvb, pnstr->srcnodeid_offset, 2, ENC_LITTLE_ENDIAN);
|
||||
proto_tree_add_item(ns_tree, hf_ns_dnode, tvb, pnstr->destnodeid_offset, 2, ENC_LITTLE_ENDIAN);
|
||||
|
||||
flagitem = proto_tree_add_uint_format_value(ns_tree, hf_ns_clflags, tvb, flagoffset, 1, flagval,
|
||||
"0x%02x (%s)", flagval, wmem_strbuf_get_str(flags_strbuf));
|
||||
flagtree = proto_item_add_subtree(flagitem, ett_ns_flags);
|
||||
|
||||
proto_tree_add_boolean(flagtree, hf_ns_clflags_res, tvb, flagoffset, 1, flagval);
|
||||
proto_tree_add_boolean(flagtree, hf_ns_clflags_rssh, tvb, flagoffset, 1, flagval);
|
||||
proto_tree_add_boolean(flagtree, hf_ns_clflags_rss, tvb, flagoffset, 1, flagval);
|
||||
proto_tree_add_boolean(flagtree, hf_ns_clflags_dfd, tvb, flagoffset, 1, flagval);
|
||||
proto_tree_add_boolean(flagtree, hf_ns_clflags_fr, tvb, flagoffset, 1, flagval);
|
||||
proto_tree_add_boolean(flagtree, hf_ns_clflags_fp, tvb, flagoffset, 1, flagval);
|
||||
proto_tree_add_bitmask(ns_tree, tvb, pnstr->clflags_offset, hf_ns_clflags, ett_ns_flags, clflags, ENC_NA);
|
||||
}
|
||||
/* fall through to next case */
|
||||
|
||||
case NSPR_HEADER_VERSION203:
|
||||
|
|
|
@ -1377,8 +1377,6 @@ dissect_ntp_priv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *ntp_tree, gu
|
|||
|
||||
offset = 8 + itemsize * i;
|
||||
|
||||
v6_flag = tvb_get_ntohl(tvb, offset + 32);
|
||||
|
||||
monlist_item = proto_tree_add_string_format(ntp_tree, hf_monlist_item, tvb, offset,
|
||||
itemsize, "Monlist Item", "Monlist item: address: %s:%u",
|
||||
tvb_ip_to_str(tvb, offset + 16), tvb_get_ntohs(tvb, offset + 28));
|
||||
|
@ -1394,7 +1392,7 @@ dissect_ntp_priv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *ntp_tree, gu
|
|||
proto_tree_add_item(monlist_item_tree, hf_ntppriv_port, tvb, offset + 28, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(monlist_item_tree, hf_ntppriv_mode, tvb, offset + 30, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(monlist_item_tree, hf_ntppriv_version, tvb, offset + 31, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_boolean(monlist_item_tree, hf_ntppriv_v6_flag, tvb, offset + 32, 4, v6_flag);
|
||||
proto_tree_add_item_ret_uint(monlist_item_tree, hf_ntppriv_v6_flag, tvb, offset + 32, 4, ENC_BIG_ENDIAN, &v6_flag);
|
||||
|
||||
if (v6_flag != 0) {
|
||||
proto_tree_add_item(monlist_item_tree, hf_ntppriv_addr6, tvb, offset + 36, 16, ENC_NA);
|
||||
|
|
|
@ -1715,14 +1715,14 @@ dissect_oampdu_variable_response(tvbuff_t *tvb, proto_tree *tree)
|
|||
static void
|
||||
dissect_oampdu_loopback_control(tvbuff_t *tvb, proto_tree *tree)
|
||||
{
|
||||
guint8 ctrl;
|
||||
guint32 offset;
|
||||
guint16 bytes;
|
||||
|
||||
proto_tree *ctrl_tree;
|
||||
proto_item *ctrl_item;
|
||||
|
||||
const char *sep;
|
||||
static const int * ctrl[] = {
|
||||
&hf_oampdu_lpbk_enable,
|
||||
&hf_oampdu_lpbk_disable,
|
||||
NULL
|
||||
};
|
||||
|
||||
offset = OAMPDU_HEADER_SIZE;
|
||||
|
||||
|
@ -1730,27 +1730,7 @@ dissect_oampdu_loopback_control(tvbuff_t *tvb, proto_tree *tree)
|
|||
|
||||
if (bytes >= 1)
|
||||
{
|
||||
ctrl = tvb_get_guint8(tvb, offset);
|
||||
|
||||
ctrl_item = proto_tree_add_uint(tree, hf_oampdu_lpbk,
|
||||
tvb, offset, 1, ctrl);
|
||||
|
||||
ctrl_tree = proto_item_add_subtree(ctrl_item, ett_oampdu_lpbk_ctrl);
|
||||
|
||||
sep = initial_sep;
|
||||
|
||||
APPEND_BOOLEAN_FLAG(ctrl & OAMPDU_LPBK_ENABLE, ctrl_item,
|
||||
"%sEnable Remote Loopack");
|
||||
proto_tree_add_boolean(ctrl_tree, hf_oampdu_lpbk_enable,
|
||||
tvb, offset, 1, ctrl);
|
||||
|
||||
APPEND_BOOLEAN_FLAG(ctrl & OAMPDU_LPBK_DISABLE, ctrl_item,
|
||||
"%sDisable Remote Loopback");
|
||||
proto_tree_add_boolean(ctrl_tree, hf_oampdu_lpbk_disable,
|
||||
tvb, offset, 1, ctrl);
|
||||
|
||||
if (sep != initial_sep)
|
||||
proto_item_append_text(ctrl_item, ")");
|
||||
proto_tree_add_bitmask(tree, tvb, offset, hf_oampdu_lpbk, ett_oampdu_lpbk_ctrl, ctrl, ENC_NA);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1512,6 +1512,12 @@ static int ositp_decode_CC(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
|
|||
tvbuff_t *next_tvb;
|
||||
guint tpdu_len;
|
||||
heur_dtbl_entry_t *hdtbl_entry;
|
||||
static const int * class_options[] = {
|
||||
&hf_cotp_class,
|
||||
&hf_cotp_opts_extended_formats,
|
||||
&hf_cotp_opts_no_explicit_flow_control,
|
||||
NULL,
|
||||
};
|
||||
|
||||
src_ref = tvb_get_ntohs(tvb, offset + P_SRC_REF);
|
||||
|
||||
|
@ -1531,26 +1537,20 @@ static int ositp_decode_CC(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
|
|||
"%s TPDU src-ref: 0x%04x dst-ref: 0x%04x",
|
||||
(tpdu == CR_TPDU) ? "CR" : "CC", src_ref, dst_ref);
|
||||
|
||||
if (tree) {
|
||||
ti = proto_tree_add_item(tree, proto_cotp, tvb, offset, li + 1, ENC_NA);
|
||||
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
|
||||
proto_tree_add_uint(cotp_tree, hf_cotp_li, tvb, offset, 1,li);
|
||||
}
|
||||
ti = proto_tree_add_item(tree, proto_cotp, tvb, offset, li + 1, ENC_NA);
|
||||
cotp_tree = proto_item_add_subtree(ti, ett_cotp);
|
||||
proto_tree_add_uint(cotp_tree, hf_cotp_li, tvb, offset, 1,li);
|
||||
offset += 1;
|
||||
|
||||
if (tree) {
|
||||
item = proto_tree_add_uint(cotp_tree, hf_cotp_type, tvb, offset, 1, tpdu);
|
||||
}
|
||||
item = proto_tree_add_uint(cotp_tree, hf_cotp_type, tvb, offset, 1, tpdu);
|
||||
offset += 1;
|
||||
li -= 1;
|
||||
|
||||
if (tree)
|
||||
proto_tree_add_uint(cotp_tree, hf_cotp_destref, tvb, offset, 2, dst_ref);
|
||||
proto_tree_add_uint(cotp_tree, hf_cotp_destref, tvb, offset, 2, dst_ref);
|
||||
offset += 2;
|
||||
li -= 2;
|
||||
|
||||
if (tree)
|
||||
proto_tree_add_uint(cotp_tree, hf_cotp_srcref, tvb, offset, 2, src_ref);
|
||||
proto_tree_add_uint(cotp_tree, hf_cotp_srcref, tvb, offset, 2, src_ref);
|
||||
offset += 2;
|
||||
li -= 2;
|
||||
|
||||
|
@ -1560,17 +1560,10 @@ static int ositp_decode_CC(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
|
|||
expert_add_info_format(pinfo, item, &ei_cotp_connection, "Connection %s: 0x%x -> 0x%x", tpdu == CR_TPDU ? "Request(CR)" : "Confirm(CC)", src_ref, dst_ref);
|
||||
}
|
||||
|
||||
if (tree) {
|
||||
proto_tree_add_uint(cotp_tree, hf_cotp_class, tvb, offset, 1, class_option);
|
||||
proto_tree_add_boolean(cotp_tree, hf_cotp_opts_extended_formats, tvb,
|
||||
offset, 1, class_option);
|
||||
proto_tree_add_boolean(cotp_tree, hf_cotp_opts_no_explicit_flow_control,
|
||||
tvb, offset, 1, class_option);
|
||||
}
|
||||
proto_tree_add_bitmask_list(cotp_tree, tvb, offset, 1, class_options, ENC_NA);
|
||||
offset += 1;
|
||||
li -= 1;
|
||||
|
||||
if (tree) {
|
||||
/* Microsoft runs their Remote Desktop Protocol atop ISO COTP
|
||||
atop TPKT, and does some weird stuff in the CR packet:
|
||||
|
||||
|
@ -1595,9 +1588,8 @@ static int ositp_decode_CC(tvbuff_t *tvb, int offset, guint8 li, guint8 tpdu,
|
|||
|
||||
XXX - have TPKT know that a given session is an RDP session,
|
||||
and let us know, so we know whether to check for this stuff. */
|
||||
ositp_decode_var_part(tvb, offset, li, class_option, tpdu_len , pinfo,
|
||||
ositp_decode_var_part(tvb, offset, li, class_option, tpdu_len , pinfo,
|
||||
cotp_tree);
|
||||
}
|
||||
offset += li;
|
||||
|
||||
/*
|
||||
|
|
|
@ -121,9 +121,6 @@ static expert_field ei_pagp_tlv_length = EI_INIT;
|
|||
|
||||
/* General declarations and macros */
|
||||
|
||||
static const char initial_sep[] = " (";
|
||||
static const char cont_sep[] = ", ";
|
||||
|
||||
static const value_string pdu_vers[] = {
|
||||
{ 1, "Info PDU" },
|
||||
{ 2, "Flush PDU" },
|
||||
|
@ -149,19 +146,11 @@ static const true_false_string automode = {
|
|||
"Desirable Mode"
|
||||
};
|
||||
|
||||
#define APPEND_BOOLEAN_FLAG(flag, item, string) \
|
||||
if(flag) { \
|
||||
if(item) \
|
||||
proto_item_append_text(item, string, sep); \
|
||||
sep = cont_sep; \
|
||||
}
|
||||
|
||||
/* Code to actually dissect the PAGP packets */
|
||||
static void
|
||||
dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
guint32 raw_word;
|
||||
guint16 raw_half_word;
|
||||
guint16 num_tlvs;
|
||||
guint16 tlv;
|
||||
guint16 len;
|
||||
|
@ -171,15 +160,15 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
guint8 flags;
|
||||
|
||||
guchar *ch;
|
||||
|
||||
proto_tree *pagp_tree = NULL;
|
||||
proto_item *pagp_item, *len_item;
|
||||
proto_tree *flags_tree;
|
||||
proto_item *flags_item;
|
||||
proto_tree *tlv_tree;
|
||||
|
||||
const char *sep;
|
||||
static const int * pagp_flags[] = {
|
||||
&hf_pagp_flags_slow_hello,
|
||||
&hf_pagp_flags_auto_mode,
|
||||
&hf_pagp_flags_consistent_state,
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PAGP"); /* PAGP Protocol */
|
||||
|
@ -226,32 +215,7 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
flags = tvb_get_guint8(tvb, PAGP_FLAGS);
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "; Flags 0x%x", flags);
|
||||
|
||||
if (tree) {
|
||||
flags_item = proto_tree_add_uint(pagp_tree, hf_pagp_flags, tvb,
|
||||
PAGP_FLAGS, 1, flags);
|
||||
flags_tree = proto_item_add_subtree(flags_item, ett_pagp_flags);
|
||||
|
||||
sep = initial_sep;
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_SLOW_HELLO, flags_item, "%sSlow Hello");
|
||||
proto_tree_add_boolean(flags_tree, hf_pagp_flags_slow_hello, tvb,
|
||||
PAGP_FLAGS, 1, flags);
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_AUTO_MODE, flags_item, "%sAuto Mode");
|
||||
proto_tree_add_boolean(flags_tree, hf_pagp_flags_auto_mode, tvb,
|
||||
PAGP_FLAGS, 1, flags);
|
||||
|
||||
APPEND_BOOLEAN_FLAG(flags & PAGP_FLAGS_CONSISTENT_STATE, flags_item,
|
||||
"%sConsistent State");
|
||||
proto_tree_add_boolean(flags_tree, hf_pagp_flags_consistent_state, tvb,
|
||||
PAGP_FLAGS, 1, flags);
|
||||
|
||||
sep = cont_sep;
|
||||
if (sep != initial_sep) {
|
||||
/* We put something in; put in the terminating ")" */
|
||||
proto_item_append_text(flags_item, ")");
|
||||
}
|
||||
}
|
||||
proto_tree_add_bitmask(pagp_tree, tvb, PAGP_FLAGS, hf_pagp_flags, ett_pagp_flags, pagp_flags, ENC_NA);
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, "; Local DevID: %s",
|
||||
tvb_ether_to_str(tvb, PAGP_LOCAL_DEVICE_ID));
|
||||
|
@ -260,25 +224,20 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
PAGP_LOCAL_DEVICE_ID, 6, ENC_NA);
|
||||
|
||||
if (tree) {
|
||||
raw_octet = tvb_get_guint8(tvb, PAGP_LOCAL_LEARN_CAP);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_local_learn_cap, tvb,
|
||||
PAGP_LOCAL_LEARN_CAP, 1, raw_octet);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_local_learn_cap, tvb,
|
||||
PAGP_LOCAL_LEARN_CAP, 1, ENC_NA);
|
||||
|
||||
raw_octet = tvb_get_guint8(tvb, PAGP_LOCAL_PORT_PRIORITY);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_local_port_priority, tvb,
|
||||
PAGP_LOCAL_PORT_PRIORITY, 1, raw_octet);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_local_port_priority, tvb,
|
||||
PAGP_LOCAL_PORT_PRIORITY, 1, ENC_NA);
|
||||
|
||||
raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_SENT_PORT_IFINDEX);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_local_sent_port_ifindex, tvb,
|
||||
PAGP_LOCAL_SENT_PORT_IFINDEX, 4, raw_word);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_local_sent_port_ifindex, tvb,
|
||||
PAGP_LOCAL_SENT_PORT_IFINDEX, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_GROUP_CAPABILITY);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_local_group_capability, tvb,
|
||||
PAGP_LOCAL_GROUP_CAPABILITY, 4, raw_word);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_local_group_capability, tvb,
|
||||
PAGP_LOCAL_GROUP_CAPABILITY, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
raw_word = tvb_get_ntohl(tvb, PAGP_LOCAL_GROUP_IFINDEX);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_local_group_ifindex, tvb,
|
||||
PAGP_LOCAL_GROUP_IFINDEX, 4, raw_word);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_local_group_ifindex, tvb,
|
||||
PAGP_LOCAL_GROUP_IFINDEX, 4, ENC_BIG_ENDIAN);
|
||||
}
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", Partner DevID: %s",
|
||||
|
@ -287,29 +246,23 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(pagp_tree, hf_pagp_partner_device_id, tvb,
|
||||
PAGP_PARTNER_DEVICE_ID, 6, ENC_NA);
|
||||
|
||||
raw_octet = tvb_get_guint8(tvb, PAGP_PARTNER_LEARN_CAP);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_partner_learn_cap, tvb,
|
||||
PAGP_PARTNER_LEARN_CAP, 1, raw_octet);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_partner_learn_cap, tvb,
|
||||
PAGP_PARTNER_LEARN_CAP, 1, ENC_NA);
|
||||
|
||||
raw_octet = tvb_get_guint8(tvb, PAGP_PARTNER_PORT_PRIORITY);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_partner_port_priority, tvb,
|
||||
PAGP_PARTNER_PORT_PRIORITY, 1, raw_octet);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_partner_port_priority, tvb,
|
||||
PAGP_PARTNER_PORT_PRIORITY, 1, ENC_NA);
|
||||
|
||||
raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_SENT_PORT_IFINDEX);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_partner_sent_port_ifindex, tvb,
|
||||
PAGP_PARTNER_SENT_PORT_IFINDEX, 4, raw_word);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_partner_sent_port_ifindex, tvb,
|
||||
PAGP_PARTNER_SENT_PORT_IFINDEX, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_GROUP_CAPABILITY);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_partner_group_capability, tvb,
|
||||
PAGP_PARTNER_GROUP_CAPABILITY, 4, raw_word);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_partner_group_capability, tvb,
|
||||
PAGP_PARTNER_GROUP_CAPABILITY, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
raw_word = tvb_get_ntohl(tvb, PAGP_PARTNER_GROUP_IFINDEX);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_partner_group_ifindex, tvb,
|
||||
PAGP_PARTNER_GROUP_IFINDEX, 4, raw_word);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_partner_group_ifindex, tvb,
|
||||
PAGP_PARTNER_GROUP_IFINDEX, 4, ENC_BIG_ENDIAN);
|
||||
|
||||
raw_half_word = tvb_get_ntohs(tvb, PAGP_PARTNER_COUNT);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_partner_count, tvb,
|
||||
PAGP_PARTNER_COUNT, 2, raw_half_word);
|
||||
proto_tree_add_item(pagp_tree, hf_pagp_partner_count, tvb,
|
||||
PAGP_PARTNER_COUNT, 2, ENC_BIG_ENDIAN);
|
||||
|
||||
num_tlvs = tvb_get_ntohs(tvb, PAGP_NUM_TLVS);
|
||||
proto_tree_add_uint(pagp_tree, hf_pagp_num_tlvs, tvb,
|
||||
|
@ -340,14 +293,12 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
switch (tlv) {
|
||||
case PAGP_TLV_DEVICE_NAME:
|
||||
ch = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len-4, ENC_ASCII);
|
||||
proto_tree_add_string(tlv_tree, hf_pagp_tlv_device_name,
|
||||
tvb, offset+4, len-4, ch);
|
||||
proto_tree_add_item(tlv_tree, hf_pagp_tlv_device_name,
|
||||
tvb, offset+4, len-4, ENC_NA|ENC_ASCII);
|
||||
break;
|
||||
case PAGP_TLV_PORT_NAME:
|
||||
ch = tvb_get_string_enc(wmem_packet_scope(), tvb, offset+4, len-4, ENC_ASCII);
|
||||
proto_tree_add_string(tlv_tree, hf_pagp_tlv_port_name,
|
||||
tvb, offset+4, len-4, ch);
|
||||
proto_tree_add_item(tlv_tree, hf_pagp_tlv_port_name,
|
||||
tvb, offset+4, len-4, ENC_NA|ENC_ASCII);
|
||||
break;
|
||||
case PAGP_TLV_AGPORT_MAC:
|
||||
proto_tree_add_item(tlv_tree, hf_pagp_tlv_agport_mac,
|
||||
|
|
|
@ -220,38 +220,18 @@ dissect_pana_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
|||
static void
|
||||
dissect_pana_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags)
|
||||
{
|
||||
static const int * flag_fields[] = {
|
||||
&hf_pana_flag_r,
|
||||
&hf_pana_flag_s,
|
||||
&hf_pana_flag_c,
|
||||
&hf_pana_flag_a,
|
||||
&hf_pana_flag_p,
|
||||
&hf_pana_flag_i,
|
||||
NULL,
|
||||
};
|
||||
|
||||
proto_item *flags_item;
|
||||
proto_tree *flags_tree;
|
||||
|
||||
if(parent_tree == NULL)
|
||||
return;
|
||||
|
||||
flags_item = proto_tree_add_uint(parent_tree, hf_pana_flags, tvb,
|
||||
offset, 2, flags);
|
||||
flags_tree = proto_item_add_subtree(flags_item, ett_pana_flags);
|
||||
|
||||
proto_tree_add_boolean(flags_tree, hf_pana_flag_r, tvb, offset, 2, flags);
|
||||
if (flags & PANA_FLAG_R)
|
||||
proto_item_append_text(flags_item, ", Request");
|
||||
else
|
||||
proto_item_append_text(flags_item, ", Answer");
|
||||
proto_tree_add_boolean(flags_tree, hf_pana_flag_s, tvb, offset, 2, flags);
|
||||
if (flags & PANA_FLAG_S)
|
||||
proto_item_append_text(flags_item, ", S flag set");
|
||||
proto_tree_add_boolean(flags_tree, hf_pana_flag_c, tvb, offset, 2, flags);
|
||||
if (flags & PANA_FLAG_C)
|
||||
proto_item_append_text(flags_item, ", C flag set");
|
||||
proto_tree_add_boolean(flags_tree, hf_pana_flag_a, tvb, offset, 2, flags);
|
||||
if (flags & PANA_FLAG_A)
|
||||
proto_item_append_text(flags_item, ", A flag set");
|
||||
proto_tree_add_boolean(flags_tree, hf_pana_flag_p, tvb, offset, 2, flags);
|
||||
if (flags & PANA_FLAG_P)
|
||||
proto_item_append_text(flags_item, ", P flag set");
|
||||
proto_tree_add_boolean(flags_tree, hf_pana_flag_i, tvb, offset, 2, flags);
|
||||
if (flags & PANA_FLAG_I)
|
||||
proto_item_append_text(flags_item, ", I flag set");
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_pana_flags,
|
||||
ett_pana_flags, flag_fields, flags, BMT_NO_TFS|BMT_NO_FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -261,22 +241,13 @@ dissect_pana_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 f
|
|||
static void
|
||||
dissect_pana_avp_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags)
|
||||
{
|
||||
static const int * flag_fields[] = {
|
||||
&hf_pana_avp_flag_v,
|
||||
NULL,
|
||||
};
|
||||
|
||||
proto_item *avp_flags_item;
|
||||
proto_tree *avp_flags_tree;
|
||||
|
||||
if(parent_tree == NULL) {
|
||||
return;
|
||||
}
|
||||
avp_flags_item = proto_tree_add_uint(parent_tree, hf_pana_avp_flags, tvb,
|
||||
offset, 2, flags);
|
||||
avp_flags_tree = proto_item_add_subtree(avp_flags_item, ett_pana_avp_flags);
|
||||
|
||||
proto_tree_add_boolean(avp_flags_tree, hf_pana_avp_flag_v, tvb, offset, 2, flags);
|
||||
if (flags & PANA_AVP_FLAG_V) {
|
||||
proto_item_append_text(avp_flags_item, ", Vendor");
|
||||
}
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_pana_avp_flags,
|
||||
ett_pana_avp_flags, flag_fields, flags, BMT_NO_TFS|BMT_NO_FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue