diff options
author | Michael Mann <mmann78@netscape.net> | 2017-05-21 07:39:32 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-05-22 15:28:41 +0000 |
commit | 8cdbde02c9c949f7c9069623650d2eba70bdd1dc (patch) | |
tree | c68326b18840252ad7746f01c38075ebb6a30b82 /epan | |
parent | 6112591976a79d6598a4c92cbbf3c158ec0ce54c (diff) |
packet-h261.c: Use proto_tree_add_item
Change-Id: Ifbb69d0bd2a71c4dd022c6dbae2ed84c2bf5f912
Reviewed-on: https://code.wireshark.org/review/21732
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-h261.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/epan/dissectors/packet-h261.c b/epan/dissectors/packet-h261.c index 0f912a2fd2..24e5eaca48 100644 --- a/epan/dissectors/packet-h261.c +++ b/epan/dissectors/packet-h261.c @@ -86,24 +86,20 @@ dissect_h261( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U offset++; /* GOBN 2nd octet, 4 bits */ - proto_tree_add_uint( h261_tree, hf_h261_gobn, tvb, offset, 1, tvb_get_guint8( tvb, offset ) >> 4 ); + proto_tree_add_item( h261_tree, hf_h261_gobn, tvb, offset, 1, ENC_NA); /* MBAP 2nd octet, 4 bits, 3rd octet 1 bit */ - proto_tree_add_uint( h261_tree, hf_h261_mbap, tvb, offset, 1, - ( tvb_get_guint8( tvb, offset ) & 15 ) - + ( tvb_get_guint8( tvb, offset + 1 ) >> 7 ) ); + proto_tree_add_item( h261_tree, hf_h261_mbap, tvb, offset, 1, ENC_BIG_ENDIAN); offset++; /* QUANT 3rd octet, 5 bits (starting at bit 2!) */ - proto_tree_add_uint( h261_tree, hf_h261_quant, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 124 ); + proto_tree_add_item( h261_tree, hf_h261_quant, tvb, offset, 1, ENC_NA ); /* HMVD 3rd octet 2 bits, 4th octet 3 bits */ - proto_tree_add_uint( h261_tree, hf_h261_hmvd, tvb, offset, 2, - ( ( tvb_get_guint8( tvb, offset ) & 0x03 ) << 3 ) - + ( tvb_get_guint8( tvb, offset+1 ) >> 5 ) ); + proto_tree_add_item( h261_tree, hf_h261_hmvd, tvb, offset, 2, ENC_BIG_ENDIAN); offset++; /* VMVD 4th octet, last 5 bits */ - proto_tree_add_uint( h261_tree, hf_h261_vmvd, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 31 ); + proto_tree_add_item( h261_tree, hf_h261_vmvd, tvb, offset, 1, 0x1F ); offset++; /* The rest of the packet is the H.261 stream */ @@ -173,7 +169,7 @@ proto_register_h261(void) FT_UINT8, BASE_DEC, NULL, - 0x0, + 0xF0, NULL, HFILL } }, @@ -185,7 +181,7 @@ proto_register_h261(void) FT_UINT8, BASE_DEC, NULL, - 0x0, + 0x0E80, NULL, HFILL } }, @@ -197,7 +193,7 @@ proto_register_h261(void) FT_UINT8, BASE_DEC, NULL, - 0x0, + 0x7C, NULL, HFILL } }, @@ -209,7 +205,7 @@ proto_register_h261(void) FT_UINT8, BASE_DEC, NULL, - 0x0, + 0x03E0, NULL, HFILL } }, |