diff options
author | Anders Broman <anders.broman@ericsson.com> | 2011-09-26 08:25:18 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2011-09-26 08:25:18 +0000 |
commit | 4b952c1324c2dd7ad9b5208550eb4e1c79aa2874 (patch) | |
tree | 78a5794489900be2b0c0f74a21bf9f587bd83589 /epan/dissectors | |
parent | d06af0f7717ab04eaf592dd109fb8a58c18eea23 (diff) |
Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39146
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-arp.c | 249 | ||||
-rw-r--r-- | epan/dissectors/packet-artnet.c | 212 | ||||
-rw-r--r-- | epan/dissectors/packet-atalk.c | 315 | ||||
-rw-r--r-- | epan/dissectors/packet-atm.c | 71 | ||||
-rw-r--r-- | epan/dissectors/packet-bat.c | 82 | ||||
-rw-r--r-- | epan/dissectors/packet-batadv.c | 292 | ||||
-rw-r--r-- | epan/dissectors/packet-ber.c | 44 | ||||
-rw-r--r-- | epan/dissectors/packet-ber.h | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-bfd.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-bittorrent.c | 91 | ||||
-rw-r--r-- | epan/dissectors/packet-bofl.c | 11 | ||||
-rw-r--r-- | epan/dissectors/packet-bootp.c | 23 | ||||
-rw-r--r-- | epan/dissectors/packet-bpdu.c | 114 | ||||
-rw-r--r-- | epan/dissectors/packet-bssap.c | 270 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_acl.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_evt.c | 679 | ||||
-rw-r--r-- | epan/dissectors/packet-btrfcomm.c | 68 |
17 files changed, 1226 insertions, 1327 deletions
diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c index bbf28d2342..671a14553c 100644 --- a/epan/dissectors/packet-arp.c +++ b/epan/dissectors/packet-arp.c @@ -343,9 +343,9 @@ dissect_atm_number(tvbuff_t *tvb, int offset, int tl, int hf_e164, proto_tree *nsap_tree; if (tl & ATMARP_IS_E164) - proto_tree_add_item(tree, hf_e164, tvb, offset, len, FALSE); + proto_tree_add_item(tree, hf_e164, tvb, offset, len, ENC_BIG_ENDIAN); else { - ti = proto_tree_add_item(tree, hf_nsap, tvb, offset, len, FALSE); + ti = proto_tree_add_item(tree, hf_nsap, tvb, offset, len, ENC_BIG_ENDIAN); if (len >= 20) { nsap_tree = proto_item_add_subtree(ti, ett_atmarp_nsap); dissect_atm_nsap(tvb, offset, len, nsap_tree); @@ -703,62 +703,58 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tpa_val = tvb_get_ptr(tvb, tpa_offset, ar_tpln); tpa_str = arpproaddr_to_str(tpa_val, ar_tpln, ar_pro); - if (check_col(pinfo->cinfo, COL_PROTOCOL)) { - switch (ar_op) { - - case ARPOP_REQUEST: - case ARPOP_REPLY: - case ATMARPOP_NAK: - default: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMARP"); - break; - - case ARPOP_RREQUEST: - case ARPOP_RREPLY: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMRARP"); - break; - - case ARPOP_IREQUEST: - case ARPOP_IREPLY: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ATMARP"); - break; - } + switch (ar_op) { + + case ARPOP_REQUEST: + case ARPOP_REPLY: + case ATMARPOP_NAK: + default: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMARP"); + break; + + case ARPOP_RREQUEST: + case ARPOP_RREPLY: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMRARP"); + break; + + case ARPOP_IREQUEST: + case ARPOP_IREPLY: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ATMARP"); + break; } - if (check_col(pinfo->cinfo, COL_INFO)) { - switch (ar_op) { - case ARPOP_REQUEST: - col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s? Tell %s", - tpa_str, spa_str); - break; - case ARPOP_REPLY: - col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s%s%s", spa_str, sha_str, - ((ssa_str != NULL) ? "," : ""), - ((ssa_str != NULL) ? ssa_str : "")); - break; - case ARPOP_IREQUEST: - col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s%s%s? Tell %s%s%s", - tha_str, - ((tsa_str != NULL) ? "," : ""), - ((tsa_str != NULL) ? tsa_str : ""), - sha_str, - ((ssa_str != NULL) ? "," : ""), - ((ssa_str != NULL) ? ssa_str : "")); - break; - case ARPOP_IREPLY: - col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s%s is at %s", - sha_str, - ((ssa_str != NULL) ? "," : ""), - ((ssa_str != NULL) ? ssa_str : ""), - spa_str); - break; - case ATMARPOP_NAK: - col_add_fstr(pinfo->cinfo, COL_INFO, "I don't know where %s is", spa_str); - break; - default: - col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ATMARP opcode 0x%04x", ar_op); - break; - } + switch (ar_op) { + case ARPOP_REQUEST: + col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s? Tell %s", + tpa_str, spa_str); + break; + case ARPOP_REPLY: + col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s%s%s", spa_str, sha_str, + ((ssa_str != NULL) ? "," : ""), + ((ssa_str != NULL) ? ssa_str : "")); + break; + case ARPOP_IREQUEST: + col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s%s%s? Tell %s%s%s", + tha_str, + ((tsa_str != NULL) ? "," : ""), + ((tsa_str != NULL) ? tsa_str : ""), + sha_str, + ((ssa_str != NULL) ? "," : ""), + ((ssa_str != NULL) ? ssa_str : "")); + break; + case ARPOP_IREPLY: + col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s%s is at %s", + sha_str, + ((ssa_str != NULL) ? "," : ""), + ((ssa_str != NULL) ? ssa_str : ""), + spa_str); + break; + case ATMARPOP_NAK: + col_add_fstr(pinfo->cinfo, COL_INFO, "I don't know where %s is", spa_str); + break; + default: + col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ATMARP opcode 0x%04x", ar_op); + break; } if (tree) { @@ -836,7 +832,7 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(arp_tree, ARP_PRO_IS_IPv4(ar_pro, ar_spln) ? hf_arp_src_proto_ipv4 : hf_arp_src_proto, - tvb, spa_offset, ar_spln, FALSE); + tvb, spa_offset, ar_spln, ENC_BIG_ENDIAN); } if (ar_thl != 0) @@ -853,7 +849,7 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(arp_tree, ARP_PRO_IS_IPv4(ar_pro, ar_tpln) ? hf_arp_dst_proto_ipv4 : hf_arp_dst_proto, - tvb, tpa_offset, ar_tpln, FALSE); + tvb, tpa_offset, ar_tpln, ENC_BIG_ENDIAN); } } } @@ -909,30 +905,28 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) was padding. */ tvb_set_reported_length(tvb, tot_len); - if (check_col(pinfo->cinfo, COL_PROTOCOL)) { - switch (ar_op) { - - case ARPOP_REQUEST: - if (global_arp_detect_request_storm) - { - request_seen(pinfo); - } - /* FALLTHRU */ - case ARPOP_REPLY: - default: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP"); - break; - - case ARPOP_RREQUEST: - case ARPOP_RREPLY: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "RARP"); - break; - - case ARPOP_IREQUEST: - case ARPOP_IREPLY: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ARP"); - break; - } + switch (ar_op) { + + case ARPOP_REQUEST: + if (global_arp_detect_request_storm) + { + request_seen(pinfo); + } + /* FALLTHRU */ + case ARPOP_REPLY: + default: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP"); + break; + + case ARPOP_RREQUEST: + case ARPOP_RREPLY: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "RARP"); + break; + + case ARPOP_IREQUEST: + case ARPOP_IREPLY: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ARP"); + break; } /* Get the offsets of the addresses. */ @@ -992,7 +986,7 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - if (!tree && !check_col(pinfo->cinfo, COL_INFO)) { + if (!tree) { /* We're not building a protocol tree and we're not setting the Info column, so we don't have any more work to do. */ return; @@ -1013,46 +1007,44 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) else is_gratuitous = FALSE; - if (check_col(pinfo->cinfo, COL_INFO)) { - switch (ar_op) { - case ARPOP_REQUEST: - if (is_gratuitous) - col_add_fstr(pinfo->cinfo, COL_INFO, "Gratuitous ARP for %s (Request)", - arpproaddr_to_str(tpa_val, ar_pln, ar_pro)); - else - col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s? Tell %s", - arpproaddr_to_str(tpa_val, ar_pln, ar_pro), - arpproaddr_to_str(spa_val, ar_pln, ar_pro)); - break; - case ARPOP_REPLY: - if (is_gratuitous) - col_add_fstr(pinfo->cinfo, COL_INFO, "Gratuitous ARP for %s (Reply)", - arpproaddr_to_str(spa_val, ar_pln, ar_pro)); - else - col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", - arpproaddr_to_str(spa_val, ar_pln, ar_pro), - tvb_arphrdaddr_to_str(tvb, sha_offset, ar_hln, ar_hrd)); - break; - case ARPOP_RREQUEST: - case ARPOP_IREQUEST: - col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s? Tell %s", - tvb_arphrdaddr_to_str(tvb, tha_offset, ar_hln, ar_hrd), - tvb_arphrdaddr_to_str(tvb, sha_offset, ar_hln, ar_hrd)); - break; - case ARPOP_RREPLY: - col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", - tvb_arphrdaddr_to_str(tvb, tha_offset, ar_hln, ar_hrd), + switch (ar_op) { + case ARPOP_REQUEST: + if (is_gratuitous) + col_add_fstr(pinfo->cinfo, COL_INFO, "Gratuitous ARP for %s (Request)", arpproaddr_to_str(tpa_val, ar_pln, ar_pro)); - break; - case ARPOP_IREPLY: - col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", - tvb_arphrdaddr_to_str(tvb, sha_offset, ar_hln, ar_hrd), + else + col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s? Tell %s", + arpproaddr_to_str(tpa_val, ar_pln, ar_pro), arpproaddr_to_str(spa_val, ar_pln, ar_pro)); - break; - default: - col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ARP opcode 0x%04x", ar_op); - break; - } + break; + case ARPOP_REPLY: + if (is_gratuitous) + col_add_fstr(pinfo->cinfo, COL_INFO, "Gratuitous ARP for %s (Reply)", + arpproaddr_to_str(spa_val, ar_pln, ar_pro)); + else + col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", + arpproaddr_to_str(spa_val, ar_pln, ar_pro), + tvb_arphrdaddr_to_str(tvb, sha_offset, ar_hln, ar_hrd)); + break; + case ARPOP_RREQUEST: + case ARPOP_IREQUEST: + col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s? Tell %s", + tvb_arphrdaddr_to_str(tvb, tha_offset, ar_hln, ar_hrd), + tvb_arphrdaddr_to_str(tvb, sha_offset, ar_hln, ar_hrd)); + break; + case ARPOP_RREPLY: + col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", + tvb_arphrdaddr_to_str(tvb, tha_offset, ar_hln, ar_hrd), + arpproaddr_to_str(tpa_val, ar_pln, ar_pro)); + break; + case ARPOP_IREPLY: + col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s", + tvb_arphrdaddr_to_str(tvb, sha_offset, ar_hln, ar_hrd), + arpproaddr_to_str(spa_val, ar_pln, ar_pro)); + break; + default: + col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown ARP opcode 0x%04x", ar_op); + break; } if (tree) { @@ -1079,28 +1071,28 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ARP_HW_IS_ETHER(ar_hrd, ar_hln) ? hf_arp_src_hw_mac : hf_arp_src_hw, - tvb, sha_offset, ar_hln, FALSE); + tvb, sha_offset, ar_hln, ENC_BIG_ENDIAN); } if (ar_pln != 0) { proto_tree_add_item(arp_tree, ARP_PRO_IS_IPv4(ar_pro, ar_pln) ? hf_arp_src_proto_ipv4 : hf_arp_src_proto, - tvb, spa_offset, ar_pln, FALSE); + tvb, spa_offset, ar_pln, ENC_BIG_ENDIAN); } if (ar_hln != 0) { proto_tree_add_item(arp_tree, ARP_HW_IS_ETHER(ar_hrd, ar_hln) ? hf_arp_dst_hw_mac : hf_arp_dst_hw, - tvb, tha_offset, ar_hln, FALSE); + tvb, tha_offset, ar_hln, ENC_BIG_ENDIAN); } if (ar_pln != 0) { proto_tree_add_item(arp_tree, ARP_PRO_IS_IPv4(ar_pro, ar_pln) ? hf_arp_dst_proto_ipv4 : hf_arp_dst_proto, - tvb, tpa_offset, ar_pln, FALSE); + tvb, tpa_offset, ar_pln, ENC_BIG_ENDIAN); } } @@ -1112,11 +1104,8 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (duplicate_detected) { /* Also indicate in info column */ - if (check_col(pinfo->cinfo, COL_INFO)) - { - col_append_fstr(pinfo->cinfo, COL_INFO, " (duplicate use of %s detected!)", - arpproaddr_to_str((guint8*)&duplicate_ip, 4, ETHERTYPE_IP)); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " (duplicate use of %s detected!)", + arpproaddr_to_str((guint8*)&duplicate_ip, 4, ETHERTYPE_IP)); } } diff --git a/epan/dissectors/packet-artnet.c b/epan/dissectors/packet-artnet.c index ff4e9ed523..cfafcd7342 100644 --- a/epan/dissectors/packet-artnet.c +++ b/epan/dissectors/packet-artnet.c @@ -496,14 +496,14 @@ dissect_artnet_poll(tvbuff_t *tvb, guint offset, proto_tree *tree) offset, 1, talktome); flags_tree=proto_item_add_subtree(flags_item, ett_artnet); - proto_tree_add_item(flags_tree, hf_artnet_poll_talktome_reply_dest, tvb, offset, 1, FALSE); - proto_tree_add_item(flags_tree, hf_artnet_poll_talktome_reply_type, tvb, offset, 1, FALSE); - proto_tree_add_item(flags_tree, hf_artnet_poll_talktome_unused, tvb, offset, 1, FALSE); + proto_tree_add_item(flags_tree, hf_artnet_poll_talktome_reply_dest, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_artnet_poll_talktome_reply_type, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_artnet_poll_talktome_unused, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; return offset; @@ -518,7 +518,7 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) guint16 num_ports; proto_tree_add_item(tree, hf_artnet_poll_reply_ip_address, tvb, - offset, 4, FALSE); + offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_item(tree, hf_artnet_poll_reply_port_nr, tvb, @@ -526,23 +526,23 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) offset += 2; proto_tree_add_item(tree, hf_artnet_poll_reply_versinfo, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_poll_reply_subswitch, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_poll_reply_oem, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_poll_reply_ubea_version, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_poll_reply_status, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_poll_reply_esta_man, tvb, @@ -550,15 +550,15 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) offset += 2; proto_tree_add_item(tree, hf_artnet_poll_reply_short_name, - tvb, offset, 18, FALSE); + tvb, offset, 18, ENC_BIG_ENDIAN); offset += 18; proto_tree_add_item(tree, hf_artnet_poll_reply_long_name, - tvb, offset, 64, FALSE); + tvb, offset, 64, ENC_BIG_ENDIAN); offset += 64; proto_tree_add_item(tree, hf_artnet_poll_reply_node_report, - tvb, offset, 64, FALSE); + tvb, offset, 64, ENC_BIG_ENDIAN); offset += 64; @@ -567,7 +567,7 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) tvb, offset, ARTNET_POLL_REPLY_PORT_INFO_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -581,7 +581,7 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) tvb, offset, ARTNET_POLL_REPLY_PORT_TYPES_LENGTH, - FALSE); + ENC_BIG_ENDIAN); ti = proto_item_add_subtree(hi, ett_artnet); @@ -610,7 +610,7 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) tvb, offset, ARTNET_POLL_REPLY_GOOD_INPUT_LENGTH, - FALSE); + ENC_BIG_ENDIAN); ti = proto_item_add_subtree(hi, ett_artnet); @@ -639,7 +639,7 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) tvb, offset, ARTNET_POLL_REPLY_GOOD_OUTPUT_LENGTH, - FALSE); + ENC_BIG_ENDIAN); ti = proto_item_add_subtree(hi, ett_artnet); @@ -668,7 +668,7 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) tvb, offset, ARTNET_POLL_REPLY_SWIN_LENGTH, - FALSE); + ENC_BIG_ENDIAN); ti = proto_item_add_subtree(hi, ett_artnet); @@ -697,7 +697,7 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) tvb, offset, ARTNET_POLL_REPLY_SWOUT_LENGTH, - FALSE); + ENC_BIG_ENDIAN); ti = proto_item_add_subtree(hi, ett_artnet); @@ -737,11 +737,11 @@ dissect_artnet_poll_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) offset += 1; proto_tree_add_item(tree, hf_artnet_spare, tvb, - offset, 4, FALSE); + offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_item(tree, hf_artnet_poll_reply_mac, - tvb, offset, 6, FALSE); + tvb, offset, 6, ENC_BIG_ENDIAN); offset += 6; @@ -768,11 +768,11 @@ dissect_artnet_output(tvbuff_t *tvb, guint offset, proto_tree *tree) }; proto_tree_add_item(tree, hf_artnet_output_sequence, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_output_physical, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_output_universe, tvb, @@ -789,7 +789,7 @@ dissect_artnet_output(tvbuff_t *tvb, guint offset, proto_tree *tree) tvb, offset, length, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -842,15 +842,15 @@ dissect_artnet_address(tvbuff_t *tvb, guint offset, proto_tree *tree) { guint8 swin,swout,swvideo,command; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_address_short_name, - tvb, offset, 18, FALSE); + tvb, offset, 18, ENC_BIG_ENDIAN); offset += 18; proto_tree_add_item(tree, hf_artnet_address_long_name, - tvb, offset, 64, FALSE); + tvb, offset, 64, ENC_BIG_ENDIAN); offset += 64; hi = proto_tree_add_item(tree, @@ -858,7 +858,7 @@ dissect_artnet_address(tvbuff_t *tvb, guint offset, proto_tree *tree) { tvb, offset, ARTNET_ADDRESS_SWIN_LENGTH, - FALSE); + ENC_BIG_ENDIAN); ti = proto_item_add_subtree(hi, ett_artnet); @@ -887,7 +887,7 @@ dissect_artnet_address(tvbuff_t *tvb, guint offset, proto_tree *tree) { tvb, offset, ARTNET_ADDRESS_SWOUT_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -932,7 +932,7 @@ dissect_artnet_input(tvbuff_t *tvb, guint offset, proto_tree *tree) { guint8 input; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; num_ports = tvb_get_letohs(tvb, offset); @@ -945,7 +945,7 @@ dissect_artnet_input(tvbuff_t *tvb, guint offset, proto_tree *tree) { tvb, offset, ARTNET_INPUT_INPUT_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -978,7 +978,7 @@ dissect_artnet_video_setup(tvbuff_t *tvb, guint offset, proto_tree *tree ) { guint8 control,font_height, last_font,first_font; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 4, FALSE); + offset, 4, ENC_BIG_ENDIAN); offset += 4; control = tvb_get_guint8(tvb, offset); @@ -1002,7 +1002,7 @@ dissect_artnet_video_setup(tvbuff_t *tvb, guint offset, proto_tree *tree ) { offset += 1; proto_tree_add_item(tree, hf_artnet_video_setup_win_font_name, - tvb, offset, 64, FALSE); + tvb, offset, 64, ENC_BIG_ENDIAN); offset += 64; size = last_font * font_height; @@ -1019,7 +1019,7 @@ static guint dissect_artnet_video_palette(tvbuff_t *tvb, guint offset, proto_tree *tree) { proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_video_palette_colour_red, tvb, @@ -1043,15 +1043,15 @@ dissect_artnet_video_data(tvbuff_t *tvb, guint offset, proto_tree *tree) { guint32 size; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_video_data_pos_x, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_video_data_pos_y, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; len_x = tvb_get_guint8(tvb, offset); @@ -1080,7 +1080,7 @@ dissect_artnet_firmware_master(tvbuff_t *tvb, guint offset, proto_tree *tree ) { guint32 length; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; type = tvb_get_guint8(tvb, offset); @@ -1116,7 +1116,7 @@ dissect_artnet_firmware_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) { guint8 type; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; type = tvb_get_guint8(tvb, offset); @@ -1138,15 +1138,15 @@ dissect_artnet_tod_request(tvbuff_t *tvb, guint offset, proto_tree *tree) guint8 ad_count; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_spare, tvb, - offset, 8, FALSE); + offset, 8, ENC_BIG_ENDIAN); offset += 8; proto_tree_add_item(tree, hf_artnet_tod_request_command, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; ad_count = tvb_get_guint8(tvb, offset); @@ -1155,7 +1155,7 @@ dissect_artnet_tod_request(tvbuff_t *tvb, guint offset, proto_tree *tree) offset += 1; proto_tree_add_item(tree, hf_artnet_tod_request_address, tvb, - offset, ad_count, FALSE); + offset, ad_count, ENC_BIG_ENDIAN); offset += ad_count; return offset; @@ -1167,31 +1167,31 @@ dissect_artnet_tod_data(tvbuff_t *tvb, guint offset, proto_tree *tree) guint8 i,uid_count; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_tod_data_port, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_spare, tvb, - offset, 8, FALSE); + offset, 8, ENC_BIG_ENDIAN); offset += 8; proto_tree_add_item(tree, hf_artnet_tod_data_command_response, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_tod_data_address, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_tod_data_uid_total, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_tod_data_block_count, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; uid_count = tvb_get_guint8(tvb, offset); @@ -1202,7 +1202,7 @@ dissect_artnet_tod_data(tvbuff_t *tvb, guint offset, proto_tree *tree) for( i = 0; i < uid_count; i++) { proto_tree_add_item(tree, hf_artnet_tod_data_tod, tvb, - offset, 6, FALSE); + offset, 6, ENC_BIG_ENDIAN); offset += 6; } @@ -1213,19 +1213,19 @@ static guint dissect_artnet_tod_control(tvbuff_t *tvb, guint offset, proto_tree *tree) { proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_spare, tvb, - offset, 8, FALSE); + offset, 8, ENC_BIG_ENDIAN); offset += 8; proto_tree_add_item(tree, hf_artnet_tod_control_command, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_tod_control_address, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; return offset; @@ -1239,25 +1239,25 @@ dissect_artnet_rdm(tvbuff_t *tvb, guint offset, proto_tree *tree, packet_info * tvbuff_t *next_tvb = NULL; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_spare, tvb, - offset, 8, FALSE); + offset, 8, ENC_BIG_ENDIAN); offset += 8; proto_tree_add_item(tree, hf_artnet_rdm_command, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_rdm_address, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; size = tvb_reported_length_remaining(tvb, offset); save_info=col_get_writable(pinfo->cinfo); - col_set_writable(pinfo->cinfo, FALSE); + col_set_writable(pinfo->cinfo, ENC_BIG_ENDIAN); if (!next_tvb) next_tvb = tvb_new_subset_remaining(tvb, offset); @@ -1277,7 +1277,7 @@ dissect_artnet_ip_prog(tvbuff_t *tvb, guint offset, proto_tree *tree) { proto_tree *flags_tree,*flags_item; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; command = tvb_get_guint8(tvb, offset); @@ -1285,33 +1285,33 @@ dissect_artnet_ip_prog(tvbuff_t *tvb, guint offset, proto_tree *tree) { offset, 1, command); flags_tree=proto_item_add_subtree(flags_item, ett_artnet); - proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_prog_port, tvb, offset, 1, FALSE); - proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_prog_sm, tvb, offset, 1, FALSE); - proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_prog_ip, tvb, offset, 1, FALSE); - proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_reset, tvb, offset, 1, FALSE); - proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_unused, tvb, offset, 1, FALSE); - proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_prog_enable, tvb, offset, 1, FALSE); + proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_prog_port, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_prog_sm, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_prog_ip, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_reset, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_unused, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_artnet_ip_prog_command_prog_enable, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 1, FALSE); + offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_artnet_ip_prog_ip, tvb, - offset, 4, FALSE); + offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_item(tree, hf_artnet_ip_prog_sm, tvb, - offset, 4, FALSE); + offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_item(tree, hf_artnet_ip_prog_port, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_spare, tvb, - offset, 8, FALSE); + offset, 8, ENC_BIG_ENDIAN); offset += 8; return offset; @@ -1321,23 +1321,23 @@ static guint dissect_artnet_ip_prog_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) { proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 4, FALSE); + offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_item(tree, hf_artnet_ip_prog_reply_ip, tvb, - offset, 4, FALSE); + offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_item(tree, hf_artnet_ip_prog_reply_sm, tvb, - offset, 4, FALSE); + offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_item(tree, hf_artnet_ip_prog_reply_port, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_artnet_spare, tvb, - offset, 8, FALSE); + offset, 8, ENC_BIG_ENDIAN); offset += 8; return offset; @@ -1348,7 +1348,7 @@ dissect_artnet_poll_server_reply(tvbuff_t *tvb, guint offset, proto_tree *tree) { /* no spec released for this packet at the moment */ proto_tree_add_item(tree, hf_artnet_filler, tvb, - offset, 182, FALSE); + offset, 182, ENC_BIG_ENDIAN); offset += 182; return offset; @@ -1369,7 +1369,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { col_clear(pinfo->cinfo, COL_INFO); if (tree) { - ti = proto_tree_add_item(tree, proto_artnet, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_artnet, tvb, offset, -1, ENC_BIG_ENDIAN); artnet_tree = proto_item_add_subtree(ti, ett_artnet); hi = proto_tree_add_item(artnet_tree, @@ -1377,27 +1377,23 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_HEADER_LENGTH , - FALSE); + ENC_BIG_ENDIAN); artnet_header_tree = proto_item_add_subtree(hi, ett_artnet); } - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, "%s", - tvb_get_ephemeral_string(tvb, offset, 8)); - } + col_append_fstr(pinfo->cinfo, COL_INFO, "%s", + tvb_get_ephemeral_string(tvb, offset, 8)); if( tree ){ proto_tree_add_item(artnet_header_tree, hf_artnet_header_id, - tvb, offset, 8, FALSE); + tvb, offset, 8, ENC_BIG_ENDIAN); } offset += 8; opcode = tvb_get_letohs(tvb, offset); /* set the info column */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "%s", - val_to_str(opcode, artnet_opcode_vals, "Unknown (0x%04x)")); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "%s", + val_to_str(opcode, artnet_opcode_vals, "Unknown (0x%04x)")); if( tree ){ proto_tree_add_uint(artnet_header_tree, hf_artnet_header_opcode, tvb, @@ -1408,7 +1404,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { if( opcode != ARTNET_OP_POLL_REPLY && opcode != ARTNET_OP_POLL_SERVER_REPLY ) { if( tree ){ proto_tree_add_item(artnet_header_tree, hf_artnet_header_protver, tvb, - offset, 2, FALSE); + offset, 2, ENC_BIG_ENDIAN); proto_item_set_len(artnet_header_tree, ARTNET_HEADER_LENGTH+2 ); } @@ -1423,7 +1419,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_POLL_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1441,7 +1437,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_POLL_REPLY_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1459,7 +1455,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_OUTPUT_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1477,7 +1473,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_POLL_REPLY_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1495,7 +1491,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_INPUT_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1513,7 +1509,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_VIDEO_SETUP_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1531,7 +1527,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_VIDEO_PALETTE_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1549,7 +1545,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_VIDEO_DATA_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1567,7 +1563,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_FIRMWARE_MASTER_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1585,7 +1581,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, ARTNET_FIRMWARE_REPLY_LENGTH, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1603,7 +1599,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, 0, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet); @@ -1621,7 +1617,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, 0, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet ); @@ -1655,7 +1651,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, 0, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi,ett_artnet); size = dissect_artnet_rdm( tvb, offset, si, pinfo ); @@ -1671,7 +1667,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, 0, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet ); size = dissect_artnet_ip_prog( tvb, offset, si); @@ -1688,7 +1684,7 @@ dissect_artnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tvb, offset, 0, - FALSE); + ENC_BIG_ENDIAN); si = proto_item_add_subtree(hi, ett_artnet ); size = dissect_artnet_ip_prog_reply( tvb, offset, si ); @@ -2668,19 +2664,19 @@ proto_register_artnet(void) { "DMX Display channel value type", "The way DMX values are displayed", &global_disp_chan_val_type, - disp_chan_val_types, FALSE); + disp_chan_val_types, ENC_BIG_ENDIAN); prefs_register_enum_preference(artnet_module, "dmx_disp_chan_nr_type", "DMX Display channel nr. type", "The way DMX channel numbers are displayed", &global_disp_chan_nr_type, - disp_chan_nr_types, FALSE); + disp_chan_nr_types, ENC_BIG_ENDIAN); prefs_register_enum_preference(artnet_module, "dmx_disp_col_count", "DMX Display Column Count", "The number of columns for the DMX display", &global_disp_col_count, - col_count, FALSE); + col_count, ENC_BIG_ENDIAN); } /* The registration hand-off routing */ diff --git a/epan/dissectors/packet-atalk.c b/epan/dissectors/packet-atalk.c index 03745b0a11..4e4752c972 100644 --- a/epan/dissectors/packet-atalk.c +++ b/epan/dissectors/packet-atalk.c @@ -594,12 +594,11 @@ dissect_rtmp_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { function = tvb_get_guint8(tvb, 0); - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str(function, rtmp_function_vals, "Unknown function (%02x)")); + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str(function, rtmp_function_vals, "Unknown function (%02x)")); if (tree) { - ti = proto_tree_add_item(tree, proto_rtmp, tvb, 0, 1, FALSE); + ti = proto_tree_add_item(tree, proto_rtmp, tvb, 0, 1, ENC_BIG_ENDIAN); rtmp_tree = proto_item_add_subtree(ti, ett_rtmp); proto_tree_add_uint(rtmp_tree, hf_rtmp_function, tvb, 0, 1, function); @@ -629,12 +628,11 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { nodelen = 2; } - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "Net: %u Node Len: %u Node: %u", - net, nodelen_bits, node); + col_add_fstr(pinfo->cinfo, COL_INFO, "Net: %u Node Len: %u Node: %u", + net, nodelen_bits, node); if (tree) { - ti = proto_tree_add_item(tree, proto_rtmp, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_rtmp, tvb, offset, -1, ENC_BIG_ENDIAN); rtmp_tree = proto_item_add_subtree(ti, ett_rtmp); proto_tree_add_uint(rtmp_tree, hf_rtmp_net, tvb, offset, 2, net); @@ -681,7 +679,7 @@ dissect_rtmp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { * Extended network tuple. */ proto_tree_add_item(tuple_tree, hf_rtmp_tuple_range_end, tvb, offset+3, 2, - FALSE); + ENC_BIG_ENDIAN); offset += 6; } else offset += 3; @@ -708,12 +706,11 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { op = info >> 4; count = info & 0x0F; - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "Op: %s Count: %u", - val_to_str(op, nbp_op_vals, "Unknown (0x%01x)"), count); + col_add_fstr(pinfo->cinfo, COL_INFO, "Op: %s Count: %u", + val_to_str(op, nbp_op_vals, "Unknown (0x%01x)"), count); if (tree) { - ti = proto_tree_add_item(tree, proto_nbp, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_nbp, tvb, offset, -1, ENC_BIG_ENDIAN); nbp_tree = proto_item_add_subtree(ti, ett_nbp); info_item = proto_tree_add_uint_format(nbp_tree, hf_nbp_info, tvb, offset, 1, @@ -724,7 +721,7 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { nbp_info_tree = proto_item_add_subtree(info_item, ett_nbp_info); proto_tree_add_uint(nbp_info_tree, hf_nbp_op, tvb, offset, 1, info); proto_tree_add_uint(nbp_info_tree, hf_nbp_count, tvb, offset, 1, info); - proto_tree_add_item(nbp_tree, hf_nbp_tid, tvb, offset+1, 1, FALSE); + proto_tree_add_item(nbp_tree, hf_nbp_tid, tvb, offset+1, 1, ENC_BIG_ENDIAN); offset += 2; for (i=0; i<count; i++) { @@ -735,13 +732,13 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { "Node %u", i+1); node_tree = proto_item_add_subtree(node_item, ett_nbp_node); - proto_tree_add_item(node_tree, hf_nbp_node_net, tvb, offset, 2, FALSE); + proto_tree_add_item(node_tree, hf_nbp_node_net, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(node_tree, hf_nbp_node_node, tvb, offset, 1, FALSE); + proto_tree_add_item(node_tree, hf_nbp_node_node, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(node_tree, hf_nbp_node_port, tvb, offset, 1, FALSE); + proto_tree_add_item(node_tree, hf_nbp_node_port, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(node_tree, hf_nbp_node_enum, tvb, offset, 1, FALSE); + proto_tree_add_item(node_tree, hf_nbp_node_enum, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; offset = dissect_pascal_string(tvb, offset, node_tree, hf_nbp_node_object); @@ -843,41 +840,39 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { frag_number = bitmap; } - if (check_col(pinfo->cinfo, COL_INFO)) { - col_clear(pinfo->cinfo, COL_INFO); - col_add_fstr(pinfo->cinfo, COL_INFO, "%s transaction %u", - val_to_str(op, atp_function_vals, "Unknown (0x%01x)"),tid); - if (more_fragment) - col_append_str(pinfo->cinfo, COL_INFO, " [fragment]"); - } + col_clear(pinfo->cinfo, COL_INFO); + col_add_fstr(pinfo->cinfo, COL_INFO, "%s transaction %u", + val_to_str(op, atp_function_vals, "Unknown (0x%01x)"),tid); + if (more_fragment) + col_append_str(pinfo->cinfo, COL_INFO, " [fragment]"); if (tree) { - ti = proto_tree_add_item(tree, proto_atp, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_atp, tvb, offset, -1, ENC_BIG_ENDIAN); atp_tree = proto_item_add_subtree(ti, ett_atp); proto_item_set_len(atp_tree, aspinfo.release?8:ATP_HDRSIZE -1); - info_item = proto_tree_add_item(atp_tree, hf_atp_ctrlinfo, tvb, offset, 1, FALSE); + info_item = proto_tree_add_item(atp_tree, hf_atp_ctrlinfo, tvb, offset, 1, ENC_BIG_ENDIAN); atp_info_tree = proto_item_add_subtree(info_item, ett_atp_info); - proto_tree_add_item(atp_info_tree, hf_atp_function, tvb, offset, 1, FALSE); - proto_tree_add_item(atp_info_tree, hf_atp_xo, tvb, offset, 1, FALSE); - proto_tree_add_item(atp_info_tree, hf_atp_eom, tvb, offset, 1, FALSE); - proto_tree_add_item(atp_info_tree, hf_atp_sts, tvb, offset, 1, FALSE); + proto_tree_add_item(atp_info_tree, hf_atp_function, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(atp_info_tree, hf_atp_xo, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(atp_info_tree, hf_atp_eom, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(atp_info_tree, hf_atp_sts, tvb, offset, 1, ENC_BIG_ENDIAN); if ((ctrlinfo & (ATP_FUNCMASK|ATP_XO)) == (0x40|ATP_XO)) { /* TReq with XO set */ - proto_tree_add_item(atp_info_tree, hf_atp_treltimer, tvb, offset, 1, FALSE); + proto_tree_add_item(atp_info_tree, hf_atp_treltimer, tvb, offset, 1, ENC_BIG_ENDIAN); } if (query) { proto_tree_add_text(atp_tree, tvb, offset +1, 1, "Bitmap: 0x%02x %u packet(s) max", bitmap, nbe); } else { - proto_tree_add_item(atp_tree, hf_atp_bitmap, tvb, offset +1, 1, FALSE); + proto_tree_add_item(atp_tree, hf_atp_bitmap, tvb, offset +1, 1, ENC_BIG_ENDIAN); } - proto_tree_add_item(atp_tree, hf_atp_tid, tvb, offset +2, 2, FALSE); + proto_tree_add_item(atp_tree, hf_atp_tid, tvb, offset +2, 2, ENC_BIG_ENDIAN); if (aspinfo.release) - proto_tree_add_item(atp_tree, hf_atp_user_bytes, tvb, offset +4, 4, FALSE); + proto_tree_add_item(atp_tree, hf_atp_user_bytes, tvb, offset +4, 4, ENC_BIG_ENDIAN); } @@ -1010,21 +1005,21 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * proto_tree_add_text(tree, tvb, offset +AFPSTATUS_ICONOFF, 2, "Icon offset: %u", ofs); ofs = offset +AFPSTATUS_FLAGOFF; - ti = proto_tree_add_item(tree, hf_asp_server_flag, tvb, ofs, 2, FALSE); + ti = proto_tree_add_item(tree, hf_asp_server_flag, tvb, ofs, 2, ENC_BIG_ENDIAN); sub_tree = proto_item_add_subtree(ti, ett_asp_status_server_flag); - proto_tree_add_item(sub_tree, hf_asp_server_flag_copyfile , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_passwd , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_no_save_passwd, tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_srv_msg , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_srv_sig , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_tcpip , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_notify , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_reconnect , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_directory , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_utf8_name , tvb, ofs, 2, FALSE); - proto_tree_add_item(sub_tree, hf_asp_server_flag_fast_copy , tvb, ofs, 2, FALSE); - - proto_tree_add_item(tree, hf_asp_server_name, tvb, offset +AFPSTATUS_PRELEN, 1, FALSE); + proto_tree_add_item(sub_tree, hf_asp_server_flag_copyfile , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_passwd , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_no_save_passwd, tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_srv_msg , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_srv_sig , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_tcpip , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_notify , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_reconnect , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_directory , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_utf8_name , tvb, ofs, 2, ENC_BIG_ENDIAN); + proto_tree_add_item(sub_tree, hf_asp_server_flag_fast_copy , tvb, ofs, 2, ENC_BIG_ENDIAN); + + proto_tree_add_item(tree, hf_asp_server_name, tvb, offset +AFPSTATUS_PRELEN, 1, ENC_BIG_ENDIAN); flag = tvb_get_ntohs(tvb, ofs); if ((flag & AFPSRVRINFO_SRVSIGNATURE)) { @@ -1059,7 +1054,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * } if (machine_ofs) - proto_tree_add_item(tree, hf_asp_server_type, tvb, machine_ofs, 1, FALSE); + proto_tree_add_item(tree, hf_asp_server_type, tvb, machine_ofs, 1, ENC_BIG_ENDIAN); ofs = offset +tvb_get_ntohs(tvb, offset +AFPSTATUS_VERSOFF); if (ofs) { @@ -1069,7 +1064,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * sub_tree = proto_item_add_subtree(ti, ett_asp_vers); for (i = 0; i < nbe; i++) { len = tvb_get_guint8(tvb, ofs); - proto_tree_add_item(sub_tree, hf_asp_server_vers, tvb, ofs, 1, FALSE); + proto_tree_add_item(sub_tree, hf_asp_server_vers, tvb, ofs, 1, ENC_BIG_ENDIAN); ofs += len + 1; } } @@ -1082,17 +1077,17 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * sub_tree = proto_item_add_subtree(ti, ett_asp_uams); for (i = 0; i < nbe; i++) { len = tvb_get_guint8(tvb, ofs); - proto_tree_add_item(sub_tree, hf_asp_server_uams, tvb, ofs, 1, FALSE); + proto_tree_add_item(sub_tree, hf_asp_server_uams, tvb, ofs, 1, ENC_BIG_ENDIAN); ofs += len + 1; } } ofs = offset +tvb_get_ntohs(tvb, offset +AFPSTATUS_ICONOFF); if (ofs) - proto_tree_add_item(tree, hf_asp_server_icon, tvb, ofs, 256, FALSE); + proto_tree_add_item(tree, hf_asp_server_icon, tvb, ofs, 256, ENC_BIG_ENDIAN); if (sign_ofs) { - proto_tree_add_item(tree, hf_asp_server_signature, tvb, sign_ofs, 16, FALSE); + proto_tree_add_item(tree, hf_asp_server_signature, tvb, sign_ofs, 16, ENC_BIG_ENDIAN); } if (adr_ofs) { @@ -1141,11 +1136,11 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * } len -= 2; sub_tree = proto_item_add_subtree(ti,ett_asp_addr_line); - proto_tree_add_item(sub_tree, hf_asp_server_addr_len, tvb, ofs, 1, FALSE); + proto_tree_add_item(sub_tree, hf_asp_server_addr_len, tvb, ofs, 1, ENC_BIG_ENDIAN); ofs++; - proto_tree_add_item(sub_tree, hf_asp_server_addr_type, tvb, ofs, 1, FALSE); + proto_tree_add_item(sub_tree, hf_asp_server_addr_type, tvb, ofs, 1, ENC_BIG_ENDIAN); ofs++; - proto_tree_add_item(sub_tree, hf_asp_server_addr_value,tvb, ofs, len, FALSE); + proto_tree_add_item(sub_tree, hf_asp_server_addr_value,tvb, ofs, len, ENC_BIG_ENDIAN); ofs += len; } } @@ -1158,7 +1153,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * sub_tree = proto_item_add_subtree(ti, ett_asp_directory); for (i = 0; i < nbe; i++) { len = tvb_get_guint8(tvb, ofs); - proto_tree_add_item(sub_tree, hf_asp_server_directory, tvb, ofs, 1, FALSE); + proto_tree_add_item(sub_tree, hf_asp_server_directory, tvb, ofs, 1, ENC_BIG_ENDIAN); ofs += len + 1; } } @@ -1181,7 +1176,7 @@ dissect_asp_reply_get_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree * /* ----------------------------- PAP protocol cf. inside appletalk chap. 10 */ -#define PAD(x) { proto_tree_add_item(pap_tree, hf_pap_pad, tvb, offset, x, FALSE); offset += x; } +#define PAD(x) { proto_tree_add_item(pap_tree, hf_pap_pad, tvb, offset, x, ENC_BIG_ENDIAN); offset += x; } static void dissect_pap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) @@ -1197,51 +1192,50 @@ dissect_pap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); if (tree) { - ti = proto_tree_add_item(tree, proto_pap, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_pap, tvb, offset, -1, ENC_BIG_ENDIAN); pap_tree = proto_item_add_subtree(ti, ett_pap); } connID = tvb_get_guint8(tvb, offset); - proto_tree_add_item(pap_tree, hf_pap_connid, tvb, offset, 1, FALSE); + proto_tree_add_item(pap_tree, hf_pap_connid, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; fn = tvb_get_guint8(tvb, offset); - proto_tree_add_item(pap_tree, hf_pap_function, tvb, offset, 1, FALSE); + proto_tree_add_item(pap_tree, hf_pap_function, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "%s ID: %d", - val_to_str_ext(fn, &pap_function_vals_ext, "Unknown (0x%01x)"), connID); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "%s ID: %d", + val_to_str_ext(fn, &pap_function_vals_ext, "Unknown (0x%01x)"), connID); + switch(fn) { case PAPOpenConn: PAD(2); - proto_tree_add_item(pap_tree, hf_pap_socket, tvb, offset, 1, FALSE); + proto_tree_add_item(pap_tree, hf_pap_socket, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(pap_tree, hf_pap_quantum, tvb, offset, 1, FALSE); + proto_tree_add_item(pap_tree, hf_pap_quantum, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(pap_tree, hf_pap_waittime, tvb, offset, 2, FALSE); + proto_tree_add_item(pap_tree, hf_pap_waittime, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; break; case PAPOpenConnReply: PAD(2); - proto_tree_add_item(pap_tree, hf_pap_socket, tvb, offset, 1, FALSE); + proto_tree_add_item(pap_tree, hf_pap_socket, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(pap_tree, hf_pap_quantum, tvb, offset, 1, FALSE); + proto_tree_add_item(pap_tree, hf_pap_quantum, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(pap_tree, hf_pap_result, tvb, offset, 2, FALSE); + proto_tree_add_item(pap_tree, hf_pap_result, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; offset = dissect_pascal_string(tvb, offset, pap_tree, hf_pap_status); break; case PAPSendData: - proto_tree_add_item(pap_tree, hf_pap_seq, tvb, offset, 2, FALSE); + proto_tree_add_item(pap_tree, hf_pap_seq, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; break; case PAPData: - proto_tree_add_item(pap_tree, hf_pap_eof, tvb, offset, 1, FALSE); + proto_tree_add_item(pap_tree, hf_pap_eof, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; PAD(1); /* follow by data */ @@ -1334,67 +1328,65 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) fn = (guint8) aspinfo->command; - if (check_col(pinfo->cinfo, COL_INFO)) { - if (aspinfo->reply) - col_add_fstr(pinfo->cinfo, COL_INFO, "Reply tid %u",aspinfo->seq); - else - col_add_fstr(pinfo->cinfo, COL_INFO, "Function: %s tid %u", - val_to_str_ext(fn, &asp_func_vals_ext, "Unknown (0x%01x)"), aspinfo->seq); - } + if (aspinfo->reply) + col_add_fstr(pinfo->cinfo, COL_INFO, "Reply tid %u",aspinfo->seq); + else + col_add_fstr(pinfo->cinfo, COL_INFO, "Function: %s tid %u", + val_to_str_ext(fn, &asp_func_vals_ext, "Unknown (0x%01x)"), aspinfo->seq); if (tree) { - ti = proto_tree_add_item(tree, proto_asp, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_asp, tvb, offset, -1, ENC_BIG_ENDIAN); asp_tree = proto_item_add_subtree(ti, ett_asp); } if (!aspinfo->reply) { tvbuff_t *new_tvb; /* let the called deal with asp_tree == NULL */ - proto_tree_add_item(asp_tree, hf_asp_func, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_func, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; switch(fn) { case ASPFUNC_OPEN: - proto_tree_add_item(asp_tree, hf_asp_socket, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_socket, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_version, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_version, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; break; case ASPFUNC_TICKLE: case ASPFUNC_CLOSE: - proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 2, ENC_BIG_ENDIAN); offset +=2; break; case ASPFUNC_STAT: - proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; break; case ASPFUNC_ATTN: - proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_attn_code, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_attn_code, tvb, offset, 2, ENC_BIG_ENDIAN); offset +=2; break; case ASPFUNC_CMD: case ASPFUNC_WRITE: proto_item_set_len(asp_tree, 4); - proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_seq, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_seq, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; len = tvb_reported_length_remaining(tvb,offset); new_tvb = tvb_new_subset(tvb, offset,-1,len); call_dissector(afp_handle, new_tvb, pinfo, tree); break; case ASPFUNC_WRTCONT: - proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_seq, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_seq, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(asp_tree, hf_asp_size, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_size, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; break; default: @@ -1411,23 +1403,23 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(asp_tree, hf_asp_func, tvb, 0, 0, fn); switch(fn) { case ASPFUNC_OPEN: - proto_tree_add_item(asp_tree, hf_asp_socket, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_socket, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_session_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_init_error, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_init_error, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; break; case ASPFUNC_CLOSE: - proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 1, FALSE); + proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 2, FALSE); + proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; break; case ASPFUNC_STAT: - proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 4, FALSE); + proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; dissect_asp_reply_get_status(tvb, pinfo, asp_tree, offset); break; @@ -1435,7 +1427,7 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case ASPFUNC_WRITE: proto_item_set_len(asp_tree, 4); aspinfo->code = tvb_get_ntohl(tvb, offset); - proto_tree_add_item(asp_tree, hf_asp_error, tvb, offset, 4, FALSE); + proto_tree_add_item(asp_tree, hf_asp_error, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; len = tvb_reported_length_remaining(tvb,offset); new_tvb = tvb_new_subset(tvb, offset,-1,len); @@ -1443,7 +1435,7 @@ dissect_asp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case ASPFUNC_TICKLE: case ASPFUNC_WRTCONT: - proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 4, FALSE); + proto_tree_add_item(asp_tree, hf_asp_zero_value, tvb, offset, 4, ENC_BIG_ENDIAN); /* fall */ case ASPFUNC_ATTN: /* FIXME capture and spec disagree */ default: @@ -1480,30 +1472,28 @@ dissect_atp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) fn = (guint8) aspinfo->command; - if (check_col(pinfo->cinfo, COL_INFO)) { - if (aspinfo->reply) - col_add_fstr(pinfo->cinfo, COL_INFO, "Reply tid %u",aspinfo->seq); - else - col_add_fstr(pinfo->cinfo, COL_INFO, "Function: %s tid %u", - val_to_str(fn, zip_atp_function_vals, "Unknown (0x%01x)"), aspinfo->seq); - } + if (aspinfo->reply) + col_add_fstr(pinfo->cinfo, COL_INFO, "Reply tid %u",aspinfo->seq); + else + col_add_fstr(pinfo->cinfo, COL_INFO, "Function: %s tid %u", + val_to_str(fn, zip_atp_function_vals, "Unknown (0x%01x)"), aspinfo->seq); if (!tree) return; - ti = proto_tree_add_item(tree, proto_zip, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_zip, tvb, offset, -1, ENC_BIG_ENDIAN); zip_tree = proto_item_add_subtree(ti, ett_zip); if (!aspinfo->reply) { - proto_tree_add_item(zip_tree, hf_zip_atp_function, tvb, offset, 1, FALSE); + proto_tree_add_item(zip_tree, hf_zip_atp_function, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; switch(fn) { case 7: /* start_index = 0 */ case 8: case 9: - proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 1, FALSE); + proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(zip_tree, hf_zip_start_index, tvb, offset, 2, FALSE); + proto_tree_add_item(zip_tree, hf_zip_start_index, tvb, offset, 2, ENC_BIG_ENDIAN); break; } } @@ -1515,18 +1505,18 @@ dissect_atp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case 7: case 8: case 9: - proto_tree_add_item(zip_tree, hf_zip_last_flag, tvb, offset, 1, FALSE); + proto_tree_add_item(zip_tree, hf_zip_last_flag, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 1, FALSE); + proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; count = tvb_get_ntohs(tvb, offset); - ti = proto_tree_add_item(zip_tree, hf_zip_count, tvb, offset, 2, FALSE); + ti = proto_tree_add_item(zip_tree, hf_zip_count, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; sub_tree = proto_item_add_subtree(ti, ett_zip_zones_list); for (i= 0; i < count; i++) { len = tvb_get_guint8(tvb, offset); - proto_tree_add_item(sub_tree, hf_zip_zone_name, tvb, offset, 1,FALSE); + proto_tree_add_item(sub_tree, hf_zip_zone_name, tvb, offset, 1,ENC_BIG_ENDIAN); offset += len +1; } break; @@ -1554,28 +1544,26 @@ dissect_ddp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); fn = tvb_get_guint8(tvb, 0); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str_ext(fn, &zip_function_vals_ext, "Unknown ZIP function (%02x)")); - } + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str_ext(fn, &zip_function_vals_ext, "Unknown ZIP function (%02x)")); if (!tree) return; - ti = proto_tree_add_item(tree, proto_zip, tvb, 0, -1, FALSE); + ti = proto_tree_add_item(tree, proto_zip, tvb, 0, -1, ENC_BIG_ENDIAN); zip_tree = proto_item_add_subtree(ti, ett_zip); - proto_tree_add_item(zip_tree, hf_zip_function, tvb, offset, 1,FALSE); + proto_tree_add_item(zip_tree, hf_zip_function, tvb, offset, 1,ENC_BIG_ENDIAN); offset++; /* fn 1,7,2,8 are not tested */ switch (fn) { case 1: /* Query */ count = tvb_get_guint8(tvb, offset); - ti = proto_tree_add_item(zip_tree, hf_zip_network_count, tvb, offset, 1, FALSE); + ti = proto_tree_add_item(zip_tree, hf_zip_network_count, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; sub_tree = proto_item_add_subtree(ti, ett_zip_network_list); for (i= 0; i < count; i++) { - proto_tree_add_item(sub_tree, hf_zip_network, tvb, offset, 2, FALSE); + proto_tree_add_item(sub_tree, hf_zip_network, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; } break; @@ -1583,79 +1571,79 @@ dissect_ddp_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) flag = tvb_get_guint8(tvb, offset); ti = proto_tree_add_text(zip_tree, tvb, offset , 1,"Flags : 0x%02x", flag); flag_tree = proto_item_add_subtree(ti, ett_zip_flags); - proto_tree_add_item(flag_tree, hf_zip_flags_zone_invalid, tvb, offset, 1,FALSE); - proto_tree_add_item(flag_tree, hf_zip_flags_use_broadcast,tvb, offset, 1,FALSE); - proto_tree_add_item(flag_tree, hf_zip_flags_only_one_zone,tvb, offset, 1,FALSE); + proto_tree_add_item(flag_tree, hf_zip_flags_zone_invalid, tvb, offset, 1,ENC_BIG_ENDIAN); + proto_tree_add_item(flag_tree, hf_zip_flags_use_broadcast,tvb, offset, 1,ENC_BIG_ENDIAN); + proto_tree_add_item(flag_tree, hf_zip_flags_only_one_zone,tvb, offset, 1,ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 4, FALSE); + proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; len = tvb_get_guint8(tvb, offset); - proto_tree_add_item(zip_tree, hf_zip_zone_name, tvb, offset, 1,FALSE); + proto_tree_add_item(zip_tree, hf_zip_zone_name, tvb, offset, 1,ENC_BIG_ENDIAN); offset += len +1; len = tvb_get_guint8(tvb, offset); - proto_tree_add_item(zip_tree, hf_zip_multicast_length,tvb, offset, 1,FALSE); + proto_tree_add_item(zip_tree, hf_zip_multicast_length,tvb, offset, 1,ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(zip_tree, hf_zip_multicast_address,tvb, offset, len,FALSE); + proto_tree_add_item(zip_tree, hf_zip_multicast_address,tvb, offset, len,ENC_BIG_ENDIAN); offset += len; - proto_tree_add_item(zip_tree, hf_zip_zone_name, tvb, offset, 1,FALSE); + proto_tree_add_item(zip_tree, hf_zip_zone_name, tvb, offset, 1,ENC_BIG_ENDIAN); break; case 2: /* Reply */ case 8: /* Extended Reply */ count = tvb_get_guint8(tvb, offset); - ti = proto_tree_add_item(zip_tree, hf_zip_network_count, tvb, offset, 1, FALSE); + ti = proto_tree_add_item(zip_tree, hf_zip_network_count, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; sub_tree = proto_item_add_subtree(ti, ett_zip_network_list); for (i= 0; i < count; i++) { net = tvb_get_ntohs(tvb, offset); ti = proto_tree_add_text(sub_tree, tvb, offset , 2, "Zone for network : %u", net); net_tree = proto_item_add_subtree(ti, ett_zip_network_list); - proto_tree_add_item(net_tree, hf_zip_network, tvb, offset, 2, FALSE); + proto_tree_add_item(net_tree, hf_zip_network, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; len = tvb_get_guint8(tvb, offset); - proto_tree_add_item(net_tree, hf_zip_zone_name, tvb, offset, 1,FALSE); + proto_tree_add_item(net_tree, hf_zip_zone_name, tvb, offset, 1,ENC_BIG_ENDIAN); offset += len +1; } break; case 5 : /* GetNetInfo request */ - proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 1, FALSE); + proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 4, FALSE); + proto_tree_add_item(zip_tree, hf_zip_zero_value, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; - proto_tree_add_item(zip_tree, hf_zip_zone_name, tvb, offset, 1,FALSE); + proto_tree_add_item(zip_tree, hf_zip_zone_name, tvb, offset, 1,ENC_BIG_ENDIAN); break; case 6 : /* GetNetInfo reply */ flag = tvb_get_guint8(tvb, offset); ti = proto_tree_add_text(zip_tree, tvb, offset , 1,"Flags : 0x%02x", flag); flag_tree = proto_item_add_subtree(ti, ett_zip_flags); - proto_tree_add_item(flag_tree, hf_zip_flags_zone_invalid, tvb, offset, 1,FALSE); - proto_tree_add_item(flag_tree, hf_zip_flags_use_broadcast,tvb, offset, 1,FALSE); - proto_tree_add_item(flag_tree, hf_zip_flags_only_one_zone,tvb, offset, 1,FALSE); + proto_tree_add_item(flag_tree, hf_zip_flags_zone_invalid, tvb, offset, 1,ENC_BIG_ENDIAN); + proto_tree_add_item(flag_tree, hf_zip_flags_use_broadcast,tvb, offset, 1,ENC_BIG_ENDIAN); + proto_tree_add_item(flag_tree, hf_zip_flags_only_one_zone,tvb, offset, 1,ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(zip_tree, hf_zip_network_start, tvb, offset, 2, FALSE); + proto_tree_add_item(zip_tree, hf_zip_network_start, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(zip_tree, hf_zip_network_end, tvb, offset, 2, FALSE); + proto_tree_add_item(zip_tree, hf_zip_network_end, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; len = tvb_get_guint8(tvb, offset); - proto_tree_add_item(zip_tree, hf_zip_zone_name, tvb, offset, 1,FALSE); + proto_tree_add_item(zip_tree, hf_zip_zone_name, tvb, offset, 1,ENC_BIG_ENDIAN); offset += len +1; len = tvb_get_guint8(tvb, offset); - proto_tree_add_item(zip_tree, hf_zip_multicast_length,tvb, offset, 1,FALSE); + proto_tree_add_item(zip_tree, hf_zip_multicast_length,tvb, offset, 1,ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(zip_tree, hf_zip_multicast_address,tvb, offset, len,FALSE); + proto_tree_add_item(zip_tree, hf_zip_multicast_address,tvb, offset, len,ENC_BIG_ENDIAN); offset += len; if ((flag & 0x80) != 0) - proto_tree_add_item(zip_tree, hf_zip_default_zone, tvb, offset, 1,FALSE); + proto_tree_add_item(zip_tree, hf_zip_default_zone, tvb, offset, 1,ENC_BIG_ENDIAN); break; default: @@ -1681,7 +1669,7 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode, if (tree) { ti = proto_tree_add_item(tree, proto_ddp, tvb, 0, DDP_SHORT_HEADER_SIZE, - FALSE); + ENC_BIG_ENDIAN); ddp_tree = proto_item_add_subtree(ti, ett_ddp); } len = tvb_get_ntohs(tvb, 0); @@ -1708,10 +1696,9 @@ dissect_ddp_short(tvbuff_t *tvb, packet_info *pinfo, guint8 dnode, pinfo->destport = dport; pinfo->srcport = sport; - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str_ext(type, &op_vals_ext, "Unknown DDP protocol (%02x)")); - } + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str_ext(type, &op_vals_ext, "Unknown DDP protocol (%02x)")); + if (tree) { hidden_item = proto_tree_add_string(ddp_tree, hf_ddp_src, tvb, 4, 3, atalk_addr_to_str(&src)); @@ -1759,13 +1746,12 @@ dissect_ddp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pinfo->destport = ddp.dport; pinfo->srcport = ddp.sport; - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str_ext(ddp.type, &op_vals_ext, "Unknown DDP protocol (%02x)")); + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str_ext(ddp.type, &op_vals_ext, "Unknown DDP protocol (%02x)")); if (tree) { ti = proto_tree_add_item(tree, proto_ddp, tvb, 0, DDP_HEADER_SIZE, - FALSE); + ENC_BIG_ENDIAN); ddp_tree = proto_item_add_subtree(ti, ett_ddp); hidden_item = proto_tree_add_string(ddp_tree, hf_ddp_src, tvb, @@ -1835,7 +1821,7 @@ dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); if (tree) { - ti = proto_tree_add_item(tree, proto_llap, tvb, 0, 3, FALSE); + ti = proto_tree_add_item(tree, proto_llap, tvb, 0, 3, ENC_BIG_ENDIAN); llap_tree = proto_item_add_subtree(ti, ett_llap); } @@ -1846,10 +1832,9 @@ dissect_llap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) proto_tree_add_uint(llap_tree, hf_llap_src, tvb, 1, 1, snode); type = tvb_get_guint8(tvb, 2); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str_ext(type, &llap_type_vals_ext, "Unknown LLAP type (%02x)")); - } + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str_ext(type, &llap_type_vals_ext, "Unknown LLAP type (%02x)")); + if (tree) proto_tree_add_uint(llap_tree, hf_llap_type, tvb, 2, 1, type); diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c index fb65dee988..79f8198120 100644 --- a/epan/dissectors/packet-atm.c +++ b/epan/dissectors/packet-atm.c @@ -511,11 +511,10 @@ dissect_le_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset += 1; opcode = tvb_get_ntohs(tvb, offset); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", - val_to_str(opcode, le_control_opcode_vals, - "Unknown opcode (0x%04X)")); - } + col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", + val_to_str(opcode, le_control_opcode_vals, + "Unknown opcode (0x%04X)")); + if (tree) { proto_tree_add_text(lane_tree, tvb, offset, 2, "Opcode: %s", val_to_str(opcode, le_control_opcode_vals, @@ -701,7 +700,7 @@ dissect_lane(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void dissect_ilmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - dissect_snmp_pdu(tvb, 0, pinfo, tree, proto_ilmi, ett_ilmi, FALSE); + dissect_snmp_pdu(tvb, 0, pinfo, tree, proto_ilmi, ett_ilmi, ENC_BIG_ENDIAN); } /* AAL types */ @@ -975,12 +974,9 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pinfo->pseudo_header->atm.vci); /* Also show vpi/vci in info column */ - if (check_col(pinfo->cinfo, COL_INFO)) - { - col_append_fstr(pinfo->cinfo, COL_INFO, " VPI=%u, VCI=%u", - pinfo->pseudo_header->atm.vpi, - pinfo->pseudo_header->atm.vci); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " VPI=%u, VCI=%u", + pinfo->pseudo_header->atm.vpi, + pinfo->pseudo_header->atm.vci); } next_tvb = tvb; @@ -1686,16 +1682,14 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, case AAL_1: col_set_str(pinfo->cinfo, COL_PROTOCOL, "AAL1"); col_clear(pinfo->cinfo, COL_INFO); - ti = proto_tree_add_item(tree, proto_aal1, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_aal1, tvb, offset, -1, ENC_BIG_ENDIAN); aal_tree = proto_item_add_subtree(ti, ett_aal1); octet = tvb_get_guint8(tvb, offset); proto_tree_add_text(aal_tree, tvb, offset, 1, "CSI: %u", octet >> 7); proto_tree_add_text(aal_tree, tvb, offset, 1, "Sequence Count: %u", (octet >> 4) & 0x7); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Sequence count = %u", - (octet >> 4) & 0x7); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "Sequence count = %u", + (octet >> 4) & 0x7); proto_tree_add_text(aal_tree, tvb, offset, 1, "CRC: 0x%x", (octet >> 1) & 0x7); proto_tree_add_text(aal_tree, tvb, offset, 1, "Parity: %u", @@ -1711,14 +1705,12 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "AAL3/4"); col_clear(pinfo->cinfo, COL_INFO); - ti = proto_tree_add_item(tree, proto_aal3_4, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_aal3_4, tvb, offset, -1, ENC_BIG_ENDIAN); aal_tree = proto_item_add_subtree(ti, ett_aal3_4); aal3_4_hdr = tvb_get_ntohs(tvb, offset); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "%s, sequence number = %u", - val_to_str(aal3_4_hdr >> 14, st_vals, "Unknown (%u)"), - (aal3_4_hdr >> 10) & 0xF); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "%s, sequence number = %u", + val_to_str(aal3_4_hdr >> 14, st_vals, "Unknown (%u)"), + (aal3_4_hdr >> 10) & 0xF); proto_tree_add_text(aal_tree, tvb, offset, 2, "Segment Type: %s", val_to_str(aal3_4_hdr >> 14, st_vals, "Unknown (%u)")); proto_tree_add_text(aal_tree, tvb, offset, 2, "Sequence Number: %u", @@ -1747,14 +1739,13 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, col_set_str(pinfo->cinfo, COL_PROTOCOL, "OAM AAL"); col_clear(pinfo->cinfo, COL_INFO); } - ti = proto_tree_add_item(tree, proto_oamaal, tvb, offset, -1, FALSE); + ti = proto_tree_add_item(tree, proto_oamaal, tvb, offset, -1, ENC_BIG_ENDIAN); aal_tree = proto_item_add_subtree(ti, ett_oamaal); octet = tvb_get_guint8(tvb, offset); if (NULL == pwpd || pwpd->enable_fill_columns_by_atm_dissector) { - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "%s", - val_to_str(octet >> 4, oam_type_vals, "Unknown (%u)")); + col_add_fstr(pinfo->cinfo, COL_INFO, "%s", + val_to_str(octet >> 4, oam_type_vals, "Unknown (%u)")); } proto_tree_add_text(aal_tree, tvb, offset, 1, "OAM Type: %s", val_to_str(octet >> 4, oam_type_vals, "Unknown (%u)")); @@ -1834,20 +1825,18 @@ dissect_atm_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } } - if (check_col(pinfo->cinfo, COL_INFO)) { - if (pinfo->pseudo_header->atm.aal == AAL_5) { - col_add_fstr(pinfo->cinfo, COL_INFO, "AAL5 %s", - val_to_str(pinfo->pseudo_header->atm.type, aal5_hltype_vals, - "Unknown traffic type (%u)")); - } else { - col_add_str(pinfo->cinfo, COL_INFO, - val_to_str(pinfo->pseudo_header->atm.aal, aal_vals, - "Unknown AAL (%u)")); - } + if (pinfo->pseudo_header->atm.aal == AAL_5) { + col_add_fstr(pinfo->cinfo, COL_INFO, "AAL5 %s", + val_to_str(pinfo->pseudo_header->atm.type, aal5_hltype_vals, + "Unknown traffic type (%u)")); + } else { + col_add_str(pinfo->cinfo, COL_INFO, + val_to_str(pinfo->pseudo_header->atm.aal, aal_vals, + "Unknown AAL (%u)")); } if (tree) { - atm_ti = proto_tree_add_item(tree, proto_atm, tvb, 0, -1, FALSE); + atm_ti = proto_tree_add_item(tree, proto_atm, tvb, 0, -1, ENC_BIG_ENDIAN); atm_tree = proto_item_add_subtree(atm_ti, ett_atm); if (!pseudowire_mode) { @@ -1902,7 +1891,7 @@ dissect_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) static void dissect_atm_untruncated(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - dissect_atm_common(tvb, pinfo, tree, FALSE); + dissect_atm_common(tvb, pinfo, tree, ENC_BIG_ENDIAN); } static void @@ -1921,7 +1910,7 @@ dissect_atm_oam_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - dissect_atm_cell(tvb, pinfo, tree, atm_tree, AAL_OAMCELL, FALSE, FALSE); + dissect_atm_cell(tvb, pinfo, tree, atm_tree, AAL_OAMCELL, FALSE, ENC_BIG_ENDIAN); } @@ -1993,7 +1982,7 @@ proto_register_atm(void) prefs_register_enum_preference ( atm_module, "unknown_aal2_type", "Decode unknown AAL2 traffic as", "Type used to dissect unknown AAL2 traffic", - &unknown_aal2_type, unknown_aal2_options, FALSE); + &unknown_aal2_type, unknown_aal2_options, ENC_BIG_ENDIAN); } diff --git a/epan/dissectors/packet-bat.c b/epan/dissectors/packet-bat.c index 956476a45e..32647e963a 100644 --- a/epan/dissectors/packet-bat.c +++ b/epan/dissectors/packet-bat.c @@ -271,16 +271,16 @@ static int dissect_bat_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinfo, "B.A.T.M.A.N., Orig: %s (%s)", get_hostname(orig), ip_to_str(batman_packeth->orig.data)); } else { - ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, offset, BATMAN_PACKET_V5_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, offset, BATMAN_PACKET_V5_SIZE, ENC_BIG_ENDIAN); } bat_batman_tree = proto_item_add_subtree(ti, ett_bat_batman); } /* items */ - proto_tree_add_item(bat_batman_tree, hf_bat_batman_version, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_batman_tree, hf_bat_batman_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(bat_batman_tree, hf_bat_batman_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(bat_batman_tree, hf_bat_batman_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_bat_batman_flags); proto_tree_add_boolean(flag_tree, hf_bat_batman_flags_unidirectional, tvb, offset, 1, batman_packeth->flags); @@ -288,17 +288,17 @@ static int dissect_bat_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinfo, /* </flags> */ offset += 1; - proto_tree_add_item(bat_batman_tree, hf_bat_batman_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_batman_tree, hf_bat_batman_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tgw = proto_tree_add_item(bat_batman_tree, hf_bat_batman_gwflags, tvb, offset, 1, FALSE); + tgw = proto_tree_add_item(bat_batman_tree, hf_bat_batman_gwflags, tvb, offset, 1, ENC_BIG_ENDIAN); dissect_bat_gwflags(tvb, batman_packeth->gwflags, offset, tgw); offset += 1; - proto_tree_add_item(bat_batman_tree, hf_bat_batman_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(bat_batman_tree, hf_bat_batman_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(bat_batman_tree, hf_bat_batman_gwport, tvb, offset, 2, FALSE); + proto_tree_add_item(bat_batman_tree, hf_bat_batman_gwport, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_ipv4(bat_batman_tree, hf_bat_batman_orig, tvb, offset, 4, orig); @@ -307,10 +307,10 @@ static int dissect_bat_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree_add_ipv4(bat_batman_tree, hf_bat_batman_old_orig, tvb, offset, 4, old_orig); offset += 4; - proto_tree_add_item(bat_batman_tree, hf_bat_batman_tq, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_batman_tree, hf_bat_batman_tq, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(bat_batman_tree, hf_bat_batman_hna_len, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_batman_tree, hf_bat_batman_hna_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; tap_queue_packet(bat_tap, pinfo, batman_packeth); @@ -348,12 +348,12 @@ static void dissect_bat_hna(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t "B.A.T.M.A.N. HNA: %s/%d", tvb_ip_to_str(tvb, 0), hna_netmask); } else { - ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 5, FALSE); + ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 5, ENC_BIG_ENDIAN); } bat_batman_hna_tree = proto_item_add_subtree(ti, ett_bat_batman_hna); proto_tree_add_ipv4(bat_batman_hna_tree, hf_bat_batman_hna_network, tvb, 0, 4, hna); - proto_tree_add_item(bat_batman_hna_tree, hf_bat_batman_hna_netmask, tvb, 4, 1, FALSE); + proto_tree_add_item(bat_batman_hna_tree, hf_bat_batman_hna_netmask, tvb, 4, 1, ENC_BIG_ENDIAN); } } @@ -384,13 +384,11 @@ static void dissect_bat_gw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "BAT_GW"); /* Set info column */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Type=%s", - val_to_str(gw_packeth->type, gw_packettypenames, "Unknown (0x%02x)")); - if (ip != 0) { - col_append_fstr(pinfo->cinfo, COL_INFO, " IP: %s (%s)", - get_hostname(ip), tvb_ip_to_str(tvb, ip_pos)); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "Type=%s", + val_to_str(gw_packeth->type, gw_packettypenames, "Unknown (0x%02x)")); + if (ip != 0) { + col_append_fstr(pinfo->cinfo, COL_INFO, " IP: %s (%s)", + get_hostname(ip), tvb_ip_to_str(tvb, ip_pos)); } @@ -404,11 +402,11 @@ static void dissect_bat_gw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) "B.A.T.M.A.N. GW [%s]", val_to_str(gw_packeth->type, gw_packettypenames, "Unknown (0x%02x)")); } else { - ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 1, FALSE); + ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 1, ENC_BIG_ENDIAN); } bat_gw_entry_tree = proto_item_add_subtree(ti, ett_bat_gw); - proto_tree_add_item(bat_gw_entry_tree, hf_bat_gw_type, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_gw_entry_tree, hf_bat_gw_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; if (gw_packeth->type != TUNNEL_DATA && ip != 0) { @@ -484,10 +482,8 @@ static void dissect_bat_vis_v22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t col_set_str(pinfo->cinfo, COL_PROTOCOL, "BAT_VIS"); /* Set info column */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Src: %s (%s)", - get_hostname(sender_ip), ip_to_str(vis_packeth->sender_ip.data)); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "Src: %s (%s)", + get_hostname(sender_ip), ip_to_str(vis_packeth->sender_ip.data)); /* Set tree info */ if (tree) { @@ -498,7 +494,7 @@ static void dissect_bat_vis_v22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t "B.A.T.M.A.N. Vis, Src: %s (%s)", get_hostname(sender_ip), ip_to_str(vis_packeth->sender_ip.data)); } else { - ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, VIS_PACKET_V22_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, VIS_PACKET_V22_SIZE, ENC_BIG_ENDIAN); } bat_vis_tree = proto_item_add_subtree(ti, ett_bat_vis); @@ -506,13 +502,13 @@ static void dissect_bat_vis_v22(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t proto_tree_add_ipv4(bat_vis_tree, hf_bat_vis_vis_orig, tvb, offset, 4, sender_ip); offset += 4; - proto_tree_add_item(bat_vis_tree, hf_bat_vis_version, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_vis_tree, hf_bat_vis_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(bat_vis_tree, hf_bat_vis_gwflags, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_vis_tree, hf_bat_vis_gwflags, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(bat_vis_tree, hf_bat_max_tq_v22, tvb, offset, 2, FALSE); + proto_tree_add_item(bat_vis_tree, hf_bat_max_tq_v22, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; } @@ -574,18 +570,18 @@ static void dissect_vis_entry_v22(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t val_to_str(vis_datah->type, vis_packettypenames, "Unknown (0x%02x)"), get_hostname(ip), ip_to_str(vis_datah->ip.data)); } else { - ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 7, FALSE); + ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 7, ENC_BIG_ENDIAN); } bat_vis_entry_tree = proto_item_add_subtree(ti, ett_bat_vis_entry); - proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_data_type, tvb, 0, 1, FALSE); + proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_data_type, tvb, 0, 1, ENC_BIG_ENDIAN); switch (vis_datah->type) { case DATA_TYPE_NEIGH: - proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_tq_v22, tvb, 1, 2, FALSE); + proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_tq_v22, tvb, 1, 2, ENC_BIG_ENDIAN); break; case DATA_TYPE_HNA: - proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_netmask, tvb, 1, 1, FALSE); + proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_netmask, tvb, 1, 1, ENC_BIG_ENDIAN); break; case DATA_TYPE_SEC_IF: default: @@ -619,10 +615,8 @@ static void dissect_bat_vis_v23(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t col_set_str(pinfo->cinfo, COL_PROTOCOL, "BAT_VIS"); /* Set info column */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Src: %s (%s)", - get_hostname(sender_ip), ip_to_str(vis_packeth->sender_ip.data)); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "Src: %s (%s)", + get_hostname(sender_ip), ip_to_str(vis_packeth->sender_ip.data)); /* Set tree info */ if (tree) { @@ -633,7 +627,7 @@ static void dissect_bat_vis_v23(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t "B.A.T.M.A.N. Vis, Src: %s (%s)", get_hostname(sender_ip), ip_to_str(vis_packeth->sender_ip.data)); } else { - ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, VIS_PACKET_V23_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, VIS_PACKET_V23_SIZE, ENC_BIG_ENDIAN); } bat_vis_tree = proto_item_add_subtree(ti, ett_bat_vis); @@ -641,13 +635,13 @@ static void dissect_bat_vis_v23(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t proto_tree_add_ipv4(bat_vis_tree, hf_bat_vis_vis_orig, tvb, offset, 4, sender_ip); offset += 4; - proto_tree_add_item(bat_vis_tree, hf_bat_vis_version, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_vis_tree, hf_bat_vis_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(bat_vis_tree, hf_bat_vis_gwflags, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_vis_tree, hf_bat_vis_gwflags, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(bat_vis_tree, hf_bat_max_tq_v23, tvb, offset, 1, FALSE); + proto_tree_add_item(bat_vis_tree, hf_bat_max_tq_v23, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; } @@ -709,18 +703,18 @@ static void dissect_vis_entry_v23(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t val_to_str(vis_datah->type, vis_packettypenames, "Unknown (0x%02x)"), get_hostname(ip), ip_to_str(vis_datah->ip.data)); } else { - ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 7, FALSE); + ti = proto_tree_add_item(tree, proto_bat_plugin, tvb, 0, 7, ENC_BIG_ENDIAN); } bat_vis_entry_tree = proto_item_add_subtree(ti, ett_bat_vis_entry); - proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_data_type, tvb, 0, 1, FALSE); + proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_data_type, tvb, 0, 1, ENC_BIG_ENDIAN); switch (vis_datah->type) { case DATA_TYPE_NEIGH: - proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_tq_v23, tvb, 1, 1, FALSE); + proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_tq_v23, tvb, 1, 1, ENC_BIG_ENDIAN); break; case DATA_TYPE_HNA: - proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_netmask, tvb, 1, 1, FALSE); + proto_tree_add_item(bat_vis_entry_tree, hf_bat_vis_netmask, tvb, 1, 1, ENC_BIG_ENDIAN); break; case DATA_TYPE_SEC_IF: default: diff --git a/epan/dissectors/packet-batadv.c b/epan/dissectors/packet-batadv.c index b4eb6a4003..f6313537a4 100644 --- a/epan/dissectors/packet-batadv.c +++ b/epan/dissectors/packet-batadv.c @@ -714,7 +714,7 @@ static int dissect_batadv_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinf "B.A.T.M.A.N., Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V5_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V5_SIZE, ENC_BIG_ENDIAN); } batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman); } @@ -724,10 +724,10 @@ static int dissect_batadv_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinf "Packet Type: %s (%u)", "BATADV_PACKET", BATADV_PACKET_V5); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_batman_flags); proto_tree_add_boolean(flag_tree, hf_batadv_batman_flags_directlink, tvb, offset, 1, batman_packeth->flags); @@ -735,17 +735,17 @@ static int dissect_batadv_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinf /* </flags> */ offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tgw = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_gwflags, tvb, offset, 1, FALSE); + tgw = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_gwflags, tvb, offset, 1, ENC_BIG_ENDIAN); dissect_batadv_gwflags(tvb, batman_packeth->gwflags, offset, tgw); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_orig, tvb, offset, 6, orig_addr); @@ -754,7 +754,7 @@ static int dissect_batadv_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinf proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_prev_sender, tvb, offset, 6, prev_sender_addr); offset += 6; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* Skip 1 byte of padding. */ @@ -822,7 +822,7 @@ static int dissect_batadv_batman_v7(tvbuff_t *tvb, int offset, packet_info *pinf "B.A.T.M.A.N., Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V7_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V7_SIZE, ENC_BIG_ENDIAN); } batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman); } @@ -832,10 +832,10 @@ static int dissect_batadv_batman_v7(tvbuff_t *tvb, int offset, packet_info *pinf "Packet Type: %s (%u)", "BATADV_PACKET", BATADV_PACKET_V5); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_batman_flags); proto_tree_add_boolean(flag_tree, hf_batadv_batman_flags_directlink, tvb, offset, 1, batman_packeth->flags); @@ -843,10 +843,10 @@ static int dissect_batadv_batman_v7(tvbuff_t *tvb, int offset, packet_info *pinf /* </flags> */ offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_orig, tvb, offset, 6, orig_addr); @@ -855,10 +855,10 @@ static int dissect_batadv_batman_v7(tvbuff_t *tvb, int offset, packet_info *pinf proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_prev_sender, tvb, offset, 6, prev_sender_addr); offset += 6; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, orig_addr); @@ -924,7 +924,7 @@ static int dissect_batadv_batman_v9(tvbuff_t *tvb, int offset, packet_info *pinf "B.A.T.M.A.N., Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V9_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V9_SIZE, ENC_BIG_ENDIAN); } batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman); } @@ -934,10 +934,10 @@ static int dissect_batadv_batman_v9(tvbuff_t *tvb, int offset, packet_info *pinf "Packet Type: %s (%u)", "BATADV_PACKET", BATADV_PACKET_V5); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_batman_flags); proto_tree_add_boolean(flag_tree, hf_batadv_batman_flags_directlink, tvb, offset, 1, batman_packeth->flags); @@ -946,10 +946,10 @@ static int dissect_batadv_batman_v9(tvbuff_t *tvb, int offset, packet_info *pinf /* </flags> */ offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_orig, tvb, offset, 6, orig_addr); @@ -958,13 +958,13 @@ static int dissect_batadv_batman_v9(tvbuff_t *tvb, int offset, packet_info *pinf proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_prev_sender, tvb, offset, 6, prev_sender_addr); offset += 6; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tgw = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_gwflags, tvb, offset, 1, FALSE); + tgw = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_gwflags, tvb, offset, 1, ENC_BIG_ENDIAN); dissect_batadv_gwflags(tvb, batman_packeth->gwflags, offset, tgw); offset += 1; @@ -1034,7 +1034,7 @@ static int dissect_batadv_batman_v10(tvbuff_t *tvb, int offset, packet_info *pin "B.A.T.M.A.N., Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V10_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V10_SIZE, ENC_BIG_ENDIAN); } batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman); } @@ -1044,10 +1044,10 @@ static int dissect_batadv_batman_v10(tvbuff_t *tvb, int offset, packet_info *pin "Packet Type: %s (%u)", "BATADV_PACKET", BATADV_PACKET_V5); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_batman_flags); proto_tree_add_boolean(flag_tree, hf_batadv_batman_flags_directlink, tvb, offset, 1, batman_packeth->flags); @@ -1056,10 +1056,10 @@ static int dissect_batadv_batman_v10(tvbuff_t *tvb, int offset, packet_info *pin /* </flags> */ offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno32, tvb, offset, 4, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno32, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_orig, tvb, offset, 6, orig_addr); @@ -1068,13 +1068,13 @@ static int dissect_batadv_batman_v10(tvbuff_t *tvb, int offset, packet_info *pin proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_prev_sender, tvb, offset, 6, prev_sender_addr); offset += 6; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tgw = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_gwflags, tvb, offset, 1, FALSE); + tgw = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_gwflags, tvb, offset, 1, ENC_BIG_ENDIAN); dissect_batadv_gwflags(tvb, batman_packeth->gwflags, offset, tgw); offset += 1; @@ -1143,7 +1143,7 @@ static int dissect_batadv_batman_v11(tvbuff_t *tvb, int offset, packet_info *pin "B.A.T.M.A.N., Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V11_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V11_SIZE, ENC_BIG_ENDIAN); } batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman); } @@ -1153,10 +1153,10 @@ static int dissect_batadv_batman_v11(tvbuff_t *tvb, int offset, packet_info *pin "Packet Type: %s (%u)", "BATADV_PACKET", BATADV_PACKET_V5); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_batman_flags); proto_tree_add_boolean(flag_tree, hf_batadv_batman_flags_directlink, tvb, offset, 1, batman_packeth->flags); @@ -1165,10 +1165,10 @@ static int dissect_batadv_batman_v11(tvbuff_t *tvb, int offset, packet_info *pin /* </flags> */ offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno32, tvb, offset, 4, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno32, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_orig, tvb, offset, 6, orig_addr); @@ -1177,10 +1177,10 @@ static int dissect_batadv_batman_v11(tvbuff_t *tvb, int offset, packet_info *pin proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_prev_sender, tvb, offset, 6, prev_sender_addr); offset += 6; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_num_tt, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, orig_addr); @@ -1249,7 +1249,7 @@ static int dissect_batadv_batman_v14(tvbuff_t *tvb, int offset, packet_info *pin "B.A.T.M.A.N., Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V14_SIZE, ENC_BIG_ENDIAN); } batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman); } @@ -1259,13 +1259,13 @@ static int dissect_batadv_batman_v14(tvbuff_t *tvb, int offset, packet_info *pin "Packet Type: %s (%u)", "BATADV_PACKET", BATADV_PACKET_V5); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_batman_flags); proto_tree_add_boolean(flag_tree, hf_batadv_batman_flags_directlink, tvb, offset, 1, batman_packeth->flags); @@ -1274,7 +1274,7 @@ static int dissect_batadv_batman_v14(tvbuff_t *tvb, int offset, packet_info *pin /* </flags> */ offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno32, tvb, offset, 4, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_seqno32, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_orig, tvb, offset, 6, orig_addr); @@ -1283,20 +1283,20 @@ static int dissect_batadv_batman_v14(tvbuff_t *tvb, int offset, packet_info *pin proto_tree_add_ether(batadv_batman_tree, hf_batadv_batman_prev_sender, tvb, offset, 6, prev_sender_addr); offset += 6; - tgw = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_gwflags, tvb, offset, 1, FALSE); + tgw = proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_gwflags, tvb, offset, 1, ENC_BIG_ENDIAN); dissect_batadv_gwflags(tvb, batman_packeth->gw_flags, offset, tgw); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tq, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tt_num_changes, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tt_num_changes, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttvn, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_ttvn, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tt_crc, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_batman_tree, hf_batadv_batman_tt_crc, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, orig_addr); @@ -1342,7 +1342,7 @@ static void dissect_batadv_tt(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree "B.A.T.M.A.N. TT: %s (%s)", get_ether_name(tt), ether_to_str(tt)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, 6, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, 6, ENC_BIG_ENDIAN); } batadv_batman_tt_tree = proto_item_add_subtree(ti, ett_batadv_batman_tt); } @@ -1410,7 +1410,7 @@ static void dissect_batadv_bcast_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tre "B.A.T.M.A.N. Bcast, Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V6_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V6_SIZE, ENC_BIG_ENDIAN); } batadv_bcast_tree = proto_item_add_subtree(ti, ett_batadv_bcast); } @@ -1420,13 +1420,13 @@ static void dissect_batadv_bcast_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tre "Packet Type: %s (%u)", "BATADV_BCAST", BATADV_BCAST_V5); offset += 1; - proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_bcast_tree, hf_batadv_bcast_orig, tvb, offset, 6, orig_addr); offset += 6; - proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, orig_addr); @@ -1477,7 +1477,7 @@ static void dissect_batadv_bcast_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tr "B.A.T.M.A.N. Bcast, Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V10_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V10_SIZE, ENC_BIG_ENDIAN); } batadv_bcast_tree = proto_item_add_subtree(ti, ett_batadv_bcast); } @@ -1487,16 +1487,16 @@ static void dissect_batadv_bcast_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tr "Packet Type: %s (%u)", "BATADV_BCAST", BATADV_BCAST_V5); offset += 1; - proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_bcast_tree, hf_batadv_bcast_orig, tvb, offset, 6, orig_addr); offset += 6; - proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_seqno32, tvb, offset, 4, FALSE); + proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_seqno32, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, orig_addr); @@ -1548,7 +1548,7 @@ static void dissect_batadv_bcast_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tr "B.A.T.M.A.N. Bcast, Orig: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V14_SIZE, ENC_BIG_ENDIAN); } batadv_bcast_tree = proto_item_add_subtree(ti, ett_batadv_bcast); } @@ -1558,16 +1558,16 @@ static void dissect_batadv_bcast_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tr "Packet Type: %s (%u)", "BATADV_BCAST", BATADV_BCAST_V5); offset += 1; - proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* Skip 1 byte of padding. */ offset += 1; - proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_seqno32, tvb, offset, 4, FALSE); + proto_tree_add_item(batadv_bcast_tree, hf_batadv_bcast_seqno32, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; proto_tree_add_ether(batadv_bcast_tree, hf_batadv_bcast_orig, tvb, offset, 6, orig_addr); @@ -1645,11 +1645,9 @@ static void dissect_batadv_icmp_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree icmp_packeth->seqno = tvb_get_ntohs(tvb, 17); /* Set info column */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u", - val_to_str(icmp_packeth->msg_type, icmp_packettypenames, "Unknown (0x%02x)"), - icmp_packeth->seqno); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u", + val_to_str(icmp_packeth->msg_type, icmp_packettypenames, "Unknown (0x%02x)"), + icmp_packeth->seqno); /* Set tree info */ if (tree) { proto_item *ti; @@ -1659,7 +1657,7 @@ static void dissect_batadv_icmp_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree "B.A.T.M.A.N. ICMP, Orig: %s (%s), Dst: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr), get_ether_name(dst_addr), ether_to_str(dst_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V6_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V6_SIZE, ENC_BIG_ENDIAN); } batadv_icmp_tree = proto_item_add_subtree(ti, ett_batadv_icmp); } @@ -1669,10 +1667,10 @@ static void dissect_batadv_icmp_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree "Packet Type: %s (%u)", "BATADV_ICMP", BATADV_ICMP_V5); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_msg_type, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_icmp_tree, hf_batadv_icmp_dst, tvb, offset, 6, dst_addr); @@ -1681,13 +1679,13 @@ static void dissect_batadv_icmp_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree proto_tree_add_ether(batadv_icmp_tree, hf_batadv_icmp_orig, tvb, offset, 6, orig_addr); offset += 6; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_uid, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_uid, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, orig_addr); @@ -1757,11 +1755,9 @@ static void dissect_batadv_icmp_v7(tvbuff_t *tvb, packet_info *pinfo, proto_tree icmp_packeth->uid = tvb_get_guint8(tvb, 17); /* Set info column */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u", - val_to_str(icmp_packeth->msg_type, icmp_packettypenames, "Unknown (0x%02x)"), - icmp_packeth->seqno); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u", + val_to_str(icmp_packeth->msg_type, icmp_packettypenames, "Unknown (0x%02x)"), + icmp_packeth->seqno); /* Set tree info */ if (tree) { @@ -1770,7 +1766,7 @@ static void dissect_batadv_icmp_v7(tvbuff_t *tvb, packet_info *pinfo, proto_tree "B.A.T.M.A.N. ICMP, Orig: %s (%s), Dst: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr), get_ether_name(dst_addr), ether_to_str(dst_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V7_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V7_SIZE, ENC_BIG_ENDIAN); } batadv_icmp_tree = proto_item_add_subtree(ti, ett_batadv_icmp); } @@ -1780,13 +1776,13 @@ static void dissect_batadv_icmp_v7(tvbuff_t *tvb, packet_info *pinfo, proto_tree "Packet Type: %s (%u)", "BATADV_ICMP", BATADV_ICMP_V5); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_msg_type, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_icmp_tree, hf_batadv_icmp_dst, tvb, offset, 6, dst_addr); @@ -1795,10 +1791,10 @@ static void dissect_batadv_icmp_v7(tvbuff_t *tvb, packet_info *pinfo, proto_tree proto_tree_add_ether(batadv_icmp_tree, hf_batadv_icmp_orig, tvb, offset, 6, orig_addr); offset += 6; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_uid, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_uid, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* rr data available? */ @@ -1850,11 +1846,9 @@ static void dissect_batadv_icmp_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tre icmp_packeth->reserved = tvb_get_guint8(tvb, 18); /* Set info column */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u", - val_to_str(icmp_packeth->msg_type, icmp_packettypenames, "Unknown (0x%02x)"), - icmp_packeth->seqno); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u", + val_to_str(icmp_packeth->msg_type, icmp_packettypenames, "Unknown (0x%02x)"), + icmp_packeth->seqno); /* Set tree info */ if (tree) { @@ -1863,7 +1857,7 @@ static void dissect_batadv_icmp_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tre "B.A.T.M.A.N. ICMP, Orig: %s (%s), Dst: %s (%s)", get_ether_name(orig_addr), ether_to_str(orig_addr), get_ether_name(dst_addr), ether_to_str(dst_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V14_SIZE, ENC_BIG_ENDIAN); } batadv_icmp_tree = proto_item_add_subtree(ti, ett_batadv_icmp); } @@ -1873,13 +1867,13 @@ static void dissect_batadv_icmp_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tre "Packet Type: %s (%u)", "BATADV_ICMP", BATADV_ICMP_V5); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_msg_type, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_icmp_tree, hf_batadv_icmp_dst, tvb, offset, 6, dst_addr); @@ -1888,10 +1882,10 @@ static void dissect_batadv_icmp_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tre proto_tree_add_ether(batadv_icmp_tree, hf_batadv_icmp_orig, tvb, offset, 6, orig_addr); offset += 6; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; - proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_uid, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_icmp_tree, hf_batadv_icmp_uid, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* Skip 1 byte of padding. */ @@ -1979,7 +1973,7 @@ static void dissect_batadv_unicast_v6(tvbuff_t *tvb, packet_info *pinfo, proto_t "B.A.T.M.A.N. Unicast, Dst: %s (%s)", get_ether_name(dest_addr), ether_to_str(dest_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, UNICAST_PACKET_V6_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, UNICAST_PACKET_V6_SIZE, ENC_BIG_ENDIAN); } batadv_unicast_tree = proto_item_add_subtree(ti, ett_batadv_unicast); } @@ -1989,13 +1983,13 @@ static void dissect_batadv_unicast_v6(tvbuff_t *tvb, packet_info *pinfo, proto_t "Packet Type: %s (%u)", "BATADV_UNICAST", BATADV_UNICAST_V5); offset += 1; - proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_unicast_tree, hf_batadv_unicast_dst, tvb, offset, 6, dest_addr); offset += 6; - proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; SET_ADDRESS(&pinfo->dl_dst, AT_ETHER, 6, dest_addr); @@ -2046,7 +2040,7 @@ static void dissect_batadv_unicast_v14(tvbuff_t *tvb, packet_info *pinfo, proto_ "B.A.T.M.A.N. Unicast, Dst: %s (%s)", get_ether_name(dest_addr), ether_to_str(dest_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, UNICAST_PACKET_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, UNICAST_PACKET_V14_SIZE, ENC_BIG_ENDIAN); } batadv_unicast_tree = proto_item_add_subtree(ti, ett_batadv_unicast); } @@ -2056,13 +2050,13 @@ static void dissect_batadv_unicast_v14(tvbuff_t *tvb, packet_info *pinfo, proto_ "Packet Type: %s (%u)", "BATADV_UNICAST", BATADV_UNICAST_V5); offset += 1; - proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_ttvn, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_tree, hf_batadv_unicast_ttvn, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_unicast_tree, hf_batadv_unicast_dst, tvb, offset, 6, dest_addr); @@ -2148,7 +2142,7 @@ static void dissect_batadv_unicast_frag_v12(tvbuff_t *tvb, packet_info *pinfo, p "B.A.T.M.A.N. Unicast Fragment, Dst: %s (%s)", get_ether_name(dest_addr), ether_to_str(dest_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, UNICAST_FRAG_PACKET_V12_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, UNICAST_FRAG_PACKET_V12_SIZE, ENC_BIG_ENDIAN); } batadv_unicast_frag_tree = proto_item_add_subtree(ti, ett_batadv_unicast_frag); } @@ -2158,16 +2152,16 @@ static void dissect_batadv_unicast_frag_v12(tvbuff_t *tvb, packet_info *pinfo, p "Packet Type: %s (%u)", "BATADV_UNICAST_FRAG", BATADV_UNICAST_FRAG_V12); offset += 1; - proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_unicast_frag_tree, hf_batadv_unicast_frag_dst, tvb, offset, 6, dest_addr); offset += 6; - proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_batman_flags); proto_tree_add_boolean(flag_tree, hf_batadv_unicast_frag_flags_head, tvb, offset, 1, unicast_frag_packeth->flags); @@ -2178,7 +2172,7 @@ static void dissect_batadv_unicast_frag_v12(tvbuff_t *tvb, packet_info *pinfo, p proto_tree_add_ether(batadv_unicast_frag_tree, hf_batadv_unicast_frag_orig, tvb, offset, 6, orig_addr); offset += 6; - proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, orig_addr); @@ -2253,7 +2247,7 @@ static void dissect_batadv_unicast_frag_v14(tvbuff_t *tvb, packet_info *pinfo, p "B.A.T.M.A.N. Unicast Fragment, Dst: %s (%s)", get_ether_name(dest_addr), ether_to_str(dest_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, UNICAST_FRAG_PACKET_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, UNICAST_FRAG_PACKET_V14_SIZE, ENC_BIG_ENDIAN); } batadv_unicast_frag_tree = proto_item_add_subtree(ti, ett_batadv_unicast_frag); } @@ -2263,19 +2257,19 @@ static void dissect_batadv_unicast_frag_v14(tvbuff_t *tvb, packet_info *pinfo, p "Packet Type: %s (%u)", "BATADV_UNICAST", BATADV_UNICAST_FRAG_V12); offset += 1; - proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_ttvn, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_ttvn, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_unicast_frag_tree, hf_batadv_unicast_frag_dst, tvb, offset, 6, dest_addr); offset += 6; - tf = proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_batman_flags); proto_tree_add_boolean(flag_tree, hf_batadv_unicast_frag_flags_head, tvb, offset, 1, unicast_frag_packeth->flags); @@ -2289,7 +2283,7 @@ static void dissect_batadv_unicast_frag_v14(tvbuff_t *tvb, packet_info *pinfo, p proto_tree_add_ether(batadv_unicast_frag_tree, hf_batadv_unicast_frag_orig, tvb, offset, 6, orig_addr); offset += 6; - proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_seqno, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_unicast_frag_tree, hf_batadv_unicast_frag_seqno, tvb, offset, 2, ENC_BIG_ENDIAN); offset += 2; SET_ADDRESS(&pinfo->dl_src, AT_ETHER, 6, orig_addr); @@ -2380,11 +2374,9 @@ static void dissect_batadv_vis_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree SET_ADDRESS(&vis_packeth->sender_orig, AT_ETHER, 6, sender_orig_addr); /* Set info column */ - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u", - val_to_str(vis_packeth->vis_type, vis_packettypenames, "Unknown (0x%02x)"), - vis_packeth->seqno); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "[%s] Seq=%u", + val_to_str(vis_packeth->vis_type, vis_packettypenames, "Unknown (0x%02x)"), + vis_packeth->seqno); /* Set tree info */ if (tree) { proto_item *ti; @@ -2394,7 +2386,7 @@ static void dissect_batadv_vis_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree "B.A.T.M.A.N. Vis, Orig: %s (%s)", get_ether_name(vis_orig_addr), ether_to_str(vis_orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V6_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V6_SIZE, ENC_BIG_ENDIAN); } batadv_vis_tree = proto_item_add_subtree(ti, ett_batadv_vis); } @@ -2404,19 +2396,19 @@ static void dissect_batadv_vis_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree "Packet Type: %s (%u)", "BATADV_VIS", BATADV_VIS_V5); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_type, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_seqno, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_seqno, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_entries, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_entries, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_vis_tree, hf_batadv_vis_vis_orig, tvb, offset, 6, vis_orig_addr); @@ -2523,7 +2515,7 @@ static void dissect_batadv_vis_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tree "B.A.T.M.A.N. Vis, Orig: %s (%s)", get_ether_name(vis_orig_addr), ether_to_str(vis_orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V10_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V10_SIZE, ENC_BIG_ENDIAN); } batadv_vis_tree = proto_item_add_subtree(ti, ett_batadv_vis); } @@ -2533,19 +2525,19 @@ static void dissect_batadv_vis_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tree "Packet Type: %s (%u)", "BATADV_VIS", BATADV_VIS_V5); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_type, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_entries, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_entries, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_seqno32, tvb, offset, 4, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_seqno32, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; proto_tree_add_ether(batadv_vis_tree, hf_batadv_vis_vis_orig, tvb, offset, 6, vis_orig_addr); @@ -2628,7 +2620,7 @@ static void dissect_batadv_vis_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tree "B.A.T.M.A.N. Vis, Orig: %s (%s)", get_ether_name(vis_orig_addr), ether_to_str(vis_orig_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V14_SIZE, ENC_BIG_ENDIAN); } batadv_vis_tree = proto_item_add_subtree(ti, ett_batadv_vis); } @@ -2638,19 +2630,19 @@ static void dissect_batadv_vis_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tree "Packet Type: %s (%u)", "BATADV_VIS", BATADV_VIS_V5); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_type, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_seqno32, tvb, offset, 4, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_seqno32, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; - proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_entries, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_vis_tree, hf_batadv_vis_entries, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* Skip 1 byte of padding. */ @@ -2711,13 +2703,13 @@ static void dissect_vis_entry_v6(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr "VIS Entry: %s (%s)", get_ether_name(dst), ether_to_str(dst)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_ENTRY_V6_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_ENTRY_V6_SIZE, ENC_BIG_ENDIAN); } batadv_vis_entry_tree = proto_item_add_subtree(ti, ett_batadv_vis_entry); } proto_tree_add_ether(batadv_vis_entry_tree, hf_batadv_vis_entry_dst, tvb, 0, 6, dst); - proto_tree_add_item(batadv_vis_entry_tree, hf_batadv_vis_entry_quality, tvb, 6, 1, FALSE); + proto_tree_add_item(batadv_vis_entry_tree, hf_batadv_vis_entry_quality, tvb, 6, 1, ENC_BIG_ENDIAN); } static void dissect_vis_entry_v8(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) @@ -2736,14 +2728,14 @@ static void dissect_vis_entry_v8(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr "VIS Entry: %s (%s)", get_ether_name(dst), ether_to_str(dst)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_ENTRY_V8_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, VIS_ENTRY_V8_SIZE, ENC_BIG_ENDIAN); } batadv_vis_entry_tree = proto_item_add_subtree(ti, ett_batadv_vis_entry); } proto_tree_add_ether(batadv_vis_entry_tree, hf_batadv_vis_entry_src, tvb, 0, 6, src); proto_tree_add_ether(batadv_vis_entry_tree, hf_batadv_vis_entry_dst, tvb, 6, 6, dst); - proto_tree_add_item(batadv_vis_entry_tree, hf_batadv_vis_entry_quality, tvb, 12, 1, FALSE); + proto_tree_add_item(batadv_vis_entry_tree, hf_batadv_vis_entry_quality, tvb, 12, 1, ENC_BIG_ENDIAN); } static void dissect_batadv_tt_query(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) @@ -2814,7 +2806,7 @@ static void dissect_batadv_tt_query_v14(tvbuff_t *tvb, packet_info *pinfo _U_, p "B.A.T.M.A.N. TT Query, Dst: %s (%s)", get_ether_name(dst_addr), ether_to_str(dst_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, TT_QUERY_PACKET_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, TT_QUERY_PACKET_V14_SIZE, ENC_BIG_ENDIAN); } batadv_tt_query_tree = proto_item_add_subtree(ti, ett_batadv_tt_query); } @@ -2824,13 +2816,13 @@ static void dissect_batadv_tt_query_v14(tvbuff_t *tvb, packet_info *pinfo _U_, p "Packet Type: %s (%u)", "BATADV_TT_QUERY", BATADV_TT_QUERY_V14); offset += 1; - proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - tf = proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_flags, tvb, offset, 1, FALSE); + tf = proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_flags, tvb, offset, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_tt_query_flags); proto_tree_add_uint(flag_tree, hf_batadv_tt_query_flags_type, tvb, offset, 1, tt_type); @@ -2844,15 +2836,15 @@ static void dissect_batadv_tt_query_v14(tvbuff_t *tvb, packet_info *pinfo _U_, p proto_tree_add_ether(batadv_tt_query_tree, hf_batadv_tt_query_src, tvb, offset, 6, src_addr); offset += 6; - proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_ttvn, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_ttvn, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; switch (tt_type) { case TT_REQUEST: - proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_tt_crc, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_tt_crc, tvb, offset, 2, ENC_BIG_ENDIAN); break; case TT_RESPONSE: - proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_entries, tvb, offset, 2, FALSE); + proto_tree_add_item(batadv_tt_query_tree, hf_batadv_tt_query_entries, tvb, offset, 2, ENC_BIG_ENDIAN); break; default: break; @@ -2910,12 +2902,12 @@ static void dissect_tt_entry_v14(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr "TT Entry: %s (%s)", get_ether_name(entry), ether_to_str(entry)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, TT_ENTRY_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, TT_ENTRY_V14_SIZE, ENC_BIG_ENDIAN); } batadv_tt_entry_tree = proto_item_add_subtree(ti, ett_batadv_tt_entry); } - tf = proto_tree_add_item(batadv_tt_entry_tree, hf_batadv_tt_entry_flags, tvb, 0, 1, FALSE); + tf = proto_tree_add_item(batadv_tt_entry_tree, hf_batadv_tt_entry_flags, tvb, 0, 1, ENC_BIG_ENDIAN); /* <flags> */ flag_tree = proto_item_add_subtree(tf, ett_batadv_tt_entry_flags); proto_tree_add_boolean(flag_tree, hf_batadv_tt_entry_flags_change_del, tvb, 0, 1, flags); @@ -2976,7 +2968,7 @@ static void dissect_batadv_roam_adv_v14(tvbuff_t *tvb, packet_info *pinfo, proto "B.A.T.M.A.N. Roam: %s (%s)", get_ether_name(client_addr), ether_to_str(client_addr)); } else { - ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, ROAM_ADV_PACKET_V14_SIZE, FALSE); + ti = proto_tree_add_item(tree, proto_batadv_plugin, tvb, 0, ROAM_ADV_PACKET_V14_SIZE, ENC_BIG_ENDIAN); } batadv_roam_adv_tree = proto_item_add_subtree(ti, ett_batadv_roam_adv); } @@ -2986,10 +2978,10 @@ static void dissect_batadv_roam_adv_v14(tvbuff_t *tvb, packet_info *pinfo, proto "Packet Type: %s (%u)", "BATADV_ROAM_ADV", BATADV_ROAM_ADV_V14); offset += 1; - proto_tree_add_item(batadv_roam_adv_tree, hf_batadv_roam_adv_version, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_roam_adv_tree, hf_batadv_roam_adv_version, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - proto_tree_add_item(batadv_roam_adv_tree, hf_batadv_roam_adv_ttl, tvb, offset, 1, FALSE); + proto_tree_add_item(batadv_roam_adv_tree, hf_batadv_roam_adv_ttl, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; /* Skip 1 byte of padding. */ diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index acb1fe752c..ce3395d4a5 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -757,7 +757,7 @@ try_dissect_unknown_ber(packet_info *pinfo, tvbuff_t *tvb, volatile int offset, offset = dissect_ber_identifier(pinfo, tree, tvb, start_offset, NULL, NULL, NULL); offset = dissect_ber_length(pinfo, tree, tvb, offset, NULL, NULL); } - item = ber_proto_tree_add_item(pinfo, tree, hf_ber_unknown_BER_OCTETSTRING, tvb, offset, len, FALSE); + item = ber_proto_tree_add_item(pinfo, tree, hf_ber_unknown_BER_OCTETSTRING, tvb, offset, len, ENC_BIG_ENDIAN); next_tree = proto_item_add_subtree(item, ett_ber_octet_string); offset = try_dissect_unknown_ber(pinfo, tvb, offset, next_tree, nest_level+1); } @@ -1331,7 +1331,7 @@ reassemble_octet_string(asn1_ctx_t *actx, proto_tree *tree, gint hf_id, tvbuff_t reassembled_tvb = tvb_new_child_real_data(next_tvb, fd_head->data, fd_head->len, fd_head->len); - actx->created_item = proto_tree_add_item(tree, hf_id, reassembled_tvb, 0, -1, FALSE); + actx->created_item = proto_tree_add_item(tree, hf_id, reassembled_tvb, 0, -1, ENC_BIG_ENDIAN); next_tree = proto_item_add_subtree (actx->created_item, ett_ber_reassembled_octet_string); add_new_data_source(actx->pinfo, reassembled_tvb, "Reassembled OCTET STRING"); @@ -1451,9 +1451,9 @@ printf("OCTET STRING dissect_ber_octet_string(%s) entered\n",name); length_remaining=len; } if(hf_id >= 0) { - it = ber_proto_tree_add_item(actx->pinfo, tree, hf_id, tvb, offset, length_remaining, FALSE); + it = ber_proto_tree_add_item(actx->pinfo, tree, hf_id, tvb, offset, length_remaining, ENC_BIG_ENDIAN); actx->created_item = it; - ber_check_length(length_remaining, min_len, max_len, actx, it, FALSE); + ber_check_length(length_remaining, min_len, max_len, actx, it, ENC_BIG_ENDIAN); } else { proto_item *pi; @@ -1535,7 +1535,7 @@ if (!implicit_tag) } } if (hf_id >= 0) - proto_tree_add_item(tree, hf_id, tvb, offset, 0, FALSE); + proto_tree_add_item(tree, hf_id, tvb, offset, 0, ENC_BIG_ENDIAN); return offset; } @@ -1745,7 +1745,7 @@ dissect_ber_boolean(gboolean implicit_tag, asn1_ctx_t *actx, proto_tree *tree, t } if(value){ - *value=(val?TRUE:FALSE); + *value=(val?TRUE:ENC_BIG_ENDIAN); } return offset; @@ -1832,7 +1832,7 @@ printf("SEQUENCE dissect_ber_sequence(%s) entered\n",name); /* create subtree */ if(hf_id >= 0) { if(parent_tree){ - item = proto_tree_add_item(parent_tree, hf_id, tvb, hoffset, lenx + offset - hoffset, FALSE); + item = proto_tree_add_item(parent_tree, hf_id, tvb, hoffset, lenx + offset - hoffset, ENC_BIG_ENDIAN); tree = proto_item_add_subtree(item, ett_id); } } @@ -2154,7 +2154,7 @@ printf("SEQUENCE dissect_ber_old_sequence(%s) entered\n",name); /* create subtree */ if(hf_id >= 0) { if(parent_tree){ - item = proto_tree_add_item(parent_tree, hf_id, tvb, hoffset, lenx + offset - hoffset, FALSE); + item = proto_tree_add_item(parent_tree, hf_id, tvb, hoffset, lenx + offset - hoffset, ENC_BIG_ENDIAN); tree = proto_item_add_subtree(item, ett_id); } } @@ -2503,7 +2503,7 @@ printf("SET dissect_ber_set(%s) entered\n",name); /* create subtree */ if (hf_id >= 0) { if(parent_tree){ - item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, lenx, FALSE); + item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, lenx, ENC_BIG_ENDIAN); tree = proto_item_add_subtree(item, ett_id); } } @@ -2763,7 +2763,7 @@ printf("SET dissect_old_ber_set(%s) entered\n",name); /* create subtree */ if (hf_id >= 0) { if(parent_tree){ - item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, lenx, FALSE); + item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, lenx, ENC_BIG_ENDIAN); tree = proto_item_add_subtree(item, ett_id); } } @@ -3614,7 +3614,7 @@ printf("OBJECT IDENTIFIER dissect_ber_object_identifier(%s) entered\n",name); actx->created_item=NULL; hfi = proto_registrar_get_nth(hf_id); if (hfi->type == FT_OID) { - actx->created_item = proto_tree_add_item(tree, hf_id, tvb, offset, len, FALSE); + actx->created_item = proto_tree_add_item(tree, hf_id, tvb, offset, len, ENC_BIG_ENDIAN); } else if (IS_FT_STRING(hfi->type)) { str = oid_encoded2string(tvb_get_ptr(tvb, offset, len), len); actx->created_item = proto_tree_add_string(tree, hf_id, tvb, offset, len, str); @@ -3765,7 +3765,7 @@ printf("SQ OF dissect_ber_sq_of(%s) entered\n",name); hfi = proto_registrar_get_nth(hf_id); if(parent_tree){ if(hfi->type == FT_NONE) { - item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, lenx, FALSE); + item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, lenx, ENC_BIG_ENDIAN); proto_item_append_text(item, ":"); } else { item = proto_tree_add_uint(parent_tree, hf_id, tvb, offset, lenx, cnt); @@ -3977,7 +3977,7 @@ printf("SQ OF dissect_ber_old_sq_of(%s) entered\n",name); hfi = proto_registrar_get_nth(hf_id); if(parent_tree){ if(hfi->type == FT_NONE) { - item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, lenx, FALSE); + item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, lenx, ENC_BIG_ENDIAN); proto_item_append_text(item, ":"); } else { item = proto_tree_add_uint(parent_tree, hf_id, tvb, offset, lenx, cnt); @@ -4415,10 +4415,10 @@ int dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, p pad = tvb_get_guint8(tvb, offset); if(pad == 0 && len == 1) { /* empty */ - proto_tree_add_item(parent_tree, hf_ber_bitstring_empty, tvb, offset, 1, FALSE); + proto_tree_add_item(parent_tree, hf_ber_bitstring_empty, tvb, offset, 1, ENC_BIG_ENDIAN); } else { /* padding */ - proto_item *pad_item = proto_tree_add_item(parent_tree, hf_ber_bitstring_padding, tvb, offset, 1, FALSE); + proto_item *pad_item = proto_tree_add_item(parent_tree, hf_ber_bitstring_padding, tvb, offset, 1, ENC_BIG_ENDIAN); if (pad > 7) { expert_add_info_format(actx->pinfo, pad_item, PI_UNDECODED, PI_WARN, "Illegal padding (0 .. 7): %d", pad); @@ -4427,7 +4427,7 @@ int dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, p offset++; len--; if(hf_id >= 0) { - item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, len, FALSE); + item = proto_tree_add_item(parent_tree, hf_id, tvb, offset, len, ENC_BIG_ENDIAN); actx->created_item = item; if(ett_id != -1) { tree = proto_item_add_subtree(item, ett_id); @@ -4457,7 +4457,7 @@ int dissect_ber_constrained_bitstring(gboolean implicit_tag, asn1_ctx_t *actx, p ((guint32)nb->gb0)/8; b1 = (nb->gb1 == -1) ? nb->bit/8 : ((guint32)nb->gb1)/8; - proto_tree_add_item(tree, *(nb->p_id), tvb, offset + b0, b1 - b0 + 1, FALSE); + proto_tree_add_item(tree, *(nb->p_id), tvb, offset + b0, b1 - b0 + 1, ENC_BIG_ENDIAN); } else { /* 8.6.2.4 */ val = 0; proto_tree_add_boolean(tree, *(nb->p_id), tvb, offset + len, 0, 0x00); @@ -4732,13 +4732,9 @@ dissect_ber(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) (void) call_ber_syntax_callback(decode_as_syntax, tvb, 0, pinfo, tree); - if (check_col(pinfo->cinfo, COL_INFO)) { - - /* see if we have a better name */ - name = get_ber_oid_syntax(decode_as_syntax); - - col_add_fstr(pinfo->cinfo, COL_INFO, "Decoded as %s", name ? name : decode_as_syntax); - } + /* see if we have a better name */ + name = get_ber_oid_syntax(decode_as_syntax); + col_add_fstr(pinfo->cinfo, COL_INFO, "Decoded as %s", name ? name : decode_as_syntax); } } diff --git a/epan/dissectors/packet-ber.h b/epan/dissectors/packet-ber.h index 6b06bb1094..aaec7dfedf 100644 --- a/epan/dissectors/packet-ber.h +++ b/epan/dissectors/packet-ber.h @@ -33,9 +33,7 @@ #define BER_NOT_DECODED_YET(x) \ proto_tree_add_text(tree, tvb, offset, 0, "something unknown here [%s]",x); \ fprintf(stderr,"Not decoded yet in packet : %d [%s]\n", pinfo->fd->num,x); \ -if (check_col(pinfo->cinfo, COL_INFO)){ \ - col_append_fstr(pinfo->cinfo, COL_INFO, "[UNKNOWN BER: %s]", x); \ -} \ +col_append_fstr(pinfo->cinfo, COL_INFO, "[UNKNOWN BER: %s]", x); \ tvb_get_guint8(tvb, 9999); /* value for value and size constraints */ diff --git a/epan/dissectors/packet-bfd.c b/epan/dissectors/packet-bfd.c index 9f5a7b3d8c..7b217de900 100644 --- a/epan/dissectors/packet-bfd.c +++ b/epan/dissectors/packet-bfd.c @@ -294,12 +294,12 @@ static void dissect_bfd_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_ val_to_str(auth_type, bfd_control_auth_type_values, "Unknown Authentication Type (%d)") ); auth_tree = proto_item_add_subtree(auth_item, ett_bfd_auth); - proto_tree_add_item(auth_tree, hf_bfd_auth_type, tvb, offset, 1, FALSE); + proto_tree_add_item(auth_tree, hf_bfd_auth_type, tvb, offset, 1, ENC_BIG_ENDIAN); - ti = proto_tree_add_item(auth_tree, hf_bfd_auth_len, tvb, offset + 1, 1, FALSE); + ti = proto_tree_add_item(auth_tree, hf_bfd_auth_len, tvb, offset + 1, 1, ENC_BIG_ENDIAN); proto_item_append_text(ti, " bytes"); - proto_tree_add_item(auth_tree, hf_bfd_auth_key, tvb, offset + 2, 1, FALSE); + proto_tree_add_item(auth_tree, hf_bfd_auth_key, tvb, offset + 2, 1, ENC_BIG_ENDIAN); switch (auth_type) { case BFD_AUTH_SIMPLE: @@ -321,7 +321,7 @@ static void dissect_bfd_authentication(tvbuff_t *tvb, packet_info *pinfo, proto_ val_to_str(auth_type, bfd_control_auth_type_values, "Unknown Authentication Type (%d)") ); } - proto_tree_add_item(auth_tree, hf_bfd_auth_seq_num, tvb, offset+4, 4, FALSE); + proto_tree_add_item(auth_tree, hf_bfd_auth_seq_num, tvb, offset+4, 4, ENC_BIG_ENDIAN); proto_tree_add_text(auth_tree, tvb, offset+8, get_bfd_checksum_len(auth_type), "Checksum: 0x%s", tvb_bytes_to_str(tvb, offset+8, get_bfd_checksum_len(auth_type)) ); @@ -396,7 +396,6 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t bfd_required_min_rx_interval = tvb_get_ntohl(tvb, 16); bfd_required_min_echo_interval = tvb_get_ntohl(tvb, 20); - if (check_col(pinfo->cinfo, COL_INFO)) { switch (bfd_version) { case 0: col_add_fstr(pinfo->cinfo, COL_INFO, "Diag: %s, Flags: 0x%02x", @@ -410,7 +409,6 @@ static void dissect_bfd_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t val_to_str(bfd_sta >> 6 , bfd_control_sta_values, "UNKNOWN"), bfd_flags); break; - } } if (tree) { diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c index 961199982c..9a1b4c6d92 100644 --- a/epan/dissectors/packet-bittorrent.c +++ b/epan/dissectors/packet-bittorrent.c @@ -343,7 +343,7 @@ static int dissect_bencoding_str(tvbuff_t *tvb, packet_info *pinfo _U_, } if (tree) { proto_tree_add_uint(tree, hf_bittorrent_bstr_length, tvb, offset, used, stringlen); - proto_tree_add_item(tree, hf_bittorrent_bstr, tvb, offset+used, stringlen, FALSE); + proto_tree_add_item(tree, hf_bittorrent_bstr, tvb, offset+used, stringlen, ENC_BIG_ENDIAN); if (treeadd==1) { proto_item_append_text(ti, " Key: %s", format_text(ep_tvb_memdup(tvb, offset+used, stringlen), stringlen)); @@ -474,7 +474,7 @@ static int dissect_bencoding_rec(tvbuff_t *tvb, packet_info *pinfo _U_, switch (op) { case 'd': if (tree) { - td = proto_tree_add_item(tree, hf_bittorrent_bdict, tvb, offset, oplen, FALSE); + td = proto_tree_add_item(tree, hf_bittorrent_bdict, tvb, offset, oplen, ENC_BIG_ENDIAN); dtree = proto_item_add_subtree(td, ett_bittorrent_bdict); } @@ -507,7 +507,7 @@ static int dissect_bencoding_rec(tvbuff_t *tvb, packet_info *pinfo _U_, } if (dtree) { - ti = proto_tree_add_item(dtree, hf_bittorrent_bdict_entry, tvb, offset+used, op1len+op2len, FALSE); + ti = proto_tree_add_item(dtree, hf_bittorrent_bdict_entry, tvb, offset+used, op1len+op2len, ENC_BIG_ENDIAN); itree = proto_item_add_subtree(ti, ett_bittorrent_bdict_entry); dissect_bencoding_str(tvb, pinfo, offset+used, length, itree, ti, 1); @@ -524,7 +524,7 @@ static int dissect_bencoding_rec(tvbuff_t *tvb, packet_info *pinfo _U_, case 'l': if (tree) { - ti = proto_tree_add_item(tree, hf_bittorrent_blist, tvb, offset, oplen, FALSE); + ti = proto_tree_add_item(tree, hf_bittorrent_blist, tvb, offset, oplen, ENC_BIG_ENDIAN); itree = proto_item_add_subtree(ti, ett_bittorrent_blist); } @@ -638,33 +638,33 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto } if (isamp) { - ti = proto_tree_add_item(tree, hf_azureus_msg, tvb, offset, length + BITTORRENT_HEADER_LENGTH, FALSE); + ti = proto_tree_add_item(tree, hf_azureus_msg, tvb, offset, length + BITTORRENT_HEADER_LENGTH, ENC_BIG_ENDIAN); } else { - ti = proto_tree_add_item(tree, hf_bittorrent_msg, tvb, offset, length + BITTORRENT_HEADER_LENGTH, FALSE); + ti = proto_tree_add_item(tree, hf_bittorrent_msg, tvb, offset, length + BITTORRENT_HEADER_LENGTH, ENC_BIG_ENDIAN); } mtree = proto_item_add_subtree(ti, ett_bittorrent_msg); /* Keepalive message */ if (length == 0) { - proto_tree_add_item(mtree, hf_bittorrent_msg_len, tvb, offset, BITTORRENT_HEADER_LENGTH, FALSE); + proto_tree_add_item(mtree, hf_bittorrent_msg_len, tvb, offset, BITTORRENT_HEADER_LENGTH, ENC_BIG_ENDIAN); col_set_str(pinfo->cinfo, COL_INFO, "KeepAlive"); return; } - proto_tree_add_item(mtree, hf_bittorrent_msg_len, tvb, offset, BITTORRENT_HEADER_LENGTH, FALSE); + proto_tree_add_item(mtree, hf_bittorrent_msg_len, tvb, offset, BITTORRENT_HEADER_LENGTH, ENC_BIG_ENDIAN); offset += BITTORRENT_HEADER_LENGTH; /* If the tvb_bytes_exist() call above returned FALSE, this will throw an exception, so we won't use msgtype or type. */ if (isamp) { - proto_tree_add_item(mtree, hf_azureus_msg_type_len, tvb, offset, 4, FALSE); - proto_tree_add_item(mtree, hf_azureus_msg_type, tvb, offset+4, typelen, FALSE); + proto_tree_add_item(mtree, hf_azureus_msg_type_len, tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(mtree, hf_azureus_msg_type, tvb, offset+4, typelen, ENC_BIG_ENDIAN); proto_item_append_text(ti, ": Len %u, %s", length, msgtype); - proto_tree_add_item(mtree, hf_azureus_msg_prio, tvb, offset+4+typelen, 1, FALSE); + proto_tree_add_item(mtree, hf_azureus_msg_prio, tvb, offset+4+typelen, 1, ENC_BIG_ENDIAN); offset += 4+typelen+1; length -= 4+typelen+1; } else { - proto_tree_add_item(mtree, hf_bittorrent_msg_type, tvb, offset, 1, FALSE); + proto_tree_add_item(mtree, hf_bittorrent_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN); proto_item_append_text(ti, ": Len:%u, %s", length, msgtype); offset += 1; length -= 1; @@ -688,10 +688,10 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto piece_length = tvb_get_ntohl(tvb, offset); proto_tree_add_uint(mtree, hf_bittorrent_piece_length, tvb, offset, 4, piece_length); proto_item_append_text(ti, ", Piece (Idx:0x%x,Begin:0x%x,Len:0x%x)", piece_index, piece_begin, piece_length); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, ", Piece (Idx:0x%x,Begin:0x%x,Len:0x%x)", piece_index, piece_begin, piece_length); - } - break; + + col_append_fstr(pinfo->cinfo, COL_INFO, ", Piece (Idx:0x%x,Begin:0x%x,Len:0x%x)", piece_index, piece_begin, piece_length); + + break; case BITTORRENT_MESSAGE_PORT: /* port as payload */ @@ -701,25 +701,24 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto case BITTORRENT_MESSAGE_EXTENDED: /* extended message content */ - proto_tree_add_item(mtree, hf_bittorrent_extended, tvb, offset, length, FALSE); + proto_tree_add_item(mtree, hf_bittorrent_extended, tvb, offset, length, ENC_BIG_ENDIAN); break; case BITTORRENT_MESSAGE_HAVE: piece_index = tvb_get_ntohl(tvb, offset); - proto_tree_add_item(mtree, hf_bittorrent_piece_index, tvb, offset, 4, FALSE); + proto_tree_add_item(mtree, hf_bittorrent_piece_index, tvb, offset, 4, ENC_BIG_ENDIAN); proto_item_append_text(ti, ", Piece (Idx:0x%x)", piece_index); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, ", Piece (Idx:0x%x)", piece_index); - } - break; + + col_append_fstr(pinfo->cinfo, COL_INFO, ", Piece (Idx:0x%x)", piece_index); + + break; case BITTORRENT_MESSAGE_BITFIELD: - proto_tree_add_item(mtree, hf_bittorrent_bitfield_data, tvb, offset, length, FALSE); + proto_tree_add_item(mtree, hf_bittorrent_bitfield_data, tvb, offset, length, ENC_BIG_ENDIAN); proto_item_append_text(ti, ", Len:0x%x", length); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, ", Len:0x%x", length); - } - break; + col_append_fstr(pinfo->cinfo, COL_INFO, ", Len:0x%x", length); + + break; case BITTORRENT_MESSAGE_PIECE: piece_index = tvb_get_ntohl(tvb, offset); @@ -730,12 +729,11 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto proto_tree_add_item(mtree, hf_bittorrent_piece_begin, tvb, offset, 4, piece_begin); offset += 4; length -= 4; - proto_tree_add_item(mtree, hf_bittorrent_piece_data, tvb, offset, length, FALSE); + proto_tree_add_item(mtree, hf_bittorrent_piece_data, tvb, offset, length, ENC_BIG_ENDIAN); proto_item_append_text(ti, ", Idx:0x%x,Begin:0x%x,Len:0x%x", piece_index, piece_begin, length); - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_fstr(pinfo->cinfo, COL_INFO, ", Idx:0x%x,Begin:0x%x,Len:0x%x", piece_index, piece_begin, length); - } - break; + col_append_fstr(pinfo->cinfo, COL_INFO, ", Idx:0x%x,Begin:0x%x,Len:0x%x", piece_index, piece_begin, length); + + break; case AZUREUS_MESSAGE_HANDSHAKE: case AZUREUS_MESSAGE_PEER_EXCHANGE: @@ -744,14 +742,14 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto case AZUREUS_MESSAGE_JPC_HELLO: stringlen = tvb_get_ntohl(tvb, offset); - proto_tree_add_item(mtree, hf_azureus_jpc_addrlen, tvb, offset, 4, FALSE); - proto_tree_add_item(mtree, hf_azureus_jpc_addr, tvb, offset+4, stringlen, FALSE); - proto_tree_add_item(mtree, hf_azureus_jpc_port, tvb, offset+4+stringlen, 4, FALSE); - proto_tree_add_item(mtree, hf_azureus_jpc_session, tvb, offset+4+stringlen+4, 4, FALSE); + proto_tree_add_item(mtree, hf_azureus_jpc_addrlen, tvb, offset, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(mtree, hf_azureus_jpc_addr, tvb, offset+4, stringlen, ENC_BIG_ENDIAN); + proto_tree_add_item(mtree, hf_azureus_jpc_port, tvb, offset+4+stringlen, 4, ENC_BIG_ENDIAN); + proto_tree_add_item(mtree, hf_azureus_jpc_session, tvb, offset+4+stringlen+4, 4, ENC_BIG_ENDIAN); break; case AZUREUS_MESSAGE_JPC_REPLY: - proto_tree_add_item(mtree, hf_azureus_jpc_session, tvb, offset, 4, FALSE); + proto_tree_add_item(mtree, hf_azureus_jpc_session, tvb, offset, 4, ENC_BIG_ENDIAN); break; default: @@ -767,14 +765,14 @@ static void dissect_bittorrent_welcome (tvbuff_t *tvb, packet_info *pinfo _U_, p col_set_str(pinfo->cinfo, COL_INFO, "Handshake"); - proto_tree_add_item(tree, hf_bittorrent_prot_name_len, tvb, offset, 1, FALSE); offset+=1; - proto_tree_add_item(tree, hf_bittorrent_prot_name, tvb, offset, 19, FALSE); offset += 19; - proto_tree_add_item(tree, hf_bittorrent_reserved, tvb, offset, 8, FALSE); offset += 8; + proto_tree_add_item(tree, hf_bittorrent_prot_name_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset+=1; + proto_tree_add_item(tree, hf_bittorrent_prot_name, tvb, offset, 19, ENC_BIG_ENDIAN); offset += 19; + proto_tree_add_item(tree, hf_bittorrent_reserved, tvb, offset, 8, ENC_BIG_ENDIAN); offset += 8; - proto_tree_add_item(tree, hf_bittorrent_sha1_hash, tvb, offset, 20, FALSE); + proto_tree_add_item(tree, hf_bittorrent_sha1_hash, tvb, offset, 20, ENC_BIG_ENDIAN); offset += 20; - proto_tree_add_item(tree, hf_bittorrent_peer_id, tvb, offset, 20, FALSE); + proto_tree_add_item(tree, hf_bittorrent_peer_id, tvb, offset, 20, ENC_BIG_ENDIAN); if(decode_client_information) { for(i = 0; peer_id[i].name != NULL; ++i) { @@ -799,7 +797,7 @@ static void dissect_bittorrent_tcp_pdu (tvbuff_t *tvb, packet_info *pinfo, proto col_set_str(pinfo->cinfo, COL_INFO, "BitTorrent "); - ti = proto_tree_add_item (tree, proto_bittorrent, tvb, 0, -1, FALSE); + ti = proto_tree_add_item (tree, proto_bittorrent, tvb, 0, -1, ENC_BIG_ENDIAN); tree = proto_item_add_subtree(ti, ett_bittorrent); if (tvb_get_guint8(tvb, 0) == 19 && @@ -809,10 +807,9 @@ static void dissect_bittorrent_tcp_pdu (tvbuff_t *tvb, packet_info *pinfo, proto dissect_bittorrent_message(tvb, pinfo, tree); } - if (check_col(pinfo->cinfo, COL_INFO)) { - col_append_str(pinfo->cinfo, COL_INFO, " "); - col_set_fence(pinfo->cinfo, COL_INFO); - } + col_append_str(pinfo->cinfo, COL_INFO, " "); + col_set_fence(pinfo->cinfo, COL_INFO); + } static void dissect_bittorrent (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) diff --git a/epan/dissectors/packet-bofl.c b/epan/dissectors/packet-bofl.c index c1f29916b6..0d872e620b 100644 --- a/epan/dissectors/packet-bofl.c +++ b/epan/dissectors/packet-bofl.c @@ -73,25 +73,22 @@ dissect_bofl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_clear(pinfo->cinfo, COL_INFO); if (tree) { - ti = proto_tree_add_item(tree, proto_bofl, tvb, 0, -1, FALSE); + ti = proto_tree_add_item(tree, proto_bofl, tvb, 0, -1, ENC_BIG_ENDIAN); bofl_tree = proto_item_add_subtree(ti, ett_bofl); } pdu = tvb_get_ntohl(tvb, 0); - if (check_col(pinfo->cinfo, COL_INFO)) { col_add_fstr(pinfo->cinfo, COL_INFO, "PDU: 0x%08x", pdu); - } if (tree) - proto_tree_add_uint(bofl_tree, hf_bofl_pdu, tvb, 0, 4, pdu); + proto_tree_add_uint(bofl_tree, hf_bofl_pdu, tvb, 0, 4, pdu); sequence = tvb_get_ntohl(tvb, 4); - if (check_col(pinfo->cinfo, COL_INFO)) { + col_append_fstr(pinfo->cinfo, COL_INFO, " Sequence: %u", sequence); - } if (tree) { - proto_tree_add_uint(bofl_tree, hf_bofl_sequence, tvb, 4, 4, sequence); + proto_tree_add_uint(bofl_tree, hf_bofl_sequence, tvb, 4, 4, sequence); len = tvb_length_remaining(tvb, 8); if (len > 0) diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index 026485953b..e5d5b466c3 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -4578,17 +4578,13 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case BOOTREQUEST: if ((htype == ARPHRD_ETHER || htype == ARPHRD_IEEE802) && hlen == 6) { - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s (%s)", - tvb_arphrdaddr_to_str(tvb, 28, hlen, htype), - get_ether_name(tvb_get_ptr(tvb, 28, hlen))); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s (%s)", + tvb_arphrdaddr_to_str(tvb, 28, hlen, htype), + get_ether_name(tvb_get_ptr(tvb, 28, hlen))); } else { - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s", - tvb_arphrdaddr_to_str(tvb, 28, hlen, htype)); - } + col_add_fstr(pinfo->cinfo, COL_INFO, "Boot Request from %s", + tvb_arphrdaddr_to_str(tvb, 28, hlen, htype)); } break; @@ -4597,8 +4593,7 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BOOTP message type (%u)", op); + col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BOOTP message type (%u)", op); break; } @@ -4638,9 +4633,9 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * packet type. */ col_set_str(pinfo->cinfo, COL_PROTOCOL, "DHCP"); - if (check_col(pinfo->cinfo, COL_INFO)) - col_add_fstr(pinfo->cinfo, COL_INFO, "DHCP %-8s - Transaction ID 0x%x", - dhcp_type, tvb_get_ntohl(tvb, 4)); + + col_add_fstr(pinfo->cinfo, COL_INFO, "DHCP %-8s - Transaction ID 0x%x", + dhcp_type, tvb_get_ntohl(tvb, 4)); tap_queue_packet( bootp_dhcp_tap, pinfo, dhcp_type); } diff --git a/epan/dissectors/packet-bpdu.c b/epan/dissectors/packet-bpdu.c index aefa8fa4a9..6c2d188c96 100644 --- a/epan/dissectors/packet-bpdu.c +++ b/epan/dissectors/packet-bpdu.c @@ -291,24 +291,18 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pinfo->current_proto = "GARP"; - if (check_col(pinfo->cinfo, COL_PROTOCOL)) { - col_set_str(pinfo->cinfo, COL_PROTOCOL, "GARP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "GARP"); /* Generic Attribute Registration Protocol */ - } - if (check_col(pinfo->cinfo, COL_INFO)) { - col_add_fstr(pinfo->cinfo, COL_INFO, - "Unknown GARP application (0x%02X)", - dstaddr[5]); - } + col_add_fstr(pinfo->cinfo, COL_INFO, + "Unknown GARP application (0x%02X)", + dstaddr[5]); return; } } - if (check_col(pinfo->cinfo, COL_PROTOCOL)) { - col_set_str(pinfo->cinfo, COL_PROTOCOL, "STP"); /* Spanning Tree Protocol */ - } + col_set_str(pinfo->cinfo, COL_PROTOCOL, "STP"); /* Spanning Tree Protocol */ col_clear(pinfo->cinfo, COL_INFO); bpdu_type = tvb_get_guint8(tvb, BPDU_TYPE); @@ -342,55 +336,53 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; } - if (check_col(pinfo->cinfo, COL_INFO)) { - switch (bpdu_type) { + switch (bpdu_type) { - case BPDU_TYPE_CONF: - if (bpdu_use_system_id_extensions ) { - col_add_fstr(pinfo->cinfo, COL_INFO, - "Conf. %sRoot = %d/%d/%s Cost = %d Port = 0x%04x", - flags & 0x1 ? "TC + " : "", - root_identifier_bridge_priority, - root_identifier_system_id_extension, - root_identifier_mac_str, - root_path_cost, port_identifier); - } else { - col_add_fstr(pinfo->cinfo, COL_INFO, - "Conf. %sRoot = %d/%s Cost = %d Port = 0x%04x", - flags & 0x1 ? "TC + " : "", - root_identifier_bridge_priority, root_identifier_mac_str, - root_path_cost, port_identifier); - } - break; + case BPDU_TYPE_CONF: + if (bpdu_use_system_id_extensions ) { + col_add_fstr(pinfo->cinfo, COL_INFO, + "Conf. %sRoot = %d/%d/%s Cost = %d Port = 0x%04x", + flags & 0x1 ? "TC + " : "", + root_identifier_bridge_priority, + root_identifier_system_id_extension, + root_identifier_mac_str, + root_path_cost, port_identifier); + } else { + col_add_fstr(pinfo->cinfo, COL_INFO, + "Conf. %sRoot = %d/%s Cost = %d Port = 0x%04x", + flags & 0x1 ? "TC + " : "", + root_identifier_bridge_priority, root_identifier_mac_str, + root_path_cost, port_identifier); + } + break; - case BPDU_TYPE_TOPOLOGY_CHANGE: - col_set_str(pinfo->cinfo, COL_INFO, "Topology Change Notification"); - break; + case BPDU_TYPE_TOPOLOGY_CHANGE: + col_set_str(pinfo->cinfo, COL_INFO, "Topology Change Notification"); + break; - case BPDU_TYPE_RST: - if (bpdu_use_system_id_extensions ) { - col_add_fstr(pinfo->cinfo, COL_INFO, - "%cST. %sRoot = %d/%d/%s Cost = %d Port = 0x%04x", + case BPDU_TYPE_RST: + if (bpdu_use_system_id_extensions ) { + col_add_fstr(pinfo->cinfo, COL_INFO, + "%cST. %sRoot = %d/%d/%s Cost = %d Port = 0x%04x", protocol_version_identifier == 3 ? 'M':'R', flags & 0x1 ? "TC + " : "", root_identifier_bridge_priority, root_identifier_system_id_extension, root_identifier_mac_str, root_path_cost, port_identifier); - } else { - col_add_fstr(pinfo->cinfo, COL_INFO, - "%cST. %sRoot = %d/%s Cost = %d Port = 0x%04x", - protocol_version_identifier == 3 ? 'M':'R', - flags & 0x1 ? "TC + " : "", - root_identifier_bridge_priority, root_identifier_mac_str, - root_path_cost, port_identifier); - } - break; - - default: - col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BPDU type (%u)", bpdu_type); - break; + } else { + col_add_fstr(pinfo->cinfo, COL_INFO, + "%cST. %sRoot = %d/%s Cost = %d Port = 0x%04x", + protocol_version_identifier == 3 ? 'M':'R', + flags & 0x1 ? "TC + " : "", + root_identifier_bridge_priority, root_identifier_mac_str, + root_path_cost, port_identifier); } + break; + + default: + col_add_fstr(pinfo->cinfo, COL_INFO, "Unknown BPDU type (%u)", bpdu_type); + break; } if (tree) { @@ -664,20 +656,20 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) mstp_tree = proto_item_add_subtree(mstp_item, ett_mstp); proto_tree_add_item(mstp_tree, hf_bpdu_mst_config_format_selector, tvb, - BPDU_MST_CONFIG_FORMAT_SELECTOR, 1, FALSE); + BPDU_MST_CONFIG_FORMAT_SELECTOR, 1, ENC_BIG_ENDIAN); proto_tree_add_item(mstp_tree, hf_bpdu_mst_config_name, tvb, - BPDU_MST_CONFIG_NAME, 32, FALSE); + BPDU_MST_CONFIG_NAME, 32, ENC_BIG_ENDIAN); proto_tree_add_item(mstp_tree, hf_bpdu_mst_config_revision_level, tvb, - BPDU_MST_CONFIG_REVISION_LEVEL, 2, FALSE); + BPDU_MST_CONFIG_REVISION_LEVEL, 2, ENC_BIG_ENDIAN); proto_tree_add_item(mstp_tree, hf_bpdu_mst_config_digest, tvb, - BPDU_MST_CONFIG_DIGEST, 16, FALSE); + BPDU_MST_CONFIG_DIGEST, 16, ENC_BIG_ENDIAN); switch(msti_format) { case MSTI_FORMAT_IEEE_8021S: proto_tree_add_item(mstp_tree, hf_bpdu_cist_internal_root_path_cost, tvb, - BPDU_CIST_INTERNAL_ROOT_PATH_COST, 4, FALSE); + BPDU_CIST_INTERNAL_ROOT_PATH_COST, 4, ENC_BIG_ENDIAN); cist_bridge_identifier_bridge_priority = tvb_get_ntohs(tvb,BPDU_CIST_BRIDGE_IDENTIFIER); cist_bridge_identifier_mac = tvb_get_ptr(tvb, BPDU_CIST_BRIDGE_IDENTIFIER + 2, 6); @@ -773,13 +765,13 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* end of Identifier formatting */ proto_tree_add_item(mstp_tree, hf_bpdu_cist_internal_root_path_cost, tvb, - ALT_BPDU_CIST_INTERNAL_ROOT_PATH_COST, 4, FALSE); + ALT_BPDU_CIST_INTERNAL_ROOT_PATH_COST, 4, ENC_BIG_ENDIAN); break; } proto_tree_add_item(mstp_tree, hf_bpdu_cist_remaining_hops, tvb, - BPDU_CIST_REMAINING_HOPS, 1, FALSE); + BPDU_CIST_REMAINING_HOPS, 1, ENC_BIG_ENDIAN); /* MSTI messages */ offset = BPDU_MSTI; msti = 1; @@ -853,7 +845,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(msti_tree, hf_bpdu_msti_internal_root_path_cost, tvb, - offset+MSTI_INTERNAL_ROOT_PATH_COST, 4, FALSE); + offset+MSTI_INTERNAL_ROOT_PATH_COST, 4, ENC_BIG_ENDIAN); msti_bridge_identifier_priority = tvb_get_guint8(tvb, offset+MSTI_BRIDGE_IDENTIFIER_PRIORITY) >> 4; msti_port_identifier_priority = tvb_get_guint8(tvb, offset+MSTI_PORT_IDENTIFIER_PRIORITY) >> 4; @@ -866,7 +858,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) msti_port_identifier_priority); proto_tree_add_item(msti_tree, hf_bpdu_msti_remaining_hops, tvb, - offset + MSTI_REMAINING_HOPS, 1, FALSE); + offset + MSTI_REMAINING_HOPS, 1, ENC_BIG_ENDIAN); total_msti_length -= MSTI_MESSAGE_SIZE; offset += MSTI_MESSAGE_SIZE; @@ -943,7 +935,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(msti_tree, hf_bpdu_msti_internal_root_path_cost, tvb, - offset+ALT_MSTI_INTERNAL_ROOT_PATH_COST, 4, FALSE); + offset+ALT_MSTI_INTERNAL_ROOT_PATH_COST, 4, ENC_BIG_ENDIAN); msti_bridge_identifier_priority = tvb_get_ntohs(tvb, offset+ALT_MSTI_BRIDGE_IDENTIFIER); msti_bridge_identifier_mac = tvb_get_ptr(tvb, offset+ALT_MSTI_BRIDGE_IDENTIFIER + 2, 6); @@ -959,7 +951,7 @@ dissect_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset+ALT_MSTI_PORT_IDENTIFIER, 2, msti_port_identifier_priority); proto_tree_add_item(msti_tree, hf_bpdu_msti_remaining_hops, tvb, - offset + ALT_MSTI_REMAINING_HOPS, 1, FALSE); + offset + ALT_MSTI_REMAINING_HOPS, 1, ENC_BIG_ENDIAN); total_msti_length -= ALT_MSTI_MESSAGE_SIZE; offset += ALT_MSTI_MESSAGE_SIZE; diff --git a/epan/dissectors/packet-bssap.c b/epan/dissectors/packet-bssap.c index e86edab199..d9ad77d672 100644 --- a/epan/dissectors/packet-bssap.c +++ b/epan/dissectors/packet-bssap.c @@ -579,15 +579,10 @@ dissect_bssap_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree, break; default: - if (check_col(pinfo->cinfo, COL_INFO)) - { - col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", - val_to_str(pdu_type, ((bssap_or_bsap_global == BSSAP) ? - bssap_pdu_type_acro_values : bsap_pdu_type_acro_values), - "Unknown")); - - } - + col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", + val_to_str(pdu_type, ((bssap_or_bsap_global == BSSAP) ? + bssap_pdu_type_acro_values : bsap_pdu_type_acro_values), + "Unknown")); dissect_bssap_unknown_message(tvb, bssap_tree); break; } @@ -602,10 +597,7 @@ dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* * Make entry in the Protocol column on summary display */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) - { - col_set_str(pinfo->cinfo, COL_PROTOCOL, ((bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP")); - } + col_set_str(pinfo->cinfo, COL_PROTOCOL, ((bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP")); if ( pinfo->sccp_info && pinfo->sccp_info->data.co.assoc ) pinfo->sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP; @@ -613,7 +605,7 @@ dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* * create the bssap protocol tree */ - hidden_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, FALSE); + hidden_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, ENC_BIG_ENDIAN); PROTO_ITEM_SET_HIDDEN(hidden_item); bssap_item = proto_tree_add_text(tree, tvb, 0, -1, (bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP"); bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap); @@ -727,19 +719,19 @@ dissect_bssap_cell_global_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_cell_global_id_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_cell_global_id_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_cell_global_id); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* * The rest of the information element is coded as the the value part * of the cell global id IE defined in 3GPP TS 48.018 (not including * 3GPP TS 48.018 IEI and 3GPP TS 48.018 length indicator). */ - cgi_item= proto_tree_add_item(ie_tree, hf_bssap_cell_global_id, tvb, offset, ie_len, FALSE); + cgi_item= proto_tree_add_item(ie_tree, hf_bssap_cell_global_id, tvb, offset, ie_len, ENC_BIG_ENDIAN); cgi_tree = proto_item_add_subtree(cgi_item, ett_bssap_cgi); /* octets 3-8 Octets 3 to 8 contain the value part (starting with octet 2) of the * Routing Area Identification IE defined in 3GPP TS 24.008, not @@ -766,12 +758,12 @@ dissect_bssap_channel_needed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_channel_needed_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_channel_needed_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_channel_needed); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* * The rest of the information element is coded as the IEI part and the @@ -795,12 +787,12 @@ dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info * guint8 prot_disc; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_dlink_tnl_pld_cntrl_amd_inf); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Bit 8 Spare */ /* Bit 7 - 4 @@ -808,20 +800,20 @@ dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info * * For coding, see 3GPP TS 44.064. */ - proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, ENC_BIG_ENDIAN); octet = tvb_get_guint8(tvb,offset); prot_disc = (octet&0x78)>>3; /* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form, * when set to 0 indicates that the SGSN did not receive the payload in ciphered form. */ - proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, ENC_BIG_ENDIAN); /* octet 3 bit 2 - 1 * Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association * between Tunnel Priority and LLC SAPs. */ - proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, ENC_BIG_ENDIAN); /* Tunnel payload */ next_tvb = tvb_new_subset(tvb, offset, ie_len-4, ie_len-4); @@ -856,12 +848,12 @@ dissect_bssap_emlpp_priority(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_emlpp_prio_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_emlpp_prio_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_emlpp_prio); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The rest of the information element is coded as the value part of the eMLPP-Priority IE defined in 3GPP TS 48.008 (not including @@ -871,7 +863,7 @@ dissect_bssap_emlpp_priority(tvbuff_t *tvb, proto_tree *tree, int offset) as the call priority field (bit 3 to 1 of octet 5) in the Descriptive group or broadcast call reference information element as defined in 3GPP TS 24.008. */ - proto_tree_add_item(ie_tree, hf_bssap_call_priority, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_call_priority, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -887,16 +879,16 @@ dissect_bssap_gprs_erroneous_msg(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_gprs_erroneous_msg_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_gprs_erroneous_msg_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_erroneous_msg); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Erroneous message including the message type. */ - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -918,16 +910,16 @@ dissect_bssap_gprs_location_update_type(tvbuff_t *tvb, proto_tree *tree, int off guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_gprs_loc_upd_type_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_gprs_loc_upd_type_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_gprs_loc_upd); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* GPRS location update type value (octet 3) */ - proto_tree_add_item(ie_tree, hf_bssap_gprs_loc_upd_type, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_gprs_loc_upd_type, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; } @@ -963,15 +955,15 @@ dissect_bssap_Gs_cause(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_Gs_cause_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_Gs_cause_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bassp_Gs_cause); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Gs Cause value (octet 3) */ - proto_tree_add_item(ie_tree, hf_bssap_Gs_cause, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_Gs_cause, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -988,18 +980,18 @@ dissect_bssap_imei(tvbuff_t *tvb, proto_tree *tree, int offset) const char *digit_str; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_imei_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_imei_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bassp_imei); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The IMEI is coded as a sequence of BCD digits, compressed two into each octet. * The IMEI consists of 15 digits (see 3GPP TS 23.003). */ ie_tvb = tvb_new_subset(tvb, offset, ie_len, ie_len); - digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, FALSE); + digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, ENC_BIG_ENDIAN); proto_tree_add_string(ie_tree, hf_bssap_imei, ie_tvb, 0, -1, digit_str); return offset + ie_len; @@ -1016,18 +1008,18 @@ dissect_bssap_imesiv(tvbuff_t *tvb, proto_tree *tree, int offset) const char *digit_str; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_imesiv_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_imesiv_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bassp_imesiv); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The IMEISV is coded as a sequence of BCD digits, compressed two into each octet. * The IMEISV consists of 16 digits (see 3GPP TS 23.003). */ ie_tvb = tvb_new_subset(tvb, offset, ie_len, ie_len); - digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, FALSE); + digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, ENC_BIG_ENDIAN); proto_tree_add_string(ie_tree, hf_bssap_imeisv, ie_tvb, 0, -1, digit_str); return offset + ie_len; @@ -1050,12 +1042,12 @@ dissect_bssap_imsi(tvbuff_t *tvb, proto_tree *tree, int offset) const char *digit_str; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_imsi_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_imsi_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_imsi); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; ie_tvb = tvb_new_subset(tvb, offset, ie_len,ie_len); digit_str = unpack_digits(ie_tvb, 0, &Dgt1_9_bcd, TRUE); @@ -1081,15 +1073,15 @@ dissect_bssap_imsi_det_from_gprs_serv_type(tvbuff_t *tvb, proto_tree *tree, int guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_gprs_serv_type_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_gprs_serv_type_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_imsi_det_from_gprs_serv_type); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* IMSI detach from GPRS service type value (octet 3)*/ - proto_tree_add_item(ie_tree, hf_bssap_imsi_det_from_gprs_serv_type, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_imsi_det_from_gprs_serv_type, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1104,14 +1096,14 @@ dissect_bssap_imsi_det_from_non_gprs_serv_type(tvbuff_t *tvb, proto_tree *tree, guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_non_gprs_serv_type_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_non_gprs_serv_type_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_imsi_det_from_non_gprs_serv_type); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1139,15 +1131,15 @@ dissect_bssap_info_req(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_info_req_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_info_req_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_info_req); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /*Information requested value (octet 3) */ - proto_tree_add_item(ie_tree, hf_bssap_info_req, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_info_req, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1162,12 +1154,12 @@ dissect_bssap_loc_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, i guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_loc_area_id_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_loc_area_id_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_loc_area_id); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The rest of the information element is coded as the value part of * the location area identifier IE defined in 3GPP TS 48.018 (not @@ -1188,12 +1180,12 @@ dissect_bssap_location_information_age(tvbuff_t *tvb, proto_tree *tree, int offs guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_loc_inf_age_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_loc_inf_age_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_loc_inf_age); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The rest of the IE is coded as the value part of the * AgeOfLocationInformation as specified in 3GPP TS 29.002.: @@ -1206,7 +1198,7 @@ dissect_bssap_location_information_age(tvbuff_t *tvb, proto_tree *tree, int offs * -- value '32767' indicates that the location information is at least * -- 32767 minutes old */ - proto_tree_add_item(ie_tree, hf_bssap_loc_inf_age, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_loc_inf_age, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1221,12 +1213,12 @@ dissect_bssap_MM_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_mm_information_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_mm_information_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_mm_information); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* User information: This field is composed of one or more of the * information elements of the MM information message as defined @@ -1249,12 +1241,12 @@ dissect_bssap_mobile_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int guint ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_mobile_id_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_mobile_id_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_id); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The rest of the information element is coded as the value part of * the mobile identity IE defined in 3GPP TS 24.008 (not including @@ -1275,12 +1267,12 @@ dissect_bssap_mobile_stn_cls_mrk1(tvbuff_t *tvb, proto_tree *tree, packet_info * guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_mobile_stn_cls_mrk1_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_mobile_stn_cls_mrk1_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_stn_cls_mrk1); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The rest of the information element is coded as the value part of * the mobile station classmark 1 IE defined in 3GPP TS 24.008 (not @@ -1312,15 +1304,15 @@ dissect_bssap_mobile_station_state(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_mobile_station_state_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_mobile_station_state_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_station_state); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* Mobile station state value (octet 3) */ - proto_tree_add_item(ie_tree, hf_bssap_mobile_station_state, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_mobile_station_state, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1334,17 +1326,17 @@ dissect_bssap_ptmsi(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_ptmsi_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_ptmsi_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_ptmsi); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The PTMSI consists of 4 octets. It can be coded using a full hexadecimal representation * (see 3GPP TS 23.003). */ - proto_tree_add_item(ie_tree, hf_bssap_ptmsi, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_ptmsi, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1358,12 +1350,12 @@ dissect_bssap_reject_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_reject_cause_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_reject_cause_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_reject_cause); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The rest of the information element is coded as the value part of * the reject cause IE defined in 3GPP TS 24.008, not including @@ -1384,18 +1376,18 @@ dissect_bssap_service_area_id(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_service_area_id_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_service_area_id_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_service_area_id); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The rest of the information element is coded as the the value part * of the SAI IE defined in 3GPP TS 25.413 (not including * 3GPP TS 25.413 IEI and 3GPP TS 25.413 length indicator). */ - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1418,12 +1410,12 @@ dissect_bssap_sgsn_number(tvbuff_t *tvb, proto_tree *tree, int offset) const char *digit_str; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_sgsn_nr_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_sgsn_nr_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_sgsn_nr); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The SGSN number is coded as a sequence of TBCD digits (as specified in 3GPP TS 29.002), * compressed two into each octet. The Number is in international E.164 format as indicated by Octet 3 @@ -1431,12 +1423,12 @@ dissect_bssap_sgsn_number(tvbuff_t *tvb, proto_tree *tree, int offset) * and includes a length indicator. The value part of the SGSN number information element * (not including IEI, Length indicator and Octet 3) shall not exceed 15 digits. */ - proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, FALSE); - proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, FALSE); - proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; number_tvb = tvb_new_subset(tvb, offset, ie_len-1,ie_len-1); - digit_str = unpack_digits(number_tvb, 0, &Dgt1_9_bcd, FALSE); + digit_str = unpack_digits(number_tvb, 0, &Dgt1_9_bcd, ENC_BIG_ENDIAN); proto_tree_add_string(ie_tree, hf_bssap_sgsn_number, number_tvb, 0, -1, digit_str); @@ -1452,17 +1444,17 @@ dissect_bssap_tmsi(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_tmsi_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_tmsi_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_tmsi); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The TMSI consists of 4 octets. It can be coded using a full hexadecimal representation * (see 3GPP TS 23.003). */ - proto_tree_add_item(ie_tree, hf_bssap_tmsi, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_tmsi, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1482,15 +1474,15 @@ dissect_bssap_tmsi_status(tvbuff_t *tvb, proto_tree *tree, int offset) guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_tmsi_status_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_tmsi_status_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_tmsi_status); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* TMSI flag (octet 3) */ - proto_tree_add_item(ie_tree, hf_bssap_tmsi_status, tvb, offset, ie_len, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_tmsi_status, tvb, offset, ie_len, ENC_BIG_ENDIAN); return offset + ie_len; @@ -1520,32 +1512,32 @@ dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info * guint8 prot_disc; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_ulink_tnl_pld_cntrl_amd_inf); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* octet 3 bit 8 Spare */ /* octet 3 bit 7 - 4 * TOM Protocol Discriminator: Identifies the protocol using tunnelling of non-GSM signalling. * For coding, see 3GPP TS 44.064. */ - proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, ENC_BIG_ENDIAN); octet = tvb_get_guint8(tvb,offset); prot_disc = (octet&0x78)>>3; /* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form, * when set to 0 indicates that the SGSN did not receive the payload in ciphered form. */ - proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, ENC_BIG_ENDIAN); /* octet 3 bit 2 - 1 * Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association * between Tunnel Priority and LLC SAPs. */ - proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, ENC_BIG_ENDIAN); /* Tunnel payload */ next_tvb = tvb_new_subset(tvb, offset, ie_len-4, ie_len-4); @@ -1569,12 +1561,12 @@ dissect_bssap_vlr_number(tvbuff_t *tvb, proto_tree *tree, int offset) const char *digit_str; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_vlr_number_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_vlr_number_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_vlr_number); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The VLR number is coded as a sequence of TBCD digits (as specified in 3GPP TS 29.002), * compressed two into each octet. The Number is in international E.164 format as indicated by Octet 3 @@ -1583,12 +1575,12 @@ dissect_bssap_vlr_number(tvbuff_t *tvb, proto_tree *tree, int offset) * (not including IEI, length indicator and Octet 3), shall not exceed 15 digits. */ - proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, FALSE); - proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, FALSE); - proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; number_tvb = tvb_new_subset(tvb, offset, ie_len-1,ie_len-1); - digit_str = unpack_digits(number_tvb, 0, &Dgt1_9_bcd, FALSE); + digit_str = unpack_digits(number_tvb, 0, &Dgt1_9_bcd, ENC_BIG_ENDIAN); proto_tree_add_string(ie_tree, hf_bssap_sgsn_number, number_tvb, 0, -1, digit_str); return offset + ie_len-1; @@ -1607,12 +1599,12 @@ dissect_bssap_global_cn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 ie_len; ie_len = tvb_get_guint8(tvb,offset+1); - item = proto_tree_add_item(tree, hf_bssap_global_cn_id_ie, tvb, offset, ie_len+2, FALSE); + item = proto_tree_add_item(tree, hf_bssap_global_cn_id_ie, tvb, offset, ie_len+2, ENC_BIG_ENDIAN); ie_tree = proto_item_add_subtree(item, ett_bssap_global_cn); - proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; - proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, FALSE); + proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* The Global CN-Id consists of a PLMN-Id and a CN-Id, see 3GPP TS 23.003. * The PLMN-Id consists of MCC and MNC coded according to Location Area Identification @@ -1621,18 +1613,18 @@ dissect_bssap_global_cn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * the most significant bit is bit 8 of octet 6. If the CN-Id does not fill the field reserved for it, * the rest of the bits are set to '0'. */ - global_cn_id_item = proto_tree_add_item(ie_tree, hf_bssap_global_cn_id, tvb, offset, ie_len, FALSE); + global_cn_id_item = proto_tree_add_item(ie_tree, hf_bssap_global_cn_id, tvb, offset, ie_len, ENC_BIG_ENDIAN); global_cn_id_tree = proto_item_add_subtree(global_cn_id_item, ett_bssap_global_cn_id); /* Octet 3 - 5 PLMN-Id Coded as octets 2 to 4 of the Location Area Identification IE, * defined in 3GPP TS 24.008 (not including 3GPP TS 24.008 IEI and LAC). */ - plmn_item = proto_tree_add_item(global_cn_id_tree, hf_bssap_plmn_id, tvb, offset, 3, FALSE); + plmn_item = proto_tree_add_item(global_cn_id_tree, hf_bssap_plmn_id, tvb, offset, 3, ENC_BIG_ENDIAN); plmn_tree = proto_item_add_subtree(plmn_item, ett_bssap_plmn); dissect_e212_mcc_mnc(tvb, pinfo, plmn_tree, offset, TRUE); offset = offset + 3; /* Octet 6 - 7 CN-Id (INTEGER 0..4095) */ - proto_tree_add_item(global_cn_id_tree, hf_bssap_cn_id, tvb, offset, 2, FALSE); + proto_tree_add_item(global_cn_id_tree, hf_bssap_cn_id, tvb, offset, 2, ENC_BIG_ENDIAN); offset = offset+2; return offset; @@ -1655,11 +1647,11 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr pinfo->sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP; /* create the BSSAP+ protocol tree */ - bssap_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, FALSE); + bssap_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, ENC_BIG_ENDIAN); bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap); message_type = tvb_get_guint8(tvb,offset); - proto_tree_add_item(bssap_tree, hf_bssap_plus_message_type, tvb, offset, 1,FALSE); + proto_tree_add_item(bssap_tree, hf_bssap_plus_message_type, tvb, offset, 1,ENC_BIG_ENDIAN); offset++; col_add_str(pinfo->cinfo,COL_INFO, val_to_str(message_type,bssap_plus_message_type_values,"Unknown %u")); @@ -2161,17 +2153,17 @@ dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (tvb_get_guint8(tvb, 0)) { case 0x00: - if (tvb_get_guint8(tvb, 1) != (tvb_length(tvb) - 2)) { return(FALSE); } + if (tvb_get_guint8(tvb, 1) != (tvb_length(tvb) - 2)) { return(ENC_BIG_ENDIAN); } if (tvb_get_guint8(tvb, 2) == 0x40 && tvb_get_guint8(tvb, 3) != 0x01) { - return(FALSE); } + return(ENC_BIG_ENDIAN); } break; case 0x01: - if (tvb_get_guint8(tvb, 2) != (tvb_length(tvb) - 3)) { return(FALSE); } + if (tvb_get_guint8(tvb, 2) != (tvb_length(tvb) - 3)) { return(ENC_BIG_ENDIAN); } break; default: - return(FALSE); + return(ENC_BIG_ENDIAN); } dissect_bssap(tvb, pinfo, tree); @@ -2526,7 +2518,7 @@ proto_register_bssap(void) "identified as BSSAP or BSAP.", &bssap_or_bsap_global, bssap_or_bsap_options, - FALSE); + ENC_BIG_ENDIAN); prefs_register_enum_preference(bssap_module, "gsm_or_lb_interface", @@ -2534,7 +2526,7 @@ proto_register_bssap(void) "GSM-A is the interface between the BSC and the MSC. Lb is the interface between the BSC and the SMLC.", &gsm_or_lb_interface_global, gsm_or_lb_interface_options, - FALSE); + ENC_BIG_ENDIAN); prefs_register_uint_preference(bssap_module, "ssn", "Subsystem number used for BSSAP", diff --git a/epan/dissectors/packet-bthci_acl.c b/epan/dissectors/packet-bthci_acl.c index b1ee0eab47..7708dc3072 100644 --- a/epan/dissectors/packet-bthci_acl.c +++ b/epan/dissectors/packet-bthci_acl.c @@ -106,15 +106,15 @@ dissect_btacl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_ACL"); if(tree){ - ti=proto_tree_add_item(tree, proto_btacl, tvb, offset, -1, FALSE); + ti=proto_tree_add_item(tree, proto_btacl, tvb, offset, -1, ENC_BIG_ENDIAN); btacl_tree = proto_item_add_subtree(ti, ett_btacl); } flags=tvb_get_letohs(tvb, offset); pb_flag = (flags & 0x3000) >> 12; - proto_tree_add_item(btacl_tree, hf_btacl_chandle, tvb, offset, 2, TRUE); - proto_tree_add_item(btacl_tree, hf_btacl_pb_flag, tvb, offset, 2, TRUE); - proto_tree_add_item(btacl_tree, hf_btacl_bc_flag, tvb, offset, 2, TRUE); + proto_tree_add_item(btacl_tree, hf_btacl_chandle, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(btacl_tree, hf_btacl_pb_flag, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(btacl_tree, hf_btacl_bc_flag, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; acl_data=ep_alloc(sizeof(bthci_acl_data_t)); @@ -131,7 +131,7 @@ dissect_btacl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } length = tvb_get_letohs(tvb, offset); - proto_tree_add_item(btacl_tree, hf_btacl_length, tvb, offset, 2, TRUE); + proto_tree_add_item(btacl_tree, hf_btacl_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; /* determine if packet is fragmented */ @@ -187,9 +187,7 @@ dissect_btacl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *item; item=proto_tree_add_uint(btacl_tree, hf_btacl_reassembled_in, tvb, 0, 0, mfp->last_frame); PROTO_ITEM_SET_GENERATED(item); - if (check_col(pinfo->cinfo, COL_INFO)){ - col_append_fstr(pinfo->cinfo, COL_INFO, " [Reassembled in #%u]", mfp->last_frame); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " [Reassembled in #%u]", mfp->last_frame); } } if(pb_flag==0x01){ /* continuation fragment */ @@ -208,9 +206,7 @@ dissect_btacl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_item *item; item=proto_tree_add_uint(btacl_tree, hf_btacl_continuation_to, tvb, 0, 0, mfp->first_frame); PROTO_ITEM_SET_GENERATED(item); - if (check_col(pinfo->cinfo, COL_INFO)){ - col_append_fstr(pinfo->cinfo, COL_INFO, " [Continuation to #%u]", mfp->first_frame); - } + col_append_fstr(pinfo->cinfo, COL_INFO, " [Continuation to #%u]", mfp->first_frame); } if(mfp != NULL && mfp->last_frame==pinfo->fd->num){ next_tvb = tvb_new_child_real_data(tvb, (guint8*)mfp->reassembled, mfp->tot_len, mfp->tot_len); diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c index ff7ce11b9b..2bb36177b8 100644 --- a/epan/dissectors/packet-bthci_evt.c +++ b/epan/dissectors/packet-bthci_evt.c @@ -614,7 +614,7 @@ dissect_bthci_evt_bd_addr(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, pro for(i=6; i; i--) bd_addr[6-i] = tvb_get_guint8(tvb, offset+i-1); - handle_item = proto_tree_add_item(tree, hf_bthci_evt_bd_addr, tvb, offset, 6, TRUE); + handle_item = proto_tree_add_item(tree, hf_bthci_evt_bd_addr, tvb, offset, 6, ENC_LITTLE_ENDIAN); proto_item_append_text(handle_item, "%02x%02x:%02x:%02x%02x%02x (%s)", bd_addr[0], bd_addr[1], bd_addr[2], bd_addr[3], bd_addr[4], bd_addr[5], get_ether_name(bd_addr)); @@ -630,7 +630,7 @@ dissect_bthci_evt_cod(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t guint8 cod1, cod2; proto_item *item; - item = proto_tree_add_item(tree, hf_bthci_evt_class_of_device, tvb, offset, 3, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_class_of_device, tvb, offset, 3, ENC_LITTLE_ENDIAN); cod1 = tvb_get_guint8(tvb, offset+1); cod2 = tvb_get_guint8(tvb, offset+2); @@ -668,7 +668,7 @@ dissect_bthci_evt_cod(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_t static int dissect_bthci_evt_inq_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -677,18 +677,18 @@ dissect_bthci_evt_inq_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_ static int dissect_bthci_evt_conn_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_encryption_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_encryption_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -701,7 +701,7 @@ dissect_bthci_evt_conn_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_ offset = dissect_bthci_evt_cod(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -710,13 +710,13 @@ dissect_bthci_evt_conn_request(tvbuff_t *tvb, int offset, packet_info *pinfo _U_ static int dissect_bthci_evt_disconn_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_reason, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -725,10 +725,10 @@ dissect_bthci_evt_disconn_complete(tvbuff_t *tvb, int offset, packet_info *pinfo static int dissect_bthci_evt_auth_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -747,73 +747,73 @@ dissect_bthci_evt_lmp_features(tvbuff_t *tvb, int offset, packet_info *pinfo _U_ ti_lmp_subtree=proto_item_add_subtree(ti_lmp_features, ett_lmp_subtree); } - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_00, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_01, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_02, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_03, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_04, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_05, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_06, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_07, tvb, offset, 1, TRUE); - offset++; - - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_10, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_11, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_12, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_13, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_14, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_15, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_16, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_17, tvb, offset, 1, TRUE); - offset++; - - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_20, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_21, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_22, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_23, tvb, offset, 1, TRUE); - item = proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_24, tvb, offset, 1, TRUE); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_00, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_01, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_02, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_03, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_04, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_05, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_06, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_07, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset++; + + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_10, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_11, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_12, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_13, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_14, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_15, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_16, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_17, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset++; + + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_20, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_21, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_22, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_23, tvb, offset, 1, ENC_LITTLE_ENDIAN); + item = proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_24, tvb, offset, 1, ENC_LITTLE_ENDIAN); fc_lag = (tvb_get_guint8(tvb, offset) & 0x70)>>4; proto_item_append_text(item, " (%i bytes)", 256*fc_lag); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_27, tvb, offset, 1, TRUE); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_27, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_31, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_32, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_33, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_34, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_35, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_36, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_37, tvb, offset, 1, TRUE); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_31, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_32, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_33, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_34, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_35, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_36, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_37, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_40, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_41, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_43, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_44, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_47, tvb, offset, 1, TRUE); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_40, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_41, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_43, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_44, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_47, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_50, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_51, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_52, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_53, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_54, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_55, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_56, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_57, tvb, offset, 1, TRUE); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_50, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_51, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_52, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_53, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_54, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_55, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_56, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_57, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_60, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_63, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_64, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_65, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_66, tvb, offset, 1, TRUE); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_60, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_63, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_64, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_65, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_66, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_70, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_71, tvb, offset, 1, TRUE); - proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_77, tvb, offset, 1, TRUE); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_70, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_71, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_lmp_subtree,hf_bthci_evt_lmp_feature_77, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -840,10 +840,10 @@ dissect_bthci_evt_link_key_notification(tvbuff_t *tvb, int offset, packet_info * { offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_link_key, tvb, offset, 16, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_link_key, tvb, offset, 16, ENC_LITTLE_ENDIAN); offset+=16; - proto_tree_add_item(tree, hf_bthci_evt_key_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_key_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset+=1; return offset; @@ -855,13 +855,13 @@ dissect_bthci_evt_return_link_keys(tvbuff_t *tvb, int offset, packet_info *pinfo guint8 evt_num_keys; evt_num_keys = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_num_keys, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_keys, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; while(evt_num_keys--){ offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_link_key, tvb, offset, 16, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_link_key, tvb, offset, 16, ENC_LITTLE_ENDIAN); offset+=16; } @@ -872,10 +872,10 @@ dissect_bthci_evt_return_link_keys(tvbuff_t *tvb, int offset, packet_info *pinfo static int dissect_bthci_evt_read_remote_support_features_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; offset=dissect_bthci_evt_lmp_features(tvb, offset, pinfo,tree); @@ -886,12 +886,12 @@ dissect_bthci_evt_read_remote_support_features_complete(tvbuff_t *tvb, int offse static int dissect_bthci_evt_remote_name_req_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_remote_name, tvb, offset, 248, FALSE); + proto_tree_add_item(tree, hf_bthci_evt_remote_name, tvb, offset, 248, ENC_BIG_ENDIAN); offset+=248; return offset; @@ -900,19 +900,19 @@ dissect_bthci_evt_remote_name_req_complete(tvbuff_t *tvb, int offset, packet_inf static int dissect_bthci_evt_read_remote_version_information_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_vers_nr, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_vers_nr, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_comp_id, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_comp_id, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_sub_vers_nr, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_sub_vers_nr, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -921,7 +921,7 @@ dissect_bthci_evt_read_remote_version_information_complete(tvbuff_t *tvb, int of static int dissect_bthci_evt_flush_occured(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -933,14 +933,14 @@ dissect_bthci_evt_number_of_completed_packets(tvbuff_t *tvb, int offset, packet_ guint8 evt_num_handles; evt_num_handles = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_num_handles, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_handles, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; while(evt_num_handles--){ - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_num_compl_packets, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_compl_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; } @@ -953,16 +953,16 @@ dissect_bthci_evt_mode_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, { proto_item *handle_item; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_curr_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_curr_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - handle_item = proto_tree_add_item(tree, hf_bthci_evt_interval, tvb, offset, 2, TRUE); + handle_item = proto_tree_add_item(tree, hf_bthci_evt_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(handle_item, " Baseband slots (%f msec)", tvb_get_letohs(tvb, offset)*0.625); offset+=2; @@ -972,12 +972,12 @@ dissect_bthci_evt_mode_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, static int dissect_bthci_evt_role_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_role, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_role, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -986,7 +986,7 @@ dissect_bthci_evt_role_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, static int dissect_bthci_evt_hardware_error(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_hardware_code, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_hardware_code, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -1009,7 +1009,7 @@ dissect_bthci_evt_loopback_command(tvbuff_t *tvb, int offset, packet_info *pinfo static int dissect_bthci_evt_data_buffer_overflow(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -1021,13 +1021,13 @@ dissect_bthci_evt_read_clock_offset_complete(tvbuff_t *tvb, int offset, packet_i proto_item *handle_item; gint16 clk; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - handle_item = proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, TRUE); + handle_item = proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN); clk=tvb_get_letohs(tvb, offset) & 32767; /* only bit0-14 are valid */ proto_item_append_text(handle_item, " (%g ms)", 1.25*clk); offset+=2; @@ -1038,10 +1038,10 @@ dissect_bthci_evt_read_clock_offset_complete(tvbuff_t *tvb, int offset, packet_i static int dissect_bthci_evt_max_slots_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_max_slots, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_max_slots, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -1050,7 +1050,7 @@ dissect_bthci_evt_max_slots_change(tvbuff_t *tvb, int offset, packet_info *pinfo static int dissect_bthci_evt_qos_violation(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -1063,11 +1063,11 @@ dissect_bthci_evt_conn_packet_type_changed(tvbuff_t *tvb, int offset, packet_inf proto_tree *handle_tree=NULL; proto_item *ti_ptype_subtree=NULL; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; flags=tvb_get_letohs(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; handle_tree = proto_tree_add_text(tree, tvb, offset, 2, "Usable packet types: "); @@ -1104,21 +1104,21 @@ dissect_bthci_evt_conn_packet_type_changed(tvbuff_t *tvb, int offset, packet_inf if (flags & 0x2000) proto_item_append_text(handle_tree, "3-DH5 "); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_2dh1, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_3dh1, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dm1, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dh1, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_2dh3, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_3dh3, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dm3, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dh3, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_2dh5, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_3dh5, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dm5, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dh5, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_hv1, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_hv2, tvb, offset, 2, TRUE); - proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_hv3, tvb, offset, 2, TRUE); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_2dh1, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_3dh1, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dm1, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dh1, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_2dh3, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_3dh3, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dm3, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dh3, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_2dh5, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_3dh5, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dm5, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_dh5, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_hv1, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_hv2, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_ptype_subtree, hf_bthci_evt_link_type_hv3, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -1133,18 +1133,18 @@ dissect_bthci_evt_command_status(tvbuff_t *tvb, int offset, packet_info *pinfo, status_code = tvb_get_guint8(tvb, offset); if( status_code != 0) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); } else { - proto_tree_add_item(tree, hf_bthci_evt_status_pending, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status_pending, tvb, offset, 1, ENC_LITTLE_ENDIAN); } offset++; - proto_tree_add_item(tree, hf_bthci_evt_num_command_packets, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_command_packets, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; opcode = tvb_get_letohs(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_com_opcode, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_com_opcode, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", @@ -1158,7 +1158,7 @@ dissect_bthci_evt_page_scan_mode_change(tvbuff_t *tvb, int offset, packet_info * { offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -1169,7 +1169,7 @@ dissect_bthci_evt_page_scan_repetition_mode_change(tvbuff_t *tvb, int offset, pa { offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -1181,13 +1181,13 @@ dissect_bthci_evt_inq_result_with_rssi(tvbuff_t *tvb, int offset, packet_info *p guint8 num, evt_num_responses; evt_num_responses = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_num_responses, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_responses, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; for(num=0;num<evt_num_responses;num++){ offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; /* reserved byte */ @@ -1195,10 +1195,10 @@ dissect_bthci_evt_inq_result_with_rssi(tvbuff_t *tvb, int offset, packet_info *p offset = dissect_bthci_evt_cod(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; } @@ -1233,8 +1233,8 @@ dissect_bthci_evt_ext_inquiry_response(tvbuff_t *tvb, int offset, packet_info *p proto_item_append_text(ti_eir_struct,"%s", val_to_str_ext_const(type, &bthci_cmd_eir_data_type_vals_ext, "Unknown")); - proto_tree_add_item(ti_eir_struct_subtree,hf_bthci_evt_eir_struct_length, tvb, offset+i, 1, TRUE); - proto_tree_add_item(ti_eir_struct_subtree,hf_bthci_evt_eir_struct_type, tvb, offset+i+1, 1, TRUE); + proto_tree_add_item(ti_eir_struct_subtree,hf_bthci_evt_eir_struct_length, tvb, offset+i, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(ti_eir_struct_subtree,hf_bthci_evt_eir_struct_type, tvb, offset+i+1, 1, ENC_LITTLE_ENDIAN); switch(type) { case 0x02: /* 16-bit Service Class UUIDs, incomplete list */ @@ -1242,7 +1242,7 @@ dissect_bthci_evt_ext_inquiry_response(tvbuff_t *tvb, int offset, packet_info *p j=0; while(j<(length-1)) { - proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_sc_uuid16, tvb, offset+i+j+2, 2, TRUE); + proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_sc_uuid16, tvb, offset+i+j+2, 2, ENC_LITTLE_ENDIAN); j+=2; } break; @@ -1251,7 +1251,7 @@ dissect_bthci_evt_ext_inquiry_response(tvbuff_t *tvb, int offset, packet_info *p j=0; while(j<(length-1)) { - proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_sc_uuid32, tvb, offset+i+j+2, 4, TRUE); + proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_sc_uuid32, tvb, offset+i+j+2, 4, ENC_LITTLE_ENDIAN); j+=4; } break; @@ -1260,20 +1260,20 @@ dissect_bthci_evt_ext_inquiry_response(tvbuff_t *tvb, int offset, packet_info *p j=0; while(j<(length-1)) { - proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_sc_uuid128, tvb, offset+i+j+2, 16, TRUE); + proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_sc_uuid128, tvb, offset+i+j+2, 16, ENC_LITTLE_ENDIAN); j+=16; } break; case 0x08: /* Device Name, shortened */ case 0x09: /* Device Name, full */ - proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_device_name, tvb, offset+i+2, length-1, TRUE); + proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_device_name, tvb, offset+i+2, length-1, ENC_LITTLE_ENDIAN); proto_item_append_text(ti_eir_struct,": %s", tvb_format_text(tvb,offset+i+2,length-1)); break; case 0x0A: /* Tx Power Level */ - proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_transmit_power_level, tvb, offset+i+2, 1, TRUE); + proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_transmit_power_level, tvb, offset+i+2, 1, ENC_LITTLE_ENDIAN); default: - proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_eir_data, tvb, offset+i+2, length-1, TRUE); + proto_tree_add_item(ti_eir_struct_subtree, hf_bthci_evt_eir_data, tvb, offset+i+2, length-1, ENC_LITTLE_ENDIAN); break; } i += length+1; @@ -1299,13 +1299,13 @@ dissect_bthci_evt_io_capability_response(tvbuff_t *tvb, int offset, packet_info { offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_io_capability, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_io_capability, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_oob_data_present, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_oob_data_present, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_auth_requirements, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_auth_requirements, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -1316,7 +1316,7 @@ dissect_bthci_evt_user_confirmation_request(tvbuff_t *tvb, int offset, packet_in { offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_numeric_value, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_numeric_value, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; return offset; @@ -1341,7 +1341,7 @@ dissect_bthci_evt_remote_oob_data_request(tvbuff_t *tvb, int offset, packet_info static int dissect_bthci_evt_simple_pairing_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); @@ -1354,7 +1354,7 @@ dissect_bthci_evt_user_passkey_notification(tvbuff_t *tvb, int offset, packet_in { offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_passkey, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_passkey, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; return offset; @@ -1365,7 +1365,7 @@ dissect_bthci_evt_keypress_notification(tvbuff_t *tvb, int offset, packet_info * { offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_notification_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_notification_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -1376,7 +1376,7 @@ dissect_bthci_evt_remote_host_sup_feat_notification(tvbuff_t *tvb, int offset, p { offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_ext_lmp_features, tvb, offset, 8, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_ext_lmp_features, tvb, offset, 8, ENC_LITTLE_ENDIAN); offset+=8; return offset; @@ -1393,14 +1393,14 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo guint16 com_opcode; guint32 accuracy; - proto_tree_add_item(tree, hf_bthci_evt_num_command_packets, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_command_packets, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; com_opcode = tvb_get_letohs(tvb, offset); - ti_opcode = proto_tree_add_item(tree, hf_bthci_evt_com_opcode, tvb, offset, 2, TRUE); + ti_opcode = proto_tree_add_item(tree, hf_bthci_evt_com_opcode, tvb, offset, 2, ENC_LITTLE_ENDIAN); opcode_tree = proto_item_add_subtree(ti_opcode, ett_opcode); - proto_tree_add_item(opcode_tree, hf_bthci_evt_ogf, tvb, offset, 2, TRUE); - proto_tree_add_item(opcode_tree, hf_bthci_evt_ocf, tvb, offset, 2, TRUE); + proto_tree_add_item(opcode_tree, hf_bthci_evt_ogf, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(opcode_tree, hf_bthci_evt_ocf, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", @@ -1449,7 +1449,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo case 0x1802: /* Write Loopback Mode */ case 0x1803: /* Enable Device Under Test Mode */ case 0x1804: /* Write Simple Pairing Debug Mode */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; @@ -1468,7 +1468,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo case 0x0430: /* Remote OOB Data Request Reply */ case 0x0433: /* Remote OOB Data Request Negative Reply */ case 0x1009: /* Read BD_ADDR */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); @@ -1483,10 +1483,10 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo case 0x0c37: /* Write Link Supervision Timeout */ case 0x0c5f: /* Enhanced Flush */ case 0x1402: /* Reset Failed Contact Counter */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; @@ -1494,11 +1494,11 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo /* This is a list of Commands that all return status and timeout */ case 0x0c15: /* Read Connection Accept Timeout */ case 0x0c17: /* Read Page Timeout */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; timeout = tvb_get_letohs(tvb, offset); - item = proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", timeout*0.625); offset+=2; @@ -1507,14 +1507,14 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo /* This is a list of Commands that all return status, connection handle and timeout */ case 0x0c27: /* Read Automatic Flush Timeout */ case 0x0c36: /* Read Link Supervision Timeout */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; timeout = tvb_get_letohs(tvb, offset); - item = proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", timeout*0.625); offset+=2; @@ -1523,25 +1523,25 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo /* This is a list of Commands that all return status, interval and window */ case 0x0c1b: /* Read Page Scan Activity */ case 0x0c1d: /* Read Inquiry Scan Activity */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_interval, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_window, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_window, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x0420: /* Read LMP Handle */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_lmp_handle, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_lmp_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; /* 4 reserved bytes */ @@ -1549,121 +1549,121 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo break; case 0x0809: /* Role Discovery */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_curr_role, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_curr_role, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x080c: /* Read Link Policy Settings */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_switch, tvb, offset, 2, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_hold , tvb, offset, 2, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_sniff , tvb, offset, 2, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_park , tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_switch, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_hold , tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_sniff , tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_park , tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x080e: /* Read Default Link Policy Settings */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_switch, tvb, offset, 2, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_hold , tvb, offset, 2, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_sniff , tvb, offset, 2, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_park , tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_switch, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_hold , tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_sniff , tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_park , tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x0c09: /* Read PIN Type */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_pin_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_pin_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c0d: /* Read Stored Link Key */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_max_num_keys, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_max_num_keys, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_num_keys_read, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_keys_read, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x0c11: /* Write Stored Link Key */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_num_keys_written, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_keys_written, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c12: /* Delete Stored Link Key */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_num_keys_deleted, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_keys_deleted, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x0c14: /* Read Local Name */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_device_name, tvb, offset, 248, FALSE); + proto_tree_add_item(tree, hf_bthci_evt_device_name, tvb, offset, 248, ENC_BIG_ENDIAN); offset+=248; break; case 0x0c19: /* Read Scan Enable */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_scan_enable, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_scan_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c1f: /* Read Authentication Enable */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_authentication_enable, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_authentication_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c21: /* Read Encryption Mode */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_encryption_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_encryption_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c23: /* Read Class of Device */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; offset = dissect_bthci_evt_cod(tvb, offset, pinfo, tree); @@ -1671,197 +1671,197 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo break; case 0x0c25: /* Read Voice Setting */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_input_coding, tvb, offset, 2, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_input_data_format, tvb, offset, 2, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_input_sample_size, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_input_coding, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_input_data_format, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_input_sample_size, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x0c29: /* Read Num Broadcast Retransmissions */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_num_broadcast_retransm, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_broadcast_retransm, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c2b: /* Read Hold Mode Activity */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_page, tvb, offset, 1, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_inquiry, tvb, offset, 1, TRUE); - proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_periodic, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_page, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_inquiry, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_periodic, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c2d: /* Read Transmit Power Level */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c2e: /* Read SCO Flow Control Enable */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_sco_flow_cont_enable, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_sco_flow_cont_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c38: /* Read Number of Supported IAC */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_num_supp_iac, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_supp_iac, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c39: /* Read Current IAC LAP */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; num8 = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_num_curr_iac, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_curr_iac, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; for (i=0; i<num8; i++) { - proto_tree_add_item(tree, hf_bthci_evt_iac_lap, tvb, offset, 3, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_iac_lap, tvb, offset, 3, ENC_LITTLE_ENDIAN); offset+=3; } break; case 0x0c3b: /* Read Page Scan Period Mode */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_page_scan_period_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_scan_period_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c3d: /* Read Page Scan Mode */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c42: /* Read Inquiry Scan Type */ case 0x0c46: /* Read Page Scan Type */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_scan_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_scan_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c44: /* Read Inquiry Mode */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_inq_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_inq_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c48: /* Read AFH Channel Assessment Mode */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_afh_ch_assessment_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_afh_ch_assessment_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c51: /* Read Extended Inquiry Response */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_fec_required, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_fec_required, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; offset=dissect_bthci_evt_ext_inquiry_response(tvb, offset, pinfo, tree); break; case 0x0c55: /* Read Simple Pairing Mode */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_simple_pairing_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_simple_pairing_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c57: /* Read Local OOB Data */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_hash_c, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_hash_c, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_randomizer_r, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_randomizer_r, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x0c58: /* Read Inquiry Response Tx Power Level */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_power_level_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_power_level_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x0c5a: /* Read Default Erroneous Data Reporting */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_err_data_reporting, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_err_data_reporting, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x1001: /* Read Local Version Information */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_hci_vers_nr, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_hci_vers_nr, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_hci_revision, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_hci_revision, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_vers_nr, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_vers_nr, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_comp_id, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_comp_id, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_sub_vers_nr, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_sub_vers_nr, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x1002: /* Read Local Supported Commands */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_local_supported_cmds, tvb, offset, 64, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_local_supported_cmds, tvb, offset, 64, ENC_LITTLE_ENDIAN); offset+=64; break; case 0x1003: /* Read Local Supported Features */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; offset=dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree); @@ -1872,21 +1872,21 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo { guint8 page_number; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; page_number = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_page_number, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_max_page_number, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_max_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; if( page_number == 0 ){ offset=dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree); } else { - proto_tree_add_item(tree, hf_bthci_evt_ext_lmp_features, tvb, offset, 8, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_ext_lmp_features, tvb, offset, 8, ENC_LITTLE_ENDIAN); offset+=8; } } @@ -1894,111 +1894,111 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo break; case 0x1005: /* Read Buffer Size */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_host_data_packet_length_acl, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_host_data_packet_length_acl, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_host_data_packet_length_sco, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_host_data_packet_length_sco, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_host_total_num_acl_data_packets, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_host_total_num_acl_data_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_host_total_num_sco_data_packets, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_host_total_num_sco_data_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x1007: /* Read Country Code */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_country_code, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_country_code, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x1401: /* Read Failed Contact Counter */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_failed_contact_counter, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_failed_contact_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; break; case 0x1403: /* Get Link Quality */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_link_quality, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_link_quality, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x1405: /* Read RSSI */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; case 0x1406: /* Read AFH Channel Map */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_afh_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_afh_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_afh_channel_map, tvb, offset, 10, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_afh_channel_map, tvb, offset, 10, ENC_LITTLE_ENDIAN); offset+=10; break; case 0x1407: /* Read Clock */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_clock, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_clock, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; accuracy = tvb_get_letohl(tvb, offset); - item = proto_tree_add_item(tree, hf_bthci_evt_clock_accuracy, tvb, offset, 2, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_clock_accuracy, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " %g msec", accuracy*0.3125); offset+=2; break; case 0x1801: /* Read Loopback Mode */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_loopback_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_loopback_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; break; default: - proto_tree_add_item(tree, hf_bthci_evt_ret_params, tvb, offset, -1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_ret_params, tvb, offset, -1, ENC_LITTLE_ENDIAN); offset+=tvb_length_remaining(tvb, offset); break; } @@ -2009,28 +2009,28 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, packet_info *pinfo static int dissect_bthci_evt_qos_setup_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_flags, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_service_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_service_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_token_rate, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_token_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; - proto_tree_add_item(tree, hf_bthci_evt_peak_bandwidth, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_peak_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; - proto_tree_add_item(tree, hf_bthci_evt_latency, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; - proto_tree_add_item(tree, hf_bthci_evt_delay_variation, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_delay_variation, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; return offset; @@ -2039,10 +2039,10 @@ dissect_bthci_evt_qos_setup_complete(tvbuff_t *tvb, int offset, packet_info *pin static int dissect_bthci_evt_change_conn_link_key_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -2051,13 +2051,13 @@ dissect_bthci_evt_change_conn_link_key_complete(tvbuff_t *tvb, int offset, packe static int dissect_bthci_evt_master_link_key_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_key_flag, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_key_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -2066,13 +2066,13 @@ dissect_bthci_evt_master_link_key_complete(tvbuff_t *tvb, int offset, packet_inf static int dissect_bthci_evt_encryption_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_encryption_enable, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_encryption_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -2083,24 +2083,24 @@ dissect_bthci_evt_read_remote_ext_features_complete(tvbuff_t *tvb, int offset, p { guint8 page_number; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; page_number = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_page_number, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_max_page_number, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_max_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; if( page_number == 0 ){ offset=dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree); } else { - proto_tree_add_item(tree, hf_bthci_evt_ext_lmp_features, tvb, offset, 8, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_ext_lmp_features, tvb, offset, 8, ENC_LITTLE_ENDIAN); offset+=8; } @@ -2112,32 +2112,32 @@ dissect_bthci_evt_sync_connection_complete(tvbuff_t *tvb, int offset, packet_inf { proto_item *item; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_sync_link_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_sync_link_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - item = proto_tree_add_item(tree, hf_bthci_evt_sync_tx_interval, tvb, offset, 1, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_sync_tx_interval, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_guint8(tvb, offset)*0.625); offset++; - item = proto_tree_add_item(tree, hf_bthci_evt_sync_rtx_window, tvb, offset, 1, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_sync_rtx_window, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_guint8(tvb, offset)*0.625); offset++; - proto_tree_add_item(tree, hf_bthci_evt_sync_rx_packet_length, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_sync_rx_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_sync_tx_packet_length, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_sync_tx_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_air_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_air_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -2148,24 +2148,24 @@ dissect_bthci_evt_sync_connection_changed(tvbuff_t *tvb, int offset, packet_info { proto_item *item; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - item = proto_tree_add_item(tree, hf_bthci_evt_sync_tx_interval, tvb, offset, 1, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_sync_tx_interval, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_guint8(tvb, offset)*0.625); offset++; - item = proto_tree_add_item(tree, hf_bthci_evt_sync_rtx_window, tvb, offset, 1, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_sync_rtx_window, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_guint8(tvb, offset)*0.625); offset++; - proto_tree_add_item(tree, hf_bthci_evt_sync_rx_packet_length, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_sync_rx_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_sync_tx_packet_length, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_sync_tx_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -2176,25 +2176,25 @@ dissect_bthci_evt_sniff_subrating(tvbuff_t *tvb, int offset, packet_info *pinfo { proto_item *item; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - item = proto_tree_add_item(tree, hf_bthci_evt_max_tx_latency, tvb, offset, 2, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_max_tx_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_letohs(tvb, offset)*0.625); offset+=2; - item = proto_tree_add_item(tree, hf_bthci_evt_max_rx_latency, tvb, offset, 2, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_max_rx_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_letohs(tvb, offset)*0.625); offset+=2; - item = proto_tree_add_item(tree, hf_bthci_evt_min_remote_timeout, tvb, offset, 2, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_min_remote_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_letohs(tvb, offset)*0.625); offset+=2; - item = proto_tree_add_item(tree, hf_bthci_evt_min_local_timeout, tvb, offset, 2, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_min_local_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_letohs(tvb, offset)*0.625); offset+=2; @@ -2204,31 +2204,31 @@ dissect_bthci_evt_sniff_subrating(tvbuff_t *tvb, int offset, packet_info *pinfo static int dissect_bthci_evt_flow_specification_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - proto_tree_add_item(tree, hf_bthci_evt_flags, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_flow_direction, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_flow_direction, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_service_type, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_service_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_token_rate, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_token_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; - proto_tree_add_item(tree, hf_bthci_evt_token_bucket_size, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_token_bucket_size, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; - proto_tree_add_item(tree, hf_bthci_evt_peak_bandwidth, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_peak_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; - proto_tree_add_item(tree, hf_bthci_evt_latency, tvb, offset, 4, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset+=4; return offset; @@ -2237,7 +2237,7 @@ dissect_bthci_evt_flow_specification_complete(tvbuff_t *tvb, int offset, packet_ static int dissect_bthci_evt_enhanced_flush_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -2246,10 +2246,10 @@ dissect_bthci_evt_enhanced_flush_complete(tvbuff_t *tvb, int offset, packet_info static int dissect_bthci_evt_encryption_key_refresh_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) { - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; return offset; @@ -2260,10 +2260,10 @@ dissect_bthci_evt_link_supervision_timeout_changed(tvbuff_t *tvb, int offset, pa { proto_item *item; - proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; - item = proto_tree_add_item(tree, hf_bthci_evt_link_supervision_timeout, tvb, offset, 2, TRUE); + item = proto_tree_add_item(tree, hf_bthci_evt_link_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_letohs(tvb, offset)*0.625); offset+=2; @@ -2276,24 +2276,24 @@ dissect_bthci_evt_inq_result(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, guint8 num, evt_num_responses; evt_num_responses = tvb_get_guint8(tvb, offset); - proto_tree_add_item(tree, hf_bthci_evt_num_responses, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_num_responses, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; for(num=0;num<evt_num_responses;num++){ offset = dissect_bthci_evt_bd_addr(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_page_scan_period_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_scan_period_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; - proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; offset = dissect_bthci_evt_cod(tvb, offset, pinfo, tree); - proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, TRUE); + proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; } @@ -2311,26 +2311,23 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) int offset=0; if(tree){ - ti=proto_tree_add_item(tree, proto_bthci_evt, tvb, offset, -1, FALSE); + ti=proto_tree_add_item(tree, proto_bthci_evt, tvb, offset, -1, ENC_BIG_ENDIAN); bthci_evt_tree=proto_item_add_subtree(ti, ett_bthci_evt); } evt_code = tvb_get_guint8(tvb, offset); - proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_code, tvb, offset, 1, TRUE); + proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_code, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_item_append_text(bthci_evt_tree, " - %s", val_to_str(evt_code, evt_code_vals, "Unknown 0x%08x")); offset++; param_length = tvb_get_guint8(tvb, offset); - proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_param_length, tvb, offset, 1, TRUE); + proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_param_length, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_EVT"); - if((check_col(pinfo->cinfo, COL_INFO))){ - col_append_fstr(pinfo->cinfo, COL_INFO, " %s", val_to_str(evt_code, evt_code_vals, "Unknown 0x%08x")); - } - + col_append_fstr(pinfo->cinfo, COL_INFO, " %s", val_to_str(evt_code, evt_code_vals, "Unknown 0x%08x")); if (param_length > 0) { switch(evt_code) { @@ -2540,7 +2537,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_params, tvb, 2, -1, TRUE); + proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_params, tvb, 2, -1, ENC_LITTLE_ENDIAN); break; } diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c index 266d30ce19..e98f82ca80 100644 --- a/epan/dissectors/packet-btrfcomm.c +++ b/epan/dissectors/packet-btrfcomm.c @@ -261,12 +261,12 @@ dissect_ctrl_pn(packet_info *pinfo, proto_tree *t, tvbuff_t *tvb, int offset, in ti = proto_tree_add_text(t, tvb, offset, 1, "I1-I4: 0x%x, C1-C4: 0x%x", flags&0xf, (flags>>4)&0xf); st = proto_item_add_subtree(ti, ett_ctrl_pn_ci); - proto_tree_add_item(st, hf_pn_c14, tvb, offset, 1, TRUE); - proto_tree_add_item(st, hf_pn_i14, tvb, offset, 1, TRUE); + proto_tree_add_item(st, hf_pn_c14, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(st, hf_pn_i14, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; /* priority */ - proto_tree_add_item(t, hf_priority, tvb, offset, 1, TRUE); + proto_tree_add_item(t, hf_priority, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; /* Ack timer */ @@ -274,15 +274,15 @@ dissect_ctrl_pn(packet_info *pinfo, proto_tree *t, tvbuff_t *tvb, int offset, in offset++; /* max frame size */ - proto_tree_add_item(t, hf_max_frame_size, tvb, offset, 2, TRUE); + proto_tree_add_item(t, hf_max_frame_size, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset+=2; /* max retrans */ - proto_tree_add_item(t, hf_max_retrans, tvb, offset, 1, TRUE); + proto_tree_add_item(t, hf_max_retrans, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; /* error recovery mode */ - proto_tree_add_item(t, hf_error_recovery_mode, tvb, offset, 1, TRUE); + proto_tree_add_item(t, hf_error_recovery_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; if(!pinfo->fd->flags.visited){ @@ -333,16 +333,16 @@ dissect_ctrl_msc(proto_tree *t, tvbuff_t *tvb, int offset, int length) (status >> 6) & 1, (status >> 7) & 1); st = proto_item_add_subtree(it, ett_ctrl_pn_v24); - proto_tree_add_item(st, hf_msc_fc, tvb, offset, 1, TRUE); - proto_tree_add_item(st, hf_msc_rtc, tvb, offset, 1, TRUE); - proto_tree_add_item(st, hf_msc_rtr, tvb, offset, 1, TRUE); - proto_tree_add_item(st, hf_msc_ic, tvb, offset, 1, TRUE); - proto_tree_add_item(st, hf_msc_dv, tvb, offset, 1, TRUE); + proto_tree_add_item(st, hf_msc_fc, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(st, hf_msc_rtc, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(st, hf_msc_rtr, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(st, hf_msc_ic, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(st, hf_msc_dv, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; if(length==3){ proto_tree_add_text(t, tvb, offset, 1, "Break bits B1-B3: 0x%x", (tvb_get_guint8(tvb, offset) & 0xf) >> 1); - proto_tree_add_item(t, hf_msc_l, tvb, offset, 1, TRUE); + proto_tree_add_item(t, hf_msc_l, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; } @@ -379,8 +379,8 @@ dissect_btrfcomm_Address(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 *ea addr_tree = proto_item_add_subtree(ti, ett_addr); proto_tree_add_uint(addr_tree, hf_dlci, tvb, offset, 1, dlci); - proto_tree_add_item(addr_tree, hf_cr, tvb, offset, 1, TRUE); - proto_tree_add_item(addr_tree, hf_ea, tvb, offset, 1, TRUE); + proto_tree_add_item(addr_tree, hf_cr, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(addr_tree, hf_ea, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -408,8 +408,8 @@ dissect_btrfcomm_Control(tvbuff_t *tvb, int offset, proto_tree *tree, guint8 *pf ti = proto_tree_add_text(tree, tvb, offset, 1, "Control: Frame type: %s (0x%x), P/F flag: %d", val_to_str(frame_type, vs_frame_type, "Unknown"), frame_type, pf_flag); hctl_tree = proto_item_add_subtree(ti, ett_control); - proto_tree_add_item(hctl_tree, hf_pf, tvb, offset, 1, TRUE); - proto_tree_add_item(hctl_tree, hf_frame_type, tvb, offset, 1, TRUE); + proto_tree_add_item(hctl_tree, hf_pf, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(hctl_tree, hf_frame_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; return offset; @@ -473,18 +473,16 @@ dissect_btrfcomm_MccType(tvbuff_t *tvb, int offset, proto_tree *tree, packet_inf if(mcc_type){ - if ((check_col(pinfo->cinfo, COL_INFO))){ - col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(mcc_type, vs_ctl, "Unknown")); - } + col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(mcc_type, vs_ctl, "Unknown")); } ti = proto_tree_add_text(tree, tvb, start_offset, offset-start_offset, "Type: %s (0x%x), C/R flag = %d, E/A flag = %d", val_to_str(mcc_type, vs_ctl, "Unknown"), mcc_type, mcc_cr_flag, mcc_ea_flag); mcc_tree = proto_item_add_subtree(ti, ett_mcc); - proto_tree_add_item(mcc_tree, hf_mcc_cmd, tvb, start_offset, offset-start_offset, TRUE); - proto_tree_add_item(mcc_tree, hf_mcc_cr, tvb, start_offset, 1, TRUE); - proto_tree_add_item(mcc_tree, hf_mcc_ea, tvb, start_offset, 1, TRUE); + proto_tree_add_item(mcc_tree, hf_mcc_cmd, tvb, start_offset, offset-start_offset, ENC_LITTLE_ENDIAN); + proto_tree_add_item(mcc_tree, hf_mcc_cr, tvb, start_offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(mcc_tree, hf_mcc_ea, tvb, start_offset, 1, ENC_LITTLE_ENDIAN); return offset; } @@ -507,7 +505,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint16 frame_len; dlci_state_t *dlci_state = NULL; - ti = proto_tree_add_item(tree, proto_btrfcomm, tvb, offset, -1, TRUE); + ti = proto_tree_add_item(tree, proto_btrfcomm, tvb, offset, -1, ENC_LITTLE_ENDIAN); rfcomm_tree = proto_item_add_subtree(ti, ett_btrfcomm); col_set_str(pinfo->cinfo, COL_PROTOCOL, "RFCOMM"); @@ -554,11 +552,9 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - if ((check_col(pinfo->cinfo, COL_INFO))){ - col_append_fstr(pinfo->cinfo, COL_INFO, "%s DLCI=%d ", val_to_str(frame_type, vs_frame_type_short, "Unknown"), dlci); - if(dlci && (frame_type == 0x2f)) - col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ", val_to_str(dlci_state->service, vs_service_classes, "Unknown")); - } + col_append_fstr(pinfo->cinfo, COL_INFO, "%s DLCI=%d ", val_to_str(frame_type, vs_frame_type_short, "Unknown"), dlci); + if(dlci && (frame_type == 0x2f)) + col_append_fstr(pinfo->cinfo, COL_INFO, "(%s) ", val_to_str(dlci_state->service, vs_service_classes, "Unknown")); /* UID frame */ if(frame_type==0xef && dlci && pf_flag) { @@ -566,7 +562,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if((dlci_state->do_credit_fc&0x03)==0x03){ /*QQQ use tvb_length_remaining()==2 and !frame_len as heuristics to catch this as well? */ /* add credit based flow control byte */ - proto_tree_add_item(rfcomm_tree, hf_fc_credits, tvb, offset, 1, TRUE); + proto_tree_add_item(rfcomm_tree, hf_fc_credits, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset++; } } @@ -638,7 +634,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } - proto_tree_add_item(rfcomm_tree, hf_fcs, tvb, fcs_offset, 1, TRUE); + proto_tree_add_item(rfcomm_tree, hf_fcs, tvb, fcs_offset, 1, ENC_LITTLE_ENDIAN); } @@ -844,13 +840,13 @@ dissect_bthf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "HANDSFREE"); - ti = proto_tree_add_item(tree, proto_bthf, tvb, 0, -1, FALSE); + ti = proto_tree_add_item(tree, proto_bthf, tvb, 0, -1, ENC_BIG_ENDIAN); st = proto_item_add_subtree(ti, ett_bthf); col_add_fstr(pinfo->cinfo, COL_INFO, "%s \"%s\"", pinfo->p2p_dir==P2P_DIR_SENT?"Sent":"Rcvd", tvb_format_text(tvb, 0, length)); - proto_tree_add_item(st, hf_at_cmd, tvb, 0, -1, TRUE); + proto_tree_add_item(st, hf_at_cmd, tvb, 0, -1, ENC_LITTLE_ENDIAN); } void @@ -900,7 +896,7 @@ dissect_btdun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "DUN"); - ti = proto_tree_add_item(tree, proto_btdun, tvb, 0, -1, FALSE); + ti = proto_tree_add_item(tree, proto_btdun, tvb, 0, -1, ENC_BIG_ENDIAN); st = proto_item_add_subtree(ti, ett_btdun); is_at_cmd = TRUE; @@ -913,7 +909,7 @@ dissect_btdun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_add_fstr(pinfo->cinfo, COL_INFO, "%s \"%s\"", pinfo->p2p_dir==P2P_DIR_SENT?"Sent":"Rcvd", tvb_format_text(tvb, 0, length)); - proto_tree_add_item(st, hf_dun_at_cmd, tvb, 0, -1, TRUE); + proto_tree_add_item(st, hf_dun_at_cmd, tvb, 0, -1, ENC_LITTLE_ENDIAN); } else { /* ... or raw PPP */ @@ -976,7 +972,7 @@ dissect_btspp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "SPP"); - ti = proto_tree_add_item(tree, proto_btspp, tvb, 0, -1, FALSE); + ti = proto_tree_add_item(tree, proto_btspp, tvb, 0, -1, ENC_BIG_ENDIAN); st = proto_item_add_subtree(ti, ett_btspp); length = MIN(length,60); @@ -992,7 +988,7 @@ dissect_btspp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_length(tvb) > length ? "...":""); } - proto_tree_add_item(st, hf_data, tvb, 0, -1, TRUE); + proto_tree_add_item(st, hf_data, tvb, 0, -1, ENC_LITTLE_ENDIAN); } void |