forked from osmocom/wireshark
Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.
Part 3 of many, but this concludes the strict conversion to proto_tree_add_bitmask. Patches to follow with use proto_tree_add_bitmask_xxx (some functions still need to be written) Change-Id: Ic2435667c6a7f1d40602124e5044954d2a296180 Reviewed-on: https://code.wireshark.org/review/5553 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
542439e64a
commit
e77507b0ea
|
@ -945,26 +945,16 @@ dissect_spnego_krb5_getmic_base(tvbuff_t *tvb, int offset, packet_info *pinfo _U
|
||||||
static int
|
static int
|
||||||
dissect_spnego_krb5_cfx_flags(tvbuff_t *tvb, int offset,
|
dissect_spnego_krb5_cfx_flags(tvbuff_t *tvb, int offset,
|
||||||
proto_tree *spnego_krb5_tree,
|
proto_tree *spnego_krb5_tree,
|
||||||
guint8 cfx_flags)
|
guint8 cfx_flags _U_)
|
||||||
{
|
{
|
||||||
proto_tree *cfx_flags_tree;
|
static const int * flags[] = {
|
||||||
proto_item *tf;
|
&hf_spnego_krb5_cfx_flags_04,
|
||||||
|
&hf_spnego_krb5_cfx_flags_02,
|
||||||
tf = proto_tree_add_uint(spnego_krb5_tree,
|
&hf_spnego_krb5_cfx_flags_01,
|
||||||
hf_spnego_krb5_cfx_flags,
|
NULL
|
||||||
tvb, offset, 1, cfx_flags);
|
};
|
||||||
cfx_flags_tree = proto_item_add_subtree(tf, ett_spnego_krb5_cfx_flags);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(cfx_flags_tree,
|
|
||||||
hf_spnego_krb5_cfx_flags_04,
|
|
||||||
tvb, offset, 1, cfx_flags);
|
|
||||||
proto_tree_add_boolean(cfx_flags_tree,
|
|
||||||
hf_spnego_krb5_cfx_flags_02,
|
|
||||||
tvb, offset, 1, cfx_flags);
|
|
||||||
proto_tree_add_boolean(cfx_flags_tree,
|
|
||||||
hf_spnego_krb5_cfx_flags_01,
|
|
||||||
tvb, offset, 1, cfx_flags);
|
|
||||||
|
|
||||||
|
proto_tree_add_bitmask(spnego_krb5_tree, tvb, offset, hf_spnego_krb5_cfx_flags, ett_spnego_krb5_cfx_flags, flags, ENC_NA);
|
||||||
return (offset + 1);
|
return (offset + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1182,7 +1182,6 @@ dissect_oampdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
static void
|
static void
|
||||||
dissect_oampdu_information(tvbuff_t *tvb, proto_tree *tree)
|
dissect_oampdu_information(tvbuff_t *tvb, proto_tree *tree)
|
||||||
{
|
{
|
||||||
guint16 raw_word;
|
|
||||||
guint8 raw_octet;
|
guint8 raw_octet;
|
||||||
guint8 info_type;
|
guint8 info_type;
|
||||||
guint32 offset;
|
guint32 offset;
|
||||||
|
@ -1192,10 +1191,6 @@ dissect_oampdu_information(tvbuff_t *tvb, proto_tree *tree)
|
||||||
|
|
||||||
proto_tree *info_tree;
|
proto_tree *info_tree;
|
||||||
proto_item *info_item;
|
proto_item *info_item;
|
||||||
proto_tree *state_tree;
|
|
||||||
proto_item *state_item;
|
|
||||||
proto_tree *cfg_tree;
|
|
||||||
proto_item *cfg_item;
|
|
||||||
proto_item *oui_item;
|
proto_item *oui_item;
|
||||||
proto_item *item;
|
proto_item *item;
|
||||||
|
|
||||||
|
@ -1234,72 +1229,55 @@ dissect_oampdu_information(tvbuff_t *tvb, proto_tree *tree)
|
||||||
|
|
||||||
if ((info_type==OAMPDU_INFO_TYPE_LOCAL)||(info_type==OAMPDU_INFO_TYPE_REMOTE))
|
if ((info_type==OAMPDU_INFO_TYPE_LOCAL)||(info_type==OAMPDU_INFO_TYPE_REMOTE))
|
||||||
{
|
{
|
||||||
raw_octet = tvb_get_guint8(tvb, offset);
|
static const int * info_states[] = {
|
||||||
proto_tree_add_uint(info_tree, hf_oampdu_info_len,
|
&hf_oampdu_info_state_parser,
|
||||||
tvb, offset, 1, raw_octet);
|
&hf_oampdu_info_state_mux,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * info_config[] = {
|
||||||
|
&hf_oampdu_info_oamConfig_mode,
|
||||||
|
&hf_oampdu_info_oamConfig_uni,
|
||||||
|
&hf_oampdu_info_oamConfig_lpbk,
|
||||||
|
&hf_oampdu_info_oamConfig_event,
|
||||||
|
&hf_oampdu_info_oamConfig_var,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
proto_tree_add_item(info_tree, hf_oampdu_info_len,
|
||||||
|
tvb, offset, 1, ENC_NA);
|
||||||
|
|
||||||
offset += OAMPDU_INFO_LENGTH_SZ;
|
offset += OAMPDU_INFO_LENGTH_SZ;
|
||||||
|
|
||||||
raw_octet = tvb_get_guint8(tvb, offset);
|
proto_tree_add_item(info_tree, hf_oampdu_info_version,
|
||||||
proto_tree_add_uint(info_tree, hf_oampdu_info_version,
|
tvb, offset, 1, ENC_NA);
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
offset += OAMPDU_INFO_VERSION_SZ;
|
offset += OAMPDU_INFO_VERSION_SZ;
|
||||||
|
|
||||||
raw_word = tvb_get_ntohs(tvb, offset);
|
proto_tree_add_item(info_tree, hf_oampdu_info_revision,
|
||||||
proto_tree_add_uint(info_tree, hf_oampdu_info_revision,
|
tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||||
tvb, offset, 2, raw_word);
|
|
||||||
|
|
||||||
offset += OAMPDU_INFO_REVISION_SZ;
|
offset += OAMPDU_INFO_REVISION_SZ;
|
||||||
|
|
||||||
/* Build OAM State field field */
|
/* Build OAM State field field */
|
||||||
raw_octet = tvb_get_guint8(tvb, offset);
|
raw_octet = tvb_get_guint8(tvb, offset);
|
||||||
state_item = proto_tree_add_uint(info_tree, hf_oampdu_info_state,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
if (raw_octet == OAMPDU_INFO_TYPE_LOCAL)
|
if (raw_octet == OAMPDU_INFO_TYPE_LOCAL)
|
||||||
state_tree = proto_item_add_subtree(state_item, ett_oampdu_local_info_state);
|
proto_tree_add_bitmask(info_tree, tvb, offset, hf_oampdu_info_state, ett_oampdu_local_info_state, info_states, ENC_NA);
|
||||||
else
|
else
|
||||||
state_tree = proto_item_add_subtree(state_item, ett_oampdu_remote_info_state);
|
proto_tree_add_bitmask(info_tree, tvb, offset, hf_oampdu_info_state, ett_oampdu_remote_info_state, info_states, ENC_NA);
|
||||||
|
|
||||||
proto_tree_add_uint(state_tree, hf_oampdu_info_state_parser,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(state_tree, hf_oampdu_info_state_mux,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
offset += OAMPDU_INFO_STATE_SZ;
|
offset += OAMPDU_INFO_STATE_SZ;
|
||||||
|
|
||||||
/* Build OAM configuration field */
|
/* Build OAM configuration field */
|
||||||
raw_octet = tvb_get_guint8(tvb, offset);
|
raw_octet = tvb_get_guint8(tvb, offset);
|
||||||
cfg_item = proto_tree_add_uint(info_tree, hf_oampdu_info_oamConfig,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
if (raw_octet == OAMPDU_INFO_TYPE_LOCAL)
|
if (raw_octet == OAMPDU_INFO_TYPE_LOCAL)
|
||||||
cfg_tree = proto_item_add_subtree(cfg_item, ett_oampdu_local_info_config);
|
proto_tree_add_bitmask(info_tree, tvb, offset, hf_oampdu_info_oamConfig, ett_oampdu_local_info_config, info_config, ENC_NA);
|
||||||
else
|
else
|
||||||
cfg_tree = proto_item_add_subtree(cfg_item, ett_oampdu_remote_info_config);
|
proto_tree_add_bitmask(info_tree, tvb, offset, hf_oampdu_info_oamConfig, ett_oampdu_remote_info_config, info_config, ENC_NA);
|
||||||
|
|
||||||
proto_tree_add_boolean(cfg_tree, hf_oampdu_info_oamConfig_mode,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(cfg_tree, hf_oampdu_info_oamConfig_uni,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(cfg_tree, hf_oampdu_info_oamConfig_lpbk,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(cfg_tree, hf_oampdu_info_oamConfig_event,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(cfg_tree, hf_oampdu_info_oamConfig_var,
|
|
||||||
tvb, offset, 1, raw_octet);
|
|
||||||
|
|
||||||
offset += OAMPDU_INFO_OAM_CONFIG_SZ;
|
offset += OAMPDU_INFO_OAM_CONFIG_SZ;
|
||||||
|
|
||||||
raw_word = tvb_get_ntohs(tvb, offset);
|
item = proto_tree_add_item(info_tree, hf_oampdu_info_oampduConfig,
|
||||||
item = proto_tree_add_uint(info_tree, hf_oampdu_info_oampduConfig,
|
tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||||
tvb, offset, 2, raw_word);
|
|
||||||
|
|
||||||
proto_item_append_text(item, " (bytes)");
|
proto_item_append_text(item, " (bytes)");
|
||||||
|
|
||||||
|
@ -1321,8 +1299,8 @@ dissect_oampdu_information(tvbuff_t *tvb, proto_tree *tree)
|
||||||
{
|
{
|
||||||
/* see IEEE802.3, section 57.5.2.3 for more details */
|
/* see IEEE802.3, section 57.5.2.3 for more details */
|
||||||
raw_octet = tvb_get_guint8(tvb, offset);
|
raw_octet = tvb_get_guint8(tvb, offset);
|
||||||
proto_tree_add_uint(info_tree, hf_oampdu_info_len,
|
proto_tree_add_item(info_tree, hf_oampdu_info_len,
|
||||||
tvb, offset, 1, raw_octet);
|
tvb, offset, 1, ENC_NA);
|
||||||
|
|
||||||
offset += OAMPDU_INFO_LENGTH_SZ;
|
offset += OAMPDU_INFO_LENGTH_SZ;
|
||||||
|
|
||||||
|
|
|
@ -984,7 +984,7 @@ dissect_pcep_tlvs(proto_tree *pcep_obj, tvbuff_t *tvb, int offset, gint length,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 17: /* SYMBOLIC-PATH-NAME TLV */
|
case 17: /* SYMBOLIC-PATH-NAME TLV */
|
||||||
proto_tree_add_item(tlv, hf_pcep_symbolic_path_name, tvb, offset+4+j, tlv_length, ENC_NA);
|
proto_tree_add_item(tlv, hf_pcep_symbolic_path_name, tvb, offset+4+j, tlv_length, ENC_ASCII|ENC_NA);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 18: /* IPV4-LSP-IDENTIFIERS TLV */
|
case 18: /* IPV4-LSP-IDENTIFIERS TLV */
|
||||||
|
@ -1007,7 +1007,7 @@ dissect_pcep_tlvs(proto_tree *pcep_obj, tvbuff_t *tvb, int offset, gint length,
|
||||||
proto_tree_add_item(tlv, hf_pcep_lsp_error_code, tvb, offset+4+j, 4, ENC_NA);
|
proto_tree_add_item(tlv, hf_pcep_lsp_error_code, tvb, offset+4+j, 4, ENC_NA);
|
||||||
|
|
||||||
case 21: /* RSVP-ERROR-SPEC TLV */
|
case 21: /* RSVP-ERROR-SPEC TLV */
|
||||||
proto_tree_add_item(tlv, hf_pcep_rsvp_user_error_spec, tvb, offset+4+j, tlv_length, ENC_NA);
|
proto_tree_add_item(tlv, hf_pcep_rsvp_user_error_spec, tvb, offset+4+j, tlv_length, ENC_ASCII|ENC_NA);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 23: /* LSP-DB-VERSION TLV */
|
case 23: /* LSP-DB-VERSION TLV */
|
||||||
|
@ -1015,7 +1015,7 @@ dissect_pcep_tlvs(proto_tree *pcep_obj, tvbuff_t *tvb, int offset, gint length,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 24: /* SPEAKER-ENTITY-ID TLV */
|
case 24: /* SPEAKER-ENTITY-ID TLV */
|
||||||
proto_tree_add_item(tlv, hf_pcep_speaker_entity_id, tvb, offset+4+j, tlv_length, ENC_NA);
|
proto_tree_add_item(tlv, hf_pcep_speaker_entity_id, tvb, offset+4+j, tlv_length, ENC_ASCII|ENC_NA);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1219,11 +1219,9 @@ static void
|
||||||
dissect_subobj_unnumb_interfaceID(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, gint ett_pcep_obj, guint length)
|
dissect_subobj_unnumb_interfaceID(proto_tree *pcep_subobj_tree, packet_info *pinfo, tvbuff_t *tvb, int offset, int obj_class, gint ett_pcep_obj, guint length)
|
||||||
{
|
{
|
||||||
proto_tree *pcep_subobj_unnumb_interfaceID;
|
proto_tree *pcep_subobj_unnumb_interfaceID;
|
||||||
proto_tree *pcep_subobj_unnumb_interfaceID_flags;
|
|
||||||
proto_item *ti;
|
proto_item *ti;
|
||||||
guint32 router_ID;
|
guint32 router_ID;
|
||||||
guint32 interface_ID;
|
guint32 interface_ID;
|
||||||
guint16 reserved_flags;
|
|
||||||
|
|
||||||
ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_UNNUM_INTERFACEID, tvb, offset, length, ENC_NA);
|
ti = proto_tree_add_item(pcep_subobj_tree, hf_PCEPF_SUBOBJ_UNNUM_INTERFACEID, tvb, offset, length, ENC_NA);
|
||||||
pcep_subobj_unnumb_interfaceID = proto_item_add_subtree(ti, ett_pcep_obj);
|
pcep_subobj_unnumb_interfaceID = proto_item_add_subtree(ti, ett_pcep_obj);
|
||||||
|
@ -1234,7 +1232,6 @@ dissect_subobj_unnumb_interfaceID(proto_tree *pcep_subobj_tree, packet_info *pin
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
reserved_flags = tvb_get_ntohs(tvb, offset+2);
|
|
||||||
router_ID = tvb_get_ipv4(tvb, offset+4);
|
router_ID = tvb_get_ipv4(tvb, offset+4);
|
||||||
interface_ID = tvb_get_ntohl(tvb, offset+8);
|
interface_ID = tvb_get_ntohl(tvb, offset+8);
|
||||||
proto_item_append_text(ti, ": %s:%u", ip_to_str ((guint8 *) &router_ID),
|
proto_item_append_text(ti, ": %s:%u", ip_to_str ((guint8 *) &router_ID),
|
||||||
|
@ -1250,15 +1247,18 @@ dissect_subobj_unnumb_interfaceID(proto_tree *pcep_subobj_tree, packet_info *pin
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCEP_RECORD_ROUTE_OBJ:
|
case PCEP_RECORD_ROUTE_OBJ:
|
||||||
|
{
|
||||||
|
static const int * flags[] = {
|
||||||
|
&pcep_subobj_flags_lpa,
|
||||||
|
&pcep_subobj_flags_lpu,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_PCEPF_SUBOBJ, tvb, offset, 1, ENC_NA);
|
proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_PCEPF_SUBOBJ, tvb, offset, 1, ENC_NA);
|
||||||
proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_length, tvb, offset+1, 1, ENC_NA);
|
proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_length, tvb, offset+1, 1, ENC_NA);
|
||||||
|
proto_tree_add_bitmask(pcep_subobj_unnumb_interfaceID, tvb, offset+2, hf_pcep_subobj_unnumb_interfaceID_flags, ett_pcep_obj, flags, ENC_BIG_ENDIAN);
|
||||||
ti = proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_flags, tvb, offset+2, 2, ENC_BIG_ENDIAN);
|
|
||||||
pcep_subobj_unnumb_interfaceID_flags = proto_item_add_subtree(ti, ett_pcep_obj);
|
|
||||||
proto_tree_add_boolean(pcep_subobj_unnumb_interfaceID_flags, pcep_subobj_flags_lpa, tvb, offset+2, 1, (reserved_flags & 0xff00)>>8);
|
|
||||||
proto_tree_add_boolean(pcep_subobj_unnumb_interfaceID_flags, pcep_subobj_flags_lpu, tvb, offset+2, 1, (reserved_flags & 0xff00)>>8);
|
|
||||||
|
|
||||||
proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_reserved_rrobj, tvb, offset+3, 1, ENC_NA);
|
proto_tree_add_item(pcep_subobj_unnumb_interfaceID, hf_pcep_subobj_unnumb_interfaceID_reserved_rrobj, tvb, offset+3, 1, ENC_NA);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCEP_IRO_OBJ:
|
case PCEP_IRO_OBJ:
|
||||||
|
|
|
@ -268,6 +268,7 @@ static gint ett_pppmux_subframe_flags = -1;
|
||||||
static gint ett_pppmux_subframe_info = -1;
|
static gint ett_pppmux_subframe_info = -1;
|
||||||
|
|
||||||
static int proto_mp = -1;
|
static int proto_mp = -1;
|
||||||
|
static int hf_mp_frag = -1;
|
||||||
static int hf_mp_frag_first = -1;
|
static int hf_mp_frag_first = -1;
|
||||||
static int hf_mp_frag_last = -1;
|
static int hf_mp_frag_last = -1;
|
||||||
static int hf_mp_short_sequence_num_reserved = -1;
|
static int hf_mp_short_sequence_num_reserved = -1;
|
||||||
|
@ -4109,13 +4110,20 @@ static const value_string bcp_mac_type_vals[] = {
|
||||||
static void
|
static void
|
||||||
dissect_bcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
dissect_bcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
{
|
{
|
||||||
proto_item *ti, *flags_item;
|
proto_item *ti;
|
||||||
proto_tree *bcp_tree, *flags_tree;
|
proto_tree *bcp_tree;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
guint8 flags;
|
guint8 flags;
|
||||||
guint8 mac_type;
|
guint8 mac_type;
|
||||||
gint captured_length, reported_length, pad_length;
|
gint captured_length, reported_length, pad_length;
|
||||||
tvbuff_t *next_tvb;
|
tvbuff_t *next_tvb;
|
||||||
|
static const int * bcp_flags[] = {
|
||||||
|
&hf_bcp_fcs_present,
|
||||||
|
&hf_bcp_zeropad,
|
||||||
|
&hf_bcp_bcontrol,
|
||||||
|
&hf_bcp_pads,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP BCP");
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP BCP");
|
||||||
col_clear(pinfo->cinfo, COL_INFO);
|
col_clear(pinfo->cinfo, COL_INFO);
|
||||||
|
@ -4127,18 +4135,8 @@ dissect_bcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
if (flags & BCP_IS_BCONTROL) {
|
if (flags & BCP_IS_BCONTROL) {
|
||||||
col_set_str(pinfo->cinfo, COL_INFO, "Bridge control");
|
col_set_str(pinfo->cinfo, COL_INFO, "Bridge control");
|
||||||
}
|
}
|
||||||
if (tree) {
|
|
||||||
flags_item = proto_tree_add_uint(bcp_tree, hf_bcp_flags, tvb, offset,
|
proto_tree_add_bitmask(bcp_tree, tvb, offset, hf_bcp_flags, ett_bcp_flags, bcp_flags, ENC_NA);
|
||||||
1, flags);
|
|
||||||
flags_tree = proto_item_add_subtree(flags_item, ett_bcp_flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_bcp_fcs_present, tvb, offset,
|
|
||||||
1, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_bcp_zeropad, tvb, offset, 1,
|
|
||||||
flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_bcp_bcontrol, tvb, offset, 1,
|
|
||||||
flags);
|
|
||||||
proto_tree_add_uint(flags_tree, hf_bcp_pads, tvb, offset, 1, flags);
|
|
||||||
}
|
|
||||||
offset++;
|
offset++;
|
||||||
|
|
||||||
mac_type = tvb_get_guint8(tvb, offset);
|
mac_type = tvb_get_guint8(tvb, offset);
|
||||||
|
@ -4725,12 +4723,18 @@ dissect_cdpcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
static gboolean mp_short_seqno = FALSE; /* Default to long sequence numbers */
|
static gboolean mp_short_seqno = FALSE; /* Default to long sequence numbers */
|
||||||
|
|
||||||
#define MP_FRAG_MASK 0xC0
|
#define MP_FRAG_MASK 0xC0
|
||||||
#define MP_FRAG(bits) ((bits) & MP_FRAG_MASK)
|
|
||||||
#define MP_FRAG_FIRST 0x80
|
#define MP_FRAG_FIRST 0x80
|
||||||
#define MP_FRAG_LAST 0x40
|
#define MP_FRAG_LAST 0x40
|
||||||
#define MP_FRAG_RESERVED 0x3f
|
#define MP_FRAG_RESERVED 0x3f
|
||||||
#define MP_FRAG_RESERVED_SHORT 0x30
|
#define MP_FRAG_RESERVED_SHORT 0x30
|
||||||
|
|
||||||
|
static const value_string mp_frag_vals[] = {
|
||||||
|
{ MP_FRAG_FIRST, "First" },
|
||||||
|
{ MP_FRAG_LAST, "Last" },
|
||||||
|
{ MP_FRAG_FIRST|MP_FRAG_LAST, "First, Last" },
|
||||||
|
{ 0, NULL }
|
||||||
|
};
|
||||||
|
|
||||||
/* According to RFC 1990, the length the MP header isn't indicated anywhere
|
/* According to RFC 1990, the length the MP header isn't indicated anywhere
|
||||||
in the header itself. It starts out at four bytes and can be
|
in the header itself. It starts out at four bytes and can be
|
||||||
negotiated down to two using LCP. We currently have a preference
|
negotiated down to two using LCP. We currently have a preference
|
||||||
|
@ -4739,56 +4743,37 @@ static gboolean mp_short_seqno = FALSE; /* Default to long sequence numbers */
|
||||||
static void
|
static void
|
||||||
dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
{
|
{
|
||||||
proto_tree *mp_tree = NULL, *hdr_tree;
|
proto_tree *mp_tree;
|
||||||
proto_item *ti = NULL;
|
proto_item *ti;
|
||||||
guint8 flags;
|
|
||||||
const gchar *flag_str;
|
|
||||||
gint hdrlen;
|
gint hdrlen;
|
||||||
tvbuff_t *next_tvb;
|
tvbuff_t *next_tvb;
|
||||||
|
static const int * mp_flags[] = {
|
||||||
|
&hf_mp_frag_first,
|
||||||
|
&hf_mp_frag_last,
|
||||||
|
&hf_mp_sequence_num_reserved,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * mp_short_flags[] = {
|
||||||
|
&hf_mp_frag_first,
|
||||||
|
&hf_mp_frag_last,
|
||||||
|
&hf_mp_short_sequence_num_reserved,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP MP");
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP MP");
|
||||||
col_set_str(pinfo->cinfo, COL_INFO, "PPP Multilink");
|
col_set_str(pinfo->cinfo, COL_INFO, "PPP Multilink");
|
||||||
|
|
||||||
if (tree) {
|
ti = proto_tree_add_item(tree, proto_mp, tvb, 0,
|
||||||
ti = proto_tree_add_item(tree, proto_mp, tvb, 0,
|
|
||||||
mp_short_seqno ? 2 : 4, ENC_NA);
|
mp_short_seqno ? 2 : 4, ENC_NA);
|
||||||
mp_tree = proto_item_add_subtree(ti, ett_mp);
|
mp_tree = proto_item_add_subtree(ti, ett_mp);
|
||||||
}
|
|
||||||
|
|
||||||
flags = tvb_get_guint8(tvb, 0);
|
if (mp_short_seqno) {
|
||||||
|
proto_tree_add_bitmask(mp_tree, tvb, 0, hf_mp_frag, ett_mp_flags, mp_short_flags, ENC_NA);
|
||||||
if (tree) {
|
proto_tree_add_item(mp_tree, hf_mp_short_sequence_num, tvb, 0, 2, ENC_BIG_ENDIAN);
|
||||||
switch (MP_FRAG(flags)) {
|
} else {
|
||||||
case MP_FRAG_FIRST:
|
proto_tree_add_bitmask(mp_tree, tvb, 0, hf_mp_frag, ett_mp_flags, mp_flags, ENC_NA);
|
||||||
flag_str = "First";
|
proto_tree_add_item(mp_tree, hf_mp_sequence_num, tvb, 1, 3,
|
||||||
break;
|
ENC_BIG_ENDIAN);
|
||||||
case MP_FRAG_LAST:
|
|
||||||
flag_str = "Last";
|
|
||||||
break;
|
|
||||||
case MP_FRAG_FIRST|MP_FRAG_LAST:
|
|
||||||
flag_str = "First, Last";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
flag_str = "Unknown";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
ti = proto_tree_add_text(mp_tree, tvb, 0, 1, "Fragment: 0x%2X (%s)",
|
|
||||||
MP_FRAG(flags), flag_str);
|
|
||||||
hdr_tree = proto_item_add_subtree(ti, ett_mp_flags);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(hdr_tree, hf_mp_frag_first, tvb, 0, 1, flags);
|
|
||||||
proto_tree_add_boolean(hdr_tree, hf_mp_frag_last, tvb, 0, 1, flags);
|
|
||||||
if (mp_short_seqno) {
|
|
||||||
proto_tree_add_item(hdr_tree, hf_mp_short_sequence_num_reserved, tvb, 0, 1,
|
|
||||||
ENC_BIG_ENDIAN);
|
|
||||||
proto_tree_add_item(mp_tree, hf_mp_short_sequence_num, tvb, 0, 2,
|
|
||||||
ENC_BIG_ENDIAN);
|
|
||||||
} else {
|
|
||||||
proto_tree_add_item(hdr_tree, hf_mp_sequence_num_reserved, tvb, 0, 1,
|
|
||||||
ENC_BIG_ENDIAN);
|
|
||||||
proto_tree_add_item(mp_tree, hf_mp_sequence_num, tvb, 1, 3,
|
|
||||||
ENC_BIG_ENDIAN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hdrlen = mp_short_seqno ? 2 : 4;
|
hdrlen = mp_short_seqno ? 2 : 4;
|
||||||
|
@ -5496,6 +5481,9 @@ void
|
||||||
proto_register_mp(void)
|
proto_register_mp(void)
|
||||||
{
|
{
|
||||||
static hf_register_info hf[] = {
|
static hf_register_info hf[] = {
|
||||||
|
{ &hf_mp_frag,
|
||||||
|
{ "Fragment", "mp.frag", FT_UINT8, BASE_HEX,
|
||||||
|
VALS(mp_frag_vals), MP_FRAG_MASK, NULL, HFILL }},
|
||||||
{ &hf_mp_frag_first,
|
{ &hf_mp_frag_first,
|
||||||
{ "First fragment", "mp.first", FT_BOOLEAN, 8,
|
{ "First fragment", "mp.first", FT_BOOLEAN, 8,
|
||||||
TFS(&tfs_yes_no), MP_FRAG_FIRST, NULL, HFILL }},
|
TFS(&tfs_yes_no), MP_FRAG_FIRST, NULL, HFILL }},
|
||||||
|
|
|
@ -1888,7 +1888,6 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
proto_tree *q2931_tree = NULL;
|
proto_tree *q2931_tree = NULL;
|
||||||
proto_item *ti;
|
proto_item *ti;
|
||||||
proto_tree *ext_tree;
|
|
||||||
guint8 call_ref_len;
|
guint8 call_ref_len;
|
||||||
guint8 call_ref[15];
|
guint8 call_ref[15];
|
||||||
guint8 message_type;
|
guint8 message_type;
|
||||||
|
@ -1901,6 +1900,15 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
int codeset;
|
int codeset;
|
||||||
gboolean non_locking_shift;
|
gboolean non_locking_shift;
|
||||||
#endif
|
#endif
|
||||||
|
static const int * ext_flags[] = {
|
||||||
|
&hf_q2931_message_flag,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * ext_flags_follow_inst[] = {
|
||||||
|
&hf_q2931_message_flag,
|
||||||
|
&hf_q2931_message_action_indicator,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Q.2931");
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Q.2931");
|
||||||
|
|
||||||
|
@ -1918,12 +1926,10 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
offset += 1;
|
offset += 1;
|
||||||
if (call_ref_len != 0) {
|
if (call_ref_len != 0) {
|
||||||
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
|
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
|
||||||
if (q2931_tree != NULL) {
|
proto_tree_add_boolean(q2931_tree, hf_q2931_call_ref_flag,
|
||||||
proto_tree_add_boolean(q2931_tree, hf_q2931_call_ref_flag,
|
tvb, offset, 1, (call_ref[0] & 0x80) != 0);
|
||||||
tvb, offset, 1, (call_ref[0] & 0x80) != 0);
|
call_ref[0] &= 0x7F;
|
||||||
call_ref[0] &= 0x7F;
|
proto_tree_add_bytes(q2931_tree, hf_q2931_call_ref, tvb, offset, call_ref_len, call_ref);
|
||||||
proto_tree_add_bytes(q2931_tree, hf_q2931_call_ref, tvb, offset, call_ref_len, call_ref);
|
|
||||||
}
|
|
||||||
offset += call_ref_len;
|
offset += call_ref_len;
|
||||||
}
|
}
|
||||||
message_type = tvb_get_guint8(tvb, offset);
|
message_type = tvb_get_guint8(tvb, offset);
|
||||||
|
@ -1931,21 +1937,14 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
val_to_str_ext(message_type, &q2931_message_type_vals_ext,
|
val_to_str_ext(message_type, &q2931_message_type_vals_ext,
|
||||||
"Unknown message type (0x%02X)"));
|
"Unknown message type (0x%02X)"));
|
||||||
|
|
||||||
if (q2931_tree != NULL)
|
proto_tree_add_uint(q2931_tree, hf_q2931_message_type, tvb, offset, 1, message_type);
|
||||||
proto_tree_add_uint(q2931_tree, hf_q2931_message_type, tvb, offset, 1, message_type);
|
|
||||||
offset += 1;
|
offset += 1;
|
||||||
|
|
||||||
message_type_ext = tvb_get_guint8(tvb, offset);
|
message_type_ext = tvb_get_guint8(tvb, offset);
|
||||||
if (q2931_tree != NULL) {
|
if (message_type_ext & Q2931_MSG_TYPE_EXT_FOLLOW_INST) {
|
||||||
ti = proto_tree_add_uint(q2931_tree, hf_q2931_message_type_ext, tvb,
|
proto_tree_add_bitmask(q2931_tree, tvb, offset, hf_q2931_message_type_ext, ett_q2931_ext, ext_flags_follow_inst, ENC_NA);
|
||||||
offset, 1, message_type_ext);
|
} else {
|
||||||
ext_tree = proto_item_add_subtree(ti, ett_q2931_ext);
|
proto_tree_add_bitmask(q2931_tree, tvb, offset, hf_q2931_message_type_ext, ett_q2931_ext, ext_flags, ENC_NA);
|
||||||
proto_tree_add_boolean(ext_tree, hf_q2931_message_flag, tvb,
|
|
||||||
offset, 1, message_type_ext);
|
|
||||||
if (message_type_ext & Q2931_MSG_TYPE_EXT_FOLLOW_INST) {
|
|
||||||
proto_tree_add_uint(ext_tree, hf_q2931_message_action_indicator, tvb,
|
|
||||||
offset, 1, message_type_ext);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
offset += 1;
|
offset += 1;
|
||||||
|
|
||||||
|
|
|
@ -1820,13 +1820,11 @@ dissect_q933(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
offset += 1;
|
offset += 1;
|
||||||
if (call_ref_len != 0) {
|
if (call_ref_len != 0) {
|
||||||
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
|
tvb_memcpy(tvb, call_ref, offset, call_ref_len);
|
||||||
if (q933_tree != NULL) {
|
proto_tree_add_boolean(q933_tree, hf_q933_call_ref_flag,
|
||||||
proto_tree_add_boolean(q933_tree, hf_q933_call_ref_flag,
|
tvb, offset, 1, (call_ref[0] & 0x80) != 0);
|
||||||
tvb, offset, 1, (call_ref[0] & 0x80) != 0);
|
call_ref[0] &= 0x7F;
|
||||||
call_ref[0] &= 0x7F;
|
proto_tree_add_bytes(q933_tree, hf_q933_call_ref,
|
||||||
proto_tree_add_bytes(q933_tree, hf_q933_call_ref,
|
tvb, offset, call_ref_len, call_ref);
|
||||||
tvb, offset, call_ref_len, call_ref);
|
|
||||||
}
|
|
||||||
offset += call_ref_len;
|
offset += call_ref_len;
|
||||||
}
|
}
|
||||||
message_type = tvb_get_guint8(tvb, offset);
|
message_type = tvb_get_guint8(tvb, offset);
|
||||||
|
|
|
@ -395,6 +395,7 @@ static const gchar* dissect_packetcable_surv_df_sec(proto_tree* tree _U_, tvbuff
|
||||||
#define PACKETCABLE_MESSAGE_WAITING (1 << 3)
|
#define PACKETCABLE_MESSAGE_WAITING (1 << 3)
|
||||||
|
|
||||||
static const gchar* dissect_packetcable_term_dsply_info(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
|
static const gchar* dissect_packetcable_term_dsply_info(proto_tree* tree, tvbuff_t* tvb, packet_info *pinfo _U_) {
|
||||||
|
/* XXX - this logic seems buggy because the offsets don't line up */
|
||||||
guint8 bitmask = tvb_get_guint8(tvb, 2);
|
guint8 bitmask = tvb_get_guint8(tvb, 2);
|
||||||
guint intval = 1;
|
guint intval = 1;
|
||||||
proto_item* ti = proto_tree_add_item(tree, hf_packetcable_terminal_display_info_terminal_display_status_bitmask,
|
proto_item* ti = proto_tree_add_item(tree, hf_packetcable_terminal_display_info_terminal_display_status_bitmask,
|
||||||
|
|
|
@ -5095,42 +5095,27 @@ dissect_rsvp_admin_status(proto_tree *ti, proto_tree *rsvp_object_tree,
|
||||||
int rsvp_class _U_, int type)
|
int rsvp_class _U_, int type)
|
||||||
{
|
{
|
||||||
int offset2 = offset + 4;
|
int offset2 = offset + 4;
|
||||||
proto_tree *ti2, *rsvp_admin_subtree;
|
|
||||||
guint32 status;
|
guint32 status;
|
||||||
|
static const int * status_flags[] = {
|
||||||
|
&hf_rsvp_filter[RSVPF_ADMIN_STATUS_REFLECT],
|
||||||
|
&hf_rsvp_filter[RSVPF_ADMIN_STATUS_HANDOVER],
|
||||||
|
&hf_rsvp_filter[RSVPF_ADMIN_STATUS_LOCKOUT],
|
||||||
|
&hf_rsvp_filter[RSVPF_ADMIN_STATUS_INHIBIT],
|
||||||
|
&hf_rsvp_filter[RSVPF_ADMIN_STATUS_CALL_MGMT],
|
||||||
|
&hf_rsvp_filter[RSVPF_ADMIN_STATUS_TESTING],
|
||||||
|
&hf_rsvp_filter[RSVPF_ADMIN_STATUS_DOWN],
|
||||||
|
&hf_rsvp_filter[RSVPF_ADMIN_STATUS_DELETE],
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
proto_item_set_text(ti, "ADMIN STATUS: ");
|
proto_item_set_text(ti, "ADMIN STATUS: ");
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 1:
|
case 1:
|
||||||
proto_tree_add_uint(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, type);
|
proto_tree_add_uint(rsvp_object_tree, hf_rsvp_ctype, tvb, offset+3, 1, type);
|
||||||
status = tvb_get_ntohl(tvb, offset2);
|
status = tvb_get_ntohl(tvb, offset2);
|
||||||
ti2 = proto_tree_add_item(rsvp_object_tree, hf_rsvp_admin_status, tvb, offset2, 4, ENC_BIG_ENDIAN);
|
|
||||||
rsvp_admin_subtree =
|
|
||||||
proto_item_add_subtree(ti2, TREE(TT_ADMIN_STATUS_FLAGS));
|
|
||||||
|
|
||||||
proto_tree_add_boolean(rsvp_admin_subtree,
|
proto_tree_add_bitmask(rsvp_object_tree, tvb, offset2, hf_rsvp_admin_status, TREE(TT_ADMIN_STATUS_FLAGS), status_flags, ENC_BIG_ENDIAN);
|
||||||
hf_rsvp_filter[RSVPF_ADMIN_STATUS_REFLECT],
|
|
||||||
tvb, offset2, 4, status);
|
|
||||||
proto_tree_add_boolean(rsvp_admin_subtree,
|
|
||||||
hf_rsvp_filter[RSVPF_ADMIN_STATUS_HANDOVER],
|
|
||||||
tvb, offset2, 4, status);
|
|
||||||
proto_tree_add_boolean(rsvp_admin_subtree,
|
|
||||||
hf_rsvp_filter[RSVPF_ADMIN_STATUS_LOCKOUT],
|
|
||||||
tvb, offset2, 4, status);
|
|
||||||
proto_tree_add_boolean(rsvp_admin_subtree,
|
|
||||||
hf_rsvp_filter[RSVPF_ADMIN_STATUS_INHIBIT],
|
|
||||||
tvb, offset2, 4, status);
|
|
||||||
proto_tree_add_boolean(rsvp_admin_subtree,
|
|
||||||
hf_rsvp_filter[RSVPF_ADMIN_STATUS_CALL_MGMT],
|
|
||||||
tvb, offset2, 4, status);
|
|
||||||
proto_tree_add_boolean(rsvp_admin_subtree,
|
|
||||||
hf_rsvp_filter[RSVPF_ADMIN_STATUS_TESTING],
|
|
||||||
tvb, offset2, 4, status);
|
|
||||||
proto_tree_add_boolean(rsvp_admin_subtree,
|
|
||||||
hf_rsvp_filter[RSVPF_ADMIN_STATUS_DOWN],
|
|
||||||
tvb, offset2, 4, status);
|
|
||||||
proto_tree_add_boolean(rsvp_admin_subtree,
|
|
||||||
hf_rsvp_filter[RSVPF_ADMIN_STATUS_DELETE],
|
|
||||||
tvb, offset2, 4, status);
|
|
||||||
proto_item_set_text(ti, "ADMIN-STATUS: %s%s%s%s%s%s%s%s",
|
proto_item_set_text(ti, "ADMIN-STATUS: %s%s%s%s%s%s%s%s",
|
||||||
(status & (1<<31)) ? "Reflect " : "",
|
(status & (1<<31)) ? "Reflect " : "",
|
||||||
(status & (1<<6)) ? "Handover " : "",
|
(status & (1<<6)) ? "Handover " : "",
|
||||||
|
|
|
@ -412,27 +412,18 @@ dissect_rx_acks(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, int
|
||||||
static int
|
static int
|
||||||
dissect_rx_flags(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *parent_tree, int offset)
|
dissect_rx_flags(tvbuff_t *tvb, struct rxinfo *rxinfo, proto_tree *parent_tree, int offset)
|
||||||
{
|
{
|
||||||
proto_tree *tree;
|
static const int * flags[] = {
|
||||||
proto_item *item;
|
&hf_rx_flags_free_packet,
|
||||||
guint8 flags;
|
&hf_rx_flags_more_packets,
|
||||||
|
&hf_rx_flags_last_packet,
|
||||||
|
&hf_rx_flags_request_ack,
|
||||||
|
&hf_rx_flags_clientinit,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
flags = tvb_get_guint8(tvb, offset);
|
rxinfo->flags = tvb_get_guint8(tvb, offset);
|
||||||
rxinfo->flags = flags;
|
|
||||||
|
|
||||||
item = proto_tree_add_uint(parent_tree, hf_rx_flags, tvb,
|
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_rx_flags, ett_rx_flags, flags, ENC_NA);
|
||||||
offset, 1, flags);
|
|
||||||
tree = proto_item_add_subtree(item, ett_rx_flags);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(tree, hf_rx_flags_free_packet, tvb,
|
|
||||||
offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(tree, hf_rx_flags_more_packets, tvb,
|
|
||||||
offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(tree, hf_rx_flags_last_packet, tvb,
|
|
||||||
offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(tree, hf_rx_flags_request_ack, tvb,
|
|
||||||
offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(tree, hf_rx_flags_clientinit, tvb,
|
|
||||||
offset, 1, flags);
|
|
||||||
|
|
||||||
offset += 1;
|
offset += 1;
|
||||||
return offset;
|
return offset;
|
||||||
|
|
|
@ -80,6 +80,7 @@ static int hf_enclosure_item_options_flags = -1;
|
||||||
static int hf_token_item_options_flags = -1;
|
static int hf_token_item_options_flags = -1;
|
||||||
|
|
||||||
static gint ett_connect_protocol_options_flags = -1;
|
static gint ett_connect_protocol_options_flags = -1;
|
||||||
|
static gint ett_transport_options_flags = -1;
|
||||||
static gint ett_protocol_version_flags = -1;
|
static gint ett_protocol_version_flags = -1;
|
||||||
static gint ett_enclosure_item_flags = -1;
|
static gint ett_enclosure_item_flags = -1;
|
||||||
static gint ett_token_item_flags = -1;
|
static gint ett_token_item_flags = -1;
|
||||||
|
@ -190,6 +191,7 @@ static int hf_ses_transport_protocol_error = -1;
|
||||||
static int hf_ses_transport_user_abort = -1;
|
static int hf_ses_transport_user_abort = -1;
|
||||||
static int hf_ses_parameter_length = -1;
|
static int hf_ses_parameter_length = -1;
|
||||||
static int hf_ses_transport_connection = -1;
|
static int hf_ses_transport_connection = -1;
|
||||||
|
static int hf_ses_transport_option_flags = -1;
|
||||||
|
|
||||||
/* clses header fields */
|
/* clses header fields */
|
||||||
static int proto_clses = -1;
|
static int proto_clses = -1;
|
||||||
|
@ -391,9 +393,54 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
{
|
{
|
||||||
gboolean has_user_information = TRUE;
|
gboolean has_user_information = TRUE;
|
||||||
guint16 flags;
|
guint16 flags;
|
||||||
proto_item *tf;
|
|
||||||
proto_tree *flags_tree;
|
|
||||||
asn1_ctx_t asn1_ctx;
|
asn1_ctx_t asn1_ctx;
|
||||||
|
static const int * item_option_flags[] = {
|
||||||
|
&hf_release_token,
|
||||||
|
&hf_major_activity_token,
|
||||||
|
&hf_synchronize_minor_token,
|
||||||
|
&hf_data_token,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * transport_option_flags[] = {
|
||||||
|
&hf_ses_transport_connection,
|
||||||
|
&hf_ses_transport_user_abort,
|
||||||
|
&hf_ses_transport_protocol_error,
|
||||||
|
&hf_ses_transport_no_reason,
|
||||||
|
&hf_ses_transport_implementation_restriction,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * protocol_options_flags[] = {
|
||||||
|
&hf_able_to_receive_extended_concatenated_SPDU,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * req_options_flags[] = {
|
||||||
|
&hf_session_exception_report,
|
||||||
|
&hf_data_separation_function_unit,
|
||||||
|
&hf_symmetric_synchronize_function_unit,
|
||||||
|
&hf_typed_data_function_unit,
|
||||||
|
&hf_exception_function_unit,
|
||||||
|
&hf_capability_function_unit,
|
||||||
|
&hf_negotiated_release_function_unit,
|
||||||
|
&hf_activity_management_function_unit,
|
||||||
|
&hf_resynchronize_function_unit,
|
||||||
|
&hf_major_resynchronize_function_unit,
|
||||||
|
&hf_minor_resynchronize_function_unit,
|
||||||
|
&hf_expedited_data_resynchronize_function_unit,
|
||||||
|
&hf_duplex_function_unit,
|
||||||
|
&hf_half_duplex_function_unit,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * version_flags[] = {
|
||||||
|
&hf_protocol_version_2,
|
||||||
|
&hf_protocol_version_1,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * enclosure_flags[] = {
|
||||||
|
&hf_end_of_SSDU,
|
||||||
|
&hf_beginning_of_SSDU,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
|
||||||
|
|
||||||
switch (param_type)
|
switch (param_type)
|
||||||
|
@ -401,45 +448,37 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
case Called_SS_user_Reference:
|
case Called_SS_user_Reference:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_called_ss_user_reference,
|
hf_called_ss_user_reference,
|
||||||
tvb, offset, param_len, ENC_NA);
|
tvb, offset, param_len, ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Calling_SS_user_Reference:
|
case Calling_SS_user_Reference:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_calling_ss_user_reference,
|
hf_calling_ss_user_reference,
|
||||||
tvb, offset, param_len, ENC_NA);
|
tvb, offset, param_len, ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Common_Reference:
|
case Common_Reference:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_common_reference,
|
hf_common_reference,
|
||||||
tvb, offset, param_len, ENC_NA);
|
tvb, offset, param_len, ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Additional_Reference_Information:
|
case Additional_Reference_Information:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_additional_reference_information,
|
hf_additional_reference_information,
|
||||||
tvb, offset, param_len, ENC_NA);
|
tvb, offset, param_len, ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Token_Item:
|
case Token_Item:
|
||||||
|
@ -449,23 +488,8 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
"Length is %u, should be 1", param_len);
|
"Length is %u, should be 1", param_len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_bitmask(param_tree, tvb, offset, hf_token_item_options_flags, ett_token_item_flags, item_option_flags, ENC_NA);
|
||||||
flags = tvb_get_guint8(tvb, offset);
|
|
||||||
tf = proto_tree_add_uint(param_tree,
|
|
||||||
hf_token_item_options_flags, tvb, offset, 1,
|
|
||||||
flags);
|
|
||||||
flags_tree = proto_item_add_subtree(tf,
|
|
||||||
ett_token_item_flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_release_token,
|
|
||||||
tvb, offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_major_activity_token, tvb, offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_synchronize_minor_token, tvb, offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_data_token, tvb,
|
|
||||||
offset, 1, flags);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Transport_Disconnect:
|
case Transport_Disconnect:
|
||||||
|
@ -475,27 +499,15 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
"Length is %u, should be 1", param_len);
|
"Length is %u, should be 1", param_len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tree)
|
proto_tree_add_bitmask(param_tree, tvb, offset, hf_ses_transport_option_flags, ett_transport_options_flags, transport_option_flags, ENC_NA);
|
||||||
|
|
||||||
|
if(tvb_get_guint8(tvb, offset) & user_abort )
|
||||||
{
|
{
|
||||||
guint8 flags8;
|
session->abort_type = SESSION_USER_ABORT;
|
||||||
|
}
|
||||||
flags8 = tvb_get_guint8(tvb, offset);
|
else
|
||||||
proto_tree_add_item(param_tree, hf_ses_transport_connection, tvb, offset, 1, ENC_NA);
|
{
|
||||||
|
session->abort_type = SESSION_PROVIDER_ABORT;
|
||||||
proto_tree_add_item(param_tree, hf_ses_transport_user_abort, tvb, offset, 1, ENC_NA);
|
|
||||||
if(flags8 & user_abort )
|
|
||||||
{
|
|
||||||
session->abort_type = SESSION_USER_ABORT;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
session->abort_type = SESSION_PROVIDER_ABORT;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
proto_tree_add_item(param_tree, hf_ses_transport_protocol_error, tvb, offset, 1, ENC_NA);
|
|
||||||
proto_tree_add_item(param_tree, hf_ses_transport_no_reason, tvb, offset, 1, ENC_NA);
|
|
||||||
proto_tree_add_item(param_tree, hf_ses_transport_implementation_restriction, tvb, offset, 1, ENC_NA);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -506,18 +518,8 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
"Length is %u, should be 1", param_len);
|
"Length is %u, should be 1", param_len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_bitmask(param_tree, tvb, offset, hf_connect_protocol_options_flags, ett_connect_protocol_options_flags, protocol_options_flags, ENC_NA);
|
||||||
flags = tvb_get_guint8(tvb, offset);
|
|
||||||
tf = proto_tree_add_uint(param_tree,
|
|
||||||
hf_connect_protocol_options_flags, tvb, offset, 1,
|
|
||||||
flags);
|
|
||||||
flags_tree = proto_item_add_subtree(tf,
|
|
||||||
ett_connect_protocol_options_flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_able_to_receive_extended_concatenated_SPDU,
|
|
||||||
tvb, offset, 1, flags);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Session_Requirement:
|
case Session_Requirement:
|
||||||
|
@ -527,52 +529,7 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
"Length is %u, should be 2", param_len);
|
"Length is %u, should be 2", param_len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tree)
|
proto_tree_add_bitmask(param_tree, tvb, offset, hf_session_user_req_flags, ett_ses_req_options_flags, req_options_flags, ENC_BIG_ENDIAN);
|
||||||
{
|
|
||||||
flags = tvb_get_ntohs(tvb, offset);
|
|
||||||
tf = proto_tree_add_uint(param_tree,
|
|
||||||
hf_session_user_req_flags, tvb, offset, 2,
|
|
||||||
flags);
|
|
||||||
flags_tree = proto_item_add_subtree(tf,
|
|
||||||
ett_ses_req_options_flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_session_exception_report, tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_data_separation_function_unit, tvb, offset, 2,
|
|
||||||
flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_symmetric_synchronize_function_unit,
|
|
||||||
tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_typed_data_function_unit, tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_exception_function_unit, tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_capability_function_unit, tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_negotiated_release_function_unit,
|
|
||||||
tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_activity_management_function_unit,
|
|
||||||
tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_resynchronize_function_unit, tvb, offset, 2,
|
|
||||||
flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_major_resynchronize_function_unit,
|
|
||||||
tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_minor_resynchronize_function_unit,
|
|
||||||
tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_expedited_data_resynchronize_function_unit,
|
|
||||||
tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_duplex_function_unit, tvb, offset, 2, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_half_duplex_function_unit,
|
|
||||||
tvb, offset, 2, flags);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TSDU_Maximum_Size:
|
case TSDU_Maximum_Size:
|
||||||
|
@ -600,30 +557,16 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
"Length is %u, should be 1", param_len);
|
"Length is %u, should be 1", param_len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tree)
|
proto_tree_add_bitmask(param_tree, tvb, offset, hf_version_number_options_flags, ett_protocol_version_flags, version_flags, ENC_BIG_ENDIAN);
|
||||||
{
|
|
||||||
flags = tvb_get_guint8(tvb, offset);
|
|
||||||
tf = proto_tree_add_uint(param_tree,
|
|
||||||
hf_version_number_options_flags, tvb, offset, 1,
|
|
||||||
flags);
|
|
||||||
flags_tree = proto_item_add_subtree(tf,
|
|
||||||
ett_protocol_version_flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_protocol_version_2, tvb, offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree,
|
|
||||||
hf_protocol_version_1, tvb, offset, 1, flags);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Initial_Serial_Number:
|
case Initial_Serial_Number:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_initial_serial_number,
|
hf_initial_serial_number,
|
||||||
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EnclosureItem:
|
case EnclosureItem:
|
||||||
|
@ -635,18 +578,8 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
}
|
}
|
||||||
flags = tvb_get_guint8(tvb, offset);
|
flags = tvb_get_guint8(tvb, offset);
|
||||||
*enclosure_item_flags = (guint8) flags;
|
*enclosure_item_flags = (guint8) flags;
|
||||||
if (tree)
|
proto_tree_add_bitmask(param_tree, tvb, offset, hf_enclosure_item_options_flags, ett_enclosure_item_flags, enclosure_flags, ENC_BIG_ENDIAN);
|
||||||
{
|
|
||||||
tf = proto_tree_add_uint(param_tree,
|
|
||||||
hf_enclosure_item_options_flags, tvb, offset, 1,
|
|
||||||
flags);
|
|
||||||
flags_tree = proto_item_add_subtree(tf,
|
|
||||||
ett_enclosure_item_flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_end_of_SSDU,
|
|
||||||
tvb, offset, 1, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_beginning_of_SSDU,
|
|
||||||
tvb, offset, 1, flags);
|
|
||||||
}
|
|
||||||
if (flags & END_SPDU) {
|
if (flags & END_SPDU) {
|
||||||
/*
|
/*
|
||||||
* In Data Transfer and Typed Data SPDUs, (X.225: 8.3.{11,13}.4)
|
* In Data Transfer and Typed Data SPDUs, (X.225: 8.3.{11,13}.4)
|
||||||
|
@ -698,26 +631,22 @@ dissect_parameter(tvbuff_t *tvb, int offset, proto_tree *tree,
|
||||||
case Activity_Identifier:
|
case Activity_Identifier:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
/* 8.3.29.2 The parameter fields shall be as specified in Table 37.
|
||||||
/* 8.3.29.2 The parameter fields shall be as specified in Table 37.
|
* Activity Identifier m 41 6 octets maximum
|
||||||
* Activity Identifier m 41 6 octets maximum
|
*/
|
||||||
*/
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
hf_activity_identifier,
|
||||||
hf_activity_identifier,
|
tvb, offset, param_len, ENC_NA);
|
||||||
tvb, offset, param_len, ENC_NA);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Serial_Number:
|
case Serial_Number:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_serial_number,
|
hf_serial_number,
|
||||||
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Reason_Code:
|
case Reason_Code:
|
||||||
|
@ -755,67 +684,55 @@ PICS. */
|
||||||
case Calling_Session_Selector:
|
case Calling_Session_Selector:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
|
||||||
proto_tree_add_item(param_tree,
|
proto_tree_add_item(param_tree,
|
||||||
hf_calling_session_selector,
|
hf_calling_session_selector,
|
||||||
tvb, offset, param_len, ENC_NA);
|
tvb, offset, param_len, ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Called_Session_Selector:
|
case Called_Session_Selector:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_called_session_selector,
|
hf_called_session_selector,
|
||||||
tvb, offset, param_len, ENC_NA);
|
tvb, offset, param_len, ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Second_Serial_Number:
|
case Second_Serial_Number:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_second_serial_number,
|
hf_second_serial_number,
|
||||||
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Second_Initial_Serial_Number:
|
case Second_Initial_Serial_Number:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_second_initial_serial_number,
|
hf_second_initial_serial_number,
|
||||||
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Large_Initial_Serial_Number:
|
case Large_Initial_Serial_Number:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_large_initial_serial_number,
|
hf_large_initial_serial_number,
|
||||||
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Large_Second_Initial_Serial_Number:
|
case Large_Second_Initial_Serial_Number:
|
||||||
if (param_len == 0)
|
if (param_len == 0)
|
||||||
break;
|
break;
|
||||||
if (tree)
|
|
||||||
{
|
proto_tree_add_item(param_tree,
|
||||||
proto_tree_add_item(param_tree,
|
|
||||||
hf_large_second_initial_serial_number,
|
hf_large_second_initial_serial_number,
|
||||||
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
tvb, offset, param_len, ENC_ASCII|ENC_NA);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1929,6 +1846,7 @@ proto_register_ses(void)
|
||||||
|
|
||||||
/* Generated from convert_proto_tree_add_text.pl */
|
/* Generated from convert_proto_tree_add_text.pl */
|
||||||
{ &hf_ses_user_data, { "User data", "ses.user_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
{ &hf_ses_user_data, { "User data", "ses.user_data", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
||||||
|
{ &hf_ses_transport_option_flags, { "Flags", "ses.transport_flags", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
||||||
{ &hf_ses_transport_connection, { "Transport connection", "ses.transport_flags.connection", FT_BOOLEAN, 8, TFS(&tfs_released_kept), transport_connection_is_released, NULL, HFILL }},
|
{ &hf_ses_transport_connection, { "Transport connection", "ses.transport_flags.connection", FT_BOOLEAN, 8, TFS(&tfs_released_kept), transport_connection_is_released, NULL, HFILL }},
|
||||||
{ &hf_ses_transport_user_abort, { "User abort", "ses.transport_flags.user_abort", FT_BOOLEAN, 8, TFS(&tfs_yes_no), user_abort, NULL, HFILL }},
|
{ &hf_ses_transport_user_abort, { "User abort", "ses.transport_flags.user_abort", FT_BOOLEAN, 8, TFS(&tfs_yes_no), user_abort, NULL, HFILL }},
|
||||||
{ &hf_ses_transport_protocol_error, { "Protocol error", "ses.transport_flags.protocol_error", FT_BOOLEAN, 8, TFS(&tfs_yes_no), protocol_error, NULL, HFILL }},
|
{ &hf_ses_transport_protocol_error, { "Protocol error", "ses.transport_flags.protocol_error", FT_BOOLEAN, 8, TFS(&tfs_yes_no), protocol_error, NULL, HFILL }},
|
||||||
|
@ -1945,6 +1863,7 @@ proto_register_ses(void)
|
||||||
&ett_ses,
|
&ett_ses,
|
||||||
&ett_ses_param,
|
&ett_ses_param,
|
||||||
&ett_connect_protocol_options_flags,
|
&ett_connect_protocol_options_flags,
|
||||||
|
&ett_transport_options_flags,
|
||||||
&ett_protocol_version_flags,
|
&ett_protocol_version_flags,
|
||||||
&ett_enclosure_item_flags,
|
&ett_enclosure_item_flags,
|
||||||
&ett_token_item_flags,
|
&ett_token_item_flags,
|
||||||
|
|
|
@ -386,53 +386,30 @@ static const true_false_string tfs_os_nts = {
|
||||||
static void
|
static void
|
||||||
dissect_election_criterion_os(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
|
dissect_election_criterion_os(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
|
||||||
{
|
{
|
||||||
proto_tree *tree = NULL;
|
static const int * flags[] = {
|
||||||
proto_item *item = NULL;
|
&hf_election_os_wfw,
|
||||||
guint8 os;
|
&hf_election_os_ntw,
|
||||||
|
&hf_election_os_nts,
|
||||||
os = tvb_get_guint8(tvb, offset);
|
NULL
|
||||||
|
};
|
||||||
if (parent_tree) {
|
|
||||||
item = proto_tree_add_uint(parent_tree, hf_election_os, tvb, offset, 1, os);
|
|
||||||
tree = proto_item_add_subtree(item, ett_browse_election_os);
|
|
||||||
}
|
|
||||||
|
|
||||||
proto_tree_add_boolean(tree, hf_election_os_wfw,
|
|
||||||
tvb, offset, 1, os);
|
|
||||||
proto_tree_add_boolean(tree, hf_election_os_ntw,
|
|
||||||
tvb, offset, 1, os);
|
|
||||||
proto_tree_add_boolean(tree, hf_election_os_nts,
|
|
||||||
tvb, offset, 1, os);
|
|
||||||
|
|
||||||
|
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_election_os, ett_browse_election_os, flags, ENC_NA);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dissect_election_criterion_desire(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
|
dissect_election_criterion_desire(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
|
||||||
{
|
{
|
||||||
proto_tree *tree = NULL;
|
static const int * flags[] = {
|
||||||
proto_item *item = NULL;
|
&hf_election_desire_flags_backup,
|
||||||
guint8 desire;
|
&hf_election_desire_flags_standby,
|
||||||
|
&hf_election_desire_flags_master,
|
||||||
desire = tvb_get_guint8(tvb, offset);
|
&hf_election_desire_flags_domain_master,
|
||||||
|
&hf_election_desire_flags_wins,
|
||||||
if (parent_tree) {
|
&hf_election_desire_flags_nt,
|
||||||
item = proto_tree_add_uint(parent_tree, hf_election_desire, tvb, offset, 1, desire);
|
NULL
|
||||||
tree = proto_item_add_subtree(item, ett_browse_election_desire);
|
};
|
||||||
}
|
|
||||||
|
|
||||||
proto_tree_add_boolean(tree, hf_election_desire_flags_backup,
|
|
||||||
tvb, offset, 1, desire);
|
|
||||||
proto_tree_add_boolean(tree, hf_election_desire_flags_standby,
|
|
||||||
tvb, offset, 1, desire);
|
|
||||||
proto_tree_add_boolean(tree, hf_election_desire_flags_master,
|
|
||||||
tvb, offset, 1, desire);
|
|
||||||
proto_tree_add_boolean(tree, hf_election_desire_flags_domain_master,
|
|
||||||
tvb, offset, 1, desire);
|
|
||||||
proto_tree_add_boolean(tree, hf_election_desire_flags_wins,
|
|
||||||
tvb, offset, 1, desire);
|
|
||||||
proto_tree_add_boolean(tree, hf_election_desire_flags_nt,
|
|
||||||
tvb, offset, 1, desire);
|
|
||||||
|
|
||||||
|
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_election_desire, ett_browse_election_desire, flags, ENC_NA);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -584,7 +561,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
|
||||||
guint32 periodicity;
|
guint32 periodicity;
|
||||||
guint8 *host_name;
|
guint8 *host_name;
|
||||||
gint namelen;
|
gint namelen;
|
||||||
guint8 server_count, reset_cmd;
|
guint8 server_count;
|
||||||
guint8 os_major_ver, os_minor_ver;
|
guint8 os_major_ver, os_minor_ver;
|
||||||
const gchar *windows_version;
|
const gchar *windows_version;
|
||||||
int i;
|
int i;
|
||||||
|
@ -765,21 +742,14 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BROWSE_RESETBROWSERSTATE_ANNOUNCEMENT: {
|
case BROWSE_RESETBROWSERSTATE_ANNOUNCEMENT: {
|
||||||
proto_tree *sub_tree;
|
static const int * flags[] = {
|
||||||
proto_item *reset_item;
|
&hf_mb_reset_demote,
|
||||||
|
&hf_mb_reset_flush,
|
||||||
|
&hf_mb_reset_stop,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
/* the subcommand follows ... one of three values */
|
proto_tree_add_bitmask(tree, tvb, offset, hf_mb_reset_command, ett_browse_reset_cmd_flags, flags, ENC_NA);
|
||||||
|
|
||||||
reset_cmd = tvb_get_guint8(tvb, offset);
|
|
||||||
reset_item = proto_tree_add_uint(tree, hf_mb_reset_command, tvb,
|
|
||||||
offset, 1, reset_cmd);
|
|
||||||
sub_tree = proto_item_add_subtree(reset_item, ett_browse_reset_cmd_flags);
|
|
||||||
proto_tree_add_boolean(sub_tree, hf_mb_reset_demote, tvb,
|
|
||||||
offset, 1, reset_cmd);
|
|
||||||
proto_tree_add_boolean(sub_tree, hf_mb_reset_flush, tvb,
|
|
||||||
offset, 1, reset_cmd);
|
|
||||||
proto_tree_add_boolean(sub_tree, hf_mb_reset_stop, tvb,
|
|
||||||
offset, 1, reset_cmd);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,15 +213,16 @@ dissect_smb_direct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
|
||||||
proto_tree *data_tree = NULL;
|
proto_tree *data_tree = NULL;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
guint32 status = 0;
|
guint32 status = 0;
|
||||||
guint16 flags = 0;
|
|
||||||
proto_tree *flags_tree = NULL;
|
|
||||||
proto_item *flags_item = NULL;
|
|
||||||
guint32 remaining_length = 0;
|
guint32 remaining_length = 0;
|
||||||
guint32 data_offset = 0;
|
guint32 data_offset = 0;
|
||||||
guint32 data_length = 0;
|
guint32 data_length = 0;
|
||||||
guint rlen = tvb_reported_length(tvb);
|
guint rlen = tvb_reported_length(tvb);
|
||||||
gint len = 0;
|
gint len = 0;
|
||||||
tvbuff_t *next_tvb = NULL;
|
tvbuff_t *next_tvb = NULL;
|
||||||
|
static const int * flags[] = {
|
||||||
|
&hf_smb_direct_flags_response_requested,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMBDirect");
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMBDirect");
|
||||||
col_clear(pinfo->cinfo, COL_INFO);
|
col_clear(pinfo->cinfo, COL_INFO);
|
||||||
|
@ -354,12 +355,8 @@ dissect_smb_direct(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
|
||||||
tvb, offset, 2, ENC_LITTLE_ENDIAN);
|
tvb, offset, 2, ENC_LITTLE_ENDIAN);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
|
|
||||||
flags = tvb_get_letohs(tvb, offset);
|
proto_tree_add_bitmask(tree, tvb, offset, hf_smb_direct_flags,
|
||||||
flags_item = proto_tree_add_item(data_tree, hf_smb_direct_flags,
|
ett_smb_direct_flags, flags, ENC_LITTLE_ENDIAN);
|
||||||
tvb, offset, 2, ENC_LITTLE_ENDIAN);
|
|
||||||
flags_tree = proto_item_add_subtree(flags_item, ett_smb_direct_flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_smb_direct_flags_response_requested,
|
|
||||||
tvb, offset, 2, flags);
|
|
||||||
offset += 2;
|
offset += 2;
|
||||||
|
|
||||||
/* 2 bytes reserved */
|
/* 2 bytes reserved */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -426,6 +426,7 @@ static gint ett_smb2_lock_info = -1;
|
||||||
static gint ett_smb2_lock_flags = -1;
|
static gint ett_smb2_lock_flags = -1;
|
||||||
static gint ett_smb2_transform_enc_alg = -1;
|
static gint ett_smb2_transform_enc_alg = -1;
|
||||||
static gint ett_smb2_buffercode = -1;
|
static gint ett_smb2_buffercode = -1;
|
||||||
|
static gint ett_smb2_ioctl_network_interface_capabilities = -1;
|
||||||
|
|
||||||
static expert_field ei_smb2_invalid_length = EI_INIT;
|
static expert_field ei_smb2_invalid_length = EI_INIT;
|
||||||
static expert_field ei_smb2_bad_response = EI_INIT;
|
static expert_field ei_smb2_bad_response = EI_INIT;
|
||||||
|
@ -2264,24 +2265,18 @@ dissect_smb2_buffercode(proto_tree *parent_tree, tvbuff_t *tvb, int offset, guin
|
||||||
static int
|
static int
|
||||||
dissect_smb2_capabilities(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
dissect_smb2_capabilities(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||||
{
|
{
|
||||||
guint32 cap;
|
static const int * flags[] = {
|
||||||
proto_item *item = NULL;
|
&hf_smb2_cap_dfs,
|
||||||
proto_tree *tree = NULL;
|
&hf_smb2_cap_leasing,
|
||||||
|
&hf_smb2_cap_large_mtu,
|
||||||
cap = tvb_get_letohl(tvb, offset);
|
&hf_smb2_cap_multi_channel,
|
||||||
|
&hf_smb2_cap_persistent_handles,
|
||||||
item = proto_tree_add_item(parent_tree, hf_smb2_capabilities, tvb, offset, 4, ENC_LITTLE_ENDIAN);
|
&hf_smb2_cap_directory_leasing,
|
||||||
tree = proto_item_add_subtree(item, ett_smb2_capabilities);
|
&hf_smb2_cap_encryption,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
proto_tree_add_boolean(tree, hf_smb2_cap_dfs, tvb, offset, 4, cap);
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_cap_leasing, tvb, offset, 4, cap);
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_cap_large_mtu, tvb, offset, 4, cap);
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_cap_multi_channel, tvb, offset, 4, cap);
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_cap_persistent_handles, tvb, offset, 4, cap);
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_cap_directory_leasing, tvb, offset, 4, cap);
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_cap_encryption, tvb, offset, 4, cap);
|
|
||||||
|
|
||||||
|
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_smb2_capabilities, ett_smb2_capabilities, flags, ENC_LITTLE_ENDIAN);
|
||||||
offset += 4;
|
offset += 4;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
|
@ -2295,18 +2290,13 @@ dissect_smb2_capabilities(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||||
static int
|
static int
|
||||||
dissect_smb2_secmode(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
dissect_smb2_secmode(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||||
{
|
{
|
||||||
guint8 sm;
|
static const int * flags[] = {
|
||||||
proto_item *item = NULL;
|
&hf_smb2_secmode_flags_sign_enabled,
|
||||||
proto_tree *tree = NULL;
|
&hf_smb2_secmode_flags_sign_required,
|
||||||
|
NULL
|
||||||
sm = tvb_get_guint8(tvb, offset);
|
};
|
||||||
|
|
||||||
item = proto_tree_add_item(parent_tree, hf_smb2_security_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
|
||||||
tree = proto_item_add_subtree(item, ett_smb2_sec_mode);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_secmode_flags_sign_enabled, tvb, offset, 1, sm);
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_secmode_flags_sign_required, tvb, offset, 1, sm);
|
|
||||||
|
|
||||||
|
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_smb2_security_mode, ett_smb2_sec_mode, flags, ENC_LITTLE_ENDIAN);
|
||||||
offset += 1;
|
offset += 1;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
|
@ -2317,17 +2307,12 @@ dissect_smb2_secmode(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||||
static int
|
static int
|
||||||
dissect_smb2_ses_req_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
dissect_smb2_ses_req_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||||
{
|
{
|
||||||
guint8 sf;
|
static const int * flags[] = {
|
||||||
proto_item *item = NULL;
|
&hf_smb2_ses_req_flags_session_binding,
|
||||||
proto_tree *tree = NULL;
|
NULL
|
||||||
|
};
|
||||||
sf = tvb_get_guint8(tvb, offset);
|
|
||||||
|
|
||||||
item = proto_tree_add_item(parent_tree, hf_smb2_ses_req_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
|
||||||
tree = proto_item_add_subtree(item, ett_smb2_ses_req_flags);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_ses_req_flags_session_binding, tvb, offset, 1, sf);
|
|
||||||
|
|
||||||
|
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_smb2_ses_req_flags, ett_smb2_ses_req_flags, flags, ENC_LITTLE_ENDIAN);
|
||||||
offset += 1;
|
offset += 1;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
|
@ -2339,18 +2324,13 @@ dissect_smb2_ses_req_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||||
static int
|
static int
|
||||||
dissect_smb2_ses_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
dissect_smb2_ses_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||||
{
|
{
|
||||||
guint16 sf;
|
static const int * flags[] = {
|
||||||
proto_item *item = NULL;
|
&hf_smb2_ses_flags_guest,
|
||||||
proto_tree *tree = NULL;
|
&hf_smb2_ses_flags_null,
|
||||||
|
NULL
|
||||||
sf = tvb_get_letohs(tvb, offset);
|
};
|
||||||
|
|
||||||
item = proto_tree_add_item(parent_tree, hf_smb2_session_flags, tvb, offset, 2, ENC_LITTLE_ENDIAN);
|
|
||||||
tree = proto_item_add_subtree(item, ett_smb2_ses_flags);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_ses_flags_guest, tvb, offset, 2, sf);
|
|
||||||
proto_tree_add_boolean(tree, hf_smb2_ses_flags_null, tvb, offset, 2, sf);
|
|
||||||
|
|
||||||
|
proto_tree_add_bitmask(parent_tree, tvb, offset, hf_smb2_session_flags, ett_smb2_ses_flags, flags, ENC_LITTLE_ENDIAN);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
|
@ -4408,6 +4388,11 @@ dissect_smb2_NETWORK_INTERFACE_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tre
|
||||||
guint64 link_speed;
|
guint64 link_speed;
|
||||||
gfloat val = 0;
|
gfloat val = 0;
|
||||||
const char *unit = NULL;
|
const char *unit = NULL;
|
||||||
|
static const int * capability_flags[] = {
|
||||||
|
&hf_smb2_ioctl_network_interface_capability_rdma,
|
||||||
|
&hf_smb2_ioctl_network_interface_capability_rss,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
next_offset = tvb_get_letohl(tvb, offset);
|
next_offset = tvb_get_letohl(tvb, offset);
|
||||||
if (next_offset) {
|
if (next_offset) {
|
||||||
|
@ -4427,9 +4412,8 @@ dissect_smb2_NETWORK_INTERFACE_INFO(tvbuff_t *tvb, packet_info *pinfo, proto_tre
|
||||||
|
|
||||||
/* capabilities */
|
/* capabilities */
|
||||||
capabilities = tvb_get_letohl(tvb, offset);
|
capabilities = tvb_get_letohl(tvb, offset);
|
||||||
proto_tree_add_item(sub_tree, hf_smb2_ioctl_network_interface_capabilities, tvb, offset, 4, ENC_LITTLE_ENDIAN);
|
proto_tree_add_bitmask(sub_tree, tvb, offset, hf_smb2_ioctl_network_interface_capabilities, ett_smb2_ioctl_network_interface_capabilities, capability_flags, ENC_LITTLE_ENDIAN);
|
||||||
proto_tree_add_boolean(sub_tree, hf_smb2_ioctl_network_interface_capability_rdma, tvb, offset, 4, capabilities);
|
|
||||||
proto_tree_add_boolean(sub_tree, hf_smb2_ioctl_network_interface_capability_rss, tvb, offset, 4, capabilities);
|
|
||||||
if (capabilities != 0) {
|
if (capabilities != 0) {
|
||||||
proto_item_append_text(item, "%s%s",
|
proto_item_append_text(item, "%s%s",
|
||||||
(capabilities & NETWORK_INTERFACE_CAP_RDMA)?", RDMA":"",
|
(capabilities & NETWORK_INTERFACE_CAP_RDMA)?", RDMA":"",
|
||||||
|
@ -8441,6 +8425,7 @@ proto_register_smb2(void)
|
||||||
&ett_smb2_svhdx_open_device_context,
|
&ett_smb2_svhdx_open_device_context,
|
||||||
&ett_smb2_transform_enc_alg,
|
&ett_smb2_transform_enc_alg,
|
||||||
&ett_smb2_buffercode,
|
&ett_smb2_buffercode,
|
||||||
|
&ett_smb2_ioctl_network_interface_capabilities,
|
||||||
};
|
};
|
||||||
|
|
||||||
static ei_register_info ei[] = {
|
static ei_register_info ei[] = {
|
||||||
|
|
|
@ -2369,33 +2369,25 @@ dissect_gds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
proto_tree *parent_tree)
|
proto_tree *parent_tree)
|
||||||
{
|
{
|
||||||
guint16 length;
|
guint16 length;
|
||||||
guint16 type;
|
|
||||||
int cont;
|
int cont;
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
proto_tree *gds_tree;
|
static const int * flags[] = {
|
||||||
proto_item *gds_item;
|
&hf_sna_gds_len,
|
||||||
|
&hf_sna_gds_cont,
|
||||||
|
&hf_sna_gds_type,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
do {
|
do {
|
||||||
length = tvb_get_ntohs(tvb, offset) & 0x7fff;
|
length = tvb_get_ntohs(tvb, offset) & 0x7fff;
|
||||||
cont = (tvb_get_ntohs(tvb, offset) & 0x8000) ? 1 : 0;
|
cont = (tvb_get_ntohs(tvb, offset) & 0x8000) ? 1 : 0;
|
||||||
type = tvb_get_ntohs(tvb, offset+2);
|
|
||||||
|
|
||||||
if (length < 2 ) /* escape sequence ? */
|
if (length < 2 ) /* escape sequence ? */
|
||||||
return;
|
return;
|
||||||
if (tree) {
|
|
||||||
gds_item = proto_tree_add_item(tree, hf_sna_gds, tvb,
|
|
||||||
offset, length, ENC_NA);
|
|
||||||
gds_tree = proto_item_add_subtree(gds_item,
|
|
||||||
ett_sna_gds);
|
|
||||||
|
|
||||||
proto_tree_add_uint(gds_tree, hf_sna_gds_len, tvb,
|
proto_tree_add_bitmask(tree, tvb, offset, hf_sna_gds, ett_sna_gds, flags, ENC_BIG_ENDIAN);
|
||||||
offset, 2, length);
|
|
||||||
proto_tree_add_boolean(gds_tree, hf_sna_gds_cont, tvb,
|
|
||||||
offset, 2, cont);
|
|
||||||
proto_tree_add_uint(gds_tree, hf_sna_gds_type, tvb,
|
|
||||||
offset+2, 2, type);
|
|
||||||
}
|
|
||||||
offset += length;
|
offset += length;
|
||||||
|
|
||||||
} while(cont);
|
} while(cont);
|
||||||
if (tvb_offset_exists(tvb, offset))
|
if (tvb_offset_exists(tvb, offset))
|
||||||
call_dissector(data_handle,
|
call_dissector(data_handle,
|
||||||
|
|
|
@ -89,7 +89,7 @@ static int hf_spnego_krb5_cfx_rrc = -1;
|
||||||
static int hf_spnego_krb5_cfx_seq = -1;
|
static int hf_spnego_krb5_cfx_seq = -1;
|
||||||
|
|
||||||
|
|
||||||
/*--- Included file: packet-spnego-hf.c ---*/
|
/*--- Included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-hf.c ---*/
|
||||||
#line 1 "../../asn1/spnego/packet-spnego-hf.c"
|
#line 1 "../../asn1/spnego/packet-spnego-hf.c"
|
||||||
static int hf_spnego_negTokenInit = -1; /* T_negTokenInit */
|
static int hf_spnego_negTokenInit = -1; /* T_negTokenInit */
|
||||||
static int hf_spnego_negTokenTarg = -1; /* NegTokenTarg */
|
static int hf_spnego_negTokenTarg = -1; /* NegTokenTarg */
|
||||||
|
@ -116,7 +116,7 @@ static int hf_spnego_ContextFlags_anonFlag = -1;
|
||||||
static int hf_spnego_ContextFlags_confFlag = -1;
|
static int hf_spnego_ContextFlags_confFlag = -1;
|
||||||
static int hf_spnego_ContextFlags_integFlag = -1;
|
static int hf_spnego_ContextFlags_integFlag = -1;
|
||||||
|
|
||||||
/*--- End of included file: packet-spnego-hf.c ---*/
|
/*--- End of included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-hf.c ---*/
|
||||||
#line 84 "../../asn1/spnego/packet-spnego-template.c"
|
#line 84 "../../asn1/spnego/packet-spnego-template.c"
|
||||||
|
|
||||||
/* Global variables */
|
/* Global variables */
|
||||||
|
@ -132,7 +132,7 @@ static gint ett_spnego_krb5 = -1;
|
||||||
static gint ett_spnego_krb5_cfx_flags = -1;
|
static gint ett_spnego_krb5_cfx_flags = -1;
|
||||||
|
|
||||||
|
|
||||||
/*--- Included file: packet-spnego-ett.c ---*/
|
/*--- Included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-ett.c ---*/
|
||||||
#line 1 "../../asn1/spnego/packet-spnego-ett.c"
|
#line 1 "../../asn1/spnego/packet-spnego-ett.c"
|
||||||
static gint ett_spnego_NegotiationToken = -1;
|
static gint ett_spnego_NegotiationToken = -1;
|
||||||
static gint ett_spnego_MechTypeList = -1;
|
static gint ett_spnego_MechTypeList = -1;
|
||||||
|
@ -143,7 +143,7 @@ static gint ett_spnego_ContextFlags = -1;
|
||||||
static gint ett_spnego_NegTokenTarg = -1;
|
static gint ett_spnego_NegTokenTarg = -1;
|
||||||
static gint ett_spnego_InitialContextToken_U = -1;
|
static gint ett_spnego_InitialContextToken_U = -1;
|
||||||
|
|
||||||
/*--- End of included file: packet-spnego-ett.c ---*/
|
/*--- End of included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-ett.c ---*/
|
||||||
#line 98 "../../asn1/spnego/packet-spnego-template.c"
|
#line 98 "../../asn1/spnego/packet-spnego-template.c"
|
||||||
|
|
||||||
static expert_field ei_spnego_decrypted_keytype = EI_INIT;
|
static expert_field ei_spnego_decrypted_keytype = EI_INIT;
|
||||||
|
@ -162,7 +162,7 @@ static int dissect_spnego_NegTokenInit2(gboolean implicit_tag, tvbuff_t *tvb,
|
||||||
proto_tree *tree, int hf_index);
|
proto_tree *tree, int hf_index);
|
||||||
|
|
||||||
|
|
||||||
/*--- Included file: packet-spnego-fn.c ---*/
|
/*--- Included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-fn.c ---*/
|
||||||
#line 1 "../../asn1/spnego/packet-spnego-fn.c"
|
#line 1 "../../asn1/spnego/packet-spnego-fn.c"
|
||||||
|
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ dissect_spnego_InitialContextToken(gboolean implicit_tag _U_, tvbuff_t *tvb _U_,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*--- End of included file: packet-spnego-fn.c ---*/
|
/*--- End of included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-fn.c ---*/
|
||||||
#line 115 "../../asn1/spnego/packet-spnego-template.c"
|
#line 115 "../../asn1/spnego/packet-spnego-template.c"
|
||||||
/*
|
/*
|
||||||
* This is the SPNEGO KRB5 dissector. It is not true KRB5, but some ASN.1
|
* This is the SPNEGO KRB5 dissector. It is not true KRB5, but some ASN.1
|
||||||
|
@ -1397,26 +1397,16 @@ dissect_spnego_krb5_getmic_base(tvbuff_t *tvb, int offset, packet_info *pinfo _U
|
||||||
static int
|
static int
|
||||||
dissect_spnego_krb5_cfx_flags(tvbuff_t *tvb, int offset,
|
dissect_spnego_krb5_cfx_flags(tvbuff_t *tvb, int offset,
|
||||||
proto_tree *spnego_krb5_tree,
|
proto_tree *spnego_krb5_tree,
|
||||||
guint8 cfx_flags)
|
guint8 cfx_flags _U_)
|
||||||
{
|
{
|
||||||
proto_tree *cfx_flags_tree;
|
static const int * flags[] = {
|
||||||
proto_item *tf;
|
&hf_spnego_krb5_cfx_flags_04,
|
||||||
|
&hf_spnego_krb5_cfx_flags_02,
|
||||||
tf = proto_tree_add_uint(spnego_krb5_tree,
|
&hf_spnego_krb5_cfx_flags_01,
|
||||||
hf_spnego_krb5_cfx_flags,
|
NULL
|
||||||
tvb, offset, 1, cfx_flags);
|
};
|
||||||
cfx_flags_tree = proto_item_add_subtree(tf, ett_spnego_krb5_cfx_flags);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(cfx_flags_tree,
|
|
||||||
hf_spnego_krb5_cfx_flags_04,
|
|
||||||
tvb, offset, 1, cfx_flags);
|
|
||||||
proto_tree_add_boolean(cfx_flags_tree,
|
|
||||||
hf_spnego_krb5_cfx_flags_02,
|
|
||||||
tvb, offset, 1, cfx_flags);
|
|
||||||
proto_tree_add_boolean(cfx_flags_tree,
|
|
||||||
hf_spnego_krb5_cfx_flags_01,
|
|
||||||
tvb, offset, 1, cfx_flags);
|
|
||||||
|
|
||||||
|
proto_tree_add_bitmask(spnego_krb5_tree, tvb, offset, hf_spnego_krb5_cfx_flags, ett_spnego_krb5_cfx_flags, flags, ENC_NA);
|
||||||
return (offset + 1);
|
return (offset + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1861,7 +1851,7 @@ void proto_register_spnego(void) {
|
||||||
NULL, 0, "KRB5 Sequence Number", HFILL}},
|
NULL, 0, "KRB5 Sequence Number", HFILL}},
|
||||||
|
|
||||||
|
|
||||||
/*--- Included file: packet-spnego-hfarr.c ---*/
|
/*--- Included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-hfarr.c ---*/
|
||||||
#line 1 "../../asn1/spnego/packet-spnego-hfarr.c"
|
#line 1 "../../asn1/spnego/packet-spnego-hfarr.c"
|
||||||
{ &hf_spnego_negTokenInit,
|
{ &hf_spnego_negTokenInit,
|
||||||
{ "negTokenInit", "spnego.negTokenInit_element",
|
{ "negTokenInit", "spnego.negTokenInit_element",
|
||||||
|
@ -1956,8 +1946,8 @@ void proto_register_spnego(void) {
|
||||||
FT_BOOLEAN, 8, NULL, 0x02,
|
FT_BOOLEAN, 8, NULL, 0x02,
|
||||||
NULL, HFILL }},
|
NULL, HFILL }},
|
||||||
|
|
||||||
/*--- End of included file: packet-spnego-hfarr.c ---*/
|
/*--- End of included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-hfarr.c ---*/
|
||||||
#line 1412 "../../asn1/spnego/packet-spnego-template.c"
|
#line 1402 "../../asn1/spnego/packet-spnego-template.c"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* List of subtrees */
|
/* List of subtrees */
|
||||||
|
@ -1968,7 +1958,7 @@ void proto_register_spnego(void) {
|
||||||
&ett_spnego_krb5_cfx_flags,
|
&ett_spnego_krb5_cfx_flags,
|
||||||
|
|
||||||
|
|
||||||
/*--- Included file: packet-spnego-ettarr.c ---*/
|
/*--- Included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-ettarr.c ---*/
|
||||||
#line 1 "../../asn1/spnego/packet-spnego-ettarr.c"
|
#line 1 "../../asn1/spnego/packet-spnego-ettarr.c"
|
||||||
&ett_spnego_NegotiationToken,
|
&ett_spnego_NegotiationToken,
|
||||||
&ett_spnego_MechTypeList,
|
&ett_spnego_MechTypeList,
|
||||||
|
@ -1979,8 +1969,8 @@ void proto_register_spnego(void) {
|
||||||
&ett_spnego_NegTokenTarg,
|
&ett_spnego_NegTokenTarg,
|
||||||
&ett_spnego_InitialContextToken_U,
|
&ett_spnego_InitialContextToken_U,
|
||||||
|
|
||||||
/*--- End of included file: packet-spnego-ettarr.c ---*/
|
/*--- End of included file: /home/mmann/wireshark/asn1/spnego/packet-spnego-ettarr.c ---*/
|
||||||
#line 1422 "../../asn1/spnego/packet-spnego-template.c"
|
#line 1412 "../../asn1/spnego/packet-spnego-template.c"
|
||||||
};
|
};
|
||||||
|
|
||||||
static ei_register_info ei[] = {
|
static ei_register_info ei[] = {
|
||||||
|
|
|
@ -805,8 +805,8 @@ static int
|
||||||
dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
||||||
{
|
{
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
proto_item *ti, *tf;
|
proto_item *ti;
|
||||||
proto_tree *srvloc_tree, *srvloc_flags;
|
proto_tree *srvloc_tree;
|
||||||
guint8 version;
|
guint8 version;
|
||||||
guint8 function;
|
guint8 function;
|
||||||
guint16 encoding;
|
guint16 encoding;
|
||||||
|
@ -837,23 +837,20 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
||||||
proto_tree_add_uint(srvloc_tree, hf_srvloc_function, tvb, offset + 1, 1,
|
proto_tree_add_uint(srvloc_tree, hf_srvloc_function, tvb, offset + 1, 1,
|
||||||
function);
|
function);
|
||||||
if (version < 2) {
|
if (version < 2) {
|
||||||
|
static const int * v1_flags[] = {
|
||||||
|
&hf_srvloc_flags_v1_overflow,
|
||||||
|
&hf_srvloc_flags_v1_monolingual,
|
||||||
|
&hf_srvloc_flags_v1_url_auth,
|
||||||
|
&hf_srvloc_flags_v1_attribute_auth,
|
||||||
|
&hf_srvloc_flags_v1_fresh,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
length = tvb_get_ntohs(tvb, offset + 2);
|
length = tvb_get_ntohs(tvb, offset + 2);
|
||||||
proto_tree_add_uint(srvloc_tree, hf_srvloc_pktlen, tvb, offset + 2, 2,
|
proto_tree_add_uint(srvloc_tree, hf_srvloc_pktlen, tvb, offset + 2, 2,
|
||||||
length);
|
length);
|
||||||
flags = tvb_get_guint8(tvb, offset + 4);
|
flags = tvb_get_guint8(tvb, offset + 4);
|
||||||
tf = proto_tree_add_uint(srvloc_tree, hf_srvloc_flags_v1, tvb, offset + 4, 1,
|
proto_tree_add_bitmask(srvloc_tree, tvb, offset + 4, hf_srvloc_flags_v1, ett_srvloc_flags, v1_flags, ENC_NA);
|
||||||
flags);
|
|
||||||
srvloc_flags = proto_item_add_subtree(tf, ett_srvloc_flags);
|
|
||||||
proto_tree_add_boolean(srvloc_flags, hf_srvloc_flags_v1_overflow,
|
|
||||||
tvb, offset+4, 1, flags);
|
|
||||||
proto_tree_add_boolean(srvloc_flags, hf_srvloc_flags_v1_monolingual,
|
|
||||||
tvb, offset+4, 1, flags);
|
|
||||||
proto_tree_add_boolean(srvloc_flags, hf_srvloc_flags_v1_url_auth,
|
|
||||||
tvb, offset+4, 1, flags);
|
|
||||||
proto_tree_add_boolean(srvloc_flags, hf_srvloc_flags_v1_attribute_auth,
|
|
||||||
tvb, offset+4, 1, flags);
|
|
||||||
proto_tree_add_boolean(srvloc_flags, hf_srvloc_flags_v1_fresh,
|
|
||||||
tvb, offset+4, 1, flags);
|
|
||||||
proto_tree_add_text(srvloc_tree, tvb, offset + 5, 1, "Dialect: %u",
|
proto_tree_add_text(srvloc_tree, tvb, offset + 5, 1, "Dialect: %u",
|
||||||
tvb_get_guint8(tvb, offset + 5));
|
tvb_get_guint8(tvb, offset + 5));
|
||||||
proto_tree_add_text(srvloc_tree, tvb, offset + 6, 2, "Language: %s",
|
proto_tree_add_text(srvloc_tree, tvb, offset + 6, 2, "Language: %s",
|
||||||
|
@ -1058,19 +1055,16 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { /* Version 2 */
|
else { /* Version 2 */
|
||||||
|
static const int * v2_flags[] = {
|
||||||
|
&hf_srvloc_flags_v2_overflow,
|
||||||
|
&hf_srvloc_flags_v2_fresh,
|
||||||
|
&hf_srvloc_flags_v2_reqmulti,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
length = tvb_get_ntoh24(tvb, offset + 2);
|
length = tvb_get_ntoh24(tvb, offset + 2);
|
||||||
proto_tree_add_uint(srvloc_tree, hf_srvloc_pktlen, tvb, offset + 2, 3,
|
proto_tree_add_uint(srvloc_tree, hf_srvloc_pktlen, tvb, offset + 2, 3, length);
|
||||||
length);
|
proto_tree_add_bitmask(srvloc_tree, tvb, offset + 5, hf_srvloc_flags_v2, ett_srvloc_flags, v2_flags, ENC_BIG_ENDIAN);
|
||||||
flags = tvb_get_ntohs(tvb, offset + 5);
|
|
||||||
tf = proto_tree_add_uint(srvloc_tree, hf_srvloc_flags_v2, tvb, offset + 5, 2,
|
|
||||||
flags);
|
|
||||||
srvloc_flags = proto_item_add_subtree(tf, ett_srvloc_flags);
|
|
||||||
proto_tree_add_boolean(srvloc_flags, hf_srvloc_flags_v2_overflow,
|
|
||||||
tvb, offset+5, 1, flags);
|
|
||||||
proto_tree_add_boolean(srvloc_flags, hf_srvloc_flags_v2_fresh,
|
|
||||||
tvb, offset+5, 1, flags);
|
|
||||||
proto_tree_add_boolean(srvloc_flags, hf_srvloc_flags_v2_reqmulti,
|
|
||||||
tvb, offset+5, 1, flags);
|
|
||||||
|
|
||||||
next_ext_off = tvb_get_ntoh24(tvb, offset + 7);
|
next_ext_off = tvb_get_ntoh24(tvb, offset + 7);
|
||||||
proto_tree_add_uint(srvloc_tree, hf_srvloc_nextextoff, tvb, offset + 7, 3,
|
proto_tree_add_uint(srvloc_tree, hf_srvloc_nextextoff, tvb, offset + 7, 3,
|
||||||
|
|
|
@ -967,10 +967,9 @@ static const value_string auth_krb5_types[] = {
|
||||||
static void
|
static void
|
||||||
dissect_authentication_type_pair(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, proto_tree *tree)
|
dissect_authentication_type_pair(packet_info *pinfo _U_, tvbuff_t *tvb, int offset, proto_tree *tree)
|
||||||
{
|
{
|
||||||
guint8 type, mod;
|
guint8 mod;
|
||||||
|
|
||||||
type=tvb_get_guint8(tvb, offset);
|
proto_tree_add_item(tree, hf_telnet_auth_type, tvb, offset, 1, ENC_NA);
|
||||||
proto_tree_add_uint(tree, hf_telnet_auth_type, tvb, offset, 1, type);
|
|
||||||
|
|
||||||
mod=tvb_get_guint8(tvb, offset+1);
|
mod=tvb_get_guint8(tvb, offset+1);
|
||||||
proto_tree_add_uint(tree, hf_telnet_auth_mod_enc, tvb, offset+1, 1, mod);
|
proto_tree_add_uint(tree, hf_telnet_auth_mod_enc, tvb, offset+1, 1, mod);
|
||||||
|
|
|
@ -383,7 +383,7 @@ capture_tr(const guchar *pd, int offset, int len, packet_counts *ld) {
|
||||||
static void
|
static void
|
||||||
dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
{
|
{
|
||||||
proto_tree *tr_tree, *bf_tree;
|
proto_tree *tr_tree;
|
||||||
proto_item *ti, *hidden_item;
|
proto_item *ti, *hidden_item;
|
||||||
guint8 rcf1, rcf2;
|
guint8 rcf1, rcf2;
|
||||||
tvbuff_t *next_tvb;
|
tvbuff_t *next_tvb;
|
||||||
|
@ -554,26 +554,30 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
|
|
||||||
/* protocol analysis tree */
|
/* protocol analysis tree */
|
||||||
if (tree) {
|
if (tree) {
|
||||||
|
static const int * ac[] = {
|
||||||
|
&hf_tr_priority,
|
||||||
|
&hf_tr_frame,
|
||||||
|
&hf_tr_monitor_cnt,
|
||||||
|
&hf_tr_priority_reservation,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
static const int * fc_flags[] = {
|
||||||
|
&hf_tr_fc_type,
|
||||||
|
&hf_tr_fc_pcf,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
/* Create Token-Ring Tree */
|
/* Create Token-Ring Tree */
|
||||||
ti = proto_tree_add_item(tree, proto_tr, tr_tvb, 0, TR_MIN_HEADER_LEN + actual_rif_bytes, ENC_NA);
|
ti = proto_tree_add_item(tree, proto_tr, tr_tvb, 0, TR_MIN_HEADER_LEN + actual_rif_bytes, ENC_NA);
|
||||||
tr_tree = proto_item_add_subtree(ti, ett_token_ring);
|
tr_tree = proto_item_add_subtree(ti, ett_token_ring);
|
||||||
|
|
||||||
/* Create the Access Control bitfield tree */
|
/* Create the Access Control bitfield tree */
|
||||||
trh->ac = tvb_get_guint8(tr_tvb, 0);
|
trh->ac = tvb_get_guint8(tr_tvb, 0);
|
||||||
ti = proto_tree_add_uint(tr_tree, hf_tr_ac, tr_tvb, 0, 1, trh->ac);
|
proto_tree_add_bitmask(tr_tree, tr_tvb, 0, hf_tr_ac, ett_token_ring_ac, ac, ENC_NA);
|
||||||
bf_tree = proto_item_add_subtree(ti, ett_token_ring_ac);
|
|
||||||
|
|
||||||
proto_tree_add_uint(bf_tree, hf_tr_priority, tr_tvb, 0, 1, trh->ac);
|
|
||||||
proto_tree_add_boolean(bf_tree, hf_tr_frame, tr_tvb, 0, 1, trh->ac);
|
|
||||||
proto_tree_add_uint(bf_tree, hf_tr_monitor_cnt, tr_tvb, 0, 1, trh->ac);
|
|
||||||
proto_tree_add_uint(bf_tree, hf_tr_priority_reservation, tr_tvb, 0, 1, trh->ac);
|
|
||||||
|
|
||||||
/* Create the Frame Control bitfield tree */
|
/* Create the Frame Control bitfield tree */
|
||||||
ti = proto_tree_add_uint(tr_tree, hf_tr_fc, tr_tvb, 1, 1, trh->fc);
|
proto_tree_add_bitmask(tr_tree, tr_tvb, 1, hf_tr_fc, ett_token_ring_fc, fc_flags, ENC_NA);
|
||||||
bf_tree = proto_item_add_subtree(ti, ett_token_ring_fc);
|
|
||||||
|
|
||||||
proto_tree_add_uint(bf_tree, hf_tr_fc_type, tr_tvb, 1, 1, trh->fc);
|
|
||||||
proto_tree_add_uint(bf_tree, hf_tr_fc_pcf, tr_tvb, 1, 1, trh->fc);
|
|
||||||
proto_tree_add_ether(tr_tree, hf_tr_dst, tr_tvb, 2, 6, (const guint8 *)trh->dst.data);
|
proto_tree_add_ether(tr_tree, hf_tr_dst, tr_tvb, 2, 6, (const guint8 *)trh->dst.data);
|
||||||
proto_tree_add_ether(tr_tree, hf_tr_src, tr_tvb, 8, 6, (const guint8 *)trh->src.data);
|
proto_tree_add_ether(tr_tree, hf_tr_src, tr_tvb, 8, 6, (const guint8 *)trh->src.data);
|
||||||
hidden_item = proto_tree_add_ether(tr_tree, hf_tr_addr, tr_tvb, 2, 6, (const guint8 *)trh->dst.data);
|
hidden_item = proto_tree_add_ether(tr_tree, hf_tr_addr, tr_tvb, 2, 6, (const guint8 *)trh->dst.data);
|
||||||
|
|
|
@ -1180,16 +1180,12 @@ dissect_usb_video_format(proto_tree *tree, tvbuff_t *tvb, int offset,
|
||||||
}
|
}
|
||||||
else if (subtype == VS_FORMAT_MJPEG)
|
else if (subtype == VS_FORMAT_MJPEG)
|
||||||
{
|
{
|
||||||
proto_item *flags_item = NULL;
|
static const int * flags[] = {
|
||||||
proto_tree *flags_tree = NULL;
|
&hf_usb_vid_mjpeg_fixed_samples,
|
||||||
guint8 bmFlags;
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
flags_item = proto_tree_add_item(tree, hf_usb_vid_mjpeg_flags, tvb, offset, 1, ENC_NA);
|
proto_tree_add_bitmask(tree, tvb, offset, hf_usb_vid_mjpeg_flags, ett_mjpeg_flags, flags, ENC_NA);
|
||||||
flags_tree = proto_item_add_subtree(flags_item, ett_mjpeg_flags);
|
|
||||||
|
|
||||||
bmFlags = tvb_get_guint8(tvb, offset);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_usb_vid_mjpeg_fixed_samples, tvb, offset, 1, bmFlags);
|
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -379,8 +379,6 @@ dissect_winsrepl_wins_name(tvbuff_t *winsrepl_tvb, packet_info *pinfo,
|
||||||
{
|
{
|
||||||
proto_item *name_item = NULL, *ti;
|
proto_item *name_item = NULL, *ti;
|
||||||
proto_tree *name_tree = NULL;
|
proto_tree *name_tree = NULL;
|
||||||
proto_item *flags_item;
|
|
||||||
proto_tree *flags_tree;
|
|
||||||
int old_offset = winsrepl_offset;
|
int old_offset = winsrepl_offset;
|
||||||
tvbuff_t *name_tvb = NULL;
|
tvbuff_t *name_tvb = NULL;
|
||||||
guint32 name_len;
|
guint32 name_len;
|
||||||
|
@ -388,6 +386,14 @@ dissect_winsrepl_wins_name(tvbuff_t *winsrepl_tvb, packet_info *pinfo,
|
||||||
int name_type;
|
int name_type;
|
||||||
guint32 flags;
|
guint32 flags;
|
||||||
guint32 addr;
|
guint32 addr;
|
||||||
|
static const int * name_flags[] = {
|
||||||
|
&hf_winsrepl_name_flags_rectype,
|
||||||
|
&hf_winsrepl_name_flags_recstate,
|
||||||
|
&hf_winsrepl_name_flags_local,
|
||||||
|
&hf_winsrepl_name_flags_hosttype,
|
||||||
|
&hf_winsrepl_name_flags_static,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
if (sub_tree) {
|
if (sub_tree) {
|
||||||
name_tree = proto_tree_add_subtree_format(sub_tree, winsrepl_tvb, winsrepl_offset, -1,
|
name_tree = proto_tree_add_subtree_format(sub_tree, winsrepl_tvb, winsrepl_offset, -1,
|
||||||
|
@ -434,13 +440,7 @@ dissect_winsrepl_wins_name(tvbuff_t *winsrepl_tvb, packet_info *pinfo,
|
||||||
* anything in the Samba code about them.
|
* anything in the Samba code about them.
|
||||||
*/
|
*/
|
||||||
flags = tvb_get_ntohl(winsrepl_tvb, winsrepl_offset);
|
flags = tvb_get_ntohl(winsrepl_tvb, winsrepl_offset);
|
||||||
flags_item = proto_tree_add_uint(name_tree, hf_winsrepl_name_flags, winsrepl_tvb, winsrepl_offset, 4, flags);
|
proto_tree_add_bitmask(name_tree, winsrepl_tvb, winsrepl_offset, hf_winsrepl_name_flags, ett_winsrepl_flags, name_flags, ENC_BIG_ENDIAN);
|
||||||
flags_tree = proto_item_add_subtree(flags_item, ett_winsrepl_flags);
|
|
||||||
proto_tree_add_uint(flags_tree, hf_winsrepl_name_flags_rectype, winsrepl_tvb, winsrepl_offset, 4, flags);
|
|
||||||
proto_tree_add_uint(flags_tree, hf_winsrepl_name_flags_recstate, winsrepl_tvb, winsrepl_offset, 4, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_winsrepl_name_flags_local, winsrepl_tvb, winsrepl_offset, 4, flags);
|
|
||||||
proto_tree_add_uint(flags_tree, hf_winsrepl_name_flags_hosttype, winsrepl_tvb, winsrepl_offset, 4, flags);
|
|
||||||
proto_tree_add_boolean(flags_tree, hf_winsrepl_name_flags_static, winsrepl_tvb, winsrepl_offset, 4, flags);
|
|
||||||
winsrepl_offset += 4;
|
winsrepl_offset += 4;
|
||||||
|
|
||||||
/* GROUP_FLAG */
|
/* GROUP_FLAG */
|
||||||
|
|
|
@ -4287,6 +4287,12 @@ parameter_value_q (proto_tree *tree, proto_item *ti, tvbuff_t *tvb, int start)
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const int * address_length_flags[] = {
|
||||||
|
&hf_address_flags_length_bearer_type_included,
|
||||||
|
&hf_address_flags_length_port_number_included,
|
||||||
|
&hf_address_flags_length_address_len,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
/* Code to actually dissect the packets */
|
/* Code to actually dissect the packets */
|
||||||
|
|
||||||
|
@ -4302,15 +4308,12 @@ static void
|
||||||
dissect_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
dissect_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
proto_tree *tree, dissector_handle_t dissector_handle)
|
proto_tree *tree, dissector_handle_t dissector_handle)
|
||||||
{
|
{
|
||||||
guint8 flags;
|
|
||||||
proto_item *ti;
|
proto_item *ti;
|
||||||
proto_tree *addresses_tree = NULL;
|
proto_tree *addresses_tree = NULL;
|
||||||
proto_tree *addr_tree = NULL;
|
proto_tree *addr_tree = NULL;
|
||||||
proto_tree *flags_tree;
|
|
||||||
guint8 bearer_type;
|
guint8 bearer_type;
|
||||||
guint8 address_flags_len;
|
guint8 address_flags_len;
|
||||||
int address_len;
|
int address_len;
|
||||||
proto_tree *address_flags_tree;
|
|
||||||
guint16 port_num;
|
guint16 port_num;
|
||||||
guint32 address_ipv4;
|
guint32 address_ipv4;
|
||||||
struct e_in6_addr address_ipv6;
|
struct e_in6_addr address_ipv6;
|
||||||
|
@ -4318,20 +4321,17 @@ dissect_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
conversation_t *conv;
|
conversation_t *conv;
|
||||||
guint32 idx = 0; /* Address index */
|
guint32 idx = 0; /* Address index */
|
||||||
guint32 address_record_len; /* Length of the entire address record */
|
guint32 address_record_len; /* Length of the entire address record */
|
||||||
|
static const int * flags[] = {
|
||||||
|
&hf_wsp_redirect_permanent,
|
||||||
|
&hf_wsp_redirect_reuse_security_session,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Redirect flags.
|
* Redirect flags.
|
||||||
*/
|
*/
|
||||||
flags = tvb_get_guint8 (tvb, offset);
|
proto_tree_add_bitmask(tree, tvb, offset, hf_wsp_redirect_flags, ett_redirect_flags, flags, ENC_NA);
|
||||||
if (tree) {
|
|
||||||
ti = proto_tree_add_uint (tree, hf_wsp_redirect_flags,
|
|
||||||
tvb, offset, 1, flags);
|
|
||||||
flags_tree = proto_item_add_subtree (ti, ett_redirect_flags);
|
|
||||||
proto_tree_add_boolean (flags_tree, hf_wsp_redirect_permanent,
|
|
||||||
tvb, offset, 1, flags);
|
|
||||||
proto_tree_add_boolean (flags_tree, hf_wsp_redirect_reuse_security_session,
|
|
||||||
tvb, offset, 1, flags);
|
|
||||||
}
|
|
||||||
offset++;
|
offset++;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4355,38 +4355,24 @@ dissect_redirect(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||||
+ (address_flags_len & PORT_NUMBER_INCLUDED ? 2 : 0)
|
+ (address_flags_len & PORT_NUMBER_INCLUDED ? 2 : 0)
|
||||||
;
|
;
|
||||||
|
|
||||||
if (tree) {
|
ti = proto_tree_add_uint(addresses_tree, hf_address_entry,
|
||||||
ti = proto_tree_add_uint(addresses_tree, hf_address_entry,
|
tvb, offset, 1 + address_record_len, idx);
|
||||||
tvb, offset, 1 + address_record_len, idx);
|
addr_tree = proto_item_add_subtree(ti, ett_address);
|
||||||
addr_tree = proto_item_add_subtree(ti, ett_address);
|
|
||||||
|
|
||||||
ti = proto_tree_add_uint (addr_tree, hf_address_flags_length,
|
proto_tree_add_bitmask(addr_tree, tvb, offset, hf_address_flags_length, ett_address_flags, address_length_flags, ENC_NA);
|
||||||
tvb, offset, 1, address_flags_len);
|
|
||||||
address_flags_tree = proto_item_add_subtree (ti, ett_address_flags);
|
|
||||||
proto_tree_add_boolean (address_flags_tree, hf_address_flags_length_bearer_type_included,
|
|
||||||
tvb, offset, 1, address_flags_len);
|
|
||||||
proto_tree_add_boolean (address_flags_tree, hf_address_flags_length_port_number_included,
|
|
||||||
tvb, offset, 1, address_flags_len);
|
|
||||||
proto_tree_add_uint (address_flags_tree, hf_address_flags_length_address_len,
|
|
||||||
tvb, offset, 1, address_flags_len);
|
|
||||||
}
|
|
||||||
offset++;
|
offset++;
|
||||||
if (address_flags_len & BEARER_TYPE_INCLUDED) {
|
if (address_flags_len & BEARER_TYPE_INCLUDED) {
|
||||||
bearer_type = tvb_get_guint8 (tvb, offset);
|
bearer_type = tvb_get_guint8 (tvb, offset);
|
||||||
if (tree) {
|
proto_tree_add_uint (addr_tree, hf_address_bearer_type,
|
||||||
proto_tree_add_uint (addr_tree, hf_address_bearer_type,
|
|
||||||
tvb, offset, 1, bearer_type);
|
tvb, offset, 1, bearer_type);
|
||||||
}
|
|
||||||
offset++;
|
offset++;
|
||||||
} else {
|
} else {
|
||||||
bearer_type = 0x00; /* XXX */
|
bearer_type = 0x00; /* XXX */
|
||||||
}
|
}
|
||||||
if (address_flags_len & PORT_NUMBER_INCLUDED) {
|
if (address_flags_len & PORT_NUMBER_INCLUDED) {
|
||||||
port_num = tvb_get_ntohs (tvb, offset);
|
port_num = tvb_get_ntohs (tvb, offset);
|
||||||
if (tree) {
|
proto_tree_add_uint (addr_tree, hf_address_port_num,
|
||||||
proto_tree_add_uint (addr_tree, hf_address_port_num,
|
|
||||||
tvb, offset, 2, port_num);
|
tvb, offset, 2, port_num);
|
||||||
}
|
|
||||||
offset += 2;
|
offset += 2;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
|
@ -4523,7 +4509,6 @@ add_addresses(proto_tree *tree, tvbuff_t *tvb, int hf)
|
||||||
guint8 bearer_type;
|
guint8 bearer_type;
|
||||||
guint8 address_flags_len;
|
guint8 address_flags_len;
|
||||||
int address_len;
|
int address_len;
|
||||||
proto_tree *address_flags_tree;
|
|
||||||
guint32 tvb_len = tvb_length(tvb);
|
guint32 tvb_len = tvb_length(tvb);
|
||||||
guint32 offset = 0;
|
guint32 offset = 0;
|
||||||
guint32 idx = 0; /* Address index */
|
guint32 idx = 0; /* Address index */
|
||||||
|
@ -4558,15 +4543,7 @@ add_addresses(proto_tree *tree, tvbuff_t *tvb, int hf)
|
||||||
tvb, offset, 1 + address_record_len, idx);
|
tvb, offset, 1 + address_record_len, idx);
|
||||||
addr_tree = proto_item_add_subtree(ti, ett_address);
|
addr_tree = proto_item_add_subtree(ti, ett_address);
|
||||||
|
|
||||||
ti = proto_tree_add_uint (addr_tree, hf_address_flags_length,
|
proto_tree_add_bitmask(addr_tree, tvb, offset, hf_address_flags_length, ett_address_flags, address_length_flags, ENC_NA);
|
||||||
tvb, offset, 1, address_flags_len);
|
|
||||||
address_flags_tree = proto_item_add_subtree (ti, ett_address_flags);
|
|
||||||
proto_tree_add_boolean (address_flags_tree, hf_address_flags_length_bearer_type_included,
|
|
||||||
tvb, offset, 1, address_flags_len);
|
|
||||||
proto_tree_add_boolean (address_flags_tree, hf_address_flags_length_port_number_included,
|
|
||||||
tvb, offset, 1, address_flags_len);
|
|
||||||
proto_tree_add_uint (address_flags_tree, hf_address_flags_length_address_len,
|
|
||||||
tvb, offset, 1, address_flags_len);
|
|
||||||
offset++;
|
offset++;
|
||||||
if (address_flags_len & BEARER_TYPE_INCLUDED) {
|
if (address_flags_len & BEARER_TYPE_INCLUDED) {
|
||||||
bearer_type = tvb_get_guint8 (tvb, offset);
|
bearer_type = tvb_get_guint8 (tvb, offset);
|
||||||
|
|
|
@ -159,11 +159,8 @@ dissect_domain_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tr
|
||||||
{
|
{
|
||||||
proto_item_append_text(tree, " DOMAIN reply");
|
proto_item_append_text(tree, " DOMAIN reply");
|
||||||
|
|
||||||
if ( tree )
|
proto_tree_add_item(tree, hf_ypserv_servesdomain, tvb,
|
||||||
{
|
offset, 4, ENC_BIG_ENDIAN);
|
||||||
proto_tree_add_boolean(tree, hf_ypserv_servesdomain, tvb,
|
|
||||||
offset, 4, tvb_get_ntohl(tvb,offset));
|
|
||||||
}
|
|
||||||
|
|
||||||
offset += 4;
|
offset += 4;
|
||||||
return offset;
|
return offset;
|
||||||
|
@ -174,11 +171,8 @@ dissect_domain_nonack_reply(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, p
|
||||||
{
|
{
|
||||||
proto_item_append_text(tree, " DOMAIN_NONACK reply");
|
proto_item_append_text(tree, " DOMAIN_NONACK reply");
|
||||||
|
|
||||||
if ( tree )
|
proto_tree_add_item(tree, hf_ypserv_servesdomain, tvb,
|
||||||
{
|
offset, 4, ENC_BIG_ENDIAN);
|
||||||
proto_tree_add_boolean(tree, hf_ypserv_servesdomain, tvb,
|
|
||||||
offset, 4, tvb_get_ntohl(tvb,offset));
|
|
||||||
}
|
|
||||||
|
|
||||||
offset += 4;
|
offset += 4;
|
||||||
return offset;
|
return offset;
|
||||||
|
|
|
@ -117,6 +117,7 @@ static int hf_zbee_nwk_cmd_leave_rejoin = -1;
|
||||||
static int hf_zbee_nwk_cmd_leave_request = -1;
|
static int hf_zbee_nwk_cmd_leave_request = -1;
|
||||||
static int hf_zbee_nwk_cmd_leave_children = -1;
|
static int hf_zbee_nwk_cmd_leave_children = -1;
|
||||||
static int hf_zbee_nwk_cmd_relay_count = -1;
|
static int hf_zbee_nwk_cmd_relay_count = -1;
|
||||||
|
static int hf_zbee_nwk_cmd_cinfo = -1;
|
||||||
static int hf_zbee_nwk_cmd_cinfo_alt_coord = -1;
|
static int hf_zbee_nwk_cmd_cinfo_alt_coord = -1;
|
||||||
static int hf_zbee_nwk_cmd_cinfo_type = -1;
|
static int hf_zbee_nwk_cmd_cinfo_type = -1;
|
||||||
static int hf_zbee_nwk_cmd_cinfo_power = -1;
|
static int hf_zbee_nwk_cmd_cinfo_power = -1;
|
||||||
|
@ -1140,32 +1141,17 @@ dissect_zbee_nwk_route_rec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
static guint
|
static guint
|
||||||
dissect_zbee_nwk_rejoin_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset)
|
dissect_zbee_nwk_rejoin_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, zbee_nwk_packet * packet, guint offset)
|
||||||
{
|
{
|
||||||
proto_tree *field_tree;
|
static const int * capabilities[] = {
|
||||||
proto_item *ti;
|
&hf_zbee_nwk_cmd_cinfo_alt_coord,
|
||||||
|
&hf_zbee_nwk_cmd_cinfo_type,
|
||||||
|
&hf_zbee_nwk_cmd_cinfo_power,
|
||||||
|
&hf_zbee_nwk_cmd_cinfo_idle_rx,
|
||||||
|
&hf_zbee_nwk_cmd_cinfo_security,
|
||||||
|
&hf_zbee_nwk_cmd_cinfo_alloc,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
guint8 capabilities;
|
proto_tree_add_bitmask(tree, tvb, offset, hf_zbee_nwk_cmd_cinfo, ett_zbee_nwk_cmd_cinfo, capabilities, ENC_NA);
|
||||||
|
|
||||||
/* Get and dispaly the capabilities information. */
|
|
||||||
capabilities = tvb_get_guint8(tvb, offset);
|
|
||||||
if (tree) {
|
|
||||||
/* Create a subtree for the capability information. */
|
|
||||||
ti = proto_tree_add_text(tree, tvb, offset, 1, "Capability Information");
|
|
||||||
field_tree = proto_item_add_subtree(ti, ett_zbee_nwk_cmd_cinfo);
|
|
||||||
|
|
||||||
/* Add the capability info flags. */
|
|
||||||
proto_tree_add_boolean(field_tree, hf_zbee_nwk_cmd_cinfo_alt_coord, tvb, offset, 1,
|
|
||||||
capabilities & ZBEE_CINFO_ALT_COORD);
|
|
||||||
proto_tree_add_boolean(field_tree, hf_zbee_nwk_cmd_cinfo_type, tvb, offset, 1,
|
|
||||||
capabilities & ZBEE_CINFO_FFD);
|
|
||||||
proto_tree_add_boolean(field_tree, hf_zbee_nwk_cmd_cinfo_power, tvb, offset, 1,
|
|
||||||
capabilities & ZBEE_CINFO_POWER);
|
|
||||||
proto_tree_add_boolean(field_tree, hf_zbee_nwk_cmd_cinfo_idle_rx, tvb, offset, 1,
|
|
||||||
capabilities & ZBEE_CINFO_IDLE_RX);
|
|
||||||
proto_tree_add_boolean(field_tree, hf_zbee_nwk_cmd_cinfo_security, tvb, offset, 1,
|
|
||||||
capabilities & ZBEE_CINFO_SECURITY);
|
|
||||||
proto_tree_add_boolean(field_tree, hf_zbee_nwk_cmd_cinfo_alloc, tvb, offset, 1,
|
|
||||||
capabilities & ZBEE_CINFO_ALLOC);
|
|
||||||
}
|
|
||||||
offset += 1;
|
offset += 1;
|
||||||
|
|
||||||
/* Update the info column.*/
|
/* Update the info column.*/
|
||||||
|
@ -1830,6 +1816,10 @@ void proto_register_zbee_nwk(void)
|
||||||
{ "Relay Count", "zbee_nwk.cmd.relay_count", FT_UINT8, BASE_DEC, NULL, 0x0,
|
{ "Relay Count", "zbee_nwk.cmd.relay_count", FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||||
"Number of relays required to route to the destination.", HFILL }},
|
"Number of relays required to route to the destination.", HFILL }},
|
||||||
|
|
||||||
|
{ &hf_zbee_nwk_cmd_cinfo,
|
||||||
|
{ "Capability Information", "zbee_nwk.cmd.cinfo", FT_UINT8, BASE_HEX, NULL,
|
||||||
|
0x0, NULL, HFILL }},
|
||||||
|
|
||||||
{ &hf_zbee_nwk_cmd_cinfo_alt_coord,
|
{ &hf_zbee_nwk_cmd_cinfo_alt_coord,
|
||||||
{ "Alternate Coordinator", "zbee_nwk.cmd.cinfo.alt_coord", FT_BOOLEAN, 8, NULL,
|
{ "Alternate Coordinator", "zbee_nwk.cmd.cinfo.alt_coord", FT_BOOLEAN, 8, NULL,
|
||||||
IEEE802154_CMD_CINFO_ALT_PAN_COORD,
|
IEEE802154_CMD_CINFO_ALT_PAN_COORD,
|
||||||
|
|
|
@ -1102,6 +1102,13 @@ static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
offset += 1;
|
offset += 1;
|
||||||
break;
|
break;
|
||||||
case ZBEE_ZCL_CSC_THERMOSTAT_C_SWS:
|
case ZBEE_ZCL_CSC_THERMOSTAT_C_SWS:
|
||||||
|
{
|
||||||
|
static const int * modes[] = {
|
||||||
|
&hf_zbee_zcl_thermostat_client_sws_mfs_heat,
|
||||||
|
&hf_zbee_zcl_thermostat_client_sws_mfs_cool,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
/* Set Weekly Schedule. */
|
/* Set Weekly Schedule. */
|
||||||
number_of_transitions = tvb_get_guint8(tvb, offset);
|
number_of_transitions = tvb_get_guint8(tvb, offset);
|
||||||
proto_tree_add_uint(zcl_tree, hf_zbee_zcl_thermostat_client_sws_n_trans, tvb, offset, 1,
|
proto_tree_add_uint(zcl_tree, hf_zbee_zcl_thermostat_client_sws_n_trans, tvb, offset, 1,
|
||||||
|
@ -1119,13 +1126,7 @@ static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
}
|
}
|
||||||
offset += 1;
|
offset += 1;
|
||||||
mode_for_sequence = tvb_get_guint8(tvb, offset);
|
mode_for_sequence = tvb_get_guint8(tvb, offset);
|
||||||
ti = proto_tree_add_uint_format(zcl_tree, hf_zbee_zcl_thermostat_client_sws_mfs, tvb,
|
proto_tree_add_bitmask(zcl_tree, tvb, offset, hf_zbee_zcl_thermostat_client_sws_mfs, ett_zbee_zcl_thermostat_client_sws_mfs, modes, ENC_NA);
|
||||||
offset, 1, mode_for_sequence, "Mode for Sequence");
|
|
||||||
sub_tree = proto_item_add_subtree(ti, ett_zbee_zcl_thermostat_client_sws_mfs);
|
|
||||||
proto_tree_add_boolean(sub_tree, hf_zbee_zcl_thermostat_client_sws_mfs_heat, tvb,
|
|
||||||
offset, 1, mode_for_sequence);
|
|
||||||
proto_tree_add_boolean(sub_tree, hf_zbee_zcl_thermostat_client_sws_mfs_cool, tvb,
|
|
||||||
offset, 1, mode_for_sequence);
|
|
||||||
offset += 1;
|
offset += 1;
|
||||||
for (i = 1; i <= number_of_transitions; ++i) {
|
for (i = 1; i <= number_of_transitions; ++i) {
|
||||||
switch (mode_for_sequence) {
|
switch (mode_for_sequence) {
|
||||||
|
@ -1168,6 +1169,7 @@ static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1181,6 +1183,13 @@ static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
offset += 1;
|
offset += 1;
|
||||||
switch (packet.cmd_id) {
|
switch (packet.cmd_id) {
|
||||||
case ZBEE_ZCL_CSC_THERMOSTAT_S_GWSR:
|
case ZBEE_ZCL_CSC_THERMOSTAT_S_GWSR:
|
||||||
|
{
|
||||||
|
static const int * modes[] = {
|
||||||
|
&hf_zbee_zcl_thermostat_server_gwsr_mfs_heat,
|
||||||
|
&hf_zbee_zcl_thermostat_server_gwsr_mfs_cool,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
/* Get Weekly Schedule Response. */
|
/* Get Weekly Schedule Response. */
|
||||||
number_of_transitions = tvb_get_guint8(tvb, offset);
|
number_of_transitions = tvb_get_guint8(tvb, offset);
|
||||||
proto_tree_add_uint(zcl_tree, hf_zbee_zcl_thermostat_server_gwsr_n_trans, tvb, offset,
|
proto_tree_add_uint(zcl_tree, hf_zbee_zcl_thermostat_server_gwsr_n_trans, tvb, offset,
|
||||||
|
@ -1198,13 +1207,7 @@ static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
}
|
}
|
||||||
offset += 1;
|
offset += 1;
|
||||||
mode_for_sequence = tvb_get_guint8(tvb, offset);
|
mode_for_sequence = tvb_get_guint8(tvb, offset);
|
||||||
ti = proto_tree_add_uint_format(zcl_tree, hf_zbee_zcl_thermostat_server_gwsr_mfs, tvb,
|
proto_tree_add_bitmask(zcl_tree, tvb, offset, hf_zbee_zcl_thermostat_server_gwsr_mfs, ett_zbee_zcl_thermostat_server_gwsr_mfs, modes, ENC_NA);
|
||||||
offset, 1, mode_for_sequence, "Mode for Sequence");
|
|
||||||
sub_tree = proto_item_add_subtree(ti, ett_zbee_zcl_thermostat_server_gwsr_mfs);
|
|
||||||
proto_tree_add_boolean(sub_tree, hf_zbee_zcl_thermostat_server_gwsr_mfs_heat, tvb,
|
|
||||||
offset, 1, mode_for_sequence);
|
|
||||||
proto_tree_add_boolean(sub_tree, hf_zbee_zcl_thermostat_server_gwsr_mfs_cool, tvb,
|
|
||||||
offset, 1, mode_for_sequence);
|
|
||||||
offset += 1;
|
offset += 1;
|
||||||
for (i = 1; i <= number_of_transitions; ++i) {
|
for (i = 1; i <= number_of_transitions; ++i) {
|
||||||
switch (mode_for_sequence) {
|
switch (mode_for_sequence) {
|
||||||
|
@ -1247,6 +1250,7 @@ static int dissect_zbee_zcl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,23 +256,17 @@ zebra_route_ifindex(proto_tree *tree, tvbuff_t *tvb, int offset, guint16 len)
|
||||||
}
|
}
|
||||||
|
|
||||||
static guint8
|
static guint8
|
||||||
zebra_route_message(proto_tree *tree, tvbuff_t *tvb, int offset, guint8 message)
|
zebra_route_message(proto_tree *tree, tvbuff_t *tvb, int offset)
|
||||||
{
|
{
|
||||||
proto_item *ti;
|
static const int * flags[] = {
|
||||||
proto_tree *msg_tree;
|
&hf_zebra_msg_nexthop,
|
||||||
|
&hf_zebra_msg_index,
|
||||||
|
&hf_zebra_msg_distance,
|
||||||
|
&hf_zebra_msg_metric,
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
ti = proto_tree_add_uint(tree, hf_zebra_message, tvb,
|
proto_tree_add_bitmask(tree, tvb, offset, hf_zebra_message, ett_message, flags, ENC_NA);
|
||||||
offset, 1, message);
|
|
||||||
msg_tree = proto_item_add_subtree(ti, ett_message);
|
|
||||||
|
|
||||||
proto_tree_add_boolean(msg_tree, hf_zebra_msg_nexthop,
|
|
||||||
tvb, offset, 1, message);
|
|
||||||
proto_tree_add_boolean(msg_tree, hf_zebra_msg_index,
|
|
||||||
tvb, offset, 1, message);
|
|
||||||
proto_tree_add_boolean(msg_tree, hf_zebra_msg_distance,
|
|
||||||
tvb, offset, 1, message);
|
|
||||||
proto_tree_add_boolean(msg_tree, hf_zebra_msg_metric,
|
|
||||||
tvb, offset, 1, message);
|
|
||||||
offset += 1;
|
offset += 1;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
|
@ -294,7 +288,7 @@ zebra_route(proto_tree *tree, tvbuff_t *tvb, int offset, guint16 len,
|
||||||
offset += 1;
|
offset += 1;
|
||||||
|
|
||||||
message = tvb_get_guint8(tvb, offset);
|
message = tvb_get_guint8(tvb, offset);
|
||||||
offset = zebra_route_message(tree, tvb, offset, message);
|
offset = zebra_route_message(tree, tvb, offset);
|
||||||
|
|
||||||
prefixlen = tvb_get_guint8(tvb, offset);
|
prefixlen = tvb_get_guint8(tvb, offset);
|
||||||
proto_tree_add_uint(tree, hf_zebra_prefixlen, tvb,
|
proto_tree_add_uint(tree, hf_zebra_prefixlen, tvb,
|
||||||
|
|
Loading…
Reference in New Issue