#.OPT
--b
+-b
#-d satcom
#-s packet-gsm_map-tmp
-k
#.END
#.MODULE
-MAP-BS-Code gsm_map
-MAP-TS-Code gsm_map
-MAP-SS-Code gsm_map
-MAP-ExtensionDataTypes gsm_map
+MAP-BS-Code gsm_map
+MAP-TS-Code gsm_map
+MAP-SS-Code gsm_map
+MAP-ExtensionDataTypes gsm_map
MAP-CommonDataTypes gsm_map
MAP-SS-DataTypes gsm_map.ss
#.END
#.TABLE2_BODY ERROR
- { %(&errorCode)s, "%(_ident)s" },
+ { %(&errorCode)s, "%(_ident)s" },
#.END
#.FN_BODY GSMMAPOperationLocalvalue
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
col_append_str(actx->pinfo->cinfo, COL_INFO, gsm_map_opr_code(opcode));
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " ");
#.FN_PARS PrivateExtension/extId FN_VARIANT = _str VAL_PTR = &obj_id
-#.FN_BODY PrivateExtension/extType
+#.FN_BODY PrivateExtension/extType
proto_tree_add_text(tree, tvb, offset, -1, "Extension Data");
if (obj_id){
offset=call_ber_oid_callback(obj_id, tvb, offset, actx->pinfo, tree);
}else{
call_dissector(data_handle, tvb, actx->pinfo, tree);
offset = tvb_length_remaining(tvb,offset);
- }
+ }
#.FN_PARS AccessNetworkProtocolId
if (!parameter_tvb)
return offset;
- subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LongSignalInfo);
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LongSignalInfo);
switch (AccessNetworkProtocolId){
/* ts3G-48006 */
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_remaining(parameter_tvb, 3);
- call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
- }
+ call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
+ }
break;
/* ts3G-25413 */
case 2:
- call_dissector(ranap_handle, parameter_tvb, actx->pinfo, tree);
+ call_dissector(ranap_handle, parameter_tvb, actx->pinfo, tree);
break;
default:
break;
octet = tvb_get_guint8(parameter_tvb,0);
proto_tree_add_uint(tree, hf_gsm_map_Ss_Status_unused, parameter_tvb, 0,1,octet);
- if ((octet & 0x01)== 1)
+ if ((octet & 0x01)== 1)
proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_q_bit, parameter_tvb, 0,1,octet);
-
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_p_bit, parameter_tvb, 0,1,octet);
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_r_bit, parameter_tvb, 0,1,octet);
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_a_bit, parameter_tvb, 0,1,octet);
+
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_p_bit, parameter_tvb, 0,1,octet);
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_r_bit, parameter_tvb, 0,1,octet);
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_a_bit, parameter_tvb, 0,1,octet);
#.FN_BODY Ext-SS-Status VAL_PTR = ¶meter_tvb
/* Note Ext-SS-Status can have more than one byte */
octet = tvb_get_guint8(parameter_tvb,0);
proto_tree_add_uint(tree, hf_gsm_map_Ss_Status_unused, parameter_tvb, 0,1,octet);
- if ((octet & 0x01)== 1)
+ if ((octet & 0x01)== 1)
proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_q_bit, parameter_tvb, 0,1,octet);
-
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_p_bit, parameter_tvb, 0,1,octet);
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_r_bit, parameter_tvb, 0,1,octet);
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_a_bit, parameter_tvb, 0,1,octet);
+
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_p_bit, parameter_tvb, 0,1,octet);
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_r_bit, parameter_tvb, 0,1,octet);
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_a_bit, parameter_tvb, 0,1,octet);
#.END
tvbuff_t *parameter_tvb;
int length;
guint8 out_len;
- /* XXX - The maximum item label length is 240. Does this really need to be 1024?
+ /* XXX - The maximum item label length is 240. Does this really need to be 1024?
* use ep_alloc ?
*/
static unsigned char msgbuf[1024];
gchar *utf8_text = NULL;
- GIConv cd;
+ GIConv cd;
GError *l_conv_error = NULL;
%(DEFAULT_BODY)s
case SMS_ENCODING_UCS2_LANG:
if ((cd = g_iconv_open("UTF-8","UCS-2BE")) != (GIConv) -1)
{
- utf8_text = g_convert_with_iconv(parameter_tvb->real_data, length, cd, NULL, NULL, &l_conv_error);
+ utf8_text = g_convert_with_iconv(tvb_get_ptr(parameter_tvb, 0, length), length, cd, NULL, NULL, &l_conv_error);
if(!l_conv_error)
proto_tree_add_text(tree, tvb, 0, length, "USSD String: %%s", utf8_text);
else
proto_tree_add_text(tree, tvb, 0, length, "USSD String: g_convert_with_iconv FAILED");
g_free(utf8_text);
- g_iconv_close(cd);
+ g_iconv_close(cd);
}
else
proto_tree_add_text(tree, tvb, 0, length, "USSD String: g_iconv_open FAILED contact wireshark");
break;
default:
- break;
+ break;
}
#.FN_FTR ForwardingOptions
#.FN_BODY LAIFixedLength VAL_PTR = ¶meter_tvb
- tvbuff_t *parameter_tvb;
- proto_tree *subtree;
+ tvbuff_t *parameter_tvb;
+ proto_tree *subtree;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
- if (!parameter_tvb)
- return offset;
- subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LAIFixedLength);
- dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
+ if (!parameter_tvb)
+ return offset;
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LAIFixedLength);
+ dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
-#.FN_BODY RadioResourceInformation VAL_PTR = ¶meter_tvb
- tvbuff_t *parameter_tvb;
+#.FN_BODY RadioResourceInformation VAL_PTR = ¶meter_tvb
+ tvbuff_t *parameter_tvb;
proto_tree *subtree;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
- if (!parameter_tvb)
- return offset;
+ if (!parameter_tvb)
+ return offset;
- subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_RadioResourceInformation);
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_RadioResourceInformation);
be_chan_type(parameter_tvb, subtree, actx->pinfo, 0, tvb_length_remaining(tvb,0), NULL, 0);
#.FN_BODY RANAP-ServiceHandover VAL_PTR = ¶meter_tvb
tvbuff_t *parameter_tvb;
asn1_ctx_t asn1_ctx;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
- if (!parameter_tvb)
+ if (!parameter_tvb)
return offset;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
tvbuff_t *parameter_tvb;
asn1_ctx_t asn1_ctx;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
- if (!parameter_tvb)
+ if (!parameter_tvb)
return offset;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
tvbuff_t *parameter_tvb;
asn1_ctx_t asn1_ctx;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
- if (!parameter_tvb)
+ if (!parameter_tvb)
return offset;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
For the coding of the messages see GSM 08.06 and GSM 08.08.
*/
ProtocolId = 0xffffffff;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
if (!actx->value_ptr)
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_externalsignalinfo);
/* Branch on tag */
switch(octet){
case 4:
- /* Dissect the data part */
+ /* Dissect the data part */
de_bearer_cap(actx->value_ptr, subtree, actx->pinfo, 2, length, NULL, 0);
/* TODO: There may be more than one IE */
break;
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_remaining(actx->value_ptr, 3);
- call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
- }
+ call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
+ }
break;
case 3:
/* gsm-BSSMAP -- Value 3 is reserved and must not be used*/
guint8 length;
tvbuff_t *next_tvb;
proto_tree *subtree;
-
+
ProtocolId = 0xffffffff;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
if (!actx->value_ptr)
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_externalsignalinfo);
/* Branch on tag */
switch(octet){
case 4:
- /* Dissect the data part */
+ /* Dissect the data part */
de_bearer_cap(actx->value_ptr, subtree, actx->pinfo, 2, length, NULL, 0);
/* TODO: There may be more than one IE */
break;
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_remaining(actx->value_ptr, 3);
- call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
- }
+ call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
+ }
break;
case 3:
/* gsm-BSSMAP TODO Is it correct to stripp off two first octets here?*/
break;
}/*switch (ProtocolId)*/
-#.FN_BODY GlobalCellId VAL_PTR = ¶meter_tvb
- tvbuff_t *parameter_tvb;
+#.FN_BODY GlobalCellId VAL_PTR = ¶meter_tvb
+ tvbuff_t *parameter_tvb;
proto_tree *subtree;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
- if (!parameter_tvb)
- return offset;
+ if (!parameter_tvb)
+ return offset;
- subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_GlobalCellId);
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_GlobalCellId);
be_cell_id_aux(parameter_tvb, subtree, actx->pinfo, 0, tvb_length_remaining(tvb,0), NULL, 0, 0);
-#.FN_BODY Ext-GeographicalInformation VAL_PTR = ¶meter_tvb
- tvbuff_t *parameter_tvb;
+#.FN_BODY Ext-GeographicalInformation VAL_PTR = ¶meter_tvb
+ tvbuff_t *parameter_tvb;
proto_tree *subtree;
-%(DEFAULT_BODY)s
+%(DEFAULT_BODY)s
- if (!parameter_tvb)
- return offset;
+ if (!parameter_tvb)
+ return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_GeographicalInformation);
- dissect_geographical_description(parameter_tvb, actx->pinfo, subtree);
+ dissect_geographical_description(parameter_tvb, actx->pinfo, subtree);
#----------------------------------------------------------------------------------------
#.TYPE_ATTR
{
int offset = 0;
proto_tree *entry = proto_item_add_subtree(ti, ett_aim_rendezvous_data);
- proto_tree_add_item(entry, hf_aim_rendezvous_msg_type, tvb, offset, 2, ENC_BIG_ENDIAN);
- offset+=2;
+ proto_tree_add_item(entry, hf_aim_rendezvous_msg_type, tvb, offset, 2, ENC_BIG_ENDIAN);
+ offset += 2;
- proto_tree_add_item(entry, hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN);
+ proto_tree_add_item(entry, hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
offset = dissect_aim_capability(entry, tvb, offset);
return dissect_aim_tlv_sequence(tvb, pinfo, offset, entry,
- aim_rendezvous_tlvs);
+ aim_rendezvous_tlvs);
}
static int
int buddyname_length;
/* ICBM Cookie */
- proto_tree_add_item(msg_tree, hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN);
+ proto_tree_add_item(msg_tree, hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
/* Message Channel ID */
channel_id = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(msg_tree, hf_aim_message_channel_id, tvb, offset, 2,
- ENC_BIG_ENDIAN);
+ ENC_BIG_ENDIAN);
offset += 2;
/* Add the outgoing username to the info column */
buddyname_length = aim_get_buddyname(buddyname, tvb, offset,
offset + 1);
col_append_fstr(pinfo->cinfo, COL_INFO, " to: %s",
- format_text(buddyname, buddyname_length));
+ format_text(buddyname, buddyname_length));
offset = dissect_aim_buddyname(tvb, pinfo, offset, msg_tree);
guint16 channel_id;
/* ICBM Cookie */
- proto_tree_add_item(msg_tree, hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN);
+ proto_tree_add_item(msg_tree, hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN);
offset += 8;
/* Message Channel ID */
dissect_aim_msg_params(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *msg_tree)
{
int offset = 0;
- proto_tree_add_item(msg_tree, hf_aim_icbm_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
- proto_tree_add_item(msg_tree, hf_aim_icbm_msg_flags, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4;
- proto_tree_add_item(msg_tree, hf_aim_icbm_max_snac_size, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
- proto_tree_add_item(msg_tree, hf_aim_icbm_max_sender_warnlevel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
- proto_tree_add_item(msg_tree, hf_aim_icbm_max_receiver_warnlevel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
- proto_tree_add_item(msg_tree, hf_aim_icbm_min_msg_interval, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_msg_flags, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_max_snac_size, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_max_sender_warnlevel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_max_receiver_warnlevel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_min_msg_interval, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4;
return offset;
}
dissect_aim_msg_evil_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree)
{
int offset = 0;
- proto_tree_add_item(msg_tree, hf_aim_icbm_evil, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_evil, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
return dissect_aim_buddyname(tvb, pinfo, offset, msg_tree);
}
dissect_aim_msg_evil_repl(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *msg_tree)
{
int offset = 0;
- proto_tree_add_item(msg_tree, hf_aim_evil_warn_level, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
- proto_tree_add_item(msg_tree, hf_aim_evil_new_warn_level, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_evil_warn_level, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_evil_new_warn_level, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
return offset;
}
dissect_aim_msg_minityping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tree)
{
int offset = 0;
- proto_tree_add_item(msg_tree,hf_aim_icbm_notification_cookie, tvb, offset, 8, ENC_BIG_ENDIAN); offset+=8;
- proto_tree_add_item(msg_tree,hf_aim_icbm_notification_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree,hf_aim_icbm_notification_cookie, tvb, offset, 8, ENC_BIG_ENDIAN); offset+=8;
+ proto_tree_add_item(msg_tree,hf_aim_icbm_notification_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
offset = dissect_aim_buddyname(tvb, pinfo, offset, msg_tree);
- proto_tree_add_item(msg_tree,hf_aim_icbm_notification_type, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree,hf_aim_icbm_notification_type, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
return offset;
}
static const aim_client_plugin known_client_plugins[] = {
{ "None",
{0x0, 0x0, 0x0,
- {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}},
+ {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}},
{ "Status Manager",
{0xD140CF10, 0xE94F, 0x11D3,
- {0xBC, 0xD2, 0x00, 0x04, 0xAC, 0x96, 0xDD, 0x96}}},
+ {0xBC, 0xD2, 0x00, 0x04, 0xAC, 0x96, 0xDD, 0x96}}},
{ NULL, {0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } }
};
plugin ? plugin->name:"Unknown", uuid.Data1, uuid.Data2,
uuid.Data3, uuid.Data4[0], uuid.Data4[1], uuid.Data4[2],
uuid.Data4[3], uuid.Data4[4], uuid.Data4[5], uuid.Data4[6],
- uuid.Data4[7]
+ uuid.Data4[7]
);
return offset+16;
/* TODO: parse and present message_type */
/* message_type = tvb_get_guint8(tvb, offset); */
- proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset+=1;
+ proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_type, tvb, offset, 1, ENC_BIG_ENDIAN); offset+=1;
message_flags = tvb_get_guint8(tvb, offset);
ti_flags = proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_flags, tvb, offset, 1, message_flags);
flags_entry = proto_item_add_subtree(ti_flags, ett_aim_extended_data_message_flags);
proto_tree_add_boolean(flags_entry, hf_aim_rendezvous_extended_data_message_flags_auto, tvb, offset, 1, message_flags);
proto_tree_add_boolean(flags_entry, hf_aim_rendezvous_extended_data_message_flags_multi, tvb, offset, 1, message_flags);
offset+=1;
- proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_status_code, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
- proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_priority_code, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_status_code, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_priority_code, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
text_length = tvb_get_letohs(tvb, offset);
- proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_text_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_rendezvous_extended_data_message_text_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
text = tvb_get_ephemeral_string(tvb, offset, text_length);
proto_tree_add_text(msg_tree, tvb, offset, text_length, "Text: %s", text); offset+=text_length;
- offset = tvb->length;
+ offset = tvb_length(tvb);
return offset;
}
start_offset = offset;
/* TODO: parse and present protocol version */
/* protocol_version = tvb_get_ntohs(tvb, offset); */
- proto_tree_add_item(entry, hf_aim_icbm_client_err_protocol_version, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(entry, hf_aim_icbm_client_err_protocol_version, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
offset = dissect_aim_plugin(entry, tvb, offset, &plugin_uuid);
proto_tree_add_text(entry, tvb, offset, 2, "Unknown"); offset += 2;
- proto_tree_add_item(entry, hf_aim_icbm_client_err_client_caps_flags, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4;
+ proto_tree_add_item(entry, hf_aim_icbm_client_err_client_caps_flags, tvb, offset, 4, ENC_BIG_ENDIAN); offset+=4;
proto_tree_add_text(entry, tvb, offset, 1, "Unknown"); offset += 1;
proto_tree_add_text(entry, tvb, offset, 2, "Downcounter?"); offset += 2;
/* plugin-specific data follows */
proto_tree_add_text(entry, tvb, offset, -1, "Plugin-specific data");
}
- offset = tvb->length;
+ offset = tvb_length(tvb);
return offset;
}
{
int offset = 0;
- proto_tree_add_item(msg_tree,hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN); offset+=8;
+ proto_tree_add_item(msg_tree,hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN); offset+=8;
proto_tree_add_item(msg_tree, hf_aim_message_channel_id, tvb, offset, 2,
ENC_BIG_ENDIAN); offset += 2;
int offset = 0;
guint16 channel, reason;
- proto_tree_add_item(msg_tree,hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN); offset+=8;
+ proto_tree_add_item(msg_tree,hf_aim_icbm_cookie, tvb, offset, 8, ENC_BIG_ENDIAN); offset+=8;
channel = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item(msg_tree,hf_aim_icbm_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree,hf_aim_icbm_channel, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
offset = dissect_aim_buddyname(tvb, pinfo, offset, msg_tree);
reason = tvb_get_ntohs(tvb, offset);
- proto_tree_add_item(msg_tree, hf_aim_icbm_client_err_reason, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_client_err_reason, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
if (reason == CLIENT_ERR__REASON_CHANNEL_SPECIFIC && tvb_length_remaining(tvb, offset) > 0)
{
switch (channel)
{
case ICBM_CHANNEL_RENDEZVOUS:
- proto_tree_add_item(msg_tree, hf_aim_icbm_rendezvous_nak_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
- proto_tree_add_item(msg_tree, hf_aim_icbm_rendezvous_nak, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_rendezvous_nak_length, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
+ proto_tree_add_item(msg_tree, hf_aim_icbm_rendezvous_nak, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
break;
default:
- {
- tvbuff_t *subtvb = tvb_new_subset_remaining(tvb, offset);
- proto_item *ti_extended_data = proto_tree_add_text(msg_tree, tvb, offset, -1, "Extended Data");
- dissect_aim_tlv_value_extended_data(ti_extended_data, 0, subtvb, pinfo);
- break;
- }
+ {
+ tvbuff_t *subtvb = tvb_new_subset_remaining(tvb, offset);
+ proto_item *ti_extended_data = proto_tree_add_text(msg_tree, tvb, offset, -1, "Extended Data");
+ dissect_aim_tlv_value_extended_data(ti_extended_data, 0, subtvb, pinfo);
+ break;
+ }
}
}
if ((cd = g_iconv_open("UTF-8","iso-8859-8")) != (GIConv)-1)
{
- utf8_text = g_convert_with_iconv(tvb->real_data + offset, num_fields , cd , NULL , NULL , &l_conv_error);
+ utf8_text = g_convert_with_iconv(tvb_get_ptr(tvb, offset, num_fields), num_fields , cd , NULL , NULL , &l_conv_error);
if(!l_conv_error)
{
proto_tree_add_text(tree, tvb, offset, num_fields, "Encoded user data: %s", utf8_text);
/* Create PDV structure:
Since we can have multiple PDV per packet (offset) and
- multiple merged packets per PDV (tvb->raw_offset)
+ multiple merged packets per PDV (the tvb raw_offset)
we need both values to uniquely identify a PDV
*/
- *pdv = dcm_state_pdv_get(pctx, pinfo->fd->num, tvb->raw_offset+offset, TRUE);
+ *pdv = dcm_state_pdv_get(pctx, pinfo->fd->num, TVB_RAW_OFFSET(tvb)+offset, TRUE);
if (*pdv == NULL) {
return 0; /* Failed to allocate memory */
}
offset += pdv_body_len;
}
else {
+ guint next_tvb_length = tvb_length(next_tvb);
/* Decode reassembled data */
if (tree || have_tap_listener(dicom_eo_tap)) {
i.e Class & Instance UID, so the export dialog has all information and
that the dicome header is complete
*/
- offset += dissect_dcm_pdv_body(next_tvb, pinfo, tree, pdv, 0, next_tvb->length, pdv_description);
+ offset += dissect_dcm_pdv_body(next_tvb, pinfo, tree, pdv, 0, next_tvb_length, pdv_description);
}
if (have_tap_listener(dicom_eo_tap)) {
/* Copy pure DICOM data to buffer, no PDV flags */
- pdv->data = g_malloc(next_tvb->length); /* will be freed in dcm_export_create_object() */
- tvb_memcpy(next_tvb, pdv->data, 0, next_tvb->length);
- pdv->data_len = next_tvb->length;
+ pdv->data = g_malloc(next_tvb_length); /* will be freed in dcm_export_create_object() */
+ tvb_memcpy(next_tvb, pdv->data, 0, next_tvb_length);
+ pdv->data_len = next_tvb_length;
/* Copy to export buffer */
dcm_export_create_object(pinfo, assoc, pdv);
int i;
ti = proto_tree_add_item(etch_tree, hf_etch_struct, tvb, *offset,
- tvb->length - *offset, ENC_NA);
+ tvb_length(tvb) - *offset, ENC_NA);
new_tree = proto_item_add_subtree(ti, ett_etch_struct);
if (add_type_field) {
}else{
call_dissector(data_handle, tvb, actx->pinfo, tree);
offset = tvb_length_remaining(tvb,offset);
- }
+ }
guint8 length;
tvbuff_t *next_tvb;
proto_tree *subtree;
-
+
ProtocolId = 0xffffffff;
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
gsm_map_ExternalSignalInfo_sequence, hf_index, ett_gsm_map_ExternalSignalInfo);
-
+
if (!actx->value_ptr)
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_externalsignalinfo);
/* Branch on tag */
switch(octet){
case 4:
- /* Dissect the data part */
+ /* Dissect the data part */
de_bearer_cap(actx->value_ptr, subtree, actx->pinfo, 2, length, NULL, 0);
/* TODO: There may be more than one IE */
break;
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_remaining(actx->value_ptr, 3);
- call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
- }
+ call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
+ }
break;
case 3:
/* gsm-BSSMAP TODO Is it correct to stripp off two first octets here?*/
if (!parameter_tvb)
return offset;
- subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LongSignalInfo);
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LongSignalInfo);
switch (AccessNetworkProtocolId){
/* ts3G-48006 */
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_remaining(parameter_tvb, 3);
- call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
- }
+ call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
+ }
break;
/* ts3G-25413 */
case 2:
- call_dissector(ranap_handle, parameter_tvb, actx->pinfo, tree);
+ call_dissector(ranap_handle, parameter_tvb, actx->pinfo, tree);
break;
default:
break;
int
dissect_gsm_map_GlobalCellId(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 798 "../../asn1/gsm_map/gsm_map.cnf"
- tvbuff_t *parameter_tvb;
+ tvbuff_t *parameter_tvb;
proto_tree *subtree;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
¶meter_tvb);
-
- if (!parameter_tvb)
- return offset;
- subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_GlobalCellId);
+ if (!parameter_tvb)
+ return offset;
+
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_GlobalCellId);
be_cell_id_aux(parameter_tvb, subtree, actx->pinfo, 0, tvb_length_remaining(tvb,0), NULL, 0, 0);
dissect_gsm_map_LAIFixedLength(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 577 "../../asn1/gsm_map/gsm_map.cnf"
- tvbuff_t *parameter_tvb;
- proto_tree *subtree;
+ tvbuff_t *parameter_tvb;
+ proto_tree *subtree;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
¶meter_tvb);
-
- if (!parameter_tvb)
- return offset;
- subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LAIFixedLength);
- dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
+
+ if (!parameter_tvb)
+ return offset;
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_LAIFixedLength);
+ dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, TRUE);
octet = tvb_get_guint8(parameter_tvb,0);
proto_tree_add_uint(tree, hf_gsm_map_Ss_Status_unused, parameter_tvb, 0,1,octet);
- if ((octet & 0x01)== 1)
+ if ((octet & 0x01)== 1)
proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_q_bit, parameter_tvb, 0,1,octet);
-
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_p_bit, parameter_tvb, 0,1,octet);
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_r_bit, parameter_tvb, 0,1,octet);
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_a_bit, parameter_tvb, 0,1,octet);
+
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_p_bit, parameter_tvb, 0,1,octet);
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_r_bit, parameter_tvb, 0,1,octet);
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_a_bit, parameter_tvb, 0,1,octet);
octet = tvb_get_guint8(parameter_tvb,0);
proto_tree_add_uint(tree, hf_gsm_map_Ss_Status_unused, parameter_tvb, 0,1,octet);
- if ((octet & 0x01)== 1)
+ if ((octet & 0x01)== 1)
proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_q_bit, parameter_tvb, 0,1,octet);
-
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_p_bit, parameter_tvb, 0,1,octet);
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_r_bit, parameter_tvb, 0,1,octet);
- proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_a_bit, parameter_tvb, 0,1,octet);
+
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_p_bit, parameter_tvb, 0,1,octet);
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_r_bit, parameter_tvb, 0,1,octet);
+ proto_tree_add_boolean(tree, hf_gsm_map_Ss_Status_a_bit, parameter_tvb, 0,1,octet);
tvbuff_t *parameter_tvb;
int length;
guint8 out_len;
- /* XXX - The maximum item label length is 240. Does this really need to be 1024?
+ /* XXX - The maximum item label length is 240. Does this really need to be 1024?
* use ep_alloc ?
*/
static unsigned char msgbuf[1024];
gchar *utf8_text = NULL;
- GIConv cd;
+ GIConv cd;
GError *l_conv_error = NULL;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
case SMS_ENCODING_UCS2_LANG:
if ((cd = g_iconv_open("UTF-8","UCS-2BE")) != (GIConv) -1)
{
- utf8_text = g_convert_with_iconv(parameter_tvb->real_data, length, cd, NULL, NULL, &l_conv_error);
+ utf8_text = g_convert_with_iconv(tvb_get_ptr(parameter_tvb, 0, length), length, cd, NULL, NULL, &l_conv_error);
if(!l_conv_error)
proto_tree_add_text(tree, tvb, 0, length, "USSD String: %s", utf8_text);
else
proto_tree_add_text(tree, tvb, 0, length, "USSD String: g_convert_with_iconv FAILED");
g_free(utf8_text);
- g_iconv_close(cd);
+ g_iconv_close(cd);
}
else
proto_tree_add_text(tree, tvb, 0, length, "USSD String: g_iconv_open FAILED contact wireshark");
break;
default:
- break;
+ break;
}
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
¶meter_tvb);
-
- if (!parameter_tvb)
+
+ if (!parameter_tvb)
return offset;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
¶meter_tvb);
-
- if (!parameter_tvb)
+
+ if (!parameter_tvb)
return offset;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
static int
dissect_gsm_map_ms_RadioResourceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 589 "../../asn1/gsm_map/gsm_map.cnf"
- tvbuff_t *parameter_tvb;
+ tvbuff_t *parameter_tvb;
proto_tree *subtree;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
¶meter_tvb);
-
- if (!parameter_tvb)
- return offset;
- subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_RadioResourceInformation);
+ if (!parameter_tvb)
+ return offset;
+
+ subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_RadioResourceInformation);
be_chan_type(parameter_tvb, subtree, actx->pinfo, 0, tvb_length_remaining(tvb,0), NULL, 0);
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
¶meter_tvb);
-
- if (!parameter_tvb)
+
+ if (!parameter_tvb)
return offset;
asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, actx->pinfo);
int
dissect_gsm_map_lcs_Ext_GeographicalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 810 "../../asn1/gsm_map/gsm_map.cnf"
- tvbuff_t *parameter_tvb;
+ tvbuff_t *parameter_tvb;
proto_tree *subtree;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
¶meter_tvb);
-
- if (!parameter_tvb)
- return offset;
+
+ if (!parameter_tvb)
+ return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_GeographicalInformation);
- dissect_geographical_description(parameter_tvb, actx->pinfo, subtree);
+ dissect_geographical_description(parameter_tvb, actx->pinfo, subtree);
offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
&opcode);
-
+
col_append_str(actx->pinfo->cinfo, COL_INFO, gsm_map_opr_code(opcode));
col_append_fstr(actx->pinfo->cinfo, COL_INFO, " ");
ProtocolId = 0xffffffff;
offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
gsm_old_Bss_APDU_sequence, hf_index, ett_gsm_old_Bss_APDU);
-
+
if (!actx->value_ptr)
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_gsm_map_externalsignalinfo);
/* Branch on tag */
switch(octet){
case 4:
- /* Dissect the data part */
+ /* Dissect the data part */
de_bearer_cap(actx->value_ptr, subtree, actx->pinfo, 2, length, NULL, 0);
/* TODO: There may be more than one IE */
break;
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_remaining(actx->value_ptr, 3);
- call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
- }
+ call_dissector(dtap_handle, next_tvb, actx->pinfo, subtree);
+ }
break;
case 3:
/* gsm-BSSMAP -- Value 3 is reserved and must not be used*/
*/
out_len = 0;
- total_sms_len = sm_tvb->length;
+ total_sms_len = tvb_length(sm_tvb);
for(i = 0 ; i < g_frags; i++)
{
/* maximum len msg in 7 bit with csm8 header*/
{
if ((cd = g_iconv_open("UTF-8","UCS-2BE")) != (GIConv)-1)
{
+ guint8 rep_len = tvb_reported_length(sm_tvb);
+
if(!(reassembled && g_pinfo->fd->num == reassembled_in))
{
/* Show unreassembled SMS */
- utf8_text = g_convert_with_iconv(sm_tvb->real_data, sm_tvb->reported_length , cd , NULL , NULL , &l_conv_error);
+ utf8_text = g_convert_with_iconv(tvb_get_ptr(sm_tvb, 0, rep_len), rep_len , cd , NULL , NULL , &l_conv_error);
if(!l_conv_error) {
/* XXX - using proto_tree_add_string() doesn't work */
ucs2_item = proto_tree_add_string_format_value(subtree, hf_gsm_sms_text, tvb,
* so that the text doesn't get truncated when we add it to
* the tree.
*/
- utf8_text = g_convert_with_iconv(sm_tvb->real_data, sm_tvb->reported_length , cd , NULL , NULL , &l_conv_error);
+ utf8_text = g_convert_with_iconv(tvb_get_ptr(sm_tvb, 0, rep_len), rep_len , cd , NULL , NULL , &l_conv_error);
if(!l_conv_error)
{
len_sms = (int)strlen(utf8_text);
eo_info->hostname = conv_data->http_host;
eo_info->filename = conv_data->request_uri;
eo_info->content_type = headers.content_type;
- eo_info->payload_len = next_tvb->length;
- eo_info->payload_data = next_tvb->real_data;
+ eo_info->payload_len = tvb_length(next_tvb);
+ eo_info->payload_data = tvb_get_ptr(next_tvb, 0, eo_info->payload_len);
tap_queue_packet(http_eo_tap, pinfo, eo_info);
}
gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
guint16 payloadLength = 0; /* Payload Length should it exist */
guint8 nxtHdr = 0; /* Keyed off for header dissection order */
- guint16 packetLength = 0; /* Packet Length. We track this as tvb->length - offset. */
+ guint16 packetLength = 0; /* Packet Length. We track this as tvb_length - offset. */
/* It provides the parsing methods a known size */
/* that must be available for that header. */
struct e_in6_addr SRCgid; /* Structures to hold GIDs should we need them */
{
/* Calculation for Payload:
- * (tvb->length) Length of entire packet - (local_offset) Starting byte of Payload Data
+ * (tvb_length) Length of entire packet - (local_offset) Starting byte of Payload Data
* offset addition is more complex for the payload.
* We need the total length of the packet, - length of previous headers, + offset where payload started.
* We also need to reserve 6 bytes for the CRCs which are not actually part of the payload. */
col_clear(pinfo->cinfo, COL_INFO);
/* Too little data? */
- if (tvb->length < LSC_MIN_LEN)
+ if (tvb_length(tvb) < LSC_MIN_LEN)
{
col_set_str(pinfo->cinfo, COL_INFO, "[Too short]");
return;
val_to_str(op_code, op_code_vals, "Unknown op code (0x%x)"),
stream);
- if (tvb->length < expected_len)
+ if (tvb_length(tvb) < expected_len)
col_append_str(pinfo->cinfo, COL_INFO, " [Too short]");
- else if (tvb->length > expected_len)
+ else if (tvb_length(tvb) > expected_len)
col_append_str(pinfo->cinfo, COL_INFO, " [Too long]");
}
/* Register the protocol with Wireshark */
void
proto_register_lsc(void)
-{
+{
module_t *lsc_module;
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_lsc_version,
{ "Version", "lsc.version",
- FT_UINT8, BASE_DEC, NULL, 0,
+ FT_UINT8, BASE_DEC, NULL, 0,
"Version of the Pegasus LSC protocol", HFILL }
},
{ &hf_lsc_trans_id,
{ "Transaction ID", "lsc.trans_id",
- FT_UINT8, BASE_DEC, NULL, 0,
+ FT_UINT8, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_lsc_op_code,
{ "Op Code", "lsc.op_code",
- FT_UINT8, BASE_HEX, VALS(op_code_vals), 0,
+ FT_UINT8, BASE_HEX, VALS(op_code_vals), 0,
"Operation Code", HFILL }
},
{ &hf_lsc_status_code,
{ "Status Code", "lsc.status_code",
- FT_UINT8, BASE_HEX, VALS(status_code_vals), 0,
+ FT_UINT8, BASE_HEX, VALS(status_code_vals), 0,
NULL, HFILL }
},
{ &hf_lsc_stream_handle,
{ "Stream Handle", "lsc.stream_handle",
- FT_UINT32, BASE_DEC, NULL, 0,
+ FT_UINT32, BASE_DEC, NULL, 0,
"Stream identification handle", HFILL }
},
{ &hf_lsc_start_npt,
{ "Start NPT", "lsc.start_npt",
- FT_INT32, BASE_DEC, NULL, 0,
+ FT_INT32, BASE_DEC, NULL, 0,
"Start Time (milliseconds)", HFILL }
},
{ &hf_lsc_stop_npt,
{ "Stop NPT", "lsc.stop_npt",
- FT_INT32, BASE_DEC, NULL, 0,
+ FT_INT32, BASE_DEC, NULL, 0,
"Stop Time (milliseconds)", HFILL }
},
{ &hf_lsc_current_npt,
{ "Current NPT", "lsc.current_npt",
- FT_INT32, BASE_DEC, NULL, 0,
+ FT_INT32, BASE_DEC, NULL, 0,
"Current Time (milliseconds)", HFILL }
},
{ &hf_lsc_scale_num,
{ "Scale Numerator", "lsc.scale_num",
- FT_INT16, BASE_DEC, NULL, 0,
+ FT_INT16, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_lsc_scale_denom,
{ "Scale Denominator", "lsc.scale_denum",
- FT_UINT16, BASE_DEC, NULL, 0,
+ FT_UINT16, BASE_DEC, NULL, 0,
NULL, HFILL }
},
{ &hf_lsc_mode,
{ "Server Mode", "lsc.mode",
- FT_UINT8, BASE_HEX, VALS(mode_vals), 0,
+ FT_UINT8, BASE_HEX, VALS(mode_vals), 0,
"Current Server Mode", HFILL }
}
};
proto_register_field_array(proto_lsc, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- /* Register preferences module */
+ /* Register preferences module */
lsc_module = prefs_register_protocol(proto_lsc, proto_reg_handoff_lsc);
-
- /* Register preferences */
+
+ /* Register preferences */
prefs_register_uint_preference(lsc_module, "port",
"LSC Port",
"Set the TCP or UDP port for Pegasus LSC messages",
if (blob_length < MAX_BLOB_SIZE)
{
tvb_memcpy(tvb, result->contents, blob_offset, blob_length);
- if (blob_hf == hf_ntlmssp_auth_lmresponse && !(memcmp(tvb->real_data+blob_offset+8,"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0",NTLMSSP_KEY_LEN)))
+ if (blob_hf == hf_ntlmssp_auth_lmresponse && !(tvb_memeql(tvb, blob_offset+8, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", NTLMSSP_KEY_LEN)))
{
proto_tree_add_item (ntlmssp_tree,
hf_ntlmssp_ntlm_client_challenge,
{
col_set_str(pinfo->cinfo, COL_INFO, "SEBEK - ");
- if (tvb->length<6)
+ if (tvb_length(tvb)<6)
sebek_ver = 0;
else
sebek_ver = tvb_get_ntohs(tvb, 4);
sebek_tree = proto_item_add_subtree(ti, ett_sebek);
/* check for minimum length before deciding where to go*/
- if (tvb->length<6)
+ if (tvb_length(tvb)<6)
sebek_ver = 0;
else
sebek_ver = tvb_get_ntohs(tvb, 4);
if (fid_info->fsi->filename)
eo_info->filename = (gchar *) fid_info->fsi->filename;
if(!eo_info->filename) eo_info->filename = ep_strdup_printf("\\FILEID_%i",fid);
- eo_info->fid_type = fid_info->type; eo_info->end_of_file = fid_info->end_of_file;
- } else { eo_info->fid_type=SMB_FID_TYPE_UNKNOWN;
- eo_info->filename = ep_strdup_printf("\\FILEID_%i",fid); eo_info->end_of_file = 0;
- } eo_info->fid=fid;
- eo_info->tid=si->tid; eo_info->uid=si->uid;
- eo_info->payload_len = datalen; eo_info->payload_data = data_tvb->real_data;
- eo_info->smb_file_offset=rwi->offset; eo_info->smb_chunk_len=rwi->len;
+ eo_info->fid_type = fid_info->type;
+ eo_info->end_of_file = fid_info->end_of_file;
+ } else {
+ eo_info->fid_type=SMB_FID_TYPE_UNKNOWN;
+ eo_info->filename = ep_strdup_printf("\\FILEID_%i",fid);
+ eo_info->end_of_file = 0;
+ }
+ eo_info->fid=fid;
+ eo_info->tid=si->tid;
+ eo_info->uid=si->uid;
+ eo_info->payload_len = datalen;
+ eo_info->payload_data = tvb_get_ptr(data_tvb, 0, datalen);
+ eo_info->smb_file_offset=rwi->offset;
+ eo_info->smb_chunk_len=rwi->len;
eo_info->cmd=SMB_COM_READ_ANDX;
/* Queue data to the listener */
tap_queue_packet(smb_eo_tap, pinfo, eo_info);
}
- END_OF_SMB
+ END_OF_SMB
- if (cmd != 0xff) { /* there is an andX command */
+ if (cmd != 0xff) { /* there is an andX command */
if (andxoffset < offset)
THROW(ReportedBoundsError);
dissect_smb_command(tvb, pinfo, andxoffset, smb_tree, cmd, FALSE);
eo_info->tid=si->tid;
eo_info->uid=si->uid;
eo_info->payload_len = datalen;
- eo_info->payload_data = data_tvb->real_data;
+ eo_info->payload_data = tvb_get_ptr(data_tvb, 0, datalen);
eo_info->smb_file_offset=rwi->offset;
eo_info->smb_chunk_len=rwi->len;
eo_info->cmd=SMB_COM_WRITE_ANDX;
* Create display subtree for the protocol
*/
if (tree) {
- ti = proto_tree_add_item (tree, proto_smpp, tvb, 0, tvb->length, FALSE);
+ ti = proto_tree_add_item (tree, proto_smpp, tvb, 0, tvb_length(tvb), FALSE);
smpp_tree = proto_item_add_subtree (ti, ett_smpp);
}