summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2015-01-30 13:49:59 -0500
committerBill Meier <wmeier@newsguy.com>2015-01-30 19:04:32 +0000
commiteda485ea53c7ac77470f47e886b6513f28f0c20b (patch)
tree6b5adad845db04d441bb5a177f0ce8fe6cb92346
parent7b929e2ff78c5196e5ab7c4413b0eae1b542e445 (diff)
downloadwireshark-eda485ea53c7ac77470f47e886b6513f28f0c20b.tar.gz
Cleanup:
Including: tvb_length...() ==> tvb_reported_length...() Remove some dead initializers; Localize some variables; Whitespace. Change-Id: Ide9490f248d558bb7e3af96a1fc17d8f911de4ef Reviewed-on: https://code.wireshark.org/review/6862 Reviewed-by: Bill Meier <wmeier@newsguy.com>
-rw-r--r--epan/dissectors/packet-applemidi.c149
-rw-r--r--epan/dissectors/packet-gsm_abis_oml.c87
-rw-r--r--epan/dissectors/packet-netrom.c16
-rw-r--r--epan/dissectors/packet-pana.c8
-rw-r--r--epan/dissectors/packet-rsl.c474
-rw-r--r--epan/dissectors/packet-rtmpt.c36
6 files changed, 381 insertions, 389 deletions
diff --git a/epan/dissectors/packet-applemidi.c b/epan/dissectors/packet-applemidi.c
index ea7062e9aa..8a9c424dc2 100644
--- a/epan/dissectors/packet-applemidi.c
+++ b/epan/dissectors/packet-applemidi.c
@@ -116,6 +116,7 @@ static const char applemidi_unknown_command[] = "unknown command: 0x%04x";
static void
dissect_applemidi_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 command ) {
+ proto_item *ti;
guint16 seq_num;
guint8 count;
guint8 *name;
@@ -130,103 +131,100 @@ dissect_applemidi_common( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
col_add_fstr( pinfo->cinfo, COL_INFO, "%s", val_to_str( command, applemidi_commands, applemidi_unknown_command ) );
- /* if ( tree ) */ {
- proto_item *ti;
- ti = proto_tree_add_item( tree, proto_applemidi, tvb, 0, -1, ENC_NA );
- applemidi_tree = proto_item_add_subtree( ti, ett_applemidi );
+ ti = proto_tree_add_item( tree, proto_applemidi, tvb, 0, -1, ENC_NA );
+ applemidi_tree = proto_item_add_subtree( ti, ett_applemidi );
- proto_tree_add_item( applemidi_tree, hf_applemidi_signature, tvb, offset, 2, ENC_BIG_ENDIAN );
- offset += 2;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_signature, tvb, offset, 2, ENC_BIG_ENDIAN );
+ offset += 2;
- proto_tree_add_item( applemidi_tree, hf_applemidi_command, tvb, offset, 2, ENC_BIG_ENDIAN );
- offset += 2;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_command, tvb, offset, 2, ENC_BIG_ENDIAN );
+ offset += 2;
- /* the format of packets for "IN", "NO", "OK" and "BY" is identical and contains
- * the protocol version, a random number generated by the initiator of the session,
- * the SSRC that is used by the respective sides RTP-entity and optionally the
- * name of the participant */
- if ( ( APPLEMIDI_COMMAND_INVITATION == command ) ||
- ( APPLEMIDI_COMMAND_INVITATION_REJECTED == command ) ||
- ( APLLEMIDI_COMMAND_INVITATION_ACCEPTED == command ) ||
- ( APPLEMIDI_COMMAND_ENDSESSION == command ) ) {
+ /* the format of packets for "IN", "NO", "OK" and "BY" is identical and contains
+ * the protocol version, a random number generated by the initiator of the session,
+ * the SSRC that is used by the respective sides RTP-entity and optionally the
+ * name of the participant */
+ if ( ( APPLEMIDI_COMMAND_INVITATION == command ) ||
+ ( APPLEMIDI_COMMAND_INVITATION_REJECTED == command ) ||
+ ( APLLEMIDI_COMMAND_INVITATION_ACCEPTED == command ) ||
+ ( APPLEMIDI_COMMAND_ENDSESSION == command ) ) {
- proto_tree_add_item( applemidi_tree, hf_applemidi_protocol_version, tvb, offset, 4, ENC_BIG_ENDIAN );
- offset += 4;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_protocol_version, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
- proto_tree_add_item( applemidi_tree, hf_applemidi_token, tvb, offset, 4, ENC_BIG_ENDIAN );
- offset += 4;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_token, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
- proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN );
- offset += 4;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
- len = tvb_reported_length(tvb) - offset;
+ len = tvb_reported_length(tvb) - offset;
- /* Name is optional */
- if ( len > 0 ) {
- name = tvb_get_string_enc( wmem_packet_scope(), tvb, offset, len, ENC_UTF_8|ENC_NA );
- string_size = (gint)( strlen( name ) + 1 );
- proto_tree_add_item( applemidi_tree, hf_applemidi_name, tvb, offset, string_size, ENC_UTF_8|ENC_NA );
- col_append_fstr( pinfo->cinfo, COL_INFO, ": peer = \"%s\"", name );
- offset += string_size;
- }
+ /* Name is optional */
+ if ( len > 0 ) {
+ name = tvb_get_string_enc( wmem_packet_scope(), tvb, offset, len, ENC_UTF_8|ENC_NA );
+ string_size = (gint)( strlen( name ) + 1 );
+ proto_tree_add_item( applemidi_tree, hf_applemidi_name, tvb, offset, string_size, ENC_UTF_8|ENC_NA );
+ col_append_fstr( pinfo->cinfo, COL_INFO, ": peer = \"%s\"", name );
+ offset += string_size;
+ }
/* the synchronization packet contains three 64bit timestamps, and a value to define how
* many of the timestamps transmitted are valid */
- } else if ( APPLEMIDI_COMMAND_SYNCHRONIZATION == command ) {
- proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN );
- offset += 4;
+ } else if ( APPLEMIDI_COMMAND_SYNCHRONIZATION == command ) {
+ proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
- count = tvb_get_guint8( tvb, offset );
- proto_tree_add_item( applemidi_tree, hf_applemidi_count, tvb, offset, 1, ENC_BIG_ENDIAN );
- col_append_fstr( pinfo->cinfo, COL_INFO, ": count = %u", count );
- offset += 1;
+ count = tvb_get_guint8( tvb, offset );
+ proto_tree_add_item( applemidi_tree, hf_applemidi_count, tvb, offset, 1, ENC_BIG_ENDIAN );
+ col_append_fstr( pinfo->cinfo, COL_INFO, ": count = %u", count );
+ offset += 1;
- proto_tree_add_item( applemidi_tree, hf_applemidi_padding, tvb, offset, 3, ENC_BIG_ENDIAN );
- offset += 3;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_padding, tvb, offset, 3, ENC_BIG_ENDIAN );
+ offset += 3;
- proto_tree_add_item( applemidi_tree, hf_applemidi_timestamp1, tvb, offset, 8, ENC_BIG_ENDIAN );
- offset += 8;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_timestamp1, tvb, offset, 8, ENC_BIG_ENDIAN );
+ offset += 8;
- proto_tree_add_item( applemidi_tree, hf_applemidi_timestamp2, tvb, offset, 8, ENC_BIG_ENDIAN );
- offset += 8;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_timestamp2, tvb, offset, 8, ENC_BIG_ENDIAN );
+ offset += 8;
- proto_tree_add_item( applemidi_tree, hf_applemidi_timestamp3, tvb, offset, 8, ENC_BIG_ENDIAN );
- offset += 8;
+ proto_tree_add_item( applemidi_tree, hf_applemidi_timestamp3, tvb, offset, 8, ENC_BIG_ENDIAN );
+ offset += 8;
/* With the receiver feedback packet, the recipient can tell the sender up to what sequence
* number in the RTP-stream the packets have been received; this can be used to shorten the
* recovery-journal-section in the RTP-session */
- } else if ( APPLEMIDI_COMMAND_RECEIVER_FEEDBACK == command ) {
- proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN );
- offset += 4;
-
- ti = proto_tree_add_item( applemidi_tree, hf_applemidi_sequence_num, tvb, offset, 4, ENC_BIG_ENDIAN );
- /* Apple includes a 32bit sequence-number, but the RTP-packet only specifies 16bit.
- * this subtree and subitem are added to be able to associate the sequence-number
- * here easier with the one specified in the corresponding RTP-packet */
- applemidi_tree_seq_num = proto_item_add_subtree( ti, ett_applemidi_seq_num );
- seq_num = tvb_get_ntohs( tvb, offset );
- proto_tree_add_uint( applemidi_tree_seq_num, hf_applemidi_rtp_sequence_num, tvb, offset, 2, seq_num );
- offset += 4;
-
- col_append_fstr( pinfo->cinfo, COL_INFO, ": seq = %u", seq_num );
+ } else if ( APPLEMIDI_COMMAND_RECEIVER_FEEDBACK == command ) {
+ proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
+
+ ti = proto_tree_add_item( applemidi_tree, hf_applemidi_sequence_num, tvb, offset, 4, ENC_BIG_ENDIAN );
+ /* Apple includes a 32bit sequence-number, but the RTP-packet only specifies 16bit.
+ * this subtree and subitem are added to be able to associate the sequence-number
+ * here easier with the one specified in the corresponding RTP-packet */
+ applemidi_tree_seq_num = proto_item_add_subtree( ti, ett_applemidi_seq_num );
+ seq_num = tvb_get_ntohs( tvb, offset );
+ proto_tree_add_uint( applemidi_tree_seq_num, hf_applemidi_rtp_sequence_num, tvb, offset, 2, seq_num );
+ offset += 4;
+
+ col_append_fstr( pinfo->cinfo, COL_INFO, ": seq = %u", seq_num );
/* With the bitrate receive limit packet, the recipient can tell the sender to limit
the transmission to a certain bitrate. This is important if the peer is a gateway
to a hardware-device that only supports a certain speed. Like the MIDI 1.0 DIN-cable
MIDI-implementation which is limited to 31250. */
- } else if ( APPLEMIDI_COMMAND_BITRATE_RECEIVE_LIMIT == command ) {
- proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN );
- offset += 4;
+ } else if ( APPLEMIDI_COMMAND_BITRATE_RECEIVE_LIMIT == command ) {
+ proto_tree_add_item( applemidi_tree, hf_applemidi_ssrc, tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
- proto_tree_add_item( applemidi_tree, hf_applemidi_rtp_bitrate_limit,
- tvb, offset, 4, ENC_BIG_ENDIAN );
- offset += 4;
- }
- /* If there is any remaining data (possibly because an unknown command was encountered),
- * we just dump it here */
- len = tvb_length_remaining( tvb, offset );
- if ( len > 0 ) {
- proto_tree_add_item( applemidi_tree, hf_applemidi_unknown_data, tvb, offset, len, ENC_NA );
- }
+ proto_tree_add_item( applemidi_tree, hf_applemidi_rtp_bitrate_limit,
+ tvb, offset, 4, ENC_BIG_ENDIAN );
+ offset += 4;
+ }
+ /* If there is any remaining data (possibly because an unknown command was encountered),
+ * we just dump it here */
+ len = tvb_reported_length_remaining( tvb, offset );
+ if ( len > 0 ) {
+ proto_tree_add_item( applemidi_tree, hf_applemidi_unknown_data, tvb, offset, len, ENC_NA );
}
}
@@ -282,10 +280,9 @@ dissect_applemidi_heur( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
guint16 command;
conversation_t *p_conv;
- /*struct _rtp_conversation_info *p_conv_data = NULL;*/
- rtp_dyn_payload_t *rtp_dyn_payload = NULL;
+ rtp_dyn_payload_t *rtp_dyn_payload;
- if ( tvb_length( tvb ) < 4)
+ if ( tvb_captured_length( tvb ) < 4)
return FALSE; /* not enough bytes to check */
if ( !test_applemidi( tvb, &command, FALSE ) ) {
diff --git a/epan/dissectors/packet-gsm_abis_oml.c b/epan/dissectors/packet-gsm_abis_oml.c
index 2e7e14a8ed..fa7e6d433f 100644
--- a/epan/dissectors/packet-gsm_abis_oml.c
+++ b/epan/dissectors/packet-gsm_abis_oml.c
@@ -1817,55 +1817,54 @@ dissect_abis_oml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
{
proto_item *ti;
proto_tree *oml_tree;
-
int offset = 0;
+ guint8 msg_disc = tvb_get_guint8(tvb, offset);
+ guint8 len = tvb_get_guint8(tvb, offset+3);
+
+
col_set_str(pinfo->cinfo, COL_PROTOCOL, "OML");
top_tree = tree;
- /* if (tree) */ {
- guint8 msg_disc = tvb_get_guint8(tvb, offset);
- guint8 len = tvb_get_guint8(tvb, offset+3);
-
- ti = proto_tree_add_item(tree, proto_abis_oml, tvb, 0, -1, ENC_NA);
- oml_tree = proto_item_add_subtree(ti, ett_oml);
-
- proto_tree_add_item(oml_tree, hf_oml_msg_disc, tvb, offset++,
- 1, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(oml_tree, hf_oml_placement, tvb, offset++,
- 1, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(oml_tree, hf_oml_sequence, tvb, offset++,
- 1, ENC_LITTLE_ENDIAN);
- proto_tree_add_item(oml_tree, hf_oml_length, tvb, offset++,
- 1, ENC_LITTLE_ENDIAN);
-
- if (global_oml_dialect == OML_DIALECT_ERICSSON) {
- /* Ericsson OM2000 only sharese the common header above
- * and has completely custom/proprietary message format
- * after that header. Thus, it makes more sense of
- * putting all of that into an external dissector and
- * call out to that dissector */
- tvbuff_t *subtvb;
- subtvb = tvb_new_subset_length(tvb, offset, len);
-
- if (sub_om2000)
- call_dissector(sub_om2000, subtvb, pinfo, tree);
- } else {
-
- switch (msg_disc) {
- case ABIS_OM_MDISC_FOM:
- offset = dissect_oml_fom(tvb, pinfo, oml_tree,
- offset, ti);
- break;
- case ABIS_OM_MDISC_MANUF:
- offset = dissect_oml_manuf(tvb, pinfo, oml_tree,
- offset, ti);
- break;
- case ABIS_OM_MDISC_MMI:
- case ABIS_OM_MDISC_TRAU:
- default:
- break;
- }
+
+ ti = proto_tree_add_item(tree, proto_abis_oml, tvb, 0, -1, ENC_NA);
+ oml_tree = proto_item_add_subtree(ti, ett_oml);
+
+ proto_tree_add_item(oml_tree, hf_oml_msg_disc, tvb, offset++,
+ 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(oml_tree, hf_oml_placement, tvb, offset++,
+ 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(oml_tree, hf_oml_sequence, tvb, offset++,
+ 1, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(oml_tree, hf_oml_length, tvb, offset++,
+ 1, ENC_LITTLE_ENDIAN);
+
+ if (global_oml_dialect == OML_DIALECT_ERICSSON) {
+ /* Ericsson OM2000 only sharese the common header above
+ * and has completely custom/proprietary message format
+ * after that header. Thus, it makes more sense of
+ * putting all of that into an external dissector and
+ * call out to that dissector */
+ tvbuff_t *subtvb;
+ subtvb = tvb_new_subset_length(tvb, offset, len);
+
+ if (sub_om2000)
+ call_dissector(sub_om2000, subtvb, pinfo, tree);
+ } else {
+
+ switch (msg_disc) {
+ case ABIS_OM_MDISC_FOM:
+ offset = dissect_oml_fom(tvb, pinfo, oml_tree,
+ offset, ti);
+ break;
+ case ABIS_OM_MDISC_MANUF:
+ offset = dissect_oml_manuf(tvb, pinfo, oml_tree,
+ offset, ti);
+ break;
+ case ABIS_OM_MDISC_MMI:
+ case ABIS_OM_MDISC_TRAU:
+ default:
+ break;
}
}
diff --git a/epan/dissectors/packet-netrom.c b/epan/dissectors/packet-netrom.c
index 69738afb51..e4a1c96325 100644
--- a/epan/dissectors/packet-netrom.c
+++ b/epan/dissectors/packet-netrom.c
@@ -71,9 +71,9 @@ void proto_reg_handoff_netrom(void);
#define NETROM_PROTO_IP 0x0C
-/* Dissector handles - all the possibles are listed */
+/* Dissector handles */
static dissector_handle_t ip_handle;
-static dissector_handle_t default_handle;
+static dissector_handle_t data_handle;
/* Initialize the protocol and registered fields */
static int proto_netrom = -1;
@@ -198,7 +198,7 @@ dissect_netrom_proto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 op_code;
guint8 cct_index;
guint8 cct_id;
- tvbuff_t *next_tvb = NULL;
+ tvbuff_t *next_tvb;
col_set_str( pinfo->cinfo, COL_PROTOCOL, "NET/ROM" );
col_clear( pinfo->cinfo, COL_INFO );
@@ -439,12 +439,12 @@ dissect_netrom_proto(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ( cct_index == NETROM_PROTO_IP && cct_id == NETROM_PROTO_IP )
call_dissector( ip_handle , next_tvb, pinfo, tree );
else
- call_dissector( default_handle , next_tvb, pinfo, tree );
+ call_dissector( data_handle , next_tvb, pinfo, tree );
break;
case NETROM_INFO :
default :
- call_dissector( default_handle , next_tvb, pinfo, tree );
+ call_dissector( data_handle , next_tvb, pinfo, tree );
break;
}
}
@@ -473,7 +473,7 @@ dissect_netrom_routing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
next_tvb = tvb_new_subset_remaining(tvb, 7);
- call_dissector( default_handle , next_tvb, pinfo, tree );
+ call_dissector( data_handle , next_tvb, pinfo, tree );
}
/* Code to actually dissect the packets */
@@ -626,8 +626,8 @@ proto_reg_handoff_netrom(void)
{
dissector_add_uint( "ax25.pid", AX25_P_NETROM, create_dissector_handle( dissect_netrom, proto_netrom ) );
- ip_handle = find_dissector( "ip" );
- default_handle = find_dissector( "data" );
+ ip_handle = find_dissector( "ip" );
+ data_handle = find_dissector( "data" );
}
diff --git a/epan/dissectors/packet-pana.c b/epan/dissectors/packet-pana.c
index a326e68072..50a00aab6b 100644
--- a/epan/dissectors/packet-pana.c
+++ b/epan/dissectors/packet-pana.c
@@ -461,9 +461,8 @@ dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree)
tvb, offset, avp_data_length,
ett_pana_avp, NULL, "AVP Value (EAP packet)");
eap_tvb = tvb_new_subset_length(tvb, offset, avp_data_length);
- if (eap_handle != NULL) {
- call_dissector(eap_handle, eap_tvb, pinfo, avp_eap_tree);
- }
+ DISSECTOR_ASSERT_HINT(eap_handle, "EAP Dissector not available");
+ call_dissector(eap_handle, eap_tvb, pinfo, avp_eap_tree);
break;
}
case PANA_ENCAPSULATED: {
@@ -652,7 +651,7 @@ dissect_pana(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
guint32 avp_length;
/* Get actual buffer length */
- buffer_length = tvb_length(tvb);
+ buffer_length = tvb_captured_length(tvb);
/* Check minimum buffer length */
if(buffer_length < 12) {
@@ -925,7 +924,6 @@ proto_reg_handoff_pana(void)
dissector_add_for_decode_as("udp.port", pana_handle);
eap_handle = find_dissector("eap");
-/** if(!eap_handle) fprintf(stderr,"PANA warning: EAP dissector not found\n"); **/
}
diff --git a/epan/dissectors/packet-rsl.c b/epan/dissectors/packet-rsl.c
index 6cb6ab51a3..8ea6d7e1b9 100644
--- a/epan/dissectors/packet-rsl.c
+++ b/epan/dissectors/packet-rsl.c
@@ -674,7 +674,7 @@ dissect_rsl_ie_ch_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CH_NO)
return offset;
}
@@ -718,18 +718,18 @@ dissect_rsl_ie_link_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_LINK_ID)
return offset;
}
- ie_tree = proto_tree_add_subtree(tree, tvb,offset,2, ett_ie_link_id, NULL, "Link Identifier IE ");
+ ie_tree = proto_tree_add_subtree(tree, tvb, offset, 2, ett_ie_link_id, NULL, "Link Identifier IE ");
/* Element identifier */
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- octet = tvb_get_guint8(tvb,offset);
+ octet = tvb_get_guint8(tvb, offset);
if ((octet & 0x20) == 0x20) {
/* Not applicable */
@@ -790,7 +790,7 @@ dissect_rsl_ie_act_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint octet;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_ACT_TYPE)
return offset;
}
@@ -807,7 +807,7 @@ dissect_rsl_ie_act_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
/* The A-bits indicate the type of activation, which defines the access procedure
* and the operation of the data link layer
*/
- octet = (tvb_get_guint8(tvb,offset) & 0x06) >> 1;
+ octet = (tvb_get_guint8(tvb, offset) & 0x06) >> 1;
proto_tree_add_item(ie_tree, hf_rsl_a3a2, tvb, offset, 1, ENC_BIG_ENDIAN);
switch (octet) {
case 0:
@@ -871,7 +871,7 @@ dissect_rsl_ie_bs_power(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_BS_POW)
return offset;
}
@@ -910,7 +910,7 @@ dissect_rsl_ie_ch_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CH_ID)
return offset;
}
@@ -933,14 +933,14 @@ dissect_rsl_ie_ch_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in
* length should be included.
* XXX Hmm a type 3 IE (TV).
*/
- proto_tree_add_text(ie_tree, tvb,offset, 1, "Channel Description Tag");
+ proto_tree_add_text(ie_tree, tvb, offset, 1, "Channel Description Tag");
de_rr_ch_dsc(tvb, ie_tree, pinfo, offset+1, length, NULL, 0);
offset += 4;
/*
* The 3GPP TS 24.008 "Mobile Allocation" shall for compatibility reasons be
* included but empty, i.e. the length shall be zero.
*/
- proto_tree_add_text(ie_tree, tvb,offset,2,"Mobile Allocation Tag+Length(0)");
+ proto_tree_add_text(ie_tree, tvb, offset, 2, "Mobile Allocation Tag+Length(0)");
return ie_offset + length;
}
/*
@@ -1027,7 +1027,7 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 octet;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CH_MODE)
return offset;
}
@@ -1053,7 +1053,7 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
offset++;
/* The "Speech or data indicator" field (octet 4) */
proto_tree_add_item(ie_tree, hf_rsl_speech_or_data, tvb, offset, 1, ENC_BIG_ENDIAN);
- octet = tvb_get_guint8(tvb,offset);
+ octet = tvb_get_guint8(tvb, offset);
offset++;
/* Channel rate and type */
proto_tree_add_item(ie_tree, hf_rsl_ch_rate_and_type, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1068,7 +1068,7 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
/* Data */
proto_tree_add_item(ie_tree, hf_rsl_extension_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(ie_tree, hf_rsl_t_nt_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
- octet = tvb_get_guint8(tvb,offset);
+ octet = tvb_get_guint8(tvb, offset);
if ((octet & 0x40) == 0x40) {
/* Non-transparent service */
/* For the non-transparent service, bits 6 to 1 indicate the radio interface data rate:*/
@@ -1083,11 +1083,11 @@ dissect_rsl_ie_ch_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
* If octet 4 indicates signalling then octet 6 is coded as follows:
* 0000 0000 No resources required
*/
- proto_tree_add_text(ie_tree, tvb,offset,1,"0 No resources required(All other values are reserved)");
+ proto_tree_add_text(ie_tree, tvb, offset, 1, "0 No resources required(All other values are reserved)");
break;
default:
/* Should not happen */
- proto_tree_add_text(ie_tree, tvb,offset,1,"Speech or data indicator != 1,2 or 3");
+ proto_tree_add_text(ie_tree, tvb, offset, 1, "Speech or data indicator != 1,2 or 3");
break;
}
@@ -1123,7 +1123,7 @@ dissect_rsl_ie_enc_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_ENC_INF)
return offset;
}
@@ -1158,7 +1158,7 @@ dissect_rsl_ie_frame_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_FRAME_NO)
return offset;
}
@@ -1188,7 +1188,7 @@ dissect_rsl_ie_ho_ref(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, i
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_HO_REF)
return offset;
}
@@ -1217,7 +1217,7 @@ dissect_rsl_ie_l1_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, i
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_L1_INF)
return offset;
}
@@ -1266,7 +1266,7 @@ dissect_rsl_ie_L3_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_L3_INF)
return offset;
}
@@ -1285,14 +1285,14 @@ dissect_rsl_ie_L3_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
if (type == L3_INF_CCCH)
{
/* L3 PDUs carried on CCCH have L2 PSEUDO LENGTH octet or are RR Short PD format */
- proto_tree_add_text(ie_tree, tvb,offset,length,"Link Layer Service Data Unit (L3 Message)(CCCH)");
+ proto_tree_add_text(ie_tree, tvb, offset, length, "Link Layer Service Data Unit (L3 Message)(CCCH)");
next_tvb = tvb_new_subset_length(tvb, offset, length);
call_dissector(gsm_a_ccch_handle, next_tvb, pinfo, top_tree);
}
else if (type == L3_INF_SACCH)
{
/* L3 PDUs carried on SACCH are normal format or are RR Short PD format */
- proto_tree_add_text(ie_tree, tvb,offset,length,"Link Layer Service Data Unit (L3 Message)(SACCH)");
+ proto_tree_add_text(ie_tree, tvb, offset, length, "Link Layer Service Data Unit (L3 Message)(SACCH)");
next_tvb = tvb_new_subset_length(tvb, offset, length);
call_dissector(gsm_a_sacch_handle, next_tvb, pinfo, top_tree);
}
@@ -1301,7 +1301,7 @@ dissect_rsl_ie_L3_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
/* Link Layer Service Data Unit (i.e. a layer 3 message
* as defined in 3GPP TS 24.008 or 3GPP TS 44.018)
*/
- proto_tree_add_text(ie_tree, tvb,offset,length,"Link Layer Service Data Unit (L3 Message)");
+ proto_tree_add_text(ie_tree, tvb, offset, length, "Link Layer Service Data Unit (L3 Message)");
next_tvb = tvb_new_subset_length(tvb, offset, length);
call_dissector(gsm_a_dtap_handle, next_tvb, pinfo, top_tree);
}
@@ -1323,7 +1323,7 @@ dissect_rsl_ie_ms_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_MS_ID)
return offset;
}
@@ -1333,7 +1333,7 @@ dissect_rsl_ie_ms_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -1359,7 +1359,7 @@ dissect_rsl_ie_ms_pow(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, i
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_MS_POW)
return offset;
}
@@ -1390,7 +1390,7 @@ dissect_rsl_ie_paging_grp(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_PAGING_GRP)
return offset;
}
@@ -1420,7 +1420,7 @@ dissect_rsl_ie_paging_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_PAGING_LOAD)
return offset;
}
@@ -1451,7 +1451,7 @@ dissect_rsl_ie_phy_ctx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_PHY_CTX)
return offset;
}
@@ -1462,7 +1462,7 @@ dissect_rsl_ie_phy_ctx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -1488,7 +1488,7 @@ dissect_rsl_ie_access_delay(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_ACCESS_DELAY)
return offset;
}
@@ -1517,7 +1517,7 @@ dissect_rsl_ie_rach_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
int ie_offset;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_RACH_LOAD)
return offset;
}
@@ -1528,7 +1528,7 @@ dissect_rsl_ie_rach_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -1554,7 +1554,7 @@ dissect_rsl_ie_rach_load(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
/* Supplementary Information */
if ( length > 0) {
- proto_tree_add_text(ie_tree, tvb, offset,length ,"Supplementary Information");
+ proto_tree_add_text(ie_tree, tvb, offset, length , "Supplementary Information");
}
offset = ie_offset + length;
@@ -1571,7 +1571,7 @@ dissect_rsl_ie_req_ref(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_REQ_REF)
return offset;
}
@@ -1607,7 +1607,7 @@ dissect_rsl_ie_rel_mode(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_REL_MODE)
return offset;
}
@@ -1661,7 +1661,7 @@ dissect_rsl_ie_resource_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
int ie_offset;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_RESOURCE_INF)
return offset;
}
@@ -1673,7 +1673,7 @@ dissect_rsl_ie_resource_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1714,7 +1714,7 @@ dissect_rsl_ie_rlm_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_RLM_CAUSE)
return offset;
}
@@ -1725,7 +1725,7 @@ dissect_rsl_ie_rlm_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1735,7 +1735,7 @@ dissect_rsl_ie_rlm_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
* If the extension bit is set to 1, the Cause Value is a two octet field.
*/
/* XXX: Code doesn't reflect the comment above ?? */
- /* octet = tvb_get_guint8(tvb,offset); */
+ /* octet = tvb_get_guint8(tvb, offset); */
proto_tree_add_item(tree, hf_rsl_extension_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(ie_tree, hf_rsl_cause, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -1753,7 +1753,7 @@ dissect_rsl_ie_starting_time(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_STARTING_TIME)
return offset;
}
@@ -1783,7 +1783,7 @@ dissect_rsl_ie_timing_adv(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_TIMING_ADV)
return offset;
}
@@ -1818,7 +1818,7 @@ dissect_rsl_ie_uplik_meas(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_UPLINK_MEAS)
return offset;
}
@@ -1830,7 +1830,7 @@ dissect_rsl_ie_uplik_meas(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -1891,7 +1891,7 @@ dissect_rsl_ie_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CAUSE)
return offset;
}
@@ -1902,14 +1902,14 @@ dissect_rsl_ie_cause(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, in
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
ie_offset = offset;
/* Cause Value */
- octet = tvb_get_guint8(tvb,offset);
+ octet = tvb_get_guint8(tvb, offset);
proto_tree_add_item(tree, hf_rsl_extension_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_rsl_class, tvb, offset, 1, ENC_BIG_ENDIAN);
if ((octet & 0x80) == 0x80)
@@ -1930,7 +1930,7 @@ dissect_rsl_ie_meas_res_no(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_MEAS_RES_NO)
return offset;
}
@@ -1957,7 +1957,7 @@ dissect_rsl_ie_message_id(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_MESSAGE_ID)
return offset;
}
@@ -2012,7 +2012,7 @@ dissect_rsl_ie_sys_info_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_SYS_INFO_TYPE) {
*sys_info_type = 0xff;
return offset;
@@ -2046,7 +2046,7 @@ dissect_rsl_ie_full_imm_ass_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_FULL_IMM_ASS_INF)
return offset;
}
@@ -2057,7 +2057,7 @@ dissect_rsl_ie_full_imm_ass_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2067,7 +2067,7 @@ dissect_rsl_ie_full_imm_ass_inf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
* IMMEDIATE ASSIGNMENT EXTENDED or IMMEDIATE ASSIGNMENT REJECT)
* as defined in 3GPP TS 44.018.
*/
- proto_tree_add_text(ie_tree, tvb,offset,length,"Full Immediate Assign Info field");
+ proto_tree_add_text(ie_tree, tvb, offset, length, "Full Immediate Assign Info field");
next_tvb = tvb_new_subset_length(tvb, offset, length);
call_dissector(gsm_a_ccch_handle, next_tvb, pinfo, top_tree);
@@ -2093,7 +2093,7 @@ dissect_rsl_ie_smscb_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_SMSCB_INF)
return offset;
}
@@ -2104,7 +2104,7 @@ dissect_rsl_ie_smscb_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2131,7 +2131,7 @@ dissect_rsl_ie_ms_timing_offset(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_FULL_MS_TIMING_OFFSET)
return offset;
}
@@ -2167,7 +2167,7 @@ dissect_rsl_ie_err_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
guint length;
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_ERR_MSG)
return offset;
}
@@ -2178,7 +2178,7 @@ dissect_rsl_ie_err_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2203,7 +2203,7 @@ dissect_rsl_ie_full_bcch_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_FULL_BCCH_INF)
return offset;
}
@@ -2223,7 +2223,7 @@ dissect_rsl_ie_full_bcch_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
* Octets 3-25 contain the complete L3 message as defined in 3GPP TS 44.018.
*/
- proto_tree_add_text(ie_tree, tvb,offset,length,"Layer 3 message");
+ proto_tree_add_text(ie_tree, tvb, offset, length, "Layer 3 message");
next_tvb = tvb_new_subset_length(tvb, offset, length);
call_dissector(gsm_a_ccch_handle, next_tvb, pinfo, top_tree);
@@ -2250,7 +2250,7 @@ dissect_rsl_ie_ch_needed(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CH_NEEDED)
return offset;
}
@@ -2278,7 +2278,7 @@ dissect_rsl_ie_cb_cmd_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CB_CMD_TYPE)
return offset;
}
@@ -2310,7 +2310,7 @@ dissect_rsl_ie_smscb_mess(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
int ie_offset;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_SMSCB_MESS)
return offset;
}
@@ -2320,7 +2320,7 @@ dissect_rsl_ie_smscb_mess(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -2356,7 +2356,7 @@ dissect_rsl_ie_cbch_load_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
guint8 octet;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CBCH_LOAD_INF)
return offset;
}
@@ -2367,16 +2367,16 @@ dissect_rsl_ie_cbch_load_inf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- octet = tvb_get_guint8(tvb,offset);
+ octet = tvb_get_guint8(tvb, offset);
/* CBCH Load Type */
proto_tree_add_item(ie_tree, hf_rsl_cbch_load_type, tvb, offset, 1, ENC_BIG_ENDIAN);
/* Message Slot Count */
item = proto_tree_add_item(ie_tree, hf_rsl_msg_slt_cnt, tvb, offset, 1, ENC_BIG_ENDIAN);
if ((octet & 0x80) == 0x80) {
- proto_item_append_text(item,"The amount of SMSCB messages (1 to 15) that are needed immediately by BTS");
+ proto_item_append_text(item, "The amount of SMSCB messages (1 to 15) that are needed immediately by BTS");
}else{
- proto_item_append_text(item,"The amount of delay in message slots (1 to 15) that is needed immediately by BTS");
+ proto_item_append_text(item, "The amount of delay in message slots (1 to 15) that is needed immediately by BTS");
}
offset++;
@@ -2400,7 +2400,7 @@ dissect_rsl_ie_smscb_ch_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_SMSCB_CH_IND)
return offset;
}
@@ -2430,7 +2430,7 @@ dissect_rsl_ie_grp_call_ref(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_GRP_CALL_REF)
return offset;
}
@@ -2440,12 +2440,12 @@ dissect_rsl_ie_grp_call_ref(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- proto_tree_add_text(ie_tree, tvb,offset,length,"Descriptive group or broadcast call reference");
+ proto_tree_add_text(ie_tree, tvb, offset, length, "Descriptive group or broadcast call reference");
/* The octets 3 to 7 are coded in the same way as the octets 2 to 6
* in the Descriptive group or broadcast call reference
@@ -2469,7 +2469,7 @@ dissect_rsl_ie_ch_desc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CH_DESC)
return offset;
}
@@ -2479,12 +2479,12 @@ dissect_rsl_ie_ch_desc(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- proto_tree_add_text(ie_tree, tvb,offset,length,"Group Channel Description");
+ proto_tree_add_text(ie_tree, tvb, offset, length, "Group Channel Description");
/* Octet j (j = 3, 4, ..., n) is the unchanged octet j-2 of a radio interface Group Channel description
* information element as defined in 3GPP TS 44.018, n-2 is equal to the length of the radio interface
@@ -2507,7 +2507,7 @@ dissect_rsl_ie_nch_drx(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_NCH_DRX_INF)
return offset;
}
@@ -2543,7 +2543,7 @@ dissect_rsl_ie_cmd_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 octet;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CMD_IND)
return offset;
}
@@ -2561,7 +2561,7 @@ dissect_rsl_ie_cmd_ind(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
/* TODO this should probably be add_uint instead!!! */
- octet = tvb_get_guint8(tvb,offset);
+ octet = tvb_get_guint8(tvb, offset);
if ((octet & 0x80) == 0x80) {
/* extended */
/* Command Extension */
@@ -2597,7 +2597,7 @@ dissect_rsl_ie_emlpp_prio(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_EMLPP_PRIO)
return offset;
}
@@ -2629,7 +2629,7 @@ dissect_rsl_ie_uic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_UIC)
return offset;
}
@@ -2643,7 +2643,7 @@ dissect_rsl_ie_uic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
/* Octet 3 bits 1 to 6 contain the radio interface octet 2 bits 3 to 8 of the
* UIC information element as defined in 3GPP TS 44.018.
*/
- proto_tree_add_text(ie_tree, tvb,offset,1,"UIC");
+ proto_tree_add_text(ie_tree, tvb, offset, 1, "UIC");
offset++;
return offset;
@@ -2660,7 +2660,7 @@ dissect_rsl_ie_main_ch_ref(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_MAIN_CH_REF)
return offset;
}
@@ -2692,7 +2692,7 @@ dissect_rsl_ie_multirate_conf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_MULTIRATE_CONF)
return offset;
}
@@ -2702,7 +2702,7 @@ dissect_rsl_ie_multirate_conf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -2728,7 +2728,7 @@ dissect_rsl_ie_multirate_cntrl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_MULTIRATE_CNTRL)
return offset;
}
@@ -2762,7 +2762,7 @@ dissect_rsl_ie_sup_codec_types(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_SUP_CODEC_TYPES)
return offset;
}
@@ -2772,12 +2772,12 @@ dissect_rsl_ie_sup_codec_types(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- proto_tree_add_text(tree, tvb,offset,length,"Codec List");
+ proto_tree_add_text(tree, tvb, offset, length, "Codec List");
/* The Codec List field (octet 4) lists the codec types that are supported
* by the BSS and Transcoder, and are therefore potential candidates for TFO
@@ -2829,7 +2829,7 @@ dissect_rsl_ie_codec_conf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_CODEC_CONF)
return offset;
}
@@ -2839,7 +2839,7 @@ dissect_rsl_ie_codec_conf(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
proto_tree_add_item(ie_tree, hf_rsl_ie_id, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
/* Length */
- length = tvb_get_guint8(tvb,offset);
+ length = tvb_get_guint8(tvb, offset);
proto_item_set_len(ti, length+2);
proto_tree_add_item(ie_tree, hf_rsl_ie_length, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
@@ -2869,7 +2869,7 @@ dissect_rsl_ie_rtd(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
guint8 rtd;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_RTD)
return offset;
}
@@ -2883,9 +2883,9 @@ dissect_rsl_ie_rtd(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int
/* The RTD field is the binary representation of the value of the
* round trip delay in 20 ms increments.
*/
- rtd = (tvb_get_guint8(tvb,offset)>>1)*20;
- rtd_item = proto_tree_add_uint(tree, hf_rsl_rtd, tvb,offset,1,rtd);
- proto_item_append_text(rtd_item," ms");
+ rtd = (tvb_get_guint8(tvb, offset)>>1)*20;
+ rtd_item = proto_tree_add_uint(tree, hf_rsl_rtd, tvb, offset, 1, rtd);
+ proto_item_append_text(rtd_item, " ms");
/* The Delay IND field indicates if the delay corresponds to a BTS
* to transcoder delay or to a BTS to remote BTS delay.
@@ -2912,7 +2912,7 @@ dissect_rsl_ie_tfo_status(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tre
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_TFO_STATUS)
return offset;
}
@@ -2941,7 +2941,7 @@ dissect_rsl_ie_llp_apdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_LLP_APDU)
return offset;
}
@@ -2965,7 +2965,7 @@ dissect_rsl_ie_llp_apdu(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
* octets defined in 3GPP TS 44.071.
*/
/* TODO: Given traces with LLP data this IE could be further dissected */
- proto_tree_add_text(tree, tvb,offset,length,
+ proto_tree_add_text(tree, tvb, offset, length,
"Facility Information Element as defined in 3GPP TS 44.071");
return ie_offset + length;
}
@@ -2986,7 +2986,7 @@ dissect_rsl_ie_tfo_transp_cont(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
guint8 ie_id;
if (is_mandatory == FALSE) {
- ie_id = tvb_get_guint8(tvb,offset);
+ ie_id = tvb_get_guint8(tvb, offset);
if (ie_id != RSL_IE_TFO_TRANSP_CONT)
return offset;
}
@@ -3009,7 +3009,7 @@ dissect_rsl_ie_tfo_transp_cont(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
* 3GPP TS 44.071 excluding the Facility IEI and length of Facility IEI
* octets defined in 3GPP TS 44.071.
*/
- proto_tree_add_text(tree, tvb,offset,length,
+ proto_tree_add_text(tree, tvb, offset, length,
"Embedded message that contains the TFO configuration");
return ie_offset + length;
}
@@ -3158,7 +3158,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
guint8 msg_disc, msg_type, sys_info_type;
msg_disc = tvb_get_guint8(tvb, offset++) >> 1;
- msg_type = tvb_get_guint8(tvb,offset) & 0x7f;
+ msg_type = tvb_get_guint8(tvb, offset) & 0x7f;
proto_tree_add_item(tree, hf_rsl_msg_type, tvb, offset, 1, ENC_BIG_ENDIAN);
if (msg_disc == RSL_MSGDISC_IPACCESS) {
@@ -3217,7 +3217,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Link Identifier 9.3.2 M TV 2 */
offset = dissect_rsl_ie_link_id(tvb, pinfo, tree, offset, TRUE);
/* L3 Information 9.3.11 O (note 1) TLV 3-23 */
- if (tvb_length_remaining(tvb,offset) >1)
+ if (tvb_reported_length_remaining(tvb, offset) >1)
offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE, L3_INF_OTHER);
break;
/* 8.3.7 RELEASE REQUEST */
@@ -3250,7 +3250,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Link Identifier 9.3.2 M TV 2 */
offset = dissect_rsl_ie_link_id(tvb, pinfo, tree, offset, TRUE);
/* L3 Information 9.3.11 O (note 1) TLV 3-23 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE, L3_INF_OTHER);
break;
/* Common Channel Management/TRX Management messages */
@@ -3261,10 +3261,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* System Info Type 9.3.30 M TV 2 */
offset = dissect_rsl_ie_sys_info_type(tvb, pinfo, tree, offset, TRUE, &sys_info_type);
/* Full BCCH Info (SYS INFO) 9.3.39 O 1) TLV 25 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_full_bcch_inf(tvb, pinfo, tree, offset, TRUE);
/* Starting Time 9.3.23 O 2) TV 3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_starting_time(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.5.2 CCCH LOAD INDICATION 18*/
@@ -3275,7 +3275,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* RACH Load 9.3.18 C 1) TLV >=8 */
offset = dissect_rsl_ie_rach_load(tvb, pinfo, tree, offset, FALSE);
/* Paging Load 9.3.15 C 2) TV 3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_paging_load(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.5.3 */
@@ -3287,7 +3287,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Access Delay 9.3.17 M TV 2 */
offset = dissect_rsl_ie_access_delay(tvb, pinfo, tree, offset, TRUE);
/* Physical Context 9.3.16 O 1) TLV >=2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_phy_ctx(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.5.4 DELETE INDICATION */
@@ -3305,10 +3305,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* MS Identity 9.3.12 M TLV 2-10 2 */
offset = dissect_rsl_ie_ms_id(tvb, pinfo, tree, offset, TRUE);
/* Channel Needed 9.3.40 O 1) TV 2 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ch_needed(tvb, pinfo, tree, offset, FALSE);
/* eMLPP Priority 9.3.49 O 2) TV 2 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_emlpp_prio(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.5.6 IMMEDIATE ASSIGN COMMAND */
@@ -3325,7 +3325,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* SMSCB Information 9.3.36 M TV 24 */
offset = dissect_rsl_ie_smscb_inf(tvb, pinfo, tree, offset, TRUE);
/* SMSCB Channel Indicator 9.3.44 O 1) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_smscb_ch_ind(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.6 TRX MANAGEMENT MESSAGES */
@@ -3339,11 +3339,11 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* System Info Type 9.3.30 M TV 2 */
offset = dissect_rsl_ie_sys_info_type(tvb, pinfo, tree, offset, TRUE, &sys_info_type);
/* L3 Info (SYS INFO) 9.3.11 O 1) TLV 22 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE,
(sys_info_type == 0x48) ? L3_INF_SACCH : L3_INF_OTHER);
/* Starting Time 9.3.23 O 2) TV 3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_starting_time(tvb, pinfo, tree, offset, FALSE);
break;
case RSL_MSG_OVERLOAD: /* 27 8.6.3 */
@@ -3354,16 +3354,16 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Cause 9.3.26 M TLV >=3 */
offset = dissect_rsl_ie_cause(tvb, pinfo, tree, offset, TRUE);
/* Message Identifier 9.3.28 O 1) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_message_id(tvb, pinfo, tree, offset, FALSE);
/* Channel Number 9.3.1 O 2) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
/* Link identifier 9.3.2 O 3) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_link_id(tvb, pinfo, tree, offset, TRUE);
/* Erroneous Message 9.3.38 O 4) TLV >=3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_err_msg(tvb, pinfo, tree, offset, TRUE);
break;
/* 8.5.8 SMS BROADCAST COMMAND */
@@ -3375,7 +3375,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* SMSCB message 9.3.42 M TLV 2-90 */
offset = dissect_rsl_ie_smscb_mess(tvb, pinfo, tree, offset, TRUE);
/* SMSCB Channel Indicator 9.3.44 O 1) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_smscb_ch_ind(tvb, pinfo, tree, offset, FALSE);
break;
case RSL_MSG_CBCH_LOAD_IND: /* 30 8.5.9 */
@@ -3384,7 +3384,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* CBCH Load Information 9.3.43 M TV 2 */
offset = dissect_rsl_ie_cbch_load_inf(tvb, pinfo, tree, offset, TRUE);
/* SMSCB Channel Indicator 9.3.44 O 1) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_smscb_ch_ind(tvb, pinfo, tree, offset, FALSE);
break;
case RSL_MSG_NOT_CMD: /* 31 8.5.10 */
@@ -3393,13 +3393,13 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Command indicator 9.3.48 M 1) TLV 3-4 */
offset = dissect_rsl_ie_cmd_ind(tvb, pinfo, tree, offset, TRUE);
/* Group call reference 9.3.45 O TLV 7 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_grp_call_ref(tvb, pinfo, tree, offset, FALSE);
/* Channel Description 9.3.46 O TLV 3-n */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ch_desc(tvb, pinfo, tree, offset, FALSE);
/* NCH DRX information 9.3.47 O TLV 3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_nch_drx(tvb, pinfo, tree, offset, FALSE);
break;
@@ -3413,46 +3413,46 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Channel Mode 9.3.6 M TLV 8-9 */
offset = dissect_rsl_ie_ch_mode(tvb, pinfo, tree, offset, TRUE);
/* Channel Identification 9.3.5 O 7) TLV 8 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ch_id(tvb, pinfo, tree, offset, FALSE);
/* Encryption information 9.3.7 O 1) TLV >=3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_enc_inf(tvb, pinfo, tree, offset, FALSE);
/* Handover Reference 9.3.9 C 2) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ho_ref(tvb, pinfo, tree, offset, FALSE);
/* BS Power 9.3.4 O 3) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_bs_power(tvb, pinfo, tree, offset, FALSE);
/* MS Power 9.3.13 O 3) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ms_pow(tvb, pinfo, tree, offset, FALSE);
/* Timing Advance 9.3.24 C 3) 4) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_timing_adv(tvb, pinfo, tree, offset, FALSE);
/* BS Power Parameters 9.3.32 O 5) TLV >=2 */
/* MS Power Parameters 9.3.31 O 5) TLV >=2 */
/* Physical Context 9.3.16 O 6) TLV >=2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_phy_ctx(tvb, pinfo, tree, offset, FALSE);
/* SACCH Information 9.3.29 O 8) TLV >=3 */
/* UIC 9.3.50 O 9) TLV 3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_uic(tvb, pinfo, tree, offset, FALSE);
/* Main channel reference 9.3.51 O 10) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_main_ch_ref(tvb, pinfo, tree, offset, FALSE);
/* MultiRate configuration 9.3.52 O 11) TLV >=4 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_multirate_conf(tvb, pinfo, tree, offset, FALSE);
/* MultiRate Control 9.3.53 O 12) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_multirate_cntrl(tvb, pinfo, tree, offset, FALSE);
/* Supported Codec Types 9.3.54 O 12) TLV >=5 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE);
/* TFO transparent container 9.3.59 O 12) TLV >=3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE);
break;
@@ -3498,7 +3498,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Channel number 9.3.1 M TV 2 */
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
/* Access Delay 9.3.17 O 1) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_access_delay(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.8 MEASUREMENT RESULT 40 */
@@ -3512,10 +3512,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* BS Power 9.3.4 M TV 2 */
offset = dissect_rsl_ie_bs_power(tvb, pinfo, tree, offset, TRUE);
/* L1 Information 9.3.10 O 1) TV 3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_l1_inf(tvb, pinfo, tree, offset, FALSE);
/* L3 Info (MEAS REP, EXT MEAS REP or ENH MEAS REP) 9.3.11 O 1) TLV 21 */
- if (tvb_length_remaining(tvb,offset) > 0){
+ if (tvb_reported_length_remaining(tvb, offset) > 0){
/* Try to figure out of we have (MEAS REP, EXT MEAS REP or ENH MEAS REP) */
if ( ( tvb_get_guint8(tvb, offset+3) & 0xFE ) == 0x10 ) {
/* ENH MEAS REP */
@@ -3525,7 +3525,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
}
}
/* MS Timing Offset 9.3.37 O 2) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ms_timing_offset(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.9 MODE MODIFY */
@@ -3535,22 +3535,22 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Channel Mode 9.3.6 M TLV 8-9 */
offset = dissect_rsl_ie_ch_mode(tvb, pinfo, tree, offset, TRUE);
/* Encryption information 9.3.7 O 1) TLV >=3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_enc_inf(tvb, pinfo, tree, offset, FALSE);
/* Main channel reference 9.3.45 O 2) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_main_ch_ref(tvb, pinfo, tree, offset, FALSE);
/* MultiRate configuration 9.3.52 O 3) TLV >=3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_multirate_conf(tvb, pinfo, tree, offset, FALSE);
/* Multirate Control 9.3.53 O 4) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_multirate_cntrl(tvb, pinfo, tree, offset, FALSE);
/* Supported Codec Types 9.3.54 O 4) TLV >=5 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE);
/* TFO transparent container 9.3.59 O 4) TLV */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.10 MODE MODIFY ACKNOWLEDGE */
@@ -3581,7 +3581,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Timing Advance 9.3.24 M TV 2 */
offset = dissect_rsl_ie_timing_adv(tvb, pinfo, tree, offset, TRUE);
/* Physical Context 9.3.16 O 1) TLV */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_phy_ctx(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.14 RF CHANNEL RELEASE */
@@ -3594,7 +3594,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Channel number 9.3.1 M TV 2 */
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
/* MS Power 9.3.13 M TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ms_pow(tvb, pinfo, tree, offset, FALSE);
/* MS Power Parameters 9.3.31 O 1) TLV >=2 */
break;
@@ -3630,11 +3630,11 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* System Info Type 9.3.30 M TV 2 */
offset = dissect_rsl_ie_sys_info_type(tvb, pinfo, tree, offset, TRUE, &sys_info_type);
/* L3 Info 9.3.11 O 1) TLV 22 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_L3_inf(tvb, pinfo, tree, offset, FALSE,
(sys_info_type == 0x48) ? L3_INF_SACCH : L3_INF_OTHER);
/* Starting Time 9.3.23 O 2) TV 3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_starting_time(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.21 TALKER DETECTION */
@@ -3642,7 +3642,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Channel number 9.3.1 M TV 2 */
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
/* Access Delay 9.3.17 O 1) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
break;
/* 8.4.22 LISTENER DETECTION */
@@ -3650,7 +3650,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Channel number 9.3.1 M TV 2 */
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
/* Access Delay 9.3.17 O 1) TV 2 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
break;
/* 8.4.23 REMOTE CODEC CONFIGURATION REPORT */
@@ -3660,10 +3660,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Codec Configuration 9.3.55 M TLV >=3 */
offset = dissect_rsl_ie_codec_conf(tvb, pinfo, tree, offset, TRUE);
/* Supported Codec Types 9.3.54 M TLV >=5 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE);
/* TFO transparent container 9.3.59 O 4) TLV >=3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.24 ROUND TRIP DELAY REPORT */
@@ -3682,7 +3682,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Codec Configuration 9.3.55 M TLV >=3 */
offset = dissect_rsl_ie_codec_conf(tvb, pinfo, tree, offset, TRUE);
/* TFO transparent container 9.3.59 O 4) TLV >=3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.26 MULTIRATE CODEC MODIFICATION REQUEST */
@@ -3690,7 +3690,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Channel number 9.3.1 M TV 2 */
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
/* MultiRate Configuration 9.3.52 O 1) TLV >=4 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_multirate_conf(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.27 MULTIRATE CODEC MODIFICATION ACKNOWLEDGE */
@@ -3698,7 +3698,7 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* Channel number 9.3.1 M TV 2 */
offset = dissect_rsl_ie_ch_no(tvb, pinfo, tree, offset, TRUE);
/* MultiRate Configuration 9.3.52 O 1) TLV >=4 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_multirate_conf(tvb, pinfo, tree, offset, FALSE);
break;
/* 8.4.28 MULTIRATE CODEC MODIFICATION NEGATIVE ACKNOWLEDGE */
@@ -3729,10 +3729,10 @@ dissct_rsl_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
/* MultiRateControl 9.3.53 M TV 2 */
offset = dissect_rsl_ie_multirate_cntrl(tvb, pinfo, tree, offset, TRUE);
/* Supported Codec Type 9.3.54 O 1) TLV >=5 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_sup_codec_types(tvb, pinfo, tree, offset, FALSE);
/* TFO transparent container 9.3.59 O 4) TLV >=3 */
- if (tvb_length_remaining(tvb,offset) > 0)
+ if (tvb_reported_length_remaining(tvb, offset) > 0)
offset = dissect_rsl_ie_tfo_transp_cont(tvb, pinfo, tree, offset, FALSE);
break;
/* 0 1 - - - - - - Location Services messages: */
@@ -3808,30 +3808,28 @@ dissect_rsl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RSL");
col_clear(pinfo->cinfo, COL_INFO);
- msg_type = tvb_get_guint8(tvb,offset+1) & 0x7f;
+ msg_type = tvb_get_guint8(tvb, offset+1) & 0x7f;
- col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",val_to_str_ext(msg_type, &rsl_msg_type_vals_ext,"unknown %u"));
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_ext(msg_type, &rsl_msg_type_vals_ext, "unknown %u"));
top_tree = tree;
- /* if (tree) */ {
- ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, ENC_NA);
+ ti = proto_tree_add_item(tree, proto_rsl, tvb, 0, -1, ENC_NA);
- /* if nanoBTS specific vendor messages are not enabled, skip */
- if (!global_rsl_use_nano_bts) {
- guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1;
+ /* if nanoBTS specific vendor messages are not enabled, skip */
+ if (!global_rsl_use_nano_bts) {
+ guint8 msg_disc = tvb_get_guint8(tvb, offset) >> 1;
- if (msg_disc == RSL_MSGDISC_IPACCESS)
- return 0;
- }
- rsl_tree = proto_item_add_subtree(ti, ett_rsl);
+ if (msg_disc == RSL_MSGDISC_IPACCESS)
+ return 0;
+ }
+ rsl_tree = proto_item_add_subtree(ti, ett_rsl);
- /* 9.1 Message discriminator */
- proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, ENC_BIG_ENDIAN);
- proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
+ /* 9.1 Message discriminator */
+ proto_tree_add_item(rsl_tree, hf_rsl_msg_dsc, tvb, offset, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_item(rsl_tree, hf_rsl_T_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
- offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset);
+ offset = dissct_rsl_msg(tvb, pinfo, rsl_tree, offset);
- }
return offset;
}
@@ -4341,71 +4339,71 @@ void proto_register_rsl(void)
* statement in dissct_rsl_ipaccess_msg() doesn't contain explicit code
* to decode them (yet?).
*/
- RSL_ATT_TLVDEF(RSL_IE_CH_NO, TLV_TYPE_TV, 0);
- RSL_ATT_TLVDEF(RSL_IE_LINK_ID, TLV_TYPE_TV, 0);
- RSL_ATT_TLVDEF(RSL_IE_ACT_TYPE, TLV_TYPE_TV, 0);
- RSL_ATT_TLVDEF(RSL_IE_BS_POW, TLV_TYPE_TV, 0);
- RSL_ATT_TLVDEF(RSL_IE_CH_ID, TLV_TYPE_TLV, 0);
- RSL_ATT_TLVDEF(RSL_IE_CH_MODE, TLV_TYPE_TLV, 0);
- RSL_ATT_TLVDEF(RSL_IE_ENC_INF, TLV_TYPE_TLV, 0);
- RSL_ATT_TLVDEF(RSL_IE_FRAME_NO, TLV_TYPE_FIXED, 2);
- RSL_ATT_TLVDEF(RSL_IE_HO_REF, TLV_TYPE_TV, 0);
- RSL_ATT_TLVDEF(RSL_IE_L1_INF, TLV_TYPE_FIXED, 2);
- RSL_ATT_TLVDEF(RSL_IE_L3_INF, TLV_TYPE_TL16V, 0);
- RSL_ATT_TLVDEF(RSL_IE_MS_ID, TLV_TYPE_TLV, 0);
- RSL_ATT_TLVDEF(RSL_IE_MS_POW, TLV_TYPE_TV, 0);
- RSL_ATT_TLVDEF(RSL_IE_PAGING_GRP, TLV_TYPE_TV, 0);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TYPES, TLV_TYPE_TLV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_CODEC_CONF, TLV_TYPE_TLV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_RTD, TLV_TYPE_TV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_TFO_STATUS, TLV_TYPE_TV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_LLP_APDU, TLV_TYPE_TLV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_IP, TLV_TYPE_FIXED, 4);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_REMOTE_PORT, TLV_TYPE_FIXED, 2);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_IP, TLV_TYPE_FIXED, 4);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_STAT, TLV_TYPE_TLV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_LOCAL_PORT, TLV_TYPE_FIXED, 2);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_SPEECH_MODE, TLV_TYPE_TV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_CONN_ID, TLV_TYPE_FIXED, 2);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD2, TLV_TYPE_TV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_PAYLOAD, TLV_TYPE_TV, 0);
+ RSL_ATT_TLVDEF(RSL_IE_IPAC_RTP_CSD_FMT, TLV_TYPE_TV, 0);
/* Register the protocol name and description */
proto_rsl = proto_register_protocol("Radio Signalling Link (RSL)", "RSL", "gsm_abis_rsl");
diff --git a/epan/dissectors/packet-rtmpt.c b/epan/dissectors/packet-rtmpt.c
index 362dfef13c..3a058c46c3 100644
--- a/epan/dissectors/packet-rtmpt.c
+++ b/epan/dissectors/packet-rtmpt.c
@@ -561,7 +561,7 @@ static gint
rtmpt_get_amf_length(tvbuff_t *tvb, gint offset)
{
guint8 iObjType;
- gint remain = tvb_length_remaining(tvb, offset);
+ gint remain = tvb_reported_length_remaining(tvb, offset);
guint32 depth = 0;
gint itemlen = 0;
gint rv = 0;
@@ -640,7 +640,7 @@ rtmpt_get_amf_length(tvbuff_t *tvb, gint offset)
static gchar *
rtmpt_get_amf_param(tvbuff_t *tvb, gint offset, gint param, const gchar *prop)
{
- guint32 remain = tvb_length_remaining(tvb, offset);
+ guint32 remain = tvb_reported_length_remaining(tvb, offset);
guint32 itemlen;
guint32 iStringLength;
@@ -694,7 +694,7 @@ rtmpt_get_amf_param(tvbuff_t *tvb, gint offset, gint param, const gchar *prop)
static guint32
rtmpt_get_amf_txid(tvbuff_t *tvb, gint offset)
{
- guint32 remain = tvb_length_remaining(tvb, offset);
+ guint32 remain = tvb_reported_length_remaining(tvb, offset);
if (remain > 0) {
guint32 itemlen = rtmpt_get_amf_length(tvb, offset);
@@ -739,7 +739,7 @@ rtmpt_get_packet_desc(tvbuff_t *tvb, guint32 offset, guint32 remain, rtmpt_conv_
} else if (tp->cmd == RTMPT_TYPE_UCM) {
guint16 iUCM = -1;
- const gchar *sFunc = NULL;
+ const gchar *sFunc;
const gchar *sParam = "";
if (tp->len < 2 || remain < 2)
@@ -1111,7 +1111,7 @@ dissect_amf0_value_type(tvbuff_t *tvb, gint offset, proto_tree *tree, gboolean *
* If we can't determine the length, don't carry on;
* just skip to the end of the tvbuff.
*/
- iValueOffset = tvb_length(tvb);
+ iValueOffset = tvb_reported_length(tvb);
break;
}
proto_item_set_end(ti, tvb, iValueOffset);
@@ -1546,7 +1546,7 @@ dissect_amf3_value_type(tvbuff_t *tvb, gint offset, proto_tree *tree, proto_item
* If we can't determine the length, don't carry on;
* just skip to the end of the tvbuff.
*/
- iValueOffset = tvb_length(tvb);
+ iValueOffset = tvb_reported_length(tvb);
break;
}
proto_item_set_end(ti, tvb, iValueOffset);
@@ -1626,7 +1626,7 @@ dissect_rtmpt_body_aggregate(tvbuff_t *tvb, gint offset, proto_tree *rtmpt_tree)
proto_tree *data_tree;
- while (tvb_length_remaining(tvb, offset) > 0) {
+ while (tvb_reported_length_remaining(tvb, offset) > 0) {
guint8 iTagType;
guint iDataSize;
@@ -1667,9 +1667,6 @@ dissect_rtmpt_body_aggregate(tvbuff_t *tvb, gint offset, proto_tree *rtmpt_tree)
static void
dissect_rtmpt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rtmpt_conv_t *rconv, int cdir, rtmpt_packet_t *tp)
{
- proto_tree *rtmpt_tree = NULL;
- proto_tree *rtmptroot_tree = NULL;
- proto_item *ti = NULL;
gint offset = 0;
gchar *sDesc = NULL;
@@ -1682,22 +1679,22 @@ dissect_rtmpt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rtmpt_conv_t
RTMPT_DEBUG("Dissect: frame=%u visited=%d len=%d tree=%p\n",
pinfo->fd->num, pinfo->fd->flags.visited,
- tvb_length_remaining(tvb, offset), tree);
+ tvb_reported_length_remaining(tvb, offset), tree);
/* Clear any previous data in Info column (RTMP packets are protected by a "fence") */
col_clear(pinfo->cinfo, COL_INFO);
- if (tvb_length_remaining(tvb, offset) < 1) return;
+ if (tvb_reported_length_remaining(tvb, offset) < 1) return;
if (tp->id <= RTMPT_ID_MAX) {
if (tp->fmt < 3
- && tvb_length_remaining(tvb, offset) >= tp->bhlen+3
+ && tvb_reported_length_remaining(tvb, offset) >= tp->bhlen+3
&& tvb_get_ntoh24(tvb, offset+tp->bhlen) == 0xffffff) {
haveETS = TRUE;
}
iBodyOffset = offset + tp->bhlen + tp->mhlen;
- iBodyRemain = tvb_length_remaining(tvb, iBodyOffset);
+ iBodyRemain = tvb_reported_length_remaining(tvb, iBodyOffset);
if (tp->cmd == RTMPT_TYPE_CHUNK_SIZE && tp->len >= 4 && iBodyRemain >= 4) {
guint32 newchunksize = tvb_get_ntohl(tvb, iBodyOffset);
@@ -1742,6 +1739,9 @@ dissect_rtmpt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rtmpt_conv_t
if (tree)
{
+ proto_tree *rtmpt_tree = NULL;
+ proto_tree *rtmptroot_tree = NULL;
+ proto_item *ti;
ti = proto_tree_add_item(tree, proto_rtmpt, tvb, offset, -1, ENC_NA);
if (tp->id > RTMPT_ID_MAX) {
@@ -1875,7 +1875,7 @@ dissect_rtmpt_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, rtmpt_
rtmpt_packet_t *tp;
tvbuff_t *pktbuf;
- remain = tvb_length(tvb);
+ remain = tvb_reported_length(tvb);
if (!remain)
return;
@@ -2304,7 +2304,7 @@ dissect_rtmpt_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* dat
conv->key_ptr->port2 == pinfo->destport) ? 0 : 1;
dissect_rtmpt_common(tvb, pinfo, tree, rconv, cdir, tcpinfo->seq, tcpinfo->lastackseq);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
static void
@@ -2319,7 +2319,7 @@ dissect_rtmpt_http(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint remain;
offset = 0;
- remain = tvb_length_remaining(tvb, 0);
+ remain = tvb_reported_length_remaining(tvb, 0);
/*
* Request flow:
@@ -2429,7 +2429,7 @@ static gboolean
dissect_rtmpt_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
conversation_t *conversation;
- if (tvb_length(tvb) >= 12)
+ if (tvb_reported_length(tvb) >= 12)
{
/* To avoid a too high rate of false positive, this heuristics only matches the protocol
from the first server response packet and not from the client request packets before.