diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-10-21 02:10:19 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-10-21 02:10:19 +0000 |
commit | 794757ae8fbee85db2b24bc46b7e9cc492de01df (patch) | |
tree | a955184a13d8444bdec0de9200f261c46cfa2734 /epan/dissectors/packet-rfc2190.c | |
parent | 449d732485da5a19b8a0d3ddef49ed30498712ff (diff) |
For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.
svn path=/trunk/; revision=39503
Diffstat (limited to 'epan/dissectors/packet-rfc2190.c')
-rw-r--r-- | epan/dissectors/packet-rfc2190.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/epan/dissectors/packet-rfc2190.c b/epan/dissectors/packet-rfc2190.c index ed65c7c9d9..df4b60691a 100644 --- a/epan/dissectors/packet-rfc2190.c +++ b/epan/dissectors/packet-rfc2190.c @@ -55,7 +55,7 @@ static int hf_rfc2190_pbframes = -1; static int hf_rfc2190_sbit = -1; static int hf_rfc2190_ebit = -1; static int hf_rfc2190_srcformat = -1; -static int hf_rfc2190_picture_coding_type = -1; +static int hf_rfc2190_picture_coding_type = -1; static int hf_rfc2190_unrestricted_motion_vector = -1; static int hf_rfc2190_syntax_based_arithmetic = -1; static int hf_rfc2190_advanced_prediction = -1; @@ -101,9 +101,9 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) } if ( tree ) { - ti = proto_tree_add_item( tree, proto_rfc2190, tvb, offset, -1, FALSE ); + ti = proto_tree_add_item( tree, proto_rfc2190, tvb, offset, -1, ENC_NA ); rfc2190_tree = proto_item_add_subtree( ti, ett_rfc2190 ); - + /* FBIT 1st octet, 1 bit */ proto_tree_add_boolean( rfc2190_tree, hf_rfc2190_ftype, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 0x80 ); /* PBIT 1st octet, 1 bit */ @@ -127,7 +127,7 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) proto_tree_add_boolean( rfc2190_tree, hf_rfc2190_syntax_based_arithmetic, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 0x04 ); /* A flag, 1 bit */ proto_tree_add_boolean( rfc2190_tree, hf_rfc2190_advanced_prediction, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 0x02 ); - + /* Reserved 2nd octect, 1 bit + 3rd octect 3 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_r, tvb, offset, 2, ( ( tvb_get_guint8( tvb, offset ) & 0x1 ) << 3 ) + ( ( tvb_get_guint8( tvb, offset + 1 ) & 0xe0 ) >> 5 ) ); @@ -137,12 +137,12 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) proto_tree_add_uint( rfc2190_tree, hf_rfc2190_dbq, tvb, offset, 1, ( tvb_get_guint8( tvb, offset ) & 0x18 ) >> 3 ); /* TRB 3 octect, 3 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_trb, tvb, offset, 1, ( tvb_get_guint8( tvb, offset ) & 0x07 ) ); - + offset++; - + /* TR 4 octect, 8 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_tr, tvb, offset, 1, tvb_get_guint8( tvb, offset ) ); - + offset++; } else { /* MODE B or MODE C */ @@ -155,7 +155,7 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) proto_tree_add_uint( rfc2190_tree, hf_rfc2190_gobn, tvb, offset, 1, ( tvb_get_guint8( tvb, offset ) & 0xf8 ) >> 3); /* MBA 3 octect, 3 bits + 4 octect 6 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_mba, tvb, offset, 2, ( ( tvb_get_guint8( tvb, offset ) & 0x7 ) << 6 ) + ( ( tvb_get_guint8( tvb, offset + 1 ) & 0xfc ) >> 2 ) ); - + offset++; /* Reserved 4th octect, 2 bits */ @@ -171,43 +171,43 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) proto_tree_add_boolean( rfc2190_tree, hf_rfc2190_syntax_based_arithmetic, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 0x20 ); /* A flag, 1 bit */ proto_tree_add_boolean( rfc2190_tree, hf_rfc2190_advanced_prediction, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 0x10 ); - + /* HMV1 5th octect, 4 bits + 6th octect 3 bits*/ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_hmv1, tvb, offset, 2,( ( tvb_get_guint8( tvb, offset ) & 0xf ) << 3 ) + ( ( tvb_get_guint8( tvb, offset+1 ) & 0xe0 ) >> 5) ); - + offset++; - + /* VMV1 6th octect, 5 bits + 7th octect 2 bits*/ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_vmv1, tvb, offset, 2,( ( tvb_get_guint8( tvb, offset ) & 0x1f ) << 2 ) + ( ( tvb_get_guint8( tvb, offset+1 ) & 0xc0 ) >> 6) ); - + offset++; /* HMV2 7th octect, 6 bits + 8th octect 1 bit*/ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_hmv2, tvb, offset, 2,( ( tvb_get_guint8( tvb, offset ) & 0x3f ) << 1 ) + ( ( tvb_get_guint8( tvb, offset+1 ) & 0xf0 ) >> 7) ); - + offset++; /* VMV2 8th octect, 7 bits*/ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_vmv2, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 0x7f ); - + offset++; if(rfc2190_version == 0x03) { /* MODE C */ /* Reserved 9th to 11th octect, 8 + 8 + 3 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_rr, tvb, offset, 3, ( tvb_get_guint8( tvb, offset ) << 11 ) + ( tvb_get_guint8( tvb, offset + 1 ) << 3 ) + ( ( tvb_get_guint8( tvb, offset + 2 ) & 0xe0 ) >> 5 ) ); - + offset+=2; /* DBQ 11th octect, 2 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_dbq, tvb, offset, 1, ( tvb_get_guint8( tvb, offset ) & 0x18 ) >>3 ); /* TRB 11th octect, 3 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_trb, tvb, offset, 1, tvb_get_guint8( tvb, offset ) & 0x07 ); - + offset++; - + /* TR 12th octect, 8 bits */ proto_tree_add_uint( rfc2190_tree, hf_rfc2190_tr, tvb, offset, 1, tvb_get_guint8( tvb, offset ) ); - + offset++; } /* end mode c */ } /* end not mode a */ @@ -224,8 +224,8 @@ dissect_rfc2190( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) break; } } - - + + /* The rest of the packet is the H.263 stream */ next_tvb = tvb_new_subset( tvb, offset, tvb_length(tvb) - offset, tvb_reported_length(tvb) - offset); call_dissector(h263_handle,next_tvb,pinfo,tree); |