forked from osmocom/wireshark
Convert proto_tree_add_boolean to proto_tree_add_bitmask_[value|value_with_flags|list]
Part 1 of a few Change-Id: I413f23dfa92da5488ca8a7f62ca0738b25004635 Reviewed-on: https://code.wireshark.org/review/8117 Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
8f9aa33b29
commit
aeb9827e4a
|
@ -3244,6 +3244,15 @@ decode_link_state_attribute_tlv(proto_tree *tree, tvbuff_t *tvb, gint offset, pa
|
|||
break;
|
||||
|
||||
case BGP_NLRI_TLV_NODE_FLAG_BITS:
|
||||
{
|
||||
static const int * flags[] = {
|
||||
&hf_bgp_ls_node_flag_bits_overload,
|
||||
&hf_bgp_ls_node_flag_bits_attached,
|
||||
&hf_bgp_ls_node_flag_bits_external,
|
||||
&hf_bgp_ls_node_flag_bits_abr,
|
||||
NULL
|
||||
};
|
||||
|
||||
tlv_item = proto_tree_add_item(tree, hf_bgp_ls_tlv_node_flags_bits, tvb, offset, length+4, ENC_NA);
|
||||
tlv_tree = proto_item_add_subtree(tlv_item, ett_bgp_link_state);
|
||||
if(length != BGP_NLRI_TLV_LEN_NODE_FLAG_BITS){
|
||||
|
@ -3253,15 +3262,12 @@ decode_link_state_attribute_tlv(proto_tree *tree, tvbuff_t *tvb, gint offset, pa
|
|||
}
|
||||
proto_tree_add_item(tlv_tree, hf_bgp_ls_type, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tlv_tree, hf_bgp_ls_length, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
|
||||
tmp8 = tvb_get_guint8(tvb, offset);
|
||||
proto_tree_add_boolean(tlv_tree, hf_bgp_ls_node_flag_bits_overload, tvb, offset, 1, tmp8);
|
||||
proto_tree_add_boolean(tlv_tree, hf_bgp_ls_node_flag_bits_attached, tvb, offset, 1, tmp8);
|
||||
proto_tree_add_boolean(tlv_tree, hf_bgp_ls_node_flag_bits_external, tvb, offset, 1, tmp8);
|
||||
proto_tree_add_boolean(tlv_tree, hf_bgp_ls_node_flag_bits_abr, tvb, offset, 1, tmp8);
|
||||
tmp8 &= 0x0f;
|
||||
proto_tree_add_bitmask_list(tlv_tree, tvb, offset+4, 1, flags, ENC_NA);
|
||||
tmp8 = tvb_get_guint8(tvb, offset+4) & 0x0f;
|
||||
if(tmp8){
|
||||
expert_add_info_format(pinfo, tlv_tree, &ei_bgp_ls_error, "Reserved flag bits are not set to zero (%u).", tmp8);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case BGP_NLRI_TLV_OPAQUE_NODE_PROPERTIES:
|
||||
|
@ -3454,6 +3460,13 @@ decode_link_state_attribute_tlv(proto_tree *tree, tvbuff_t *tvb, gint offset, pa
|
|||
}
|
||||
break;
|
||||
case BGP_NLRI_TLV_MPLS_PROTOCOL_MASK:
|
||||
{
|
||||
static const int * flags[] = {
|
||||
&hf_bgp_ls_mpls_protocol_mask_flag_l,
|
||||
&hf_bgp_ls_mpls_protocol_mask_flag_r,
|
||||
NULL
|
||||
};
|
||||
|
||||
tlv_item = proto_tree_add_item(tree, hf_bgp_ls_tlv_mpls_protocol_mask, tvb, offset, length+4, ENC_NA);
|
||||
tlv_tree = proto_item_add_subtree(tlv_item, ett_bgp_link_state);
|
||||
if(length != BGP_NLRI_TLV_LEN_MPLS_PROTOCOL_MASK){
|
||||
|
@ -3463,14 +3476,13 @@ decode_link_state_attribute_tlv(proto_tree *tree, tvbuff_t *tvb, gint offset, pa
|
|||
}
|
||||
proto_tree_add_item(tlv_tree, hf_bgp_ls_type, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tlv_tree, hf_bgp_ls_length, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
|
||||
tmp8 = tvb_get_guint8(tvb, offset + 4);
|
||||
proto_tree_add_boolean(tlv_tree, hf_bgp_ls_mpls_protocol_mask_flag_l, tvb, offset + 4, 1, tmp8);
|
||||
proto_tree_add_boolean(tlv_tree, hf_bgp_ls_mpls_protocol_mask_flag_r, tvb, offset + 4, 1, tmp8);
|
||||
tmp8 &= 0x3f;
|
||||
proto_tree_add_bitmask_list(tlv_tree, tvb, offset+4, 1, flags, ENC_NA);
|
||||
tmp8 = tvb_get_guint8(tvb, offset + 4) & 0x3f;
|
||||
if(tmp8){
|
||||
proto_tree_add_expert_format(tlv_tree, pinfo, &ei_bgp_ls_error, tvb, offset + 4, 1,
|
||||
"Reserved flags are not set to zero (%u).", tmp8);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BGP_NLRI_TLV_METRIC:
|
||||
tlv_item = proto_tree_add_item(tree, hf_bgp_ls_tlv_metric, tvb, offset, length+4, ENC_NA);
|
||||
|
@ -3527,9 +3539,8 @@ decode_link_state_attribute_tlv(proto_tree *tree, tvbuff_t *tvb, gint offset, pa
|
|||
}
|
||||
proto_tree_add_item(tlv_tree, hf_bgp_ls_type, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(tlv_tree, hf_bgp_ls_length, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
|
||||
tmp8 = tvb_get_guint8(tvb, offset + 4);
|
||||
proto_tree_add_boolean(tlv_tree, hf_bgp_ls_igp_flags_flag_d, tvb, offset + 4, 1, tmp8);
|
||||
tmp8 &= 0x7F;
|
||||
proto_tree_add_item(tlv_tree, hf_bgp_ls_igp_flags_flag_d, tvb, offset + 4, 1, ENC_NA);
|
||||
tmp8 = tvb_get_guint8(tvb, offset + 4) & 0x7F;
|
||||
if(tmp8){
|
||||
expert_add_info_format(pinfo, tlv_tree, &ei_bgp_ls_error, "Reserved flags are not set to zero (%u).", tmp8);
|
||||
}
|
||||
|
|
|
@ -232,13 +232,6 @@ static const value_string role_vals[] = {
|
|||
static const char initial_sep[] = " (";
|
||||
static const char cont_sep[] = ", ";
|
||||
|
||||
#define APPEND_BOOLEAN_FLAG(flag, item, string) \
|
||||
if(flag){ \
|
||||
if(item) \
|
||||
proto_item_append_text(item, string, sep); \
|
||||
sep = cont_sep; \
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_bpdu_pvst);
|
||||
|
||||
|
@ -355,14 +348,29 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_bp
|
|||
proto_tree *mstp_tree, *msti_tree, *spt_tree = NULL, *aux_mcid_tree = NULL, *agreement_tree = NULL;
|
||||
proto_item *bpdu_item;
|
||||
proto_item *agreement_item;
|
||||
proto_tree *flags_tree;
|
||||
proto_item *flags_item;
|
||||
proto_tree *root_id_tree;
|
||||
proto_tree *bridge_id_tree;
|
||||
proto_tree *cist_bridge_id_tree;
|
||||
proto_item *hidden_item;
|
||||
const char *sep;
|
||||
|
||||
static const int * bpdu_flags[] = {
|
||||
&hf_bpdu_flags_tcack,
|
||||
&hf_bpdu_flags_tc,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const int * rst_flags[] = {
|
||||
&hf_bpdu_flags_tcack,
|
||||
&hf_bpdu_flags_agreement,
|
||||
&hf_bpdu_flags_forwarding,
|
||||
&hf_bpdu_flags_learning,
|
||||
&hf_bpdu_flags_port_role,
|
||||
&hf_bpdu_flags_proposal,
|
||||
&hf_bpdu_flags_tc,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* GARP application frames require special interpretation of the
|
||||
destination address field; otherwise, they will be mistaken as
|
||||
BPDU frames.
|
||||
|
@ -539,50 +547,10 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_bp
|
|||
}
|
||||
bridge_identifier_mac_str = tvb_ether_to_str(tvb, BPDU_BRIDGE_IDENTIFIER + 2);
|
||||
|
||||
flags_item = proto_tree_add_uint(bpdu_tree, hf_bpdu_flags, tvb,
|
||||
BPDU_FLAGS, 1, flags);
|
||||
flags_tree = proto_item_add_subtree(flags_item, ett_bpdu_flags);
|
||||
sep = initial_sep;
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_TCACK, flags_item,
|
||||
"%sTopology Change Acknowledgment");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_tcack, tvb,
|
||||
BPDU_FLAGS, 1, flags);
|
||||
if (bpdu_type == BPDU_TYPE_RST) {
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_AGREEMENT, flags_item,
|
||||
"%sAgreement");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_agreement, tvb,
|
||||
BPDU_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_FORWARDING, flags_item,
|
||||
"%sForwarding");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_forwarding, tvb,
|
||||
BPDU_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_LEARNING, flags_item,
|
||||
"%sLearning");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_learning, tvb,
|
||||
BPDU_FLAGS, 1, flags);
|
||||
if (flags_item) {
|
||||
guint8 port_role;
|
||||
|
||||
port_role = (flags & BPDU_FLAGS_PORT_ROLE_MASK) >> BPDU_FLAGS_PORT_ROLE_SHIFT;
|
||||
proto_item_append_text(flags_item, "%sPort Role: %s", sep,
|
||||
val_to_str(port_role, role_vals,
|
||||
"Unknown (%u)"));
|
||||
}
|
||||
sep = cont_sep;
|
||||
proto_tree_add_uint(flags_tree, hf_bpdu_flags_port_role, tvb,
|
||||
BPDU_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_PROPOSAL, flags_item,
|
||||
"%sProposal");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_proposal, tvb,
|
||||
BPDU_FLAGS, 1, flags);
|
||||
}
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_TC, flags_item,
|
||||
"%sTopology Change");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_tc, tvb,
|
||||
BPDU_FLAGS, 1, flags);
|
||||
if (sep != initial_sep) {
|
||||
/* We put something in; put in the terminating ")" */
|
||||
proto_item_append_text(flags_item, ")");
|
||||
proto_tree_add_bitmask_value_with_flags(bpdu_tree, tvb, BPDU_FLAGS, hf_bpdu_flags, ett_bpdu_flags, rst_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
} else {
|
||||
proto_tree_add_bitmask_value_with_flags(bpdu_tree, tvb, BPDU_FLAGS, hf_bpdu_flags, ett_bpdu_flags, bpdu_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
/* add Identifier with format based on preference value
|
||||
|
@ -886,43 +854,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_bp
|
|||
msti_regional_root_mac_str);
|
||||
|
||||
/* flags */
|
||||
flags = tvb_get_guint8(tvb, offset+MSTI_FLAGS);
|
||||
flags_item = proto_tree_add_uint(msti_tree, hf_bpdu_msti_flags, tvb,
|
||||
offset+MSTI_FLAGS, 1, flags);
|
||||
flags_tree = proto_item_add_subtree(flags_item, ett_bpdu_flags);
|
||||
|
||||
sep = initial_sep;
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_TCACK, flags_item, "%sMaster");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_tcack, tvb,
|
||||
offset+MSTI_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_AGREEMENT, flags_item, "%sAgreement");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_agreement, tvb,
|
||||
offset+MSTI_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_FORWARDING, flags_item, "%sForwarding");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_forwarding, tvb,
|
||||
offset+MSTI_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_LEARNING, flags_item, "%sLearning");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_learning, tvb,
|
||||
offset+MSTI_FLAGS, 1, flags);
|
||||
if (flags_item) {
|
||||
guint8 port_role;
|
||||
port_role = (flags & BPDU_FLAGS_PORT_ROLE_MASK) >> BPDU_FLAGS_PORT_ROLE_SHIFT;
|
||||
proto_item_append_text(flags_item, "%sPort Role: %s", sep,
|
||||
val_to_str(port_role, role_vals,
|
||||
"Unknown (%u)"));
|
||||
}
|
||||
proto_tree_add_uint(flags_tree, hf_bpdu_flags_port_role, tvb,
|
||||
offset+MSTI_FLAGS, 1, flags);
|
||||
sep = cont_sep;
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_PROPOSAL, flags_item, "%sProposal");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_proposal, tvb,
|
||||
offset+MSTI_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_TC, flags_item, "%sTopology Change");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_tc, tvb,
|
||||
offset+MSTI_FLAGS, 1, flags);
|
||||
if (sep != initial_sep) { /* We put something in; put in the terminating ")" */
|
||||
proto_item_append_text(flags_item, ")");
|
||||
}
|
||||
proto_tree_add_bitmask_with_flags(msti_tree, tvb, offset+MSTI_FLAGS, hf_bpdu_msti_flags, ett_bpdu_flags, rst_flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
|
||||
/* pri, MSTID, Regional root */
|
||||
hidden_item = proto_tree_add_item(msti_tree, hf_bpdu_msti_regional_root_mac, tvb,
|
||||
|
@ -973,43 +905,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean is_bp
|
|||
"MSTID: %d", msti_mstid);
|
||||
|
||||
/* flags */
|
||||
flags = tvb_get_guint8(tvb, offset+ALT_MSTI_FLAGS);
|
||||
flags_item = proto_tree_add_uint(msti_tree, hf_bpdu_msti_flags, tvb,
|
||||
offset+ALT_MSTI_FLAGS, 1, flags);
|
||||
flags_tree = proto_item_add_subtree(flags_item, ett_bpdu_flags);
|
||||
|
||||
sep = initial_sep;
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_TCACK, flags_item, "%sMaster");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_tcack, tvb,
|
||||
offset+ALT_MSTI_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_AGREEMENT, flags_item, "%sAgreement");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_agreement, tvb,
|
||||
offset+ALT_MSTI_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_FORWARDING, flags_item, "%sForwarding");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_forwarding, tvb,
|
||||
offset+ALT_MSTI_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_LEARNING, flags_item, "%sLearning");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_learning, tvb,
|
||||
offset+ALT_MSTI_FLAGS, 1, flags);
|
||||
if (flags_item) {
|
||||
guint8 port_role;
|
||||
port_role = (flags & BPDU_FLAGS_PORT_ROLE_MASK) >> BPDU_FLAGS_PORT_ROLE_SHIFT;
|
||||
proto_item_append_text(flags_item, "%sPort Role: %s", sep,
|
||||
val_to_str(port_role, role_vals,
|
||||
"Unknown (%u)"));
|
||||
}
|
||||
proto_tree_add_uint(flags_tree, hf_bpdu_flags_port_role, tvb,
|
||||
offset+ALT_MSTI_FLAGS, 1, flags);
|
||||
sep = cont_sep;
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_PROPOSAL, flags_item, "%sProposal");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_proposal, tvb,
|
||||
offset+ALT_MSTI_FLAGS, 1, flags);
|
||||
APPEND_BOOLEAN_FLAG(flags & BPDU_FLAGS_TC, flags_item, "%sTopology Change");
|
||||
proto_tree_add_boolean(flags_tree, hf_bpdu_flags_tc, tvb,
|
||||
offset+ALT_MSTI_FLAGS, 1, flags);
|
||||
if (sep != initial_sep) { /* We put something in; put in the terminating ")" */
|
||||
proto_item_append_text(flags_item, ")");
|
||||
}
|
||||
proto_tree_add_bitmask_with_flags(msti_tree, tvb, offset+ALT_MSTI_FLAGS, hf_bpdu_msti_flags, ett_bpdu_flags, rst_flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
|
||||
/* pri, MSTID, Regional root */
|
||||
hidden_item = proto_tree_add_item(msti_tree, hf_bpdu_msti_regional_root_mac, tvb,
|
||||
|
|
|
@ -140,63 +140,19 @@ static const true_false_string tfs_error_ctrl = {
|
|||
static void
|
||||
dissect_brdwlk_err(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint8 flags;
|
||||
static const int * flags[] = {
|
||||
&hf_brdwlk_error_plp,
|
||||
&hf_brdwlk_error_ef,
|
||||
&hf_brdwlk_error_nd,
|
||||
&hf_brdwlk_error_tr,
|
||||
&hf_brdwlk_error_badcrc,
|
||||
&hf_brdwlk_error_ff,
|
||||
&hf_brdwlk_error_jumbo,
|
||||
&hf_brdwlk_error_ctrl,
|
||||
NULL
|
||||
};
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
item = proto_tree_add_uint(parent_tree, hf_brdwlk_error,
|
||||
tvb, offset, 1, flags);
|
||||
tree = proto_item_add_subtree(item, ett_brdwlk_error);
|
||||
|
||||
|
||||
proto_tree_add_boolean(tree, hf_brdwlk_error_plp, tvb, offset, 1, flags);
|
||||
if (flags & 0x01) {
|
||||
proto_item_append_text(item, " Packet Length Present");
|
||||
}
|
||||
flags &= (~( 0x01 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_brdwlk_error_ef, tvb, offset, 1, flags);
|
||||
if (flags & 0x02) {
|
||||
proto_item_append_text(item, " Empty Frame");
|
||||
}
|
||||
flags &= (~( 0x02 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_brdwlk_error_nd, tvb, offset, 1, flags);
|
||||
if (flags & 0x04) {
|
||||
proto_item_append_text(item, " No Data");
|
||||
}
|
||||
flags &= (~( 0x04 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_brdwlk_error_tr, tvb, offset, 1, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " Truncated");
|
||||
}
|
||||
flags &= (~( 0x08 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_brdwlk_error_badcrc, tvb, offset, 1, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " Bad FC CRC");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_brdwlk_error_ff, tvb, offset, 1, flags);
|
||||
if (flags & 0x20) {
|
||||
proto_item_append_text(item, " Fifo Full");
|
||||
}
|
||||
flags &= (~( 0x20 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_brdwlk_error_jumbo, tvb, offset, 1, flags);
|
||||
if (flags & 0x40) {
|
||||
proto_item_append_text(item, " Jumbo FC Frame");
|
||||
}
|
||||
flags &= (~( 0x40 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_brdwlk_error_ctrl, tvb, offset, 1, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " Ctrl Char Inside Frame");
|
||||
}
|
||||
/*flags &= (~( 0x80 ));*/
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_brdwlk_error, ett_brdwlk_error, flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
/* Code to actually dissect the packets */
|
||||
|
|
|
@ -694,7 +694,6 @@ dissect_brsf_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
gint offset, gint role, guint16 type, guint8 *parameter_stream,
|
||||
guint parameter_number, gint parameter_length, void **data _U_)
|
||||
{
|
||||
proto_tree *ptree;
|
||||
proto_item *pitem;
|
||||
guint32 value;
|
||||
|
||||
|
@ -708,42 +707,44 @@ dissect_brsf_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
value = get_uint_parameter(parameter_stream, parameter_length);
|
||||
|
||||
if (role == ROLE_HS) {
|
||||
pitem = proto_tree_add_uint(tree, hf_brsf_hs, tvb, offset, parameter_length, value);
|
||||
ptree = proto_item_add_subtree(pitem, ett_bthfp_brsf_hf);
|
||||
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_ec_nr_function, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_call_waiting_or_tree_way, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_cli_presentation, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_voice_recognition_activation, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_remote_volume_control, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_enhanced_call_status, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_enhanced_call_control, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_codec_negotiation, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_hf_indicators, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_hs_esco_s4_t2_settings_support, tvb, offset, parameter_length, value);
|
||||
pitem = proto_tree_add_uint(ptree, hf_brsf_hs_reserved, tvb, offset, parameter_length, value);
|
||||
static const int * hs[] = {
|
||||
&hf_brsf_hs_ec_nr_function,
|
||||
&hf_brsf_hs_call_waiting_or_tree_way,
|
||||
&hf_brsf_hs_cli_presentation,
|
||||
&hf_brsf_hs_voice_recognition_activation,
|
||||
&hf_brsf_hs_remote_volume_control,
|
||||
&hf_brsf_hs_enhanced_call_status,
|
||||
&hf_brsf_hs_enhanced_call_control,
|
||||
&hf_brsf_hs_codec_negotiation,
|
||||
&hf_brsf_hs_hf_indicators,
|
||||
&hf_brsf_hs_esco_s4_t2_settings_support,
|
||||
&hf_brsf_hs_reserved,
|
||||
NULL
|
||||
};
|
||||
|
||||
pitem = proto_tree_add_bitmask_value_with_flags(tree, tvb, offset, hf_brsf_hs, ett_bthfp_brsf_hf, hs, value, BMT_NO_APPEND);
|
||||
if (value >> 8) {
|
||||
expert_add_info(pinfo, pitem, &ei_brfs_hs_reserved_bits);
|
||||
}
|
||||
} else {
|
||||
pitem = proto_tree_add_uint(tree, hf_brsf_ag, tvb, offset, parameter_length, value);
|
||||
ptree = proto_item_add_subtree(pitem, ett_bthfp_brsf_ag);
|
||||
static const int * ag[] = {
|
||||
&hf_brsf_ag_three_way_calling,
|
||||
&hf_brsf_ag_ec_nr_function,
|
||||
&hf_brsf_ag_voice_recognition_function,
|
||||
&hf_brsf_ag_inband_ring_tone,
|
||||
&hf_brsf_ag_attach_number_to_voice_tag,
|
||||
&hf_brsf_ag_ability_to_reject_a_call,
|
||||
&hf_brsf_ag_enhanced_call_status,
|
||||
&hf_brsf_ag_enhanced_call_control,
|
||||
&hf_brsf_ag_extended_error_result_codes,
|
||||
&hf_brsf_ag_codec_negotiation,
|
||||
&hf_brsf_ag_hf_indicators,
|
||||
&hf_brsf_ag_esco_s4_t2_settings_support,
|
||||
&hf_brsf_ag_reserved,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_three_way_calling, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_ec_nr_function, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_voice_recognition_function, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_inband_ring_tone, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_attach_number_to_voice_tag, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_ability_to_reject_a_call, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_enhanced_call_status, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_enhanced_call_control, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_extended_error_result_codes, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_codec_negotiation, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_hf_indicators, tvb, offset, parameter_length, value);
|
||||
proto_tree_add_boolean(ptree, hf_brsf_ag_esco_s4_t2_settings_support, tvb, offset, parameter_length, value);
|
||||
|
||||
pitem = proto_tree_add_uint(ptree, hf_brsf_ag_reserved, tvb, offset, parameter_length, value);
|
||||
pitem = proto_tree_add_bitmask_value_with_flags(tree, tvb, offset, hf_brsf_ag, ett_bthfp_brsf_ag, ag, value, BMT_NO_APPEND);
|
||||
|
||||
if (value >> 10) {
|
||||
expert_add_info(pinfo, pitem, &ei_brfs_ag_reserved_bits);
|
||||
|
|
|
@ -1259,16 +1259,16 @@ static void dissect_pdcp_lte(tvbuff_t *tvb, gint offset,
|
|||
|
||||
/* CNF follows MUI in AM */
|
||||
if ((opcode == RLC_AM_DATA_REQ) || (opcode == RLC_AM_DATA_IND)) {
|
||||
proto_tree_add_boolean(tree, hf_catapult_dct2000_lte_rlc_cnf,
|
||||
tvb, offset, 1, tvb_get_guint8(tvb, offset));
|
||||
proto_tree_add_item(tree, hf_catapult_dct2000_lte_rlc_cnf,
|
||||
tvb, offset, 1, ENC_NA);
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
else if (tag == 0x45) {
|
||||
/* Discard Req */
|
||||
offset++;
|
||||
proto_tree_add_boolean(tree, hf_catapult_dct2000_lte_rlc_discard_req,
|
||||
tvb, offset, 1, tvb_get_guint8(tvb, offset));
|
||||
proto_tree_add_item(tree, hf_catapult_dct2000_lte_rlc_discard_req,
|
||||
tvb, offset, 1, ENC_NA);
|
||||
offset++;
|
||||
}
|
||||
|
||||
|
|
|
@ -612,8 +612,13 @@ netlogon_dissect_EXTRA_FLAGS(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
static const int * extraflags[] = {
|
||||
&hf_netlogon_extra_flags_root_forest,
|
||||
&hf_netlogon_trust_flags_dc_firsthop,
|
||||
&hf_netlogon_trust_flags_rodc_to_dc,
|
||||
&hf_netlogon_trust_flags_rodc_ntlm,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(di->conformant_run){
|
||||
/*just a run to handle conformant arrays, nothing to dissect */
|
||||
|
@ -621,23 +626,9 @@ netlogon_dissect_EXTRA_FLAGS(tvbuff_t *tvb, int offset,
|
|||
}
|
||||
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_netlogon_extraflags, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint(parent_tree, hf_netlogon_extraflags,
|
||||
tvb, offset-4, 4, mask);
|
||||
tree = proto_item_add_subtree(item, ett_trust_flags);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_netlogon_extra_flags_root_forest,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_dc_firsthop,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_rodc_to_dc,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_rodc_ntlm,
|
||||
tvb, offset-4, 4, mask);
|
||||
-1, &mask);
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_netlogon_extraflags, ett_trust_flags, extraflags, mask, BMT_NO_APPEND);
|
||||
return offset;
|
||||
}
|
||||
static int
|
||||
|
@ -702,8 +693,26 @@ netlogon_dissect_USER_ACCOUNT_CONTROL(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
static const int * uac[] = {
|
||||
&hf_netlogon_user_account_control_dont_require_preauth,
|
||||
&hf_netlogon_user_account_control_use_des_key_only,
|
||||
&hf_netlogon_user_account_control_not_delegated,
|
||||
&hf_netlogon_user_account_control_trusted_for_delegation,
|
||||
&hf_netlogon_user_account_control_smartcard_required,
|
||||
&hf_netlogon_user_account_control_encrypted_text_password_allowed,
|
||||
&hf_netlogon_user_account_control_account_auto_locked,
|
||||
&hf_netlogon_user_account_control_dont_expire_password,
|
||||
&hf_netlogon_user_account_control_server_trust_account,
|
||||
&hf_netlogon_user_account_control_workstation_trust_account,
|
||||
&hf_netlogon_user_account_control_interdomain_trust_account,
|
||||
&hf_netlogon_user_account_control_mns_logon_account,
|
||||
&hf_netlogon_user_account_control_normal_account,
|
||||
&hf_netlogon_user_account_control_temp_duplicate_account,
|
||||
&hf_netlogon_user_account_control_password_not_required,
|
||||
&hf_netlogon_user_account_control_home_directory_required,
|
||||
&hf_netlogon_user_account_control_account_disabled,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(di->conformant_run){
|
||||
/*just a run to handle conformant arrays, nothing to dissect */
|
||||
|
@ -711,48 +720,10 @@ netlogon_dissect_USER_ACCOUNT_CONTROL(tvbuff_t *tvb, int offset,
|
|||
}
|
||||
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_netlogon_user_account_control, &mask);
|
||||
-1, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint(parent_tree, hf_netlogon_user_account_control,
|
||||
tvb, offset-4, 4, mask);
|
||||
tree = proto_item_add_subtree(item, ett_user_account_control);
|
||||
}
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_netlogon_user_account_control, ett_user_account_control, uac, mask, BMT_NO_APPEND);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_dont_require_preauth,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_use_des_key_only,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_not_delegated,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_trusted_for_delegation,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_smartcard_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_encrypted_text_password_allowed,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_account_auto_locked,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_dont_expire_password,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_server_trust_account,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_workstation_trust_account,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_interdomain_trust_account,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_mns_logon_account,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_normal_account,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_temp_duplicate_account,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_password_not_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_home_directory_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_account_control_account_disabled,
|
||||
tvb, offset-4, 4, mask);
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -1408,8 +1379,12 @@ netlogon_dissect_GROUP_MEMBERSHIP_ATTRIBUTES(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
static const int * attr[] = {
|
||||
&hf_netlogon_group_attrs_enabled,
|
||||
&hf_netlogon_group_attrs_enabled_by_default,
|
||||
&hf_netlogon_group_attrs_mandatory,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(di->conformant_run){
|
||||
/*just a run to handle conformant arrays, nothing to dissect */
|
||||
|
@ -1417,21 +1392,9 @@ netlogon_dissect_GROUP_MEMBERSHIP_ATTRIBUTES(tvbuff_t *tvb, int offset,
|
|||
}
|
||||
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_netlogon_attrs, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint(parent_tree, hf_netlogon_attrs,
|
||||
tvb, offset-4, 4, mask);
|
||||
tree = proto_item_add_subtree(item, ett_group_attrs);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_netlogon_group_attrs_enabled,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_group_attrs_enabled_by_default,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_group_attrs_mandatory,
|
||||
tvb, offset-4, 4, mask);
|
||||
-1, &mask);
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_netlogon_attrs, ett_group_attrs, attr, mask, BMT_NO_APPEND);
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -1511,8 +1474,11 @@ netlogon_dissect_USER_FLAGS(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
static const int * flags[] = {
|
||||
&hf_netlogon_user_flags_resource_groups,
|
||||
&hf_netlogon_user_flags_extra_sids,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(di->conformant_run){
|
||||
/*just a run to handle conformant arrays, nothing to dissect */
|
||||
|
@ -1520,19 +1486,9 @@ netlogon_dissect_USER_FLAGS(tvbuff_t *tvb, int offset,
|
|||
}
|
||||
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_netlogon_user_flags, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint(parent_tree, hf_netlogon_user_flags,
|
||||
tvb, offset-4, 4, mask);
|
||||
tree = proto_item_add_subtree(item, ett_user_flags);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_flags_resource_groups,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_user_flags_extra_sids,
|
||||
tvb, offset-4, 4, mask);
|
||||
-1, &mask);
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_netlogon_user_flags, ett_user_flags, flags, mask, BMT_NO_APPEND);
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -5143,8 +5099,15 @@ netlogon_dissect_DOMAIN_TRUST_FLAGS(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
static const int * flags[] = {
|
||||
&hf_netlogon_trust_flags_inbound,
|
||||
&hf_netlogon_trust_flags_native_mode,
|
||||
&hf_netlogon_trust_flags_primary,
|
||||
&hf_netlogon_trust_flags_tree_root,
|
||||
&hf_netlogon_trust_flags_outbound,
|
||||
&hf_netlogon_trust_flags_in_forest,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(di->conformant_run){
|
||||
/*just a run to handle conformant arrays, nothing to dissect */
|
||||
|
@ -5152,27 +5115,9 @@ netlogon_dissect_DOMAIN_TRUST_FLAGS(tvbuff_t *tvb, int offset,
|
|||
}
|
||||
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_netlogon_trust_flags, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint(parent_tree, hf_netlogon_trust_flags,
|
||||
tvb, offset-4, 4, mask);
|
||||
tree = proto_item_add_subtree(item, ett_trust_flags);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_inbound,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_native_mode,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_primary,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_tree_root,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_outbound,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_flags_in_forest,
|
||||
tvb, offset-4, 4, mask);
|
||||
-1, &mask);
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_netlogon_trust_flags, ett_trust_flags, flags, mask, BMT_NO_APPEND);
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -5212,8 +5157,16 @@ netlogon_dissect_DOMAIN_TRUST_ATTRIBS(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
static const int * attr[] = {
|
||||
&hf_netlogon_trust_attribs_treat_as_external,
|
||||
&hf_netlogon_trust_attribs_within_forest,
|
||||
&hf_netlogon_trust_attribs_cross_organization,
|
||||
&hf_netlogon_trust_attribs_forest_transitive,
|
||||
&hf_netlogon_trust_attribs_quarantined_domain,
|
||||
&hf_netlogon_trust_attribs_uplevel_only,
|
||||
&hf_netlogon_trust_attribs_non_transitive,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(di->conformant_run){
|
||||
/*just a run to handle conformant arrays, nothing to dissect */
|
||||
|
@ -5221,30 +5174,9 @@ netlogon_dissect_DOMAIN_TRUST_ATTRIBS(tvbuff_t *tvb, int offset,
|
|||
}
|
||||
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_netlogon_trust_attribs, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint(parent_tree, hf_netlogon_trust_attribs,
|
||||
tvb, offset-4, 4, mask);
|
||||
tree = proto_item_add_subtree(item, ett_trust_attribs);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_attribs_treat_as_external,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_attribs_within_forest,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_attribs_cross_organization,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_attribs_forest_transitive,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_attribs_quarantined_domain,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_attribs_uplevel_only,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_trust_attribs_non_transitive,
|
||||
tvb, offset-4, 4, mask);
|
||||
|
||||
-1, &mask);
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_netlogon_trust_attribs, ett_trust_attribs, attr, mask, BMT_NO_APPEND);
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -5340,58 +5272,35 @@ netlogon_dissect_GET_DCNAME_REQUEST_FLAGS(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
static const int * flags[] = {
|
||||
&hf_netlogon_get_dcname_request_flags_return_flat_name,
|
||||
&hf_netlogon_get_dcname_request_flags_return_dns_name,
|
||||
&hf_netlogon_get_dcname_request_flags_is_flat_name,
|
||||
&hf_netlogon_get_dcname_request_flags_is_dns_name,
|
||||
&hf_netlogon_get_dcname_request_flags_only_ldap_needed,
|
||||
&hf_netlogon_get_dcname_request_flags_avoid_self,
|
||||
&hf_netlogon_get_dcname_request_flags_good_timeserv_preferred,
|
||||
&hf_netlogon_get_dcname_request_flags_writable_required,
|
||||
&hf_netlogon_get_dcname_request_flags_timeserv_required,
|
||||
&hf_netlogon_get_dcname_request_flags_kdc_required,
|
||||
&hf_netlogon_get_dcname_request_flags_ip_required,
|
||||
&hf_netlogon_get_dcname_request_flags_background_only,
|
||||
&hf_netlogon_get_dcname_request_flags_pdc_required,
|
||||
&hf_netlogon_get_dcname_request_flags_gc_server_required,
|
||||
&hf_netlogon_get_dcname_request_flags_directory_service_preferred,
|
||||
&hf_netlogon_get_dcname_request_flags_directory_service_required,
|
||||
&hf_netlogon_get_dcname_request_flags_force_rediscovery,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(di->conformant_run){
|
||||
/*just a run to handle conformant arrays, nothing to dissect */
|
||||
return offset;
|
||||
}
|
||||
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_netlogon_get_dcname_request_flags, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint(parent_tree, hf_netlogon_get_dcname_request_flags,
|
||||
tvb, offset-4, 4, mask);
|
||||
tree = proto_item_add_subtree(item, ett_get_dcname_request_flags);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_return_flat_name,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_return_dns_name,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_is_flat_name,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_is_dns_name,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_only_ldap_needed,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_avoid_self,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_good_timeserv_preferred,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_writable_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_timeserv_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_kdc_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_ip_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_background_only,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_pdc_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_gc_server_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_directory_service_preferred,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_directory_service_required,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_get_dcname_request_flags_force_rediscovery,
|
||||
tvb, offset-4, 4, mask);
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &mask);
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_netlogon_get_dcname_request_flags, ett_get_dcname_request_flags, flags, mask, BMT_NO_APPEND);
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
@ -5468,49 +5377,34 @@ netlogon_dissect_DC_FLAGS(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
proto_item *item;
|
||||
static const int * flags[] = {
|
||||
&hf_netlogon_dc_flags_dns_forest_flag,
|
||||
&hf_netlogon_dc_flags_dns_domain_flag,
|
||||
&hf_netlogon_dc_flags_dns_controller_flag,
|
||||
&hf_netlogon_dc_flags_ndnc_flag,
|
||||
&hf_netlogon_dc_flags_good_timeserv_flag,
|
||||
&hf_netlogon_dc_flags_writable_flag,
|
||||
&hf_netlogon_dc_flags_closest_flag,
|
||||
&hf_netlogon_dc_flags_timeserv_flag,
|
||||
&hf_netlogon_dc_flags_kdc_flag,
|
||||
&hf_netlogon_dc_flags_ds_flag,
|
||||
&hf_netlogon_dc_flags_ldap_flag,
|
||||
&hf_netlogon_dc_flags_gc_flag,
|
||||
&hf_netlogon_dc_flags_pdc_flag,
|
||||
NULL
|
||||
};
|
||||
|
||||
if(di->conformant_run){
|
||||
/*just a run to handle conformant arrays, nothing to dissect */
|
||||
return offset;
|
||||
}
|
||||
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_netlogon_dc_flags, &mask);
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint_format_value(parent_tree, hf_netlogon_dc_flags,
|
||||
tvb, offset-4, 4, mask, "0x%08x%s", mask, (mask==0x0000ffff)?" PING (mask==0x0000ffff)":"");
|
||||
tree = proto_item_add_subtree(item, ett_dc_flags);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_dns_forest_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_dns_domain_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_dns_controller_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_ndnc_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_good_timeserv_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_writable_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_closest_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_timeserv_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_kdc_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_ds_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_ldap_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_gc_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_netlogon_dc_flags_pdc_flag,
|
||||
tvb, offset-4, 4, mask);
|
||||
item = proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_netlogon_dc_flags, ett_dc_flags, flags, mask, BMT_NO_APPEND);
|
||||
if (mask==0x0000ffff)
|
||||
proto_item_append_text(item, " PING (mask==0x0000ffff)");
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -6537,115 +6431,48 @@ netlogon_dissect_netrlogoncomputeclientdigest_reply(tvbuff_t *tvb, int offset,
|
|||
}
|
||||
static int netlogon_dissect_neg_options(tvbuff_t *tvb,proto_tree *tree,guint32 flags,int offset)
|
||||
{
|
||||
if (tree) {
|
||||
proto_tree *negotiate_flags_tree = NULL;
|
||||
proto_item *tf = NULL;
|
||||
tf = proto_tree_add_uint (tree,
|
||||
hf_netlogon_neg_flags,
|
||||
tvb, offset, 4,flags);
|
||||
negotiate_flags_tree = proto_item_add_subtree (tf,ett_authenticate_flags);
|
||||
static const int * hf_flags[] = {
|
||||
#if 0
|
||||
&hf_netlogon_neg_flags_80000000,
|
||||
#endif
|
||||
&hf_netlogon_neg_flags_40000000,
|
||||
&hf_netlogon_neg_flags_20000000,
|
||||
#if 0
|
||||
&hf_netlogon_neg_flags_10000000,
|
||||
&hf_netlogon_neg_flags_8000000,
|
||||
&hf_netlogon_neg_flags_4000000,
|
||||
&hf_netlogon_neg_flags_2000000,
|
||||
&hf_netlogon_neg_flags_800000,
|
||||
#endif
|
||||
&hf_netlogon_neg_flags_1000000,
|
||||
&hf_netlogon_neg_flags_400000,
|
||||
&hf_netlogon_neg_flags_200000,
|
||||
&hf_netlogon_neg_flags_100000,
|
||||
&hf_netlogon_neg_flags_80000,
|
||||
&hf_netlogon_neg_flags_40000,
|
||||
&hf_netlogon_neg_flags_20000,
|
||||
&hf_netlogon_neg_flags_10000,
|
||||
&hf_netlogon_neg_flags_8000,
|
||||
&hf_netlogon_neg_flags_4000,
|
||||
&hf_netlogon_neg_flags_2000,
|
||||
&hf_netlogon_neg_flags_1000,
|
||||
&hf_netlogon_neg_flags_800,
|
||||
&hf_netlogon_neg_flags_400,
|
||||
&hf_netlogon_neg_flags_200,
|
||||
&hf_netlogon_neg_flags_100,
|
||||
&hf_netlogon_neg_flags_80,
|
||||
&hf_netlogon_neg_flags_40,
|
||||
&hf_netlogon_neg_flags_20,
|
||||
&hf_netlogon_neg_flags_10,
|
||||
&hf_netlogon_neg_flags_8,
|
||||
&hf_netlogon_neg_flags_4,
|
||||
&hf_netlogon_neg_flags_2,
|
||||
&hf_netlogon_neg_flags_1,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(tree, tvb, offset, hf_netlogon_neg_flags, ett_authenticate_flags, hf_flags, flags, BMT_NO_APPEND);
|
||||
|
||||
#if 0
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_80000000,
|
||||
tvb, offset, 4, flags);
|
||||
#endif
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_40000000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_20000000,
|
||||
tvb, offset, 4, flags);
|
||||
#if 0
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_10000000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_8000000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_4000000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_2000000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_800000,
|
||||
tvb, offset, 4, flags);
|
||||
#endif
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_1000000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_400000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_200000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_100000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_80000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_40000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_20000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_10000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_8000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_4000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_2000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_1000,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_800,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_400,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_200,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_100,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_80,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_40,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_20,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_10,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_8,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_4,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_2,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_boolean (negotiate_flags_tree,
|
||||
hf_netlogon_neg_flags_1,
|
||||
tvb, offset, 4, flags);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1594,40 +1594,25 @@ dissect_ndr_nt_acct_ctrl(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
proto_tree *parent_tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 mask;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
static const int * flags[] = {
|
||||
&hf_nt_acb_autolock,
|
||||
&hf_nt_acb_pwnoexp,
|
||||
&hf_nt_acb_svrtrust,
|
||||
&hf_nt_acb_wstrust,
|
||||
&hf_nt_acb_domtrust,
|
||||
&hf_nt_acb_mns,
|
||||
&hf_nt_acb_normal,
|
||||
&hf_nt_acb_tempdup,
|
||||
&hf_nt_acb_pwnotreq,
|
||||
&hf_nt_acb_homedirreq,
|
||||
&hf_nt_acb_disabled,
|
||||
NULL
|
||||
};
|
||||
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_nt_acct_ctrl, &mask);
|
||||
offset=dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &mask);
|
||||
|
||||
if(parent_tree){
|
||||
item = proto_tree_add_uint(parent_tree, hf_nt_acct_ctrl,
|
||||
tvb, offset-4, 4, mask);
|
||||
tree = proto_item_add_subtree(item, ett_nt_acct_ctrl);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_autolock,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_pwnoexp,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_svrtrust,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_wstrust,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_domtrust,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_mns,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_normal,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_tempdup,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_pwnotreq,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_homedirreq,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_boolean(tree, hf_nt_acb_disabled,
|
||||
tvb, offset-4, 4, mask);
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset-4, hf_nt_acct_ctrl,
|
||||
ett_nt_acct_ctrl, flags, mask, BMT_NO_APPEND);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
|
|
@ -1378,134 +1378,49 @@ static int
|
|||
dissect_DEVMODE_fields(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
||||
proto_tree *tree, dcerpc_info *di, guint8 *drep _U_, guint32 *pdata)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *subtree;
|
||||
guint32 fields;
|
||||
proto_item *hidden_item;
|
||||
|
||||
static const int * hf_fields[] = {
|
||||
&hf_devmode_fields_orientation,
|
||||
&hf_devmode_fields_papersize,
|
||||
&hf_devmode_fields_paperlength,
|
||||
&hf_devmode_fields_paperwidth,
|
||||
&hf_devmode_fields_scale,
|
||||
&hf_devmode_fields_position,
|
||||
&hf_devmode_fields_nup,
|
||||
&hf_devmode_fields_copies,
|
||||
&hf_devmode_fields_defaultsource,
|
||||
&hf_devmode_fields_printquality,
|
||||
&hf_devmode_fields_color,
|
||||
&hf_devmode_fields_duplex,
|
||||
&hf_devmode_fields_yresolution,
|
||||
&hf_devmode_fields_ttoption,
|
||||
&hf_devmode_fields_collate,
|
||||
&hf_devmode_fields_formname,
|
||||
&hf_devmode_fields_logpixels,
|
||||
&hf_devmode_fields_bitsperpel,
|
||||
&hf_devmode_fields_pelswidth,
|
||||
&hf_devmode_fields_pelsheight,
|
||||
&hf_devmode_fields_displayflags,
|
||||
&hf_devmode_fields_displayfrequency,
|
||||
&hf_devmode_fields_icmmethod,
|
||||
&hf_devmode_fields_icmintent,
|
||||
&hf_devmode_fields_mediatype,
|
||||
&hf_devmode_fields_dithertype,
|
||||
&hf_devmode_fields_panningwidth,
|
||||
&hf_devmode_fields_panningheight,
|
||||
NULL
|
||||
};
|
||||
|
||||
hidden_item = proto_tree_add_uint(
|
||||
tree, hf_devmode, tvb, offset, 0, 1);
|
||||
PROTO_ITEM_SET_HIDDEN(hidden_item);
|
||||
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_devmode_fields, &fields);
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &fields);
|
||||
|
||||
item = proto_tree_add_text(tree, tvb, offset - 4, 4,
|
||||
"Fields: 0x%08x", fields);
|
||||
|
||||
subtree = proto_item_add_subtree(item, ett_DEVMODE_fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_orientation,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_papersize,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_paperlength,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_paperwidth,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_scale,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_position,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_nup,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_copies,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_defaultsource,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_printquality,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_color,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_duplex,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_yresolution,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_ttoption,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_collate,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_formname,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_logpixels,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_bitsperpel,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_pelswidth,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_pelsheight,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_displayflags,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_displayfrequency,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_icmmethod,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_icmintent,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_mediatype,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_dithertype,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_panningwidth,
|
||||
tvb, offset - 4, 4, fields);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_devmode_fields_panningheight,
|
||||
tvb, offset - 4, 4, fields);
|
||||
proto_tree_add_bitmask_value_with_flags(tree, tvb, offset - 4, hf_devmode_fields,
|
||||
ett_DEVMODE_fields, hf_fields, fields, BMT_NO_APPEND);
|
||||
|
||||
if (pdata)
|
||||
*pdata = fields;
|
||||
|
@ -1597,9 +1512,9 @@ dissect_DEVMODE(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
subtree, hf_devmode_print_quality, tvb,
|
||||
offset - 2, 2, DREP_ENC_INTEGER(drep));
|
||||
else
|
||||
proto_tree_add_text(
|
||||
subtree, tvb, offset - 4, 4,
|
||||
"Print Quality: %d dpi", print_quality);
|
||||
proto_tree_add_uint_format_value(
|
||||
subtree, hf_devmode_print_quality, tvb, offset - 4, 4,
|
||||
print_quality, "%d dpi", print_quality);
|
||||
|
||||
offset = dissect_ndr_uint16(
|
||||
tvb, offset, pinfo, subtree, di, drep,
|
||||
|
@ -2071,51 +1986,26 @@ static int
|
|||
dissect_job_status(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||
proto_tree *tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *subtree;
|
||||
guint32 status;
|
||||
static const int * hf_status[] = {
|
||||
&hf_job_status_user_intervention,
|
||||
&hf_job_status_blocked,
|
||||
&hf_job_status_deleted,
|
||||
&hf_job_status_printed,
|
||||
&hf_job_status_paperout,
|
||||
&hf_job_status_offline,
|
||||
&hf_job_status_printing,
|
||||
&hf_job_status_spooling,
|
||||
&hf_job_status_deleting,
|
||||
&hf_job_status_error,
|
||||
&hf_job_status_paused,
|
||||
NULL
|
||||
};
|
||||
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_job_status, &status);
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &status);
|
||||
|
||||
item = proto_tree_add_text(tree, tvb, offset - 4, 4,
|
||||
"Status: 0x%08x", status);
|
||||
|
||||
subtree = proto_item_add_subtree(item, ett_job_status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_user_intervention, tvb, offset - 4, 4,
|
||||
status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_blocked, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_deleted, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_printed, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_paperout, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_offline, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_printing, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_spooling, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_deleting, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_error, tvb, offset - 4, 4, status);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_job_status_paused, tvb, offset - 4, 4, status);
|
||||
proto_tree_add_bitmask_value_with_flags(tree, tvb, offset - 4, hf_job_status,
|
||||
ett_job_status, hf_status, status, BMT_NO_APPEND);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -2214,73 +2104,29 @@ static int
|
|||
dissect_printer_attributes(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||
proto_tree *tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *subtree;
|
||||
guint32 attributes;
|
||||
static const int * hf_attributes[] = {
|
||||
&hf_printer_attributes_published,
|
||||
&hf_printer_attributes_raw_only,
|
||||
&hf_printer_attributes_enable_bidi,
|
||||
&hf_printer_attributes_work_offline,
|
||||
&hf_printer_attributes_do_complete_first,
|
||||
&hf_printer_attributes_keep_printed_jobs,
|
||||
&hf_printer_attributes_enable_devq,
|
||||
&hf_printer_attributes_local,
|
||||
&hf_printer_attributes_hidden,
|
||||
&hf_printer_attributes_network,
|
||||
&hf_printer_attributes_shared,
|
||||
&hf_printer_attributes_default,
|
||||
&hf_printer_attributes_direct,
|
||||
&hf_printer_attributes_queued,
|
||||
NULL
|
||||
};
|
||||
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_printer_attributes, &attributes);
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &attributes);
|
||||
|
||||
item = proto_tree_add_text(tree, tvb, offset - 4, 4,
|
||||
"Attributes: 0x%08x", attributes);
|
||||
|
||||
subtree = proto_item_add_subtree(item, ett_printer_attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_published,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_raw_only,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_enable_bidi,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_work_offline,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_do_complete_first,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_keep_printed_jobs,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_enable_devq,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_local,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_hidden,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_network,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_shared,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_default,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_direct,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_printer_attributes_queued,
|
||||
tvb, offset - 4, 4, attributes);
|
||||
proto_tree_add_bitmask_value_with_flags(tree, tvb, offset - 4, hf_printer_attributes,
|
||||
ett_printer_attributes, hf_attributes, attributes, BMT_NO_APPEND);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -2882,22 +2728,16 @@ static int
|
|||
dissect_notify_options_flags(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||
proto_tree *tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *subtree;
|
||||
guint32 flags;
|
||||
static const int * hf_flags[] = {
|
||||
&hf_notify_options_flags_refresh,
|
||||
NULL
|
||||
};
|
||||
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_notify_options_flags,
|
||||
&flags);
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
|
||||
|
||||
item = proto_tree_add_text(tree, tvb, offset - 4, 4,
|
||||
"Flags: 0x%08x", flags);
|
||||
|
||||
subtree = proto_item_add_subtree(item, ett_notify_options_flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
subtree, hf_notify_options_flags_refresh,
|
||||
tvb, offset, 4, flags);
|
||||
proto_tree_add_bitmask_value_with_flags(tree, tvb, offset - 4, hf_notify_options_flags,
|
||||
ett_notify_options_flags, hf_flags, flags, BMT_NO_APPEND);
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
@ -3068,8 +2908,29 @@ SpoolssRFFPCNEX_q(tvbuff_t *tvb, int offset,
|
|||
dcerpc_info *di, guint8 *drep _U_)
|
||||
{
|
||||
guint32 flags;
|
||||
proto_item *flags_item;
|
||||
proto_tree *flags_subtree;
|
||||
static const int * hf_flags[] = {
|
||||
&hf_rffpcnex_flags_timeout,
|
||||
&hf_rffpcnex_flags_delete_driver,
|
||||
&hf_rffpcnex_flags_set_driver,
|
||||
&hf_rffpcnex_flags_add_driver,
|
||||
&hf_rffpcnex_flags_delete_print_processor,
|
||||
&hf_rffpcnex_flags_add_print_processor,
|
||||
&hf_rffpcnex_flags_delete_port,
|
||||
&hf_rffpcnex_flags_configure_port,
|
||||
&hf_rffpcnex_flags_add_port,
|
||||
&hf_rffpcnex_flags_delete_form,
|
||||
&hf_rffpcnex_flags_set_form,
|
||||
&hf_rffpcnex_flags_add_form,
|
||||
&hf_rffpcnex_flags_write_job,
|
||||
&hf_rffpcnex_flags_delete_job,
|
||||
&hf_rffpcnex_flags_set_job,
|
||||
&hf_rffpcnex_flags_add_job,
|
||||
&hf_rffpcnex_flags_failed_printer_connection,
|
||||
&hf_rffpcnex_flags_delete_printer,
|
||||
&hf_rffpcnex_flags_set_printer,
|
||||
&hf_rffpcnex_flags_add_printer,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Parse packet */
|
||||
|
||||
|
@ -3077,110 +2938,10 @@ SpoolssRFFPCNEX_q(tvbuff_t *tvb, int offset,
|
|||
tvb, offset, pinfo, tree, di, drep, hf_hnd, NULL, NULL,
|
||||
FALSE, FALSE);
|
||||
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_rffpcnex_flags, &flags);
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
|
||||
|
||||
flags_item = proto_tree_add_text(tree, tvb, offset - 4, 4,
|
||||
"Flags: 0x%08x", flags);
|
||||
|
||||
flags_subtree = proto_item_add_subtree(flags_item, ett_rffpcnex_flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_timeout, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_delete_driver, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_set_driver, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_add_driver, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree,
|
||||
hf_rffpcnex_flags_delete_print_processor, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_add_print_processor,
|
||||
tvb, offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_delete_port, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_configure_port, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_add_port, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_delete_form, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_set_form, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_add_form, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_write_job, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_delete_job, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_set_job, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_add_job, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree,
|
||||
hf_rffpcnex_flags_failed_printer_connection, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_delete_printer, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_set_printer, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_rffpcnex_flags_add_printer, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
if (flags & SPOOLSS_PRINTER_CHANGE_PRINTER)
|
||||
proto_item_append_text(flags_item, ", change printer");
|
||||
|
||||
if (flags & SPOOLSS_PRINTER_CHANGE_JOB)
|
||||
proto_item_append_text(flags_item, ", change job");
|
||||
|
||||
if (flags & SPOOLSS_PRINTER_CHANGE_FORM)
|
||||
proto_item_append_text(flags_item, ", change form");
|
||||
|
||||
if (flags & SPOOLSS_PRINTER_CHANGE_PORT)
|
||||
proto_item_append_text(flags_item, ", change port");
|
||||
|
||||
if (flags & SPOOLSS_PRINTER_CHANGE_PRINTER_DRIVER)
|
||||
proto_item_append_text(flags_item, ", change printer driver");
|
||||
proto_tree_add_bitmask_value(tree, tvb, offset - 4, hf_rffpcnex_flags,
|
||||
ett_rffpcnex_flags, hf_flags, flags);
|
||||
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep,
|
||||
hf_rffpcnex_options, NULL);
|
||||
|
@ -3934,49 +3695,24 @@ SpoolssEnumPrinters_q(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
proto_tree *tree, dcerpc_info *di, guint8 *drep _U_)
|
||||
{
|
||||
guint32 level, flags;
|
||||
proto_tree *flags_subtree;
|
||||
proto_item *flags_item;
|
||||
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
|
||||
static const int * hf_flags[] = {
|
||||
&hf_enumprinters_flags_network,
|
||||
&hf_enumprinters_flags_shared,
|
||||
&hf_enumprinters_flags_remote,
|
||||
&hf_enumprinters_flags_name,
|
||||
&hf_enumprinters_flags_connections,
|
||||
&hf_enumprinters_flags_local,
|
||||
&hf_enumprinters_flags_default,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Parse packet */
|
||||
|
||||
offset = dissect_ndr_uint32(
|
||||
tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_enumprinters_flags, &flags);
|
||||
offset = dissect_ndr_uint32(tvb, offset, pinfo, NULL, di, drep, -1, &flags);
|
||||
|
||||
flags_item = proto_tree_add_text(tree, tvb, offset - 4, 4,
|
||||
"Flags: 0x%08x", flags);
|
||||
|
||||
flags_subtree = proto_item_add_subtree(
|
||||
flags_item, ett_enumprinters_flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_enumprinters_flags_network, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_enumprinters_flags_shared, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_enumprinters_flags_remote, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_enumprinters_flags_name, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_enumprinters_flags_connections, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_enumprinters_flags_local, tvb,
|
||||
offset - 4, 4, flags);
|
||||
|
||||
proto_tree_add_boolean(
|
||||
flags_subtree, hf_enumprinters_flags_default, tvb,
|
||||
offset - 4, 4, flags);
|
||||
proto_tree_add_bitmask_value(tree, tvb, offset - 4, hf_enumprinters_flags,
|
||||
ett_enumprinters_flags, hf_flags, flags);
|
||||
|
||||
offset = dissect_ndr_str_pointer_item(
|
||||
tvb, offset, pinfo, tree, di, drep,
|
||||
|
|
|
@ -4371,22 +4371,21 @@ dissect_dcerpc_cn_rts(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|||
guint32 *cmd;
|
||||
guint32 i;
|
||||
const char *info_str = NULL;
|
||||
static const int * flags[] = {
|
||||
&hf_dcerpc_cn_rts_flags_none,
|
||||
&hf_dcerpc_cn_rts_flags_ping,
|
||||
&hf_dcerpc_cn_rts_flags_other_cmd,
|
||||
&hf_dcerpc_cn_rts_flags_recycle_channel,
|
||||
&hf_dcerpc_cn_rts_flags_in_channel,
|
||||
&hf_dcerpc_cn_rts_flags_out_channel,
|
||||
&hf_dcerpc_cn_rts_flags_eof,
|
||||
NULL
|
||||
};
|
||||
|
||||
/* Dissect specific RTS header */
|
||||
rts_flags = dcerpc_tvb_get_ntohs(tvb, offset, hdr->drep);
|
||||
if (dcerpc_tree) {
|
||||
proto_tree *cn_rts_flags_tree;
|
||||
|
||||
tf = proto_tree_add_uint(dcerpc_tree, hf_dcerpc_cn_rts_flags, tvb, offset, 2, rts_flags);
|
||||
cn_rts_flags_tree = proto_item_add_subtree(tf, ett_dcerpc_cn_rts_flags);
|
||||
proto_tree_add_boolean(cn_rts_flags_tree, hf_dcerpc_cn_rts_flags_none, tvb, offset, 1, rts_flags);
|
||||
proto_tree_add_boolean(cn_rts_flags_tree, hf_dcerpc_cn_rts_flags_ping, tvb, offset, 1, rts_flags);
|
||||
proto_tree_add_boolean(cn_rts_flags_tree, hf_dcerpc_cn_rts_flags_other_cmd, tvb, offset, 1, rts_flags);
|
||||
proto_tree_add_boolean(cn_rts_flags_tree, hf_dcerpc_cn_rts_flags_recycle_channel, tvb, offset, 1, rts_flags);
|
||||
proto_tree_add_boolean(cn_rts_flags_tree, hf_dcerpc_cn_rts_flags_in_channel, tvb, offset, 1, rts_flags);
|
||||
proto_tree_add_boolean(cn_rts_flags_tree, hf_dcerpc_cn_rts_flags_out_channel, tvb, offset, 1, rts_flags);
|
||||
proto_tree_add_boolean(cn_rts_flags_tree, hf_dcerpc_cn_rts_flags_eof, tvb, offset, 1, rts_flags);
|
||||
}
|
||||
proto_tree_add_bitmask_value_with_flags(dcerpc_tree, tvb, offset, hf_dcerpc_cn_rts_flags,
|
||||
ett_dcerpc_cn_rts_flags, flags, rts_flags, BMT_NO_APPEND);
|
||||
offset += 2;
|
||||
|
||||
offset = dissect_dcerpc_uint16(tvb, offset, pinfo, dcerpc_tree, hdr->drep,
|
||||
|
@ -4713,12 +4712,22 @@ dissect_dcerpc_cn(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
proto_item *ti = NULL;
|
||||
proto_item *tf = NULL;
|
||||
proto_tree *dcerpc_tree = NULL;
|
||||
proto_tree *cn_flags_tree = NULL;
|
||||
proto_tree *drep_tree = NULL;
|
||||
e_dce_cn_common_hdr_t hdr;
|
||||
dcerpc_auth_info auth_info;
|
||||
tvbuff_t *fragment_tvb;
|
||||
dcerpc_decode_as_data* decode_data = dcerpc_get_decode_data(pinfo);
|
||||
static const int * hdr_flags[] = {
|
||||
&hf_dcerpc_cn_flags_object,
|
||||
&hf_dcerpc_cn_flags_maybe,
|
||||
&hf_dcerpc_cn_flags_dne,
|
||||
&hf_dcerpc_cn_flags_mpx,
|
||||
&hf_dcerpc_cn_flags_reserved,
|
||||
&hf_dcerpc_cn_flags_cancel_pending,
|
||||
&hf_dcerpc_cn_flags_last_frag,
|
||||
&hf_dcerpc_cn_flags_first_frag,
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* when done over nbt, dcerpc requests are padded with 4 bytes of null
|
||||
|
@ -4819,18 +4828,10 @@ dissect_dcerpc_cn(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
proto_item_append_text(ti, " %s, Fragment: %s",
|
||||
val_to_str(hdr.ptype, pckt_vals, "Unknown (0x%02x)"),
|
||||
fragment_type(hdr.flags));
|
||||
|
||||
tf = proto_tree_add_uint(dcerpc_tree, hf_dcerpc_cn_flags, tvb, offset, 1, hdr.flags);
|
||||
cn_flags_tree = proto_item_add_subtree(tf, ett_dcerpc_cn_flags);
|
||||
}
|
||||
proto_tree_add_boolean(cn_flags_tree, hf_dcerpc_cn_flags_object, tvb, offset, 1, hdr.flags);
|
||||
proto_tree_add_boolean(cn_flags_tree, hf_dcerpc_cn_flags_maybe, tvb, offset, 1, hdr.flags);
|
||||
proto_tree_add_boolean(cn_flags_tree, hf_dcerpc_cn_flags_dne, tvb, offset, 1, hdr.flags);
|
||||
proto_tree_add_boolean(cn_flags_tree, hf_dcerpc_cn_flags_mpx, tvb, offset, 1, hdr.flags);
|
||||
proto_tree_add_boolean(cn_flags_tree, hf_dcerpc_cn_flags_reserved, tvb, offset, 1, hdr.flags);
|
||||
proto_tree_add_boolean(cn_flags_tree, hf_dcerpc_cn_flags_cancel_pending, tvb, offset, 1, hdr.flags);
|
||||
proto_tree_add_boolean(cn_flags_tree, hf_dcerpc_cn_flags_last_frag, tvb, offset, 1, hdr.flags);
|
||||
proto_tree_add_boolean(cn_flags_tree, hf_dcerpc_cn_flags_first_frag, tvb, offset, 1, hdr.flags);
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(dcerpc_tree, tvb, offset, hf_dcerpc_cn_flags,
|
||||
ett_dcerpc_cn_flags, hdr_flags, hdr.flags, BMT_NO_APPEND);
|
||||
offset++;
|
||||
|
||||
col_append_fstr(pinfo->cinfo, COL_INFO, ", Fragment: %s", fragment_type(hdr.flags));
|
||||
|
@ -5616,8 +5617,6 @@ dissect_dcerpc_dg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
|
|||
proto_item *ti = NULL;
|
||||
proto_item *tf = NULL;
|
||||
proto_tree *dcerpc_tree = NULL;
|
||||
proto_tree *dg_flags1_tree = NULL;
|
||||
proto_tree *dg_flags2_tree = NULL;
|
||||
proto_tree *drep_tree = NULL;
|
||||
e_dce_dg_common_hdr_t hdr;
|
||||
int offset = 0;
|
||||
|
@ -5625,6 +5624,29 @@ dissect_dcerpc_dg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
|
|||
int auth_level;
|
||||
char *uuid_str;
|
||||
const char *uuid_name = NULL;
|
||||
static const int * hdr_flags1[] = {
|
||||
&hf_dcerpc_dg_flags1_rsrvd_80,
|
||||
&hf_dcerpc_dg_flags1_broadcast,
|
||||
&hf_dcerpc_dg_flags1_idempotent,
|
||||
&hf_dcerpc_dg_flags1_maybe,
|
||||
&hf_dcerpc_dg_flags1_nofack,
|
||||
&hf_dcerpc_dg_flags1_frag,
|
||||
&hf_dcerpc_dg_flags1_last_frag,
|
||||
&hf_dcerpc_dg_flags1_rsrvd_01,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const int * hdr_flags2[] = {
|
||||
&hf_dcerpc_dg_flags2_rsrvd_80,
|
||||
&hf_dcerpc_dg_flags2_rsrvd_40,
|
||||
&hf_dcerpc_dg_flags2_rsrvd_20,
|
||||
&hf_dcerpc_dg_flags2_rsrvd_10,
|
||||
&hf_dcerpc_dg_flags2_rsrvd_08,
|
||||
&hf_dcerpc_dg_flags2_rsrvd_04,
|
||||
&hf_dcerpc_dg_flags2_cancel_pending,
|
||||
&hf_dcerpc_dg_flags2_rsrvd_01,
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* Check if this looks like a CL DCERPC call. All dg packets
|
||||
|
@ -5703,57 +5725,18 @@ dissect_dcerpc_dg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
|
|||
}
|
||||
offset = 0;
|
||||
|
||||
if (tree)
|
||||
proto_tree_add_uint(dcerpc_tree, hf_dcerpc_ver, tvb, offset, 1, hdr.rpc_ver);
|
||||
proto_tree_add_uint(dcerpc_tree, hf_dcerpc_ver, tvb, offset, 1, hdr.rpc_ver);
|
||||
offset++;
|
||||
|
||||
if (tree)
|
||||
proto_tree_add_uint(dcerpc_tree, hf_dcerpc_packet_type, tvb, offset, 1, hdr.ptype);
|
||||
proto_tree_add_uint(dcerpc_tree, hf_dcerpc_packet_type, tvb, offset, 1, hdr.ptype);
|
||||
offset++;
|
||||
|
||||
if (tree) {
|
||||
tf = proto_tree_add_uint(dcerpc_tree, hf_dcerpc_dg_flags1, tvb, offset, 1, hdr.flags1);
|
||||
dg_flags1_tree = proto_item_add_subtree(tf, ett_dcerpc_dg_flags1);
|
||||
if (dg_flags1_tree) {
|
||||
proto_tree_add_boolean(dg_flags1_tree, hf_dcerpc_dg_flags1_rsrvd_80, tvb, offset, 1, hdr.flags1);
|
||||
proto_tree_add_boolean(dg_flags1_tree, hf_dcerpc_dg_flags1_broadcast, tvb, offset, 1, hdr.flags1);
|
||||
proto_tree_add_boolean(dg_flags1_tree, hf_dcerpc_dg_flags1_idempotent, tvb, offset, 1, hdr.flags1);
|
||||
proto_tree_add_boolean(dg_flags1_tree, hf_dcerpc_dg_flags1_maybe, tvb, offset, 1, hdr.flags1);
|
||||
proto_tree_add_boolean(dg_flags1_tree, hf_dcerpc_dg_flags1_nofack, tvb, offset, 1, hdr.flags1);
|
||||
proto_tree_add_boolean(dg_flags1_tree, hf_dcerpc_dg_flags1_frag, tvb, offset, 1, hdr.flags1);
|
||||
proto_tree_add_boolean(dg_flags1_tree, hf_dcerpc_dg_flags1_last_frag, tvb, offset, 1, hdr.flags1);
|
||||
proto_tree_add_boolean(dg_flags1_tree, hf_dcerpc_dg_flags1_rsrvd_01, tvb, offset, 1, hdr.flags1);
|
||||
if (hdr.flags1) {
|
||||
proto_item_append_text(tf, " %s%s%s%s%s%s",
|
||||
(hdr.flags1 & PFCL1_BROADCAST) ? "\"Broadcast\" " : "",
|
||||
(hdr.flags1 & PFCL1_IDEMPOTENT) ? "\"Idempotent\" " : "",
|
||||
(hdr.flags1 & PFCL1_MAYBE) ? "\"Maybe\" " : "",
|
||||
(hdr.flags1 & PFCL1_NOFACK) ? "\"No Fack\" " : "",
|
||||
(hdr.flags1 & PFCL1_FRAG) ? "\"Fragment\" " : "",
|
||||
(hdr.flags1 & PFCL1_LASTFRAG) ? "\"Last Fragment\" " : "");
|
||||
}
|
||||
}
|
||||
}
|
||||
proto_tree_add_bitmask_value(dcerpc_tree, tvb, offset, hf_dcerpc_dg_flags1,
|
||||
ett_dcerpc_dg_flags1, hdr_flags1, hdr.flags1);
|
||||
offset++;
|
||||
|
||||
if (tree) {
|
||||
tf = proto_tree_add_uint(dcerpc_tree, hf_dcerpc_dg_flags2, tvb, offset, 1, hdr.flags2);
|
||||
dg_flags2_tree = proto_item_add_subtree(tf, ett_dcerpc_dg_flags2);
|
||||
if (dg_flags2_tree) {
|
||||
proto_tree_add_boolean(dg_flags2_tree, hf_dcerpc_dg_flags2_rsrvd_80, tvb, offset, 1, hdr.flags2);
|
||||
proto_tree_add_boolean(dg_flags2_tree, hf_dcerpc_dg_flags2_rsrvd_40, tvb, offset, 1, hdr.flags2);
|
||||
proto_tree_add_boolean(dg_flags2_tree, hf_dcerpc_dg_flags2_rsrvd_20, tvb, offset, 1, hdr.flags2);
|
||||
proto_tree_add_boolean(dg_flags2_tree, hf_dcerpc_dg_flags2_rsrvd_10, tvb, offset, 1, hdr.flags2);
|
||||
proto_tree_add_boolean(dg_flags2_tree, hf_dcerpc_dg_flags2_rsrvd_08, tvb, offset, 1, hdr.flags2);
|
||||
proto_tree_add_boolean(dg_flags2_tree, hf_dcerpc_dg_flags2_rsrvd_04, tvb, offset, 1, hdr.flags2);
|
||||
proto_tree_add_boolean(dg_flags2_tree, hf_dcerpc_dg_flags2_cancel_pending, tvb, offset, 1, hdr.flags2);
|
||||
proto_tree_add_boolean(dg_flags2_tree, hf_dcerpc_dg_flags2_rsrvd_01, tvb, offset, 1, hdr.flags2);
|
||||
if (hdr.flags2) {
|
||||
proto_item_append_text(tf, " %s",
|
||||
(hdr.flags2 & PFCL2_CANCEL_PENDING) ? "\"Cancel Pending\" " : "");
|
||||
}
|
||||
}
|
||||
}
|
||||
proto_tree_add_bitmask_value(dcerpc_tree, tvb, offset, hf_dcerpc_dg_flags2,
|
||||
ett_dcerpc_dg_flags2, hdr_flags2, hdr.flags2);
|
||||
offset++;
|
||||
|
||||
if (tree) {
|
||||
|
|
|
@ -270,10 +270,15 @@ dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset,
|
|||
guint32 u32TmpOffset;
|
||||
guint32 u32SubStart;
|
||||
|
||||
proto_item *feature_item;
|
||||
proto_tree *feature_tree;
|
||||
proto_item *dispparams_item;
|
||||
proto_tree *dispparams_tree;
|
||||
static const int * flags[] = {
|
||||
&hf_dispatch_flags_propputref,
|
||||
&hf_dispatch_flags_propput,
|
||||
&hf_dispatch_flags_propget,
|
||||
&hf_dispatch_flags_method,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
offset = dissect_dcom_this(tvb, offset, pinfo, tree, di, drep);
|
||||
|
@ -288,31 +293,21 @@ dissect_IDispatch_Invoke_rqst(tvbuff_t *tvb, int offset,
|
|||
hf_dispatch_lcid, &u32Lcid);
|
||||
|
||||
/* dispatch flags */
|
||||
u32TmpOffset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_dispatch_flags, &u32Flags);
|
||||
feature_item = proto_tree_add_uint (tree, hf_dispatch_flags, tvb, offset, 4, u32Flags);
|
||||
feature_tree = proto_item_add_subtree (feature_item, ett_dispatch_flags);
|
||||
if (feature_tree) {
|
||||
proto_tree_add_boolean (feature_tree, hf_dispatch_flags_propputref, tvb, offset, 4, u32Flags);
|
||||
proto_tree_add_boolean (feature_tree, hf_dispatch_flags_propput, tvb, offset, 4, u32Flags);
|
||||
proto_tree_add_boolean (feature_tree, hf_dispatch_flags_propget, tvb, offset, 4, u32Flags);
|
||||
proto_tree_add_boolean (feature_tree, hf_dispatch_flags_method, tvb, offset, 4, u32Flags);
|
||||
}
|
||||
u32TmpOffset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL, di, drep, -1, &u32Flags);
|
||||
|
||||
proto_tree_add_bitmask_value(tree, tvb, offset, hf_dispatch_flags,
|
||||
ett_dispatch_flags, flags, u32Flags);
|
||||
|
||||
if (u32Flags & DISPATCH_FLAGS_METHOD) {
|
||||
proto_item_append_text(feature_item, ", Method");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Method");
|
||||
}
|
||||
if (u32Flags & DISPATCH_FLAGS_PROPGET) {
|
||||
proto_item_append_text(feature_item, ", PropertyGet");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " PropertyGet");
|
||||
}
|
||||
if (u32Flags & DISPATCH_FLAGS_PROPPUT) {
|
||||
proto_item_append_text(feature_item, ", PropertyPut");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " PropertyPut");
|
||||
}
|
||||
if (u32Flags & DISPATCH_FLAGS_PROPPUTREF) {
|
||||
proto_item_append_text(feature_item, ", PropertyPutRef");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " PropertyPutRef");
|
||||
}
|
||||
|
||||
|
|
|
@ -1170,8 +1170,20 @@ dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
guint32 u32SubStart;
|
||||
guint32 u32TmpOffset;
|
||||
|
||||
proto_item *feature_item;
|
||||
proto_tree *feature_tree;
|
||||
static const int * features[] = {
|
||||
&hf_dcom_sa_features_variant,
|
||||
&hf_dcom_sa_features_dispatch,
|
||||
&hf_dcom_sa_features_unknown,
|
||||
&hf_dcom_sa_features_bstr,
|
||||
&hf_dcom_sa_features_have_vartype,
|
||||
&hf_dcom_sa_features_have_iid,
|
||||
&hf_dcom_sa_features_record,
|
||||
&hf_dcom_sa_features_fixedsize,
|
||||
&hf_dcom_sa_features_embedded,
|
||||
&hf_dcom_sa_features_static,
|
||||
&hf_dcom_sa_features_auto,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
/* XXX: which alignment do we need here? */
|
||||
|
@ -1189,23 +1201,10 @@ dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
hf_dcom_sa_dims16, &u16Dims);
|
||||
|
||||
/* feature flags */
|
||||
u32TmpOffset = dissect_dcom_WORD(tvb, offset, pinfo, NULL, di, drep,
|
||||
hf_dcom_sa_features, &u16Features);
|
||||
feature_item = proto_tree_add_uint (sub_tree, hf_dcom_sa_features, tvb, offset, 2, u16Features);
|
||||
feature_tree = proto_item_add_subtree (feature_item, ett_dcom_sa_features);
|
||||
if (feature_tree) {
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_variant, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_dispatch, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_unknown, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_bstr, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_have_vartype, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_have_iid, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_record, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_fixedsize, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_embedded, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_static, tvb, offset, 2, u16Features);
|
||||
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_auto, tvb, offset, 2, u16Features);
|
||||
}
|
||||
u32TmpOffset = dissect_dcom_WORD(tvb, offset, pinfo, NULL, di, drep, -1, &u16Features);
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(sub_tree, tvb, offset, hf_dcom_sa_features,
|
||||
ett_dcom_sa_features, features, u16Features, BMT_NO_APPEND);
|
||||
offset = u32TmpOffset;
|
||||
|
||||
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, di, drep,
|
||||
|
|
|
@ -606,106 +606,24 @@ dissect_fc_vft(proto_tree *parent_tree,
|
|||
static void
|
||||
dissect_fc_fctl(packet_info *pinfo _U_, proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint32 flags;
|
||||
|
||||
flags = tvb_get_guint8 (tvb, offset);
|
||||
flags = (flags<<8) | tvb_get_guint8 (tvb, offset+1);
|
||||
flags = (flags<<8) | tvb_get_guint8 (tvb, offset+2);
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_fc_fctl, tvb, offset, 3, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fctl);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_exchange_responder, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_EXCHANGE_RESPONDER){
|
||||
proto_item_append_text(item, " Exchange Responder");
|
||||
if (flags & (~( FC_FCTL_EXCHANGE_RESPONDER )))
|
||||
proto_item_append_text(item, ",");
|
||||
} else {
|
||||
proto_item_append_text(item, " Exchange Originator");
|
||||
if (flags & (~( FC_FCTL_EXCHANGE_RESPONDER )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags&=(~( FC_FCTL_EXCHANGE_RESPONDER ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_seq_recipient, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_SEQ_RECIPIENT){
|
||||
proto_item_append_text(item, " Seq Recipient");
|
||||
if (flags & (~( FC_FCTL_SEQ_RECIPIENT )))
|
||||
proto_item_append_text(item, ",");
|
||||
} else {
|
||||
proto_item_append_text(item, " Seq Initiator");
|
||||
if (flags & (~( FC_FCTL_SEQ_RECIPIENT )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags&=(~( FC_FCTL_SEQ_RECIPIENT ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_exchange_first, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_EXCHANGE_FIRST){
|
||||
proto_item_append_text(item, " Exchg First");
|
||||
if (flags & (~( FC_FCTL_EXCHANGE_FIRST )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags&=(~( FC_FCTL_EXCHANGE_FIRST ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_exchange_last, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_EXCHANGE_LAST){
|
||||
proto_item_append_text(item, " Exchg Last");
|
||||
if (flags & (~( FC_FCTL_EXCHANGE_LAST )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags&=(~( FC_FCTL_EXCHANGE_LAST ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_seq_last, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_SEQ_LAST){
|
||||
proto_item_append_text(item, " Seq Last");
|
||||
if (flags & (~( FC_FCTL_SEQ_LAST )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags&=(~( FC_FCTL_SEQ_LAST ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_priority, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_PRIORITY){
|
||||
proto_item_append_text(item, " Priority");
|
||||
if (flags & (~( FC_FCTL_PRIORITY )))
|
||||
proto_item_append_text(item, ",");
|
||||
} else {
|
||||
proto_item_append_text(item, " CS_CTL");
|
||||
if (flags & (~( FC_FCTL_PRIORITY )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags&=(~( FC_FCTL_PRIORITY ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_transfer_seq_initiative, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_TRANSFER_SEQ_INITIATIVE){
|
||||
proto_item_append_text(item, " Transfer Seq Initiative");
|
||||
if (flags & (~( FC_FCTL_TRANSFER_SEQ_INITIATIVE )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags&=(~( FC_FCTL_TRANSFER_SEQ_INITIATIVE ));
|
||||
|
||||
proto_tree_add_uint(tree, hf_fc_fctl_last_data_frame, tvb, offset, 3, flags);
|
||||
|
||||
proto_tree_add_uint(tree, hf_fc_fctl_ack_0_1, tvb, offset, 3, flags);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_rexmitted_seq, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_REXMITTED_SEQ){
|
||||
proto_item_append_text(item, " Rexmitted Seq");
|
||||
if (flags & (~( FC_FCTL_REXMITTED_SEQ )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags&=(~( FC_FCTL_REXMITTED_SEQ ));
|
||||
|
||||
proto_tree_add_uint(tree, hf_fc_fctl_abts_ack, tvb, offset, 3, flags);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fc_fctl_rel_offset, tvb, offset, 3, flags);
|
||||
if (flags&FC_FCTL_REL_OFFSET){
|
||||
proto_item_append_text(item, " Rel Offset");
|
||||
if (flags & (~( FC_FCTL_REL_OFFSET )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
static const int * flags[] = {
|
||||
&hf_fc_fctl_exchange_responder,
|
||||
&hf_fc_fctl_seq_recipient,
|
||||
&hf_fc_fctl_exchange_first,
|
||||
&hf_fc_fctl_exchange_last,
|
||||
&hf_fc_fctl_seq_last,
|
||||
&hf_fc_fctl_priority,
|
||||
&hf_fc_fctl_transfer_seq_initiative,
|
||||
&hf_fc_fctl_last_data_frame,
|
||||
&hf_fc_fctl_ack_0_1,
|
||||
&hf_fc_fctl_rexmitted_seq,
|
||||
&hf_fc_fctl_abts_ack,
|
||||
&hf_fc_fctl_rel_offset,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_fc_fctl,
|
||||
ett_fctl, flags, ENC_BIG_ENDIAN, BMT_NO_INT);
|
||||
}
|
||||
|
||||
static const value_string fc_bls_proto_val[] = {
|
||||
|
|
|
@ -393,51 +393,18 @@ fcdns_init_protocol(void)
|
|||
static void
|
||||
dissect_cos_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, const header_field_info *hfinfo)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint32 flags;
|
||||
static const int * flags[] = {
|
||||
&hfi_fcdns_cos_f.id,
|
||||
&hfi_fcdns_cos_1.id,
|
||||
&hfi_fcdns_cos_2.id,
|
||||
&hfi_fcdns_cos_3.id,
|
||||
&hfi_fcdns_cos_4.id,
|
||||
&hfi_fcdns_cos_6.id,
|
||||
NULL
|
||||
};
|
||||
|
||||
flags = tvb_get_ntohl (tvb, offset);
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hfinfo,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_cos_flags);
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_cos_f, tvb, offset, 4, flags);
|
||||
if (flags&0x01){
|
||||
proto_item_append_text(item, " F");
|
||||
}
|
||||
flags&=(~( 0x01 ));
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_cos_1, tvb, offset, 4, flags);
|
||||
if (flags&0x02){
|
||||
proto_item_append_text(item, " 1");
|
||||
}
|
||||
flags&=(~( 0x02 ));
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_cos_2, tvb, offset, 4, flags);
|
||||
if (flags&0x04){
|
||||
proto_item_append_text(item, " 2");
|
||||
}
|
||||
flags&=(~( 0x04 ));
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_cos_3, tvb, offset, 4, flags);
|
||||
if (flags&0x08){
|
||||
proto_item_append_text(item, " 3");
|
||||
}
|
||||
flags&=(~( 0x08 ));
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_cos_4, tvb, offset, 4, flags);
|
||||
if (flags&0x10){
|
||||
proto_item_append_text(item, " 4");
|
||||
}
|
||||
flags&=(~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_cos_6, tvb, offset, 4, flags);
|
||||
if (flags&0x40){
|
||||
proto_item_append_text(item, " 6");
|
||||
}
|
||||
/*flags&=(~( 0x40 ));*/
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hfinfo->id,
|
||||
ett_cos_flags, flags, ENC_BIG_ENDIAN, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
|
||||
|
@ -448,32 +415,23 @@ dissect_cos_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, const hea
|
|||
static void
|
||||
dissect_fc4features_and_type (proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint8 flags, type;
|
||||
guint8 type;
|
||||
static const int * flags[] = {
|
||||
&hfi_fcdns_fc4features_i.id,
|
||||
&hfi_fcdns_fc4features_t.id,
|
||||
NULL
|
||||
};
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
type = tvb_get_guint8(tvb, offset+1);
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, &hfi_fcdns_fc4features,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fc4features);
|
||||
|
||||
if(type==FC_TYPE_SCSI){
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_fc4features_i, tvb, offset, 1, flags);
|
||||
if (flags&0x02){
|
||||
proto_item_append_text(item, " I");
|
||||
}
|
||||
flags&=(~( 0x02 ));
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_fc4features_t, tvb, offset, 1, flags);
|
||||
if (flags&0x01){
|
||||
proto_item_append_text(item, " T");
|
||||
}
|
||||
/*flags&=(~( 0x01 ));*/
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hfi_fcdns_fc4features.id,
|
||||
ett_fc4features, flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
} else {
|
||||
proto_tree_add_item(parent_tree, &hfi_fcdns_fc4features, tvb, offset, 1, ENC_NA);
|
||||
}
|
||||
|
||||
proto_tree_add_item (tree, &hfi_fcdns_req_fc4type, tvb, offset+1, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (parent_tree, &hfi_fcdns_req_fc4type, tvb, offset+1, 1, ENC_BIG_ENDIAN);
|
||||
}
|
||||
|
||||
/* The feature routines just decode FCP's FC-4 features field
|
||||
|
@ -481,26 +439,14 @@ dissect_fc4features_and_type (proto_tree *parent_tree, tvbuff_t *tvb, int offset
|
|||
static void
|
||||
dissect_fc4features (proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
guint8 flags;
|
||||
static const int * flags[] = {
|
||||
&hfi_fcdns_fc4features_i.id,
|
||||
&hfi_fcdns_fc4features_t.id,
|
||||
NULL
|
||||
};
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
item=proto_tree_add_uint(parent_tree, &hfi_fcdns_fc4features,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fc4features);
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_fc4features_i, tvb, offset, 1, flags);
|
||||
if (flags&0x02){
|
||||
proto_item_append_text(item, " I");
|
||||
}
|
||||
flags&=(~( 0x02 ));
|
||||
|
||||
proto_tree_add_boolean(tree, &hfi_fcdns_fc4features_t, tvb, offset, 1, flags);
|
||||
if (flags&0x01){
|
||||
proto_item_append_text(item, " T");
|
||||
}
|
||||
/*flags&=(~( 0x01 ));*/
|
||||
proto_tree_add_bitmask(parent_tree, tvb, offset, hfi_fcdns_fc4features_i.id,
|
||||
ett_fc4features, flags, ENC_NA);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -678,102 +678,45 @@ static const true_false_string tfs_fc_fcels_cmn_payload = {
|
|||
static void
|
||||
dissect_cmnsvc (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags, guint8 opcode)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * common_flags[] = {
|
||||
&hf_fcels_cmn_cios,
|
||||
&hf_fcels_cmn_rro,
|
||||
&hf_fcels_cmn_vvv,
|
||||
&hf_fcels_cmn_b2b,
|
||||
&hf_fcels_cmn_multicast,
|
||||
&hf_fcels_cmn_broadcast,
|
||||
&hf_fcels_cmn_security,
|
||||
&hf_fcels_cmn_clk,
|
||||
&hf_fcels_cmn_dhd,
|
||||
&hf_fcels_cmn_payload,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_fcels_cmnfeatures,
|
||||
tvb, offset, 2, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fcels_cmnfeatures);
|
||||
static const int * pflags[] = {
|
||||
&hf_fcels_cmn_cios,
|
||||
&hf_fcels_cmn_rro,
|
||||
&hf_fcels_cmn_vvv,
|
||||
&hf_fcels_cmn_b2b,
|
||||
&hf_fcels_cmn_e_d_tov,
|
||||
&hf_fcels_cmn_simplex,
|
||||
&hf_fcels_cmn_multicast,
|
||||
&hf_fcels_cmn_broadcast,
|
||||
&hf_fcels_cmn_security,
|
||||
&hf_fcels_cmn_clk,
|
||||
&hf_fcels_cmn_dhd,
|
||||
&hf_fcels_cmn_seqcnt,
|
||||
&hf_fcels_cmn_payload,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_cios, tvb, offset, 2, flags);
|
||||
if (flags&0x8000){
|
||||
proto_item_append_text(item, " Cont. Incr. Offset Supported");
|
||||
}
|
||||
flags&=(~( 0x8000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_rro, tvb, offset, 2, flags);
|
||||
if (flags&0x4000){
|
||||
proto_item_append_text(item, " RRO Supported");
|
||||
}
|
||||
flags&=(~( 0x4000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_vvv, tvb, offset, 2, flags);
|
||||
if (flags&0x2000){
|
||||
proto_item_append_text(item, " Valid Vendor Version");
|
||||
}
|
||||
flags&=(~( 0x2000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_b2b, tvb, offset, 2, flags);
|
||||
if (flags&0x0800){
|
||||
proto_item_append_text(item, " Alt B2B Credit Mgmt");
|
||||
} else {
|
||||
proto_item_append_text(item, " Normal B2B Credit Mgmt");
|
||||
}
|
||||
flags&=(~( 0x0800 ));
|
||||
|
||||
if ((opcode == FC_ELS_PLOGI) || (opcode == FC_ELS_PDISC)) {
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_e_d_tov, tvb, offset, 2, flags);
|
||||
if (flags&0x0400){
|
||||
proto_item_append_text(item, " E_D_TOV Resolution in ns");
|
||||
} else {
|
||||
proto_item_append_text(item, " E_D_TOV Resolution in ms");
|
||||
}
|
||||
flags&=(~( 0x0400 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_simplex, tvb, offset, 2, flags);
|
||||
if (flags&0x0040){
|
||||
proto_item_append_text(item, " Simplex Dedicated Conn Supported");
|
||||
}
|
||||
flags&=(~( 0x0040 ));
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_multicast, tvb, offset, 2, flags);
|
||||
if (flags&0x0200){
|
||||
proto_item_append_text(item, " Multicast Supported");
|
||||
}
|
||||
flags&=(~( 0x0200 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_broadcast, tvb, offset, 2, flags);
|
||||
if (flags&0x0100){
|
||||
proto_item_append_text(item, " Broadcast Supported");
|
||||
}
|
||||
flags&=(~( 0x0100 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_security, tvb, offset, 2, flags);
|
||||
if (flags&0x0020){
|
||||
proto_item_append_text(item, " Security Bit");
|
||||
}
|
||||
flags&=(~( 0x0020 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_clk, tvb, offset, 2, flags);
|
||||
if (flags&0x0010){
|
||||
proto_item_append_text(item, " Clk Sync Prim Capable");
|
||||
}
|
||||
flags&=(~( 0x0010 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_dhd, tvb, offset, 2, flags);
|
||||
if (flags&0x0004){
|
||||
proto_item_append_text(item, " DHD Capable");
|
||||
}
|
||||
flags&=(~( 0x0004 ));
|
||||
|
||||
if ((opcode == FC_ELS_PLOGI) || (opcode == FC_ELS_PDISC)) {
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_seqcnt, tvb, offset, 2, flags);
|
||||
if (flags&0x0002){
|
||||
proto_item_append_text(item, " Cont. Incr SEQCNT rules");
|
||||
} else {
|
||||
proto_item_append_text(item, " Normal SEQCNT rules");
|
||||
}
|
||||
flags&=(~( 0x0002 ));
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cmn_payload, tvb, offset, 2, flags);
|
||||
if (flags&0x0001){
|
||||
proto_item_append_text(item, " Payload Len=256 bytes");
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_cmnfeatures,
|
||||
ett_fcels_cmnfeatures, pflags, flags, 0);
|
||||
} else {
|
||||
proto_item_append_text(item, " Payload Len=116 bytes");
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_cmnfeatures,
|
||||
ett_fcels_cmnfeatures, common_flags, flags, 0);
|
||||
}
|
||||
/*flags&=(~( 0x0001 ));*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -790,44 +733,26 @@ static const true_false_string tfs_fc_fcels_cls_nzctl = {
|
|||
static void
|
||||
dissect_clssvc_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags, guint8 opcode)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * common_flags[] = {
|
||||
&hf_fcels_cls_cns,
|
||||
&hf_fcels_cls_prio,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_fcels_clsflags,
|
||||
tvb, offset, 2, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fcels_clsflags);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cls_cns, tvb, offset, 2, flags);
|
||||
if (!(flags&0x8000)){
|
||||
proto_item_append_text(item, " Class Not Supported");
|
||||
return;
|
||||
}
|
||||
flags&=(~( 0x8000 ));
|
||||
static const int * pflags[] = {
|
||||
&hf_fcels_cls_cns,
|
||||
&hf_fcels_cls_sdr,
|
||||
&hf_fcels_cls_prio,
|
||||
&hf_fcels_cls_nzctl,
|
||||
NULL
|
||||
};
|
||||
|
||||
if ((opcode == FC_ELS_FLOGI) || (opcode == FC_ELS_FDISC)) {
|
||||
proto_tree_add_boolean(tree, hf_fcels_cls_sdr, tvb, offset, 2, flags);
|
||||
if (flags&0x0800){
|
||||
proto_item_append_text(item, " Seq Delivery Requested");
|
||||
} else {
|
||||
proto_item_append_text(item, " Out of Order Delivery Requested");
|
||||
}
|
||||
flags&=(~( 0x0800 ));
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_cls_prio, tvb, offset, 2, flags);
|
||||
if (flags&0x0080){
|
||||
proto_item_append_text(item, " Priority/preemption Supported");
|
||||
}
|
||||
flags&=(~( 0x0080 ));
|
||||
|
||||
if ((opcode == FC_ELS_PLOGI) || (opcode == FC_ELS_PDISC)) {
|
||||
proto_tree_add_boolean(tree, hf_fcels_cls_nzctl, tvb, offset, 2, flags);
|
||||
if (flags & 0x0040) {
|
||||
proto_item_append_text(item, " Non-zero CS_CTL Tolerated");
|
||||
} else {
|
||||
proto_item_append_text(item, " Non-zero CS_CTL Maybe Tolerated");
|
||||
}
|
||||
/*flags&=(~( 0x0040 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_clsflags,
|
||||
ett_fcels_clsflags, pflags, flags, 0);
|
||||
} else {
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_clsflags,
|
||||
ett_fcels_clsflags, common_flags, flags, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -863,67 +788,37 @@ static const true_false_string tfs_fc_fcels_fcpflags_wrxr = {
|
|||
static void
|
||||
dissect_fcp_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint32 flags, guint8 isreq)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * req_flags[] = {
|
||||
&hf_fcels_fcpflags_trireq,
|
||||
&hf_fcels_fcpflags_retry,
|
||||
&hf_fcels_fcpflags_ccomp,
|
||||
&hf_fcels_fcpflags_datao,
|
||||
&hf_fcels_fcpflags_initiator,
|
||||
&hf_fcels_fcpflags_target,
|
||||
&hf_fcels_fcpflags_rdxr,
|
||||
&hf_fcels_fcpflags_wrxr,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_fcels_fcpflags,
|
||||
tvb, offset, 4, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fcels_fcpflags);
|
||||
static const int * rep_flags[] = {
|
||||
&hf_fcels_fcpflags_trirep,
|
||||
&hf_fcels_fcpflags_retry,
|
||||
&hf_fcels_fcpflags_ccomp,
|
||||
&hf_fcels_fcpflags_datao,
|
||||
&hf_fcels_fcpflags_initiator,
|
||||
&hf_fcels_fcpflags_target,
|
||||
&hf_fcels_fcpflags_rdxr,
|
||||
&hf_fcels_fcpflags_wrxr,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (isreq) {
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_trireq, tvb, offset, 4, flags);
|
||||
if (flags&0x2000){
|
||||
proto_item_append_text(item, " Task Retry Ident Req");
|
||||
}
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_fcpflags,
|
||||
ett_fcels_fcpflags, req_flags, flags, BMT_NO_FALSE);
|
||||
} else {
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_trirep, tvb, offset, 4, flags);
|
||||
if (flags&0x2000){
|
||||
proto_item_append_text(item, " Task Retry Ident Acc");
|
||||
}
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_fcpflags,
|
||||
ett_fcels_fcpflags, rep_flags, flags, BMT_NO_FALSE);
|
||||
}
|
||||
flags&=(~( 0x2000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_retry, tvb, offset, 4, flags);
|
||||
if (flags&0x1000){
|
||||
proto_item_append_text(item, " Retry Possible");
|
||||
}
|
||||
flags&=(~( 0x1000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_ccomp, tvb, offset, 4, flags);
|
||||
if (flags&0x0080){
|
||||
proto_item_append_text(item, " Confirmed Comp");
|
||||
}
|
||||
flags&=(~( 0x0080 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_datao, tvb, offset, 4, flags);
|
||||
if (flags&0x0040){
|
||||
proto_item_append_text(item, " Data Overlay");
|
||||
}
|
||||
flags&=(~( 0x0040 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_initiator, tvb, offset, 4, flags);
|
||||
if (flags&0x0020){
|
||||
proto_item_append_text(item, " Initiator");
|
||||
}
|
||||
flags&=(~( 0x0020 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_target, tvb, offset, 4, flags);
|
||||
if (flags&0x0010){
|
||||
proto_item_append_text(item, " Target");
|
||||
}
|
||||
flags&=(~( 0x0010 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_rdxr, tvb, offset, 4, flags);
|
||||
if (flags&0x0002){
|
||||
proto_item_append_text(item, " Rd Xfer_Rdy Dis");
|
||||
}
|
||||
flags&=(~( 0x0002 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_fcpflags_wrxr, tvb, offset, 4, flags);
|
||||
if (flags&0x0001){
|
||||
proto_item_append_text(item, " Wr Xfer_Rdy Dis");
|
||||
}
|
||||
/*flags&=(~( 0x0001 ));*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -931,37 +826,17 @@ static void
|
|||
dissect_speed_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint32 flags, int port)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * speed_flags[] = {
|
||||
&hf_fcels_speedflags_1gb,
|
||||
&hf_fcels_speedflags_2gb,
|
||||
&hf_fcels_speedflags_4gb,
|
||||
&hf_fcels_speedflags_10gb,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint_format(parent_tree, hf_fcels_speedflags,
|
||||
tvb, offset, 2, flags,
|
||||
"Port Speed Capabilities (Port %u): 0x%04x",
|
||||
port, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fcels_speedflags);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_speedflags_1gb, tvb, offset, 2, flags);
|
||||
if (flags&0x8000){
|
||||
proto_item_append_text(item, " 1Gb");
|
||||
}
|
||||
flags&=(~( 0x8000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_speedflags_2gb, tvb, offset, 2, flags);
|
||||
if (flags&0x4000){
|
||||
proto_item_append_text(item, " 2Gb");
|
||||
}
|
||||
flags&=(~( 0x4000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_speedflags_4gb, tvb, offset, 2, flags);
|
||||
if (flags&0x2000){
|
||||
proto_item_append_text(item, " 4Gb");
|
||||
}
|
||||
flags&=(~( 0x2000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_speedflags_10gb, tvb, offset, 2, flags);
|
||||
if (flags&0x1000){
|
||||
proto_item_append_text(item, " 10Gb");
|
||||
}
|
||||
/*flags&=(~( 0x1000 ));*/
|
||||
item = proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_speedflags,
|
||||
ett_fcels_speedflags, speed_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
proto_item_set_text(item, "Port Speed Capabilities (Port %u): 0x%04x", port, flags);
|
||||
}
|
||||
|
||||
static const true_false_string tfs_fc_fcels_tprloflags_gprlo = {
|
||||
|
@ -980,66 +855,39 @@ static const true_false_string tfs_fc_fcels_prliloflags_eip = {
|
|||
static void
|
||||
dissect_prlilo_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, int flags, guint8 opcode)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * tprlo_flags[] = {
|
||||
&hf_fcels_tprloflags_opav,
|
||||
&hf_fcels_tprloflags_rpav,
|
||||
&hf_fcels_tprloflags_npv,
|
||||
&hf_fcels_tprloflags_gprlo,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_fcels_prliloflags,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fcels_prliloflags);
|
||||
static const int * prli_flags[] = {
|
||||
&hf_fcels_prliloflags_opav,
|
||||
&hf_fcels_tprloflags_rpav,
|
||||
&hf_fcels_prliloflags_ipe,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const int * not_prli_flags[] = {
|
||||
&hf_fcels_prliloflags_opav,
|
||||
&hf_fcels_tprloflags_rpav,
|
||||
&hf_fcels_prliloflags_eip,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (opcode == FC_ELS_TPRLO) {
|
||||
proto_tree_add_boolean(tree, hf_fcels_tprloflags_opav, tvb, offset, 1, flags);
|
||||
if (flags&0x80){
|
||||
proto_item_append_text(item, " 3rd Party Orig PA Valid");
|
||||
}
|
||||
flags&=(~( 0x80 ));
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_prliloflags,
|
||||
ett_fcels_prliloflags, tprlo_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_tprloflags_rpav, tvb, offset, 1, flags);
|
||||
if (flags&0x40){
|
||||
proto_item_append_text(item, " Resp PA Valid");
|
||||
}
|
||||
flags&=(~( 0x40 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_tprloflags_npv, tvb, offset, 1, flags);
|
||||
if (flags&0x20){
|
||||
proto_item_append_text(item, " 3rd Party N_Port Valid");
|
||||
}
|
||||
flags&=(~( 0x20 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_tprloflags_gprlo, tvb, offset, 1, flags);
|
||||
if (flags&0x10){
|
||||
proto_item_append_text(item, " Global PRLO");
|
||||
}
|
||||
/*flags&=(~( 0x10 ));*/
|
||||
} else { /* opcode != TPRLO */
|
||||
proto_tree_add_boolean(tree, hf_fcels_prliloflags_opav, tvb, offset, 1, flags);
|
||||
if (flags&0x80){
|
||||
proto_item_append_text(item, " Orig PA Valid");
|
||||
}
|
||||
flags&=(~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_tprloflags_rpav, tvb, offset, 1, flags);
|
||||
if (flags&0x40){
|
||||
proto_item_append_text(item, " Resp PA Valid");
|
||||
}
|
||||
flags&=(~( 0x40 ));
|
||||
|
||||
if (opcode == FC_ELS_PRLI) {
|
||||
proto_tree_add_boolean(tree, hf_fcels_prliloflags_ipe, tvb, offset, 1, flags);
|
||||
if (flags&0x20){
|
||||
proto_item_append_text(item, " Image Pair Estd");
|
||||
} else {
|
||||
proto_item_append_text(item, " Image Pair NOT Estd");
|
||||
}
|
||||
/*flags&=(~( 0x20 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_prliloflags,
|
||||
ett_fcels_prliloflags, prli_flags, flags, BMT_NO_FALSE);
|
||||
} else {
|
||||
proto_tree_add_boolean(tree, hf_fcels_prliloflags_eip, tvb, offset, 1, flags);
|
||||
if (flags&0x20){
|
||||
proto_item_append_text(item, " Est Image Pair & Exchg Svc Param");
|
||||
} else {
|
||||
proto_item_append_text(item, " Exchange Svc Param Only");
|
||||
}
|
||||
/*flags&=(~( 0x20 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_prliloflags,
|
||||
ett_fcels_prliloflags, not_prli_flags, flags, BMT_NO_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1058,42 +906,26 @@ static const true_false_string tfs_fc_fcels_initctl_ackgaa = {
|
|||
static void
|
||||
dissect_initctl_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags, guint8 opcode)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * plogi_flags[] = {
|
||||
&hf_fcels_initctl_initial_pa,
|
||||
&hf_fcels_initctl_ack0,
|
||||
&hf_fcels_initctl_ackgaa,
|
||||
&hf_fcels_initctl_sync,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_fcels_initctl,
|
||||
tvb, offset, 2, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fcels_initctl);
|
||||
static const int * not_plogi_flags[] = {
|
||||
&hf_fcels_initctl_sync,
|
||||
NULL
|
||||
};
|
||||
|
||||
if ((opcode == FC_ELS_PLOGI) || (opcode == FC_ELS_PDISC)) {
|
||||
proto_tree_add_uint(tree, hf_fcels_initctl_initial_pa,
|
||||
tvb, offset, 2, flags);
|
||||
proto_item_append_text(item, " %s",
|
||||
val_to_str((flags&0x3000)>>12, initial_pa_vals,
|
||||
"0x%02x")
|
||||
);
|
||||
flags&=(~( 0x3000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_initctl_ack0, tvb, offset, 2, flags);
|
||||
if (flags&0x0800){
|
||||
proto_item_append_text(item, " ACK0 Capable");
|
||||
}
|
||||
flags&=(~( 0x0800 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_initctl_ackgaa, tvb, offset, 2, flags);
|
||||
if (flags&0x0200){
|
||||
proto_item_append_text(item, " ACK Generation Assistance Avail");
|
||||
}
|
||||
flags&=(~( 0x0200 ));
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_initctl,
|
||||
ett_fcels_initctl, plogi_flags, flags, BMT_NO_FALSE);
|
||||
} else {
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_initctl,
|
||||
ett_fcels_initctl, not_plogi_flags, flags, BMT_NO_FALSE);
|
||||
}
|
||||
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_initctl_sync, tvb, offset, 2, flags);
|
||||
if (flags&0x0010){
|
||||
proto_item_append_text(item, " Clock Sync ELS Supported");
|
||||
}
|
||||
/*flags&=(~( 0x0010 ));*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -1114,50 +946,27 @@ static const value_string rcptctl_category_vals[] = {
|
|||
static void
|
||||
dissect_rcptctl_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags, guint8 opcode)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * plogi_flags[] = {
|
||||
&hf_fcels_rcptctl_ack0,
|
||||
&hf_fcels_rcptctl_interlock,
|
||||
&hf_fcels_rcptctl_policy,
|
||||
&hf_fcels_rcptctl_category,
|
||||
&hf_fcels_rcptctl_sync,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_fcels_rcptctl,
|
||||
tvb, offset, 2, flags);
|
||||
tree=proto_item_add_subtree(item, ett_fcels_rcptctl);
|
||||
static const int * not_plogi_flags[] = {
|
||||
&hf_fcels_rcptctl_sync,
|
||||
NULL
|
||||
};
|
||||
|
||||
if ((opcode == FC_ELS_PLOGI) || (opcode == FC_ELS_PDISC)) {
|
||||
proto_tree_add_boolean(tree, hf_fcels_rcptctl_ack0, tvb, offset, 2, flags);
|
||||
if (flags&0x8000){
|
||||
proto_item_append_text(item, " ACK0 Supported");
|
||||
} else {
|
||||
proto_item_append_text(item, " ACK0 NOT Supported");
|
||||
}
|
||||
flags&=(~( 0x8000 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_rcptctl_interlock, tvb, offset, 2, flags);
|
||||
if (flags&0x2000){
|
||||
proto_item_append_text(item, " X_ID Interlock Reqd");
|
||||
}
|
||||
flags&=(~( 0x2000 ));
|
||||
|
||||
proto_tree_add_uint(tree, hf_fcels_rcptctl_policy,
|
||||
tvb, offset, 2, flags);
|
||||
proto_item_append_text(item, " %s",
|
||||
val_to_str((flags&0x1800)>>11, rcptctl_policy_vals,
|
||||
"0x%02x")
|
||||
);
|
||||
flags&=(~( 0x1800 ));
|
||||
|
||||
proto_tree_add_uint(tree, hf_fcels_rcptctl_category,
|
||||
tvb, offset, 2, flags);
|
||||
proto_item_append_text(item, " %s",
|
||||
val_to_str((flags&0x0030)>>4, rcptctl_category_vals,
|
||||
"0x%02x")
|
||||
);
|
||||
flags&=(~( 0x0030 ));
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_rcptctl,
|
||||
ett_fcels_rcptctl, plogi_flags, flags, BMT_NO_FALSE);
|
||||
} else {
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_fcels_rcptctl,
|
||||
ett_fcels_rcptctl, not_plogi_flags, flags, BMT_NO_FALSE);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcels_rcptctl_sync, tvb, offset, 2, flags);
|
||||
if (flags&0x0008){
|
||||
proto_item_append_text(item, " Clock Sync ELS Supported");
|
||||
}
|
||||
/*flags&=(~( 0x0008 ));*/
|
||||
}
|
||||
|
||||
/* Maximum length of possible string from, construct_*_string
|
||||
|
|
|
@ -211,36 +211,18 @@ dissect_fcfzs_zoneset(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree, int o
|
|||
static void
|
||||
dissect_fcfzs_gzc(tvbuff_t *tvb, int offset, proto_tree *parent_tree, gboolean isreq)
|
||||
{
|
||||
static const int * flags[] = {
|
||||
&hf_fcfzs_gzc_flags_hard_zones,
|
||||
&hf_fcfzs_gzc_flags_soft_zones,
|
||||
&hf_fcfzs_gzc_flags_zoneset_db,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!isreq) {
|
||||
guint8 flags;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_fcfzs_gzc_flags,
|
||||
ett_fcfzs_gzc_flags, flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
if (parent_tree) {
|
||||
item = proto_tree_add_uint(parent_tree, hf_fcfzs_gzc_flags, tvb, offset, 1, flags);
|
||||
tree = proto_item_add_subtree(item, ett_fcfzs_gzc_flags);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcfzs_gzc_flags_hard_zones, tvb, offset, 1, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " Hard Zones");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcfzs_gzc_flags_soft_zones, tvb, offset, 1, flags);
|
||||
if (flags & 0x40) {
|
||||
proto_item_append_text(item, " Soft Zones");
|
||||
}
|
||||
flags &= (~( 0x40 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcfzs_gzc_flags_zoneset_db, tvb, offset, 1, flags);
|
||||
if (flags & 0x01) {
|
||||
proto_item_append_text(item, " ZoneSet Database Available");
|
||||
}
|
||||
/*flags &= (~( 0x01 ));*/
|
||||
|
||||
proto_tree_add_item(tree, hf_fcfzs_gzc_vendor, tvb, offset+4, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(parent_tree, hf_fcfzs_gzc_vendor, tvb, offset+4, 4, ENC_BIG_ENDIAN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,30 +230,15 @@ static void
|
|||
dissect_fcfzs_gest(tvbuff_t *tvb, proto_tree *parent_tree, gboolean isreq)
|
||||
{
|
||||
int offset = 16; /* past the fc_ct header */
|
||||
static const int * flags[] = {
|
||||
&hf_fcfzs_soft_zone_set_enforced,
|
||||
&hf_fcfzs_hard_zone_set_enforced,
|
||||
NULL
|
||||
};
|
||||
|
||||
if (!isreq) {
|
||||
guint8 flags;
|
||||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
if (parent_tree) {
|
||||
item = proto_tree_add_uint(parent_tree, hf_fcfzs_zone_state, tvb, offset, 1, flags);
|
||||
tree = proto_item_add_subtree(item, ett_fcfzs_zone_state);
|
||||
}
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcfzs_soft_zone_set_enforced, tvb, offset, 1, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " Soft Zone Set Enforced");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcfzs_hard_zone_set_enforced, tvb, offset, 1, flags);
|
||||
if (flags & 0x40) {
|
||||
proto_item_append_text(item, " Hard Zone Set Enforced");
|
||||
}
|
||||
/*flags &= (~( 0x40 ));*/
|
||||
|
||||
proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_fcfzs_zone_state,
|
||||
ett_fcfzs_zone_state, flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
|
||||
proto_tree_add_item(parent_tree, hf_fcfzs_gest_vendor, tvb, offset+4, 4, ENC_BIG_ENDIAN);
|
||||
}
|
||||
|
|
|
@ -177,70 +177,53 @@ static void
|
|||
dissect_task_mgmt_flags(packet_info *pinfo, proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * mgmt_flags[] = {
|
||||
&hf_fcp_mgmt_flags_obsolete,
|
||||
&hf_fcp_mgmt_flags_clear_aca,
|
||||
&hf_fcp_mgmt_flags_target_reset,
|
||||
&hf_fcp_mgmt_flags_lu_reset,
|
||||
&hf_fcp_mgmt_flags_rsvd,
|
||||
&hf_fcp_mgmt_flags_clear_task_set,
|
||||
&hf_fcp_mgmt_flags_abort_task_set,
|
||||
NULL
|
||||
};
|
||||
|
||||
guint8 flags;
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_fcp_taskmgmt, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
tree = proto_item_add_subtree(item, ett_fcp_taskmgmt);
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_fcp_taskmgmt,
|
||||
ett_fcp_taskmgmt, mgmt_flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
|
||||
if (!flags)
|
||||
proto_item_append_text(item, " (No values set)");
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_obsolete, tvb, offset, 1, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " OBSOLETE");
|
||||
col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP OBSOLETE] ");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_clear_aca, tvb, offset, 1, flags);
|
||||
if (flags & 0x40) {
|
||||
proto_item_append_text(item, " CLEAR ACA");
|
||||
col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_ACA] ");
|
||||
}
|
||||
flags &= (~( 0x40 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_target_reset, tvb, offset, 1, flags);
|
||||
if (flags & 0x20) {
|
||||
proto_item_append_text(item, " TARGET RESET");
|
||||
col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP TARGET_RESET] ");
|
||||
}
|
||||
flags &= (~( 0x20 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_lu_reset, tvb, offset, 1, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " LU RESET");
|
||||
col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP LU_RESET] ");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_rsvd, tvb, offset, 1, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " RSVD");
|
||||
col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP RSVD] ");
|
||||
}
|
||||
flags &= (~( 0x08 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_clear_task_set, tvb, offset, 1, flags);
|
||||
if (flags & 0x04) {
|
||||
proto_item_append_text(item, " CLEAR TASK SET");
|
||||
col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_TASK_SET] ");
|
||||
}
|
||||
flags &= (~( 0x04 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_abort_task_set, tvb, offset, 1, flags);
|
||||
if (flags & 0x02) {
|
||||
proto_item_append_text(item, " ABORT TASK SET");
|
||||
col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP ABORT_TASK_SET] ");
|
||||
}
|
||||
flags &= (~( 0x02 ));
|
||||
|
||||
if (flags) {
|
||||
proto_item_append_text(item, " Unknown bitmap value 0x%x", flags);
|
||||
}
|
||||
}
|
||||
|
||||
static const true_false_string fcp_rsp_flags_bidi_tfs = {
|
||||
|
@ -280,97 +263,40 @@ static void
|
|||
dissect_rsp_flags(proto_tree *parent_tree, tvbuff_t *tvb, int offset)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
gboolean bidi_resid_present = FALSE;
|
||||
guint8 flags;
|
||||
static const int * resid_present_flags[] = {
|
||||
&hf_fcp_rsp_flags_bidi,
|
||||
&hf_fcp_rsp_flags_bidi_rru,
|
||||
&hf_fcp_rsp_flags_bidi_rro,
|
||||
&hf_fcp_rsp_flags_conf_req,
|
||||
&hf_fcp_rsp_flags_resid_under,
|
||||
&hf_fcp_rsp_flags_resid_over,
|
||||
&hf_fcp_rsp_flags_sns_vld,
|
||||
&hf_fcp_rsp_flags_res_vld,
|
||||
NULL
|
||||
};
|
||||
|
||||
item = proto_tree_add_item(parent_tree, hf_fcp_rspflags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
|
||||
tree = proto_item_add_subtree(item, ett_fcp_rsp_flags);
|
||||
static const int * no_resid_flags[] = {
|
||||
&hf_fcp_rsp_flags_bidi,
|
||||
&hf_fcp_rsp_flags_conf_req,
|
||||
&hf_fcp_rsp_flags_resid_under,
|
||||
&hf_fcp_rsp_flags_resid_over,
|
||||
&hf_fcp_rsp_flags_sns_vld,
|
||||
&hf_fcp_rsp_flags_res_vld,
|
||||
NULL
|
||||
};
|
||||
|
||||
flags = tvb_get_guint8(tvb, offset);
|
||||
if (flags & 0x80) {
|
||||
item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_fcp_rspflags,
|
||||
ett_fcp_rsp_flags, resid_present_flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
} else {
|
||||
item = proto_tree_add_bitmask_with_flags(parent_tree, tvb, offset, hf_fcp_rspflags,
|
||||
ett_fcp_rsp_flags, no_resid_flags, ENC_NA, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
if (!flags)
|
||||
proto_item_append_text(item, " (No values set)");
|
||||
|
||||
/* BIDI RSP */
|
||||
proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi, tvb, offset, 1, flags);
|
||||
if (flags & 0x80) {
|
||||
bidi_resid_present = TRUE;
|
||||
proto_item_append_text(item, " BIDI_RSP");
|
||||
if (flags & (~( 0x80 )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
/* these two bits are only defined if the bidi bit is set */
|
||||
if (bidi_resid_present) {
|
||||
/* BIDI READ RESID UNDER */
|
||||
proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi_rru, tvb, offset, 1, flags);
|
||||
if (flags & 0x40) {
|
||||
proto_item_append_text(item, " BIDI_RRU");
|
||||
if (flags & (~( 0x40 )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags &= (~( 0x40 ));
|
||||
|
||||
/* BIDI READ RESID OVER */
|
||||
proto_tree_add_boolean(tree, hf_fcp_rsp_flags_bidi_rro, tvb, offset, 1, flags);
|
||||
if (flags & 0x20) {
|
||||
proto_item_append_text(item, " BIDI_RRO");
|
||||
if (flags & (~( 0x20 )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags &= (~( 0x20 ));
|
||||
}
|
||||
|
||||
/* Conf Req */
|
||||
proto_tree_add_boolean(tree, hf_fcp_rsp_flags_conf_req, tvb, offset, 1, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " CONF REQ");
|
||||
if (flags & (~( 0x10 )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
/* Resid Under */
|
||||
proto_tree_add_boolean(tree, hf_fcp_rsp_flags_resid_under, tvb, offset, 1, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " RESID UNDER");
|
||||
if (flags & (~( 0x08 )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags &= (~( 0x08 ));
|
||||
|
||||
/* Resid Over */
|
||||
proto_tree_add_boolean(tree, hf_fcp_rsp_flags_resid_over, tvb, offset, 1, flags);
|
||||
if (flags & 0x04) {
|
||||
proto_item_append_text(item, " RESID OVER");
|
||||
if (flags & (~( 0x04 )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags &= (~( 0x04 ));
|
||||
|
||||
/* SNS len valid */
|
||||
proto_tree_add_boolean(tree, hf_fcp_rsp_flags_sns_vld, tvb, offset, 1, flags);
|
||||
if (flags & 0x02) {
|
||||
proto_item_append_text(item, " SNS VLD");
|
||||
if (flags & (~( 0x02 )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags &= (~( 0x02 ));
|
||||
|
||||
/* rsp len valid */
|
||||
proto_tree_add_boolean(tree, hf_fcp_rsp_flags_res_vld, tvb, offset, 1, flags);
|
||||
if (flags & 0x01) {
|
||||
proto_item_append_text(item, " RES VLD");
|
||||
if (flags & (~( 0x01 )))
|
||||
proto_item_append_text(item, ",");
|
||||
}
|
||||
flags &= (~( 0x01 ));
|
||||
|
||||
if (flags) {
|
||||
proto_item_append_text(item, " Unknown bitmap value 0x%x", flags);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -248,165 +248,77 @@ static const value_string fc_sbccs_dib_lrj_errcode_val[] = {
|
|||
static void
|
||||
dissect_iui_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * iui_flags[] = {
|
||||
&hf_sbccs_iui_as,
|
||||
&hf_sbccs_iui_es,
|
||||
&hf_sbccs_iui_val,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_sbccs_iui,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_sbccs_iui);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_iui_as, tvb, offset, 1, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " AS");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_iui_es, tvb, offset, 1, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " ES");
|
||||
}
|
||||
flags &= (~( 0x08 ));
|
||||
|
||||
proto_tree_add_item (tree, hf_sbccs_iui_val, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, "%s", val_to_str (flags & 0x7, fc_sbccs_iu_val, "0x%x"));
|
||||
/*flags &= (~( 0x07 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_sbccs_iui,
|
||||
ett_sbccs_iui, iui_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
static void
|
||||
dissect_linkctlinfo (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * linkctlinfo_flags[] = {
|
||||
&hf_sbccs_dib_linkctlinfo_ctcconn,
|
||||
&hf_sbccs_dib_linkctlinfo_ecrcg,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_linkctlinfo,
|
||||
tvb, offset, 2, flags);
|
||||
tree=proto_item_add_subtree(item, ett_sbccs_dib_linkctlinfo);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_linkctlinfo_ctcconn, tvb, offset, 2, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " CTC Conn");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_linkctlinfo_ecrcg, tvb, offset, 2, flags);
|
||||
if (flags & 0x01) {
|
||||
proto_item_append_text(item, " Enhanced CRC Gen");
|
||||
}
|
||||
/*flags &= (~( 0x01 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_sbccs_dib_linkctlinfo,
|
||||
ett_sbccs_dib_linkctlinfo, linkctlinfo_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_dh_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint16 flags)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * dh_flags[] = {
|
||||
&hf_sbccs_dhflags_end,
|
||||
&hf_sbccs_dhflags_chaining,
|
||||
&hf_sbccs_dhflags_earlyend,
|
||||
&hf_sbccs_dhflags_nocrc,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_sbccs_dhflags,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_sbccs_dhflags);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dhflags_end, tvb, offset, 1, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " End");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dhflags_chaining, tvb, offset, 1, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " Chaining");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dhflags_earlyend, tvb, offset, 1, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " Early End");
|
||||
}
|
||||
flags &= (~( 0x08 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dhflags_nocrc, tvb, offset, 1, flags);
|
||||
if (flags & 0x04) {
|
||||
proto_item_append_text(item, " No CRC");
|
||||
}
|
||||
/*flags &= (~( 0x04 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_sbccs_dhflags,
|
||||
ett_sbccs_dhflags, dh_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_ccw_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 flags)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * ccw_flags[] = {
|
||||
&hf_sbccs_dib_ccw_flags_cd,
|
||||
&hf_sbccs_dib_ccw_flags_cc,
|
||||
&hf_sbccs_dib_ccw_flags_sli,
|
||||
&hf_sbccs_dib_ccw_flags_crr,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ccw_flags,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_sbccs_dib_ccw_flags);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_cd, tvb, offset, 1, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " CD");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_cc, tvb, offset, 1, flags);
|
||||
if (flags & 0x40) {
|
||||
proto_item_append_text(item, " CC");
|
||||
}
|
||||
flags &= (~( 0x40 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_sli, tvb, offset, 1, flags);
|
||||
if (flags & 0x20) {
|
||||
proto_item_append_text(item, " SLI");
|
||||
}
|
||||
flags &= (~( 0x20 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_ccw_flags_crr, tvb, offset, 1, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " CRR");
|
||||
}
|
||||
/*flags &= (~( 0x08 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_sbccs_dib_ccw_flags,
|
||||
ett_sbccs_dib_ccw_flags, ccw_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_cmd_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 flags)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * cmd_flags[] = {
|
||||
&hf_sbccs_dib_cmdflags_du,
|
||||
&hf_sbccs_dib_cmdflags_coc,
|
||||
&hf_sbccs_dib_cmdflags_syr,
|
||||
&hf_sbccs_dib_cmdflags_rex,
|
||||
&hf_sbccs_dib_cmdflags_sss,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_cmdflags,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_sbccs_dib_cmdflags);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_du, tvb, offset, 1, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " DU");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_coc, tvb, offset, 1, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " COC");
|
||||
}
|
||||
flags &= (~( 0x08 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_syr, tvb, offset, 1, flags);
|
||||
if (flags & 0x04) {
|
||||
proto_item_append_text(item, " SYR");
|
||||
}
|
||||
flags &= (~( 0x04 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_rex, tvb, offset, 1, flags);
|
||||
if (flags & 0x02) {
|
||||
proto_item_append_text(item, " REX");
|
||||
}
|
||||
flags &= (~( 0x02 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_cmdflags_sss, tvb, offset, 1, flags);
|
||||
if (flags & 0x01) {
|
||||
proto_item_append_text(item, " SSS");
|
||||
}
|
||||
/*flags &= (~( 0x01 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_sbccs_dib_cmdflags,
|
||||
ett_sbccs_dib_cmdflags, cmd_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
static const value_string status_ffc_val[] = {
|
||||
|
@ -420,140 +332,82 @@ static const value_string status_ffc_val[] = {
|
|||
static void
|
||||
dissect_status_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 flags)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_statusflags,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_sbccs_dib_statusflags);
|
||||
|
||||
proto_tree_add_item (tree, hf_sbccs_dib_statusflags_ffc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
||||
proto_item_append_text(item, "%s", val_to_str ((flags>>5) & 0x07, status_ffc_val, "Reserved:0x%x"));
|
||||
flags &= (~( 0xE0 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_ci, tvb, offset, 1, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " CI");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_cr, tvb, offset, 1, flags);
|
||||
if (flags & 0x04) {
|
||||
proto_item_append_text(item, " CR");
|
||||
}
|
||||
flags &= (~( 0x04 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_lri, tvb, offset, 1, flags);
|
||||
if (flags & 0x02) {
|
||||
proto_item_append_text(item, " LRI");
|
||||
}
|
||||
flags &= (~( 0x02 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_statusflags_rv, tvb, offset, 1, flags);
|
||||
if (flags & 0x01) {
|
||||
proto_item_append_text(item, " RV");
|
||||
}
|
||||
/*flags &= (~( 0x01 ));*/
|
||||
static const int * status_flags[] = {
|
||||
&hf_sbccs_dib_statusflags_ffc,
|
||||
&hf_sbccs_dib_statusflags_ci,
|
||||
&hf_sbccs_dib_statusflags_cr,
|
||||
&hf_sbccs_dib_statusflags_lri,
|
||||
&hf_sbccs_dib_statusflags_rv,
|
||||
NULL
|
||||
};
|
||||
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_sbccs_dib_statusflags,
|
||||
ett_sbccs_dib_statusflags, status_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_status (packet_info *pinfo, proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint8 flags)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * status_flags[] = {
|
||||
&hf_sbccs_dib_status_attention,
|
||||
&hf_sbccs_dib_status_modifier,
|
||||
&hf_sbccs_dib_status_cue,
|
||||
&hf_sbccs_dib_status_busy,
|
||||
&hf_sbccs_dib_status_channelend,
|
||||
&hf_sbccs_dib_status_deviceend,
|
||||
&hf_sbccs_dib_status_unit_check,
|
||||
&hf_sbccs_dib_status_unit_exception,
|
||||
NULL
|
||||
};
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_sbccs_dib_status,
|
||||
ett_sbccs_dib_status, status_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_status,
|
||||
tvb, offset, 1, flags);
|
||||
tree=proto_item_add_subtree(item, ett_sbccs_dib_status);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_status_attention, tvb, offset, 1, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " Attention");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Attention");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_status_modifier, tvb, offset, 1, flags);
|
||||
if (flags & 0x40) {
|
||||
proto_item_append_text(item, " Status Modifier");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Status Modifier");
|
||||
}
|
||||
flags &= (~( 0x40 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_status_cue, tvb, offset, 1, flags);
|
||||
if (flags & 0x20) {
|
||||
proto_item_append_text(item, " Control-Unit End");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Control-Unit End");
|
||||
}
|
||||
flags &= (~( 0x20 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_status_busy, tvb, offset, 1, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " Busy");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Busy");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_status_channelend, tvb, offset, 1, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " Channel End");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Channel End");
|
||||
}
|
||||
flags &= (~( 0x08 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_status_deviceend, tvb, offset, 1, flags);
|
||||
if (flags & 0x04) {
|
||||
proto_item_append_text(item, " Device End");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Device End");
|
||||
}
|
||||
flags &= (~( 0x04 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_status_unit_check, tvb, offset, 1, flags);
|
||||
if (flags & 0x02) {
|
||||
proto_item_append_text(item, " Unit Check");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Unit Check");
|
||||
}
|
||||
flags &= (~( 0x02 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_status_unit_exception, tvb, offset, 1, flags);
|
||||
if (flags & 0x01) {
|
||||
proto_item_append_text(item, " Unit Exception");
|
||||
col_append_str(pinfo->cinfo, COL_INFO, " Unit Exception");
|
||||
}
|
||||
/*flags &= (~( 0x01 ));*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
dissect_sel_rst_param (proto_tree *parent_tree, tvbuff_t *tvb, int offset, guint32 flags)
|
||||
{
|
||||
proto_item *item;
|
||||
proto_tree *tree;
|
||||
static const int * rst_param_flags[] = {
|
||||
&hf_sbccs_dib_ctlparam_rc,
|
||||
&hf_sbccs_dib_ctlparam_ru,
|
||||
&hf_sbccs_dib_ctlparam_ro,
|
||||
NULL
|
||||
};
|
||||
|
||||
item=proto_tree_add_uint(parent_tree, hf_sbccs_dib_ctlparam,
|
||||
tvb, offset, 3, flags);
|
||||
tree=proto_item_add_subtree(item, ett_sbccs_dib_ctlparam);
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_rc, tvb, offset, 3, flags);
|
||||
if (flags & 0x80) {
|
||||
proto_item_append_text(item, " RC");
|
||||
}
|
||||
flags &= (~( 0x80 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_ru, tvb, offset, 3, flags);
|
||||
if (flags & 0x10) {
|
||||
proto_item_append_text(item, " RU");
|
||||
}
|
||||
flags &= (~( 0x10 ));
|
||||
|
||||
proto_tree_add_boolean(tree, hf_sbccs_dib_ctlparam_ro, tvb, offset, 3, flags);
|
||||
if (flags & 0x08) {
|
||||
proto_item_append_text(item, " RO");
|
||||
}
|
||||
/*flags &= (~( 0x08 ));*/
|
||||
proto_tree_add_bitmask_value_with_flags(parent_tree, tvb, offset, hf_sbccs_dib_ctlparam,
|
||||
ett_sbccs_dib_ctlparam, rst_param_flags, flags, BMT_NO_FALSE|BMT_NO_TFS);
|
||||
}
|
||||
|
||||
static void get_fc_sbccs_conv_data (tvbuff_t *tvb, guint offset,
|
||||
|
|
Loading…
Reference in New Issue