%(DEFAULT_BODY)s
if(out_tvb) {
- len = tvb_length(out_tvb);
+ len = tvb_reported_length(out_tvb);
/* now see if we can add a string representation */
for(i=0; i<len; i++)
if(!g_ascii_isprint(tvb_get_guint8(out_tvb, i)))
static void
dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
- proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_ASCII|ENC_NA);
+ proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_reported_length_remaining(tvb, 0), ENC_ASCII|ENC_NA);
}
/*
static void
dissect_ftam_unstructured_binary(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
- proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), ENC_NA);
+ proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_reported_length_remaining(tvb, 0), ENC_NA);
}
/*
nstime_t ts;
gchar * ptime;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if(len != 8)
{
offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
- offset = tvb_length_remaining(tvb,offset);
+ offset = tvb_reported_length_remaining(tvb,offset);
}
if (!parameter_tvb)
return offset;
- dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), tree);
+ dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), tree);
#.FN_BODY RedirectionInformation VAL_PTR = ¶meter_tvb
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_inap_HighLayerCompatibility);
- dissect_q931_high_layer_compat_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), subtree);
+ dissect_q931_high_layer_compat_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), subtree);
#.FN_BODY Cause VAL_PTR = ¶meter_tvb
/*
if (!parameter_tvb)
return offset;
- object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
+ object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id);
if(name){
* different type and/or mechanism.
*/
if(!actx->pinfo->fd->flags.visited) {
- mechanism = tvb_get_string_enc(NULL, parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
+ mechanism = tvb_get_string_enc(NULL, parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
ldap_info->first_auth_frame = 0; /* not known until we see the bind reply */
/*
* If the mechanism in this request is an empty string (which is
* All SPNEGO PDUs are of class CONSTRUCTED while
* GSS PDUs are class APPLICATION
*/
- if (parameter_tvb && (tvb_length(parameter_tvb) > 0))
+ if (parameter_tvb && (tvb_reported_length(parameter_tvb) > 0))
call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree);
}
/*if ((ldap_info->auth_mech != NULL) && ((strcmp(ldap_info->auth_mech, "GSSAPI") == 0) || (ber_class==BER_CLASS_APP))) {*/
/*
* This is a raw GSS-API token.
*/
- if (parameter_tvb && (tvb_length(parameter_tvb) > 0)) {
+ if (parameter_tvb && (tvb_reported_length(parameter_tvb) > 0)) {
call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree);
}
}
* which might not be wrapped in GSS-SPNEGO but be a raw
* NTLMSSP blob
*/
- if ( (tvb_length(parameter_tvb)>=7)
+ if ( (tvb_reported_length(parameter_tvb)>=7)
&& (!tvb_memeql(parameter_tvb, 0, "NTLMSSP", 7))){
call_dissector(ntlmssp_handle, parameter_tvb, actx->pinfo, tree);
break;
/*
* This is a GSS-API token.
*/
- if(parameter_tvb && (tvb_length(parameter_tvb) > 0))
+ if(parameter_tvb && (tvb_reported_length(parameter_tvb) > 0))
call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree);
} else if (ldap_info->auth_mech != NULL &&
strcmp(ldap_info->auth_mech, "GSSAPI") == 0) {
/*
* This is a GSS-API token.
*/
- if(parameter_tvb && (tvb_length(parameter_tvb) > 0))
+ if(parameter_tvb && (tvb_reported_length(parameter_tvb) > 0))
call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree);
}
break;
ldap_do_protocolop(actx->pinfo);
if(parameter_tvb)
- ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA);
+ ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA);
if(hf_index == hf_ldap_baseObject) {
/* this is search - put it on the scanline */
/* first check if we have a custom attribute type configured */
if ((hf_id = get_hf_for_header (attr_type)) != NULL)
- proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA);
+ proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_reported_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA);
/* if we have an attribute type that isn't binary see if there is a better dissector */
else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree, NULL)) {
/* do the default thing */
%(DEFAULT_BODY)s
- len = tvb_length_remaining(next_tvb, 0);
+ len = tvb_reported_length_remaining(next_tvb, 0);
for(i = 0; i < len; i++)
if(!g_ascii_isprint(tvb_get_guint8(next_tvb, i)))
break;
if(i == len) {
- string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA);
+ string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_reported_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA);
proto_item_set_text(actx->created_item, "AttributeValue: %%s", string);
}
}
ldap_do_protocolop(actx->pinfo);
call_dissector(ntlmssp_handle, tvb, actx->pinfo, tree);
- offset+=tvb_length_remaining(tvb, offset);
+ offset+=tvb_reported_length_remaining(tvb, offset);
#.FN_BODY AuthenticationChoice/ntlmsspAuth
/* make sure the protocol op comes first */
ldap_do_protocolop(actx->pinfo);
call_dissector(ntlmssp_handle, tvb, actx->pinfo, tree);
- offset+=tvb_length_remaining(tvb, offset);
+ offset+=tvb_reported_length_remaining(tvb, offset);
#.FN_BODY BindResponse/_untag/matchedDN
tvbuff_t *new_tvb=NULL;
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb);
if( new_tvb
- && (tvb_length(new_tvb)>=7)
+ && (tvb_reported_length(new_tvb)>=7)
&& (!tvb_memeql(new_tvb, 0, "NTLMSSP", 7))){
/* make sure the protocol op comes first */
dissect_ber_identifier(actx->pinfo, tree, tvb, otheroffset, &ber_class, &pc, &tag);
otheroffset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL);
} else {
- gint32 remaining=tvb_length_remaining(tvb, offset);
+ gint32 remaining=tvb_reported_length_remaining(tvb, offset);
len=remaining>0 ? remaining : 0;
}
one_more_pdu:
- length_remaining = tvb_ensure_length_remaining(tvb, offset);
+ length_remaining = tvb_ensure_captured_length_remaining(tvb, offset);
if (length_remaining < 6) return;
}
}
- length_remaining = tvb_ensure_length_remaining(tvb, offset);
+ length_remaining = tvb_ensure_captured_length_remaining(tvb, offset);
/* It might still be a packet containing a SASL security layer
* but it's just that we never saw the BIND packet.
gchar * ptime;
nstime_t ts;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if(len == 4)
{
nstime_t ts;
gchar * ptime;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if(len != 8)
{
# TransportLayerAddress ::= BIT STRING (SIZE (1..160, ...))
# Assume 4 bytes used in case of IPv4
/* Get the length */
- tvb_len = tvb_length(parameter_tvb);
+ tvb_len = tvb_reported_length(parameter_tvb);
subtree = proto_item_add_subtree(actx->created_item, ett_nbap_TransportLayerAddress);
if (tvb_len==4){
/* IPv4 */
# -- the UDP port field is included in the first octet of the Binding ID.
BindingID_port = tvb_get_ntohs(parameter_tvb,0);
- if(tvb_length(parameter_tvb)==2){
+ if(tvb_reported_length(parameter_tvb)==2){
proto_item_append_text(actx->created_item, " (%%u)",BindingID_port);
}
if(actx->external.indirect_ref_present) {
proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_StandardExtension_vals, "standard-extension %%d"));
if (dissector_try_uint(p1_extension_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
} else {
proto_item *item;
proto_tree *next_tree;
proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_ExtensionAttributeType_vals, "extension-attribute-type %%d"));
if (dissector_try_uint(p1_extension_attribute_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
- offset =tvb_length(tvb);
+ offset =tvb_reported_length(tvb);
} else {
proto_item *item;
proto_tree *next_tree;
/* we can do this now constructed octet strings are supported */
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &next_tvb);
- proto_item_set_text(actx->created_item, "content (%%u bytes)", tvb_length (next_tvb));
+ proto_item_set_text(actx->created_item, "content (%%u bytes)", tvb_reported_length (next_tvb));
if (next_tvb) {
if (ctx && ctx->content_type_id) {
proto_tree *next_tree;
item = proto_tree_add_expert(actx->subtree.top_tree ? actx->subtree.top_tree : tree, actx->pinfo, &ei_p1_unknown_built_in_content_type,
- next_tvb, 0, tvb_length_remaining(tvb, offset));
+ next_tvb, 0, tvb_reported_length_remaining(tvb, offset));
next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);
dissect_unknown_ber(actx->pinfo, next_tvb, 0, next_tree);
%(DEFAULT_BODY)s
if (ctx && ctx->do_address) {
- proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
+ proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(mtaname, 0, tvb_reported_length(mtaname)));
} else {
if (mtaname) {
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(mtaname, 0, tvb_reported_length(mtaname)));
}
}
if(id) {
if (ctx && ctx->do_address)
- proto_item_append_text(actx->subtree.tree, " $ %%s)", tvb_format_text(id, 0, tvb_length(id)));
+ proto_item_append_text(actx->subtree.tree, " $ %%s)", tvb_format_text(id, 0, tvb_reported_length(id)));
if (hf_index == hf_p1_subject_identifier)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %%s)", tvb_format_text(id, 0, tvb_length(id)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %%s)", tvb_format_text(id, 0, tvb_reported_length(id)));
}
#.FN_BODY MTSIdentifier
%(DEFAULT_BODY)s
if(arrival && ctx && ctx->do_address)
- proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(arrival, 0, tvb_length(arrival)));
+ proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(arrival, 0, tvb_reported_length(arrival)));
#.FN_PARS RoutingAction
VAL_PTR = &action
proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_TokenDataType_vals, "tokendata-type %%d"));
if (dissector_try_uint(p1_tokendata_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
} else {
proto_item *item;
proto_tree *next_tree;
if(out_tvb) {
- len = tvb_length(out_tvb);
+ len = tvb_reported_length(out_tvb);
/* now see if we can add a string representation */
for(i=0; i<len; i++)
if(!g_ascii_isprint(tvb_get_guint8(out_tvb, i)))
static void
dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
- proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), ENC_ASCII|ENC_NA);
+ proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_reported_length_remaining(tvb, 0), ENC_ASCII|ENC_NA);
}
/*
static void
dissect_ftam_unstructured_binary(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
{
- proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), ENC_NA);
+ proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_reported_length_remaining(tvb, 0), ENC_NA);
}
/*
nstime_t ts;
gchar * ptime;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if(len != 8)
{
offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, ext_tree, NULL);
}else{
call_dissector(data_handle, tvb, actx->pinfo, ext_tree);
- offset = tvb_length_remaining(tvb,offset);
+ offset = tvb_reported_length_remaining(tvb,offset);
}
if (!parameter_tvb)
return offset;
- dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), tree);
+ dissect_q931_bearer_capability_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), tree);
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_inap_HighLayerCompatibility);
- dissect_q931_high_layer_compat_ie(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), subtree);
+ dissect_q931_high_layer_compat_ie(parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), subtree);
ldap_do_protocolop(actx->pinfo);
if(parameter_tvb)
- ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA);
+ ldapstring = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb, 0), ENC_UTF_8|ENC_NA);
if(hf_index == hf_ldap_baseObject) {
/* this is search - put it on the scanline */
* different type and/or mechanism.
*/
if(!actx->pinfo->fd->flags.visited) {
- mechanism = tvb_get_string_enc(NULL, parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
+ mechanism = tvb_get_string_enc(NULL, parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
ldap_info->first_auth_frame = 0; /* not known until we see the bind reply */
/*
* If the mechanism in this request is an empty string (which is
* All SPNEGO PDUs are of class CONSTRUCTED while
* GSS PDUs are class APPLICATION
*/
- if (parameter_tvb && (tvb_length(parameter_tvb) > 0))
+ if (parameter_tvb && (tvb_reported_length(parameter_tvb) > 0))
call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree);
}
/*if ((ldap_info->auth_mech != NULL) && ((strcmp(ldap_info->auth_mech, "GSSAPI") == 0) || (ber_class==BER_CLASS_APP))) {*/
/*
* This is a raw GSS-API token.
*/
- if (parameter_tvb && (tvb_length(parameter_tvb) > 0)) {
+ if (parameter_tvb && (tvb_reported_length(parameter_tvb) > 0)) {
call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree);
}
}
ldap_do_protocolop(actx->pinfo);
call_dissector(ntlmssp_handle, tvb, actx->pinfo, tree);
- offset+=tvb_length_remaining(tvb, offset);
+ offset+=tvb_reported_length_remaining(tvb, offset);
ldap_do_protocolop(actx->pinfo);
call_dissector(ntlmssp_handle, tvb, actx->pinfo, tree);
- offset+=tvb_length_remaining(tvb, offset);
+ offset+=tvb_reported_length_remaining(tvb, offset);
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb);
if( new_tvb
- && (tvb_length(new_tvb)>=7)
+ && (tvb_reported_length(new_tvb)>=7)
&& (!tvb_memeql(new_tvb, 0, "NTLMSSP", 7))){
/* make sure the protocol op comes first */
* which might not be wrapped in GSS-SPNEGO but be a raw
* NTLMSSP blob
*/
- if ( (tvb_length(parameter_tvb)>=7)
+ if ( (tvb_reported_length(parameter_tvb)>=7)
&& (!tvb_memeql(parameter_tvb, 0, "NTLMSSP", 7))){
call_dissector(ntlmssp_handle, parameter_tvb, actx->pinfo, tree);
break;
/*
* This is a GSS-API token.
*/
- if(parameter_tvb && (tvb_length(parameter_tvb) > 0))
+ if(parameter_tvb && (tvb_reported_length(parameter_tvb) > 0))
call_dissector(spnego_handle, parameter_tvb, actx->pinfo, tree);
} else if (ldap_info->auth_mech != NULL &&
strcmp(ldap_info->auth_mech, "GSSAPI") == 0) {
/*
* This is a GSS-API token.
*/
- if(parameter_tvb && (tvb_length(parameter_tvb) > 0))
+ if(parameter_tvb && (tvb_reported_length(parameter_tvb) > 0))
call_dissector(gssapi_handle, parameter_tvb, actx->pinfo, tree);
}
break;
/* first check if we have a custom attribute type configured */
if ((hf_id = get_hf_for_header (attr_type)) != NULL)
- proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA);
+ proto_tree_add_item (tree, *hf_id, next_tvb, 0, tvb_reported_length_remaining(next_tvb, 0), ENC_UTF_8|ENC_NA);
/* if we have an attribute type that isn't binary see if there is a better dissector */
else if(!attr_type || !next_tvb || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree, NULL)) {
NULL);
- len = tvb_length_remaining(next_tvb, 0);
+ len = tvb_reported_length_remaining(next_tvb, 0);
for(i = 0; i < len; i++)
if(!g_ascii_isprint(tvb_get_guint8(next_tvb, i)))
break;
if(i == len) {
- string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA);
+ string = tvb_get_string_enc(wmem_packet_scope(), next_tvb, 0, tvb_reported_length_remaining(next_tvb, 0), ENC_ASCII|ENC_NA);
proto_item_set_text(actx->created_item, "AttributeValue: %s", string);
}
}
if (!parameter_tvb)
return offset;
- object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
+ object_identifier_id = tvb_get_string_enc(wmem_packet_scope(), parameter_tvb, 0, tvb_reported_length_remaining(parameter_tvb,0), ENC_UTF_8|ENC_NA);
name = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id);
if(name){
dissect_ber_identifier(actx->pinfo, tree, tvb, otheroffset, &ber_class, &pc, &tag);
otheroffset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL);
} else {
- gint32 remaining=tvb_length_remaining(tvb, offset);
+ gint32 remaining=tvb_reported_length_remaining(tvb, offset);
len=remaining>0 ? remaining : 0;
}
one_more_pdu:
- length_remaining = tvb_ensure_length_remaining(tvb, offset);
+ length_remaining = tvb_ensure_captured_length_remaining(tvb, offset);
if (length_remaining < 6) return;
}
}
- length_remaining = tvb_ensure_length_remaining(tvb, offset);
+ length_remaining = tvb_ensure_captured_length_remaining(tvb, offset);
/* It might still be a packet containing a SASL security layer
* but it's just that we never saw the BIND packet.
gchar * ptime;
nstime_t ts;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if(len == 4)
{
nstime_t ts;
gchar * ptime;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if(len != 8)
{
return offset;
BindingID_port = tvb_get_ntohs(parameter_tvb,0);
- if(tvb_length(parameter_tvb)==2){
+ if(tvb_reported_length(parameter_tvb)==2){
proto_item_append_text(actx->created_item, " (%u)",BindingID_port);
}
if (!parameter_tvb)
return offset;
/* Get the length */
- tvb_len = tvb_length(parameter_tvb);
+ tvb_len = tvb_reported_length(parameter_tvb);
subtree = proto_item_add_subtree(actx->created_item, ett_nbap_TransportLayerAddress);
if (tvb_len==4){
/* IPv4 */
if (ctx && ctx->do_address) {
- proto_item_append_text(actx->subtree.tree, " %s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
+ proto_item_append_text(actx->subtree.tree, " %s", tvb_format_text(mtaname, 0, tvb_reported_length(mtaname)));
} else {
if (mtaname) {
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(mtaname, 0, tvb_reported_length(mtaname)));
}
}
if(id) {
if (ctx && ctx->do_address)
- proto_item_append_text(actx->subtree.tree, " $ %s)", tvb_format_text(id, 0, tvb_length(id)));
+ proto_item_append_text(actx->subtree.tree, " $ %s)", tvb_format_text(id, 0, tvb_reported_length(id)));
if (hf_index == hf_p1_subject_identifier)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %s)", tvb_format_text(id, 0, tvb_length(id)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %s)", tvb_format_text(id, 0, tvb_reported_length(id)));
}
proto_item_append_text(tree, " (%s)", val_to_str(actx->external.indirect_reference, p1_ExtensionAttributeType_vals, "extension-attribute-type %d"));
if (dissector_try_uint(p1_extension_attribute_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
- offset =tvb_length(tvb);
+ offset =tvb_reported_length(tvb);
} else {
proto_item *item;
proto_tree *next_tree;
if(arrival && ctx && ctx->do_address)
- proto_item_append_text(actx->subtree.tree, " %s", tvb_format_text(arrival, 0, tvb_length(arrival)));
+ proto_item_append_text(actx->subtree.tree, " %s", tvb_format_text(arrival, 0, tvb_reported_length(arrival)));
if(actx->external.indirect_ref_present) {
proto_item_append_text(tree, " (%s)", val_to_str(actx->external.indirect_reference, p1_StandardExtension_vals, "standard-extension %d"));
if (dissector_try_uint(p1_extension_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
} else {
proto_item *item;
proto_tree *next_tree;
/* we can do this now constructed octet strings are supported */
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &next_tvb);
- proto_item_set_text(actx->created_item, "content (%u bytes)", tvb_length (next_tvb));
+ proto_item_set_text(actx->created_item, "content (%u bytes)", tvb_reported_length (next_tvb));
if (next_tvb) {
if (ctx && ctx->content_type_id) {
proto_tree *next_tree;
item = proto_tree_add_expert(actx->subtree.top_tree ? actx->subtree.top_tree : tree, actx->pinfo, &ei_p1_unknown_built_in_content_type,
- next_tvb, 0, tvb_length_remaining(tvb, offset));
+ next_tvb, 0, tvb_reported_length_remaining(tvb, offset));
next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);
dissect_unknown_ber(actx->pinfo, next_tvb, 0, next_tree);
proto_item_append_text(tree, " (%s)", val_to_str(actx->external.indirect_reference, p1_TokenDataType_vals, "tokendata-type %d"));
if (dissector_try_uint(p1_tokendata_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
} else {
proto_item *item;
proto_tree *next_tree;
}
+
+
/*--- proto_register_p1 -------------------------------------------*/
void proto_register_p1(void) {
NULL, HFILL }},
/*--- End of included file: packet-p1-hfarr.c ---*/
-#line 318 "../../asn1/p1/packet-p1-template.c"
+#line 320 "../../asn1/p1/packet-p1-template.c"
};
/* List of subtrees */
&ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeSubmissionFields,
/*--- End of included file: packet-p1-ettarr.c ---*/
-#line 331 "../../asn1/p1/packet-p1-template.c"
+#line 333 "../../asn1/p1/packet-p1-template.c"
};
static ei_register_info ei[] = {
new_register_ber_syntax_dissector("ORName", proto_p1, dissect_ORName_PDU);
/*--- End of included file: packet-p1-syn-reg.c ---*/
-#line 372 "../../asn1/p1/packet-p1-template.c"
+#line 374 "../../asn1/p1/packet-p1-template.c"
}
/*--- End of included file: packet-p1-dis-tab.c ---*/
-#line 380 "../../asn1/p1/packet-p1-template.c"
+#line 382 "../../asn1/p1/packet-p1-template.c"
/* APPLICATION CONTEXT */
register_rtse_oid_dissector_handle("2.6.0.2.12", p1_handle, 0, "id-as-mta-rtse", TRUE);
register_rtse_oid_dissector_handle("2.6.0.2.7", p1_handle, 0, "id-as-mtse", FALSE);
+
register_rtse_oid_dissector_handle("applicationProtocol.1", p1_handle, 0, "mts-transfer-protocol-1984", FALSE);
register_rtse_oid_dissector_handle("applicationProtocol.12", p1_handle, 0, "mta-transfer-protocol", FALSE);
+ /* the ROS dissector will use the registered P3 ros info */
+ register_rtse_oid_dissector_handle(id_as_mts_rtse, NULL, 0, "id-as-mts-rtse", TRUE);
+ register_rtse_oid_dissector_handle(id_as_msse, NULL, 0, "id-as-msse", TRUE);
+
/* remember the tpkt handler for change in preferences */
tpkt_handle = find_dissector("tpkt");
/* Register P3 with ROS */
+
register_ros_protocol_info(id_as_msse, &p3_ros_info, 0, "id-as-msse", FALSE);
register_ros_protocol_info(id_as_mdse_88, &p3_ros_info, 0, "id-as-mdse-88", FALSE);
register_ros_protocol_info(id_as_mase_94, &p3_ros_info, 0, "id-as-mase-94", FALSE);
register_ros_protocol_info(id_as_mts, &p3_ros_info, 0, "id-as-mts", FALSE);
+ register_ros_protocol_info(id_as_mts_rtse, &p3_ros_info, 0, "id-as-mts-rtse", TRUE);
}