aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-10-07 07:59:11 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-10-07 07:59:11 +0000
commitb7d8cd1c6a405b789a025774815fae599f70e452 (patch)
tree2114679c224a26076c5748d3c9bc1ecd85453e88
parent843459d07551c168a49aa9a332839c503f21525f (diff)
Switch to using tvb_new_subset_remaining() in .cnf files.
svn path=/trunk/; revision=30386
-rw-r--r--asn1/gsmmap/gsmmap.cnf16
-rw-r--r--asn1/spnego/spnego.cnf2
-rw-r--r--epan/dissectors/packet-gsm_map.c16
-rw-r--r--epan/dissectors/packet-spnego.c2
4 files changed, 18 insertions, 18 deletions
diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf
index d39cd56089..10eac05cf5 100644
--- a/asn1/gsmmap/gsmmap.cnf
+++ b/asn1/gsmmap/gsmmap.cnf
@@ -239,13 +239,13 @@ MAP-DialoguePDU B "0.4.0.0.1.1.1.1" "map-DialogueAS"
/* Strip off discrimination and length */
length = tvb_get_guint8(parameter_tvb,0);
proto_tree_add_item(subtree, hf_gsm_map_len, parameter_tvb, 1,1,FALSE);
- next_tvb = tvb_new_subset(parameter_tvb, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(parameter_tvb, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}else if(octet==1){
proto_tree_add_item(subtree, hf_gsm_map_dlci, parameter_tvb, 1,1,FALSE);
proto_tree_add_item(subtree, hf_gsm_map_len, parameter_tvb, 2,1,FALSE);
length = tvb_get_guint8(parameter_tvb,0);
- next_tvb = tvb_new_subset(parameter_tvb, 3, -1, -1);
+ next_tvb = tvb_new_subset_remaining(parameter_tvb, 3);
call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
}
break;
@@ -671,12 +671,12 @@ if (!actx->value_ptr)
if ( octet == 0) {/* DISCRIMINATION TS 48 006(GSM 08.06 version 5.3.0) */
/* Strip off discrimination and length */
proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 1,1,FALSE);
- next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}else if(octet==1){
proto_tree_add_item(subtree, hf_gsm_map_dlci, actx->value_ptr, 1,1,FALSE);
proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 2,1,FALSE);
- next_tvb = tvb_new_subset(actx->value_ptr, 3, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 3);
call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
}
break;
@@ -685,7 +685,7 @@ if (!actx->value_ptr)
octet = tvb_get_guint8(actx->value_ptr,0);
length = tvb_get_guint8(actx->value_ptr,1);
if ( octet == 0) {/* DISCRIMINATION TS 48 006 */
- next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}
break;
@@ -752,12 +752,12 @@ if (!actx->value_ptr)
if ( octet == 0) {/* DISCRIMINATION TS 48 006(GSM 08.06 version 5.3.0) */
/* Strip off discrimination and length */
proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 1,1,FALSE);
- next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}else if(octet==1){
proto_tree_add_item(subtree, hf_gsm_map_dlci, actx->value_ptr, 1,1,FALSE);
proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 2,1,FALSE);
- next_tvb = tvb_new_subset(actx->value_ptr, 3, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 3);
call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
}
break;
@@ -766,7 +766,7 @@ if (!actx->value_ptr)
octet = tvb_get_guint8(actx->value_ptr,0);
length = tvb_get_guint8(actx->value_ptr,1);
if ( octet == 0) {/* DISCRIMINATION TS 48 006 */
- next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}
break;
diff --git a/asn1/spnego/spnego.cnf b/asn1/spnego/spnego.cnf
index 563f9d17a8..91a10186c4 100644
--- a/asn1/spnego/spnego.cnf
+++ b/asn1/spnego/spnego.cnf
@@ -76,7 +76,7 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
* token it dissected, so we can return the length of the part
* we (and it) dissected.
*/
- token_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ token_tvb = tvb_new_subset_remaining(tvb, offset);
if (next_level_value && next_level_value->wrap_handle) {
len = call_dissector(next_level_value->wrap_handle, token_tvb, actx->pinfo,
subtree);
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index d6614c5b8a..fff63f3bd5 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -2971,12 +2971,12 @@ if (!actx->value_ptr)
if ( octet == 0) {/* DISCRIMINATION TS 48 006(GSM 08.06 version 5.3.0) */
/* Strip off discrimination and length */
proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 1,1,FALSE);
- next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}else if(octet==1){
proto_tree_add_item(subtree, hf_gsm_map_dlci, actx->value_ptr, 1,1,FALSE);
proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 2,1,FALSE);
- next_tvb = tvb_new_subset(actx->value_ptr, 3, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 3);
call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
}
break;
@@ -2985,7 +2985,7 @@ if (!actx->value_ptr)
octet = tvb_get_guint8(actx->value_ptr,0);
length = tvb_get_guint8(actx->value_ptr,1);
if ( octet == 0) {/* DISCRIMINATION TS 48 006 */
- next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}
break;
@@ -3084,13 +3084,13 @@ dissect_gsm_map_LongSignalInfo(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
/* Strip off discrimination and length */
length = tvb_get_guint8(parameter_tvb,0);
proto_tree_add_item(subtree, hf_gsm_map_len, parameter_tvb, 1,1,FALSE);
- next_tvb = tvb_new_subset(parameter_tvb, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(parameter_tvb, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}else if(octet==1){
proto_tree_add_item(subtree, hf_gsm_map_dlci, parameter_tvb, 1,1,FALSE);
proto_tree_add_item(subtree, hf_gsm_map_len, parameter_tvb, 2,1,FALSE);
length = tvb_get_guint8(parameter_tvb,0);
- next_tvb = tvb_new_subset(parameter_tvb, 3, -1, -1);
+ next_tvb = tvb_new_subset_remaining(parameter_tvb, 3);
call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
}
break;
@@ -14733,12 +14733,12 @@ if (!actx->value_ptr)
if ( octet == 0) {/* DISCRIMINATION TS 48 006(GSM 08.06 version 5.3.0) */
/* Strip off discrimination and length */
proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 1,1,FALSE);
- next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}else if(octet==1){
proto_tree_add_item(subtree, hf_gsm_map_dlci, actx->value_ptr, 1,1,FALSE);
proto_tree_add_item(subtree, hf_gsm_map_len, actx->value_ptr, 2,1,FALSE);
- next_tvb = tvb_new_subset(actx->value_ptr, 3, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 3);
call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
}
break;
@@ -14747,7 +14747,7 @@ if (!actx->value_ptr)
octet = tvb_get_guint8(actx->value_ptr,0);
length = tvb_get_guint8(actx->value_ptr,1);
if ( octet == 0) {/* DISCRIMINATION TS 48 006 */
- next_tvb = tvb_new_subset(actx->value_ptr, 2, -1, -1);
+ next_tvb = tvb_new_subset_remaining(actx->value_ptr, 2);
dissect_bssmap(next_tvb, actx->pinfo, subtree);
}
break;
diff --git a/epan/dissectors/packet-spnego.c b/epan/dissectors/packet-spnego.c
index 4b21f25c9d..e2f6c1bd20 100644
--- a/epan/dissectors/packet-spnego.c
+++ b/epan/dissectors/packet-spnego.c
@@ -561,7 +561,7 @@ dissect_spnego_InnerContextToken(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
* token it dissected, so we can return the length of the part
* we (and it) dissected.
*/
- token_tvb = tvb_new_subset(tvb, offset, -1, -1);
+ token_tvb = tvb_new_subset_remaining(tvb, offset);
if (next_level_value && next_level_value->wrap_handle) {
len = call_dissector(next_level_value->wrap_handle, token_tvb, actx->pinfo,
subtree);