gchar *tag_value = NULL;
gboolean dummy = FALSE;
- guint32 startpos = 0;
guint32 endpos = 0;
- startpos = offset;
endpos = offset + pdv_body_len;
if (pdv->syntax == DCM_UNK) {
static void
dissect_dec_bpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- guint8 protocol_version;
guint8 bpdu_type;
guint8 flags;
proto_tree *bpdu_tree;
FALSE);
bpdu_tree = proto_item_add_subtree(ti, ett_dec_bpdu);
- protocol_version = tvb_get_guint8(tvb, BPDU_VERSION);
-
proto_tree_add_item(bpdu_tree, hf_dec_bpdu_proto_id, tvb,
BPDU_DEC_CODE, 1, FALSE);
static gint dissect_session_desc(proto_tree *tree, tvbuff_t *tvb, gint offset)
{
- gint data_len;
guint32 flags;
proto_item *flags_item = NULL;
proto_tree *flags_tree = NULL;
- data_len = tvb_get_letohl(tvb, offset);
flags = tvb_get_letohl(tvb, offset+4);
proto_tree_add_item(tree, hf_dplay_sess_desc_length, tvb, offset, 4, TRUE); offset += 4;
guint16 message_type;
guint16 second_message_type = G_MAXUINT16;
guint16 proto_version;
- guint16 packet_size;
guint32 dplay_id;
guint8 play_id[] = {'p','l','a','y'};
- packet_size = tvb_get_letohs(tvb, 0);
dplay_id = tvb_get_letohl(tvb, 20);
message_type = tvb_get_letohs(tvb, 24);
proto_version = tvb_get_letohs(tvb, 26);
guint8 next_byte;
proto_tree *ti;
proto_tree *dtls_record_tree;
- guint32 available_bytes;
SslAssociation* association;
SslDataInfo *appl_data;
ti = NULL;
dtls_record_tree = NULL;
- available_bytes = tvb_length_remaining(tvb, offset);
/*
* Get the record layer fields of interest
dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 eap_code;
- guint8 eap_id;
guint16 eap_len;
guint8 eap_type;
gint len;
if (eap_code == EAP_FAILURE)
conversation_state->leap_state = -1;
- eap_id = tvb_get_guint8(tvb, 1);
-
eap_len = tvb_get_ntohs(tvb, 2);
len = eap_len;
{
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
- int clen, slen;
+ int clen;
proto_tree *rnid_tree;
if (tree) {
clen = tvb_get_guint8 (tvb, offset+5);
proto_tree_add_text (rnid_tree, tvb, offset+5, 1,
"Common Identification Data Length: %u", clen);
- slen = tvb_get_guint8 (tvb, offset+7);
proto_tree_add_item (rnid_tree, hf_fcels_spidlen, tvb, offset+7,
1, FALSE);
if (clen) {
dissect_fcp_cmnd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, proto_tree *tree, conversation_t *conversation, fc_hdr *fchdr, fcp_conv_data_t *fcp_conv_data)
{
int offset = 0;
- int len,
- add_len = 0;
+ int add_len = 0;
guint8 flags, rwflags, lun0;
guint16 lun=0xffff;
tvbuff_t *cdb_tvb;
if (flags) {
add_len = tvb_get_guint8 (tvb, offset+11) & 0x7C;
add_len = add_len >> 2;
-
- len = FCP_DEF_CMND_LEN + add_len;
- }
- else {
- len = FCP_DEF_CMND_LEN;
}
hidden_item = proto_tree_add_uint(tree, hf_fcp_type, tvb, offset, 0, 0);
/* Set up structures needed to add the protocol subtree and manage it */
int offset = 0;
proto_tree *dev_tree;
- int addrfmt, evtype;
int numrec, i;
proto_item *subti;
if (!isreq)
return;
- evtype = tvb_get_guint8 (tvb, offset+4);
- addrfmt = evtype & 0x0F;
- evtype = evtype >> 4;
-
proto_tree_add_item (rscn_tree, hf_swils_rscn_evtype, tvb, offset+4,
1, 0);
proto_tree_add_item (rscn_tree, hf_swils_rscn_addrfmt, tvb, offset+4,
char *value;
char *tag_str;
fix_parameter *tag;
- int check_sum = 0;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FIX");
for (j = 0; j < field_offset; j++, data++) {
sum += *data;
}
- check_sum = 1;
sum_ok = (atoi(value) == sum);
if (sum_ok) {
item = proto_tree_add_string_format_value(fix_tree, fix_fields[i].hf_id, tvb, field_offset, tag->field_len,
de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
- guint curr_len;
const gchar *str;
guchar pdp_type_org, pdp_type_num;
- curr_len = len;
curr_offset = offset;
proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset << 3), 4, ENC_BIG_ENDIAN);
offset2 = offset;
if (type == 1 && len == 40) {
/* Group State TLV */
- guint8 version,opcode, state = 0, ipver;
+ guint8 opcode, state = 0, ipver;
guint32 hellotime, holdtime;
proto_tree *group_state_tlv;
}
offset+=2;
- version = tvb_get_guint8(tvb, offset);
opcode = tvb_get_guint8(tvb, offset+1);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
gint max_length;
guint8 *key;
gboolean last_field = FALSE;
- gboolean dissected = FALSE;
tvbuff_t *next_tvb;
struct imf_field *f_info;
next_tvb = tvb_new_subset_remaining(tvb, end_offset);
- dissected = dissector_try_string(media_type_dissector_table, content_type_str, next_tvb, pinfo, tree);
+ dissector_try_string(media_type_dissector_table, content_type_str, next_tvb, pinfo, tree);
pinfo->private_data = pd_save;
} else {
static void
rs00(tvbuff_t *tvb, proto_tree *tree)
{
- guint8 v;
-
- v = tvb_get_guint8(tvb, 0);
proto_tree_add_item(tree, hf_ipmi_picmg_00_version, tvb, 0, 1, TRUE);
proto_tree_add_item(tree, hf_ipmi_picmg_00_max_fruid, tvb, 1, 1, TRUE);
proto_tree_add_item(tree, hf_ipmi_picmg_00_ipmc_fruid, tvb, 2, 1, TRUE);
static const int *ops[] = { &hf_ipmi_stor_20_op_overflow, &hf_ipmi_stor_20_op_update,
&hf_ipmi_stor_20_op_delete, &hf_ipmi_stor_20_op_partial_add, &hf_ipmi_stor_20_op_reserve,
&hf_ipmi_stor_20_op_allocinfo, NULL };
- guint8 v;
- v = tvb_get_guint8(tvb, 0);
proto_tree_add_item(tree, hf_ipmi_stor_20_sdr_version, tvb, 0, 1, TRUE);
proto_tree_add_item(tree, hf_ipmi_stor_20_rec_count, tvb, 1, 2, TRUE);
proto_tree_add_item(tree, hf_ipmi_stor_20_free_space, tvb, 3, 2, TRUE);
{
static const int *ops[] = { &hf_ipmi_stor_40_op_overflow, &hf_ipmi_stor_40_op_delete,
&hf_ipmi_stor_40_op_partial_add, &hf_ipmi_stor_40_op_reserve, &hf_ipmi_stor_40_op_allocinfo, NULL };
- guint8 v;
- v = tvb_get_guint8(tvb, 0);
proto_tree_add_item(tree, hf_ipmi_stor_40_sel_version, tvb, 0, 1, TRUE);
proto_tree_add_item(tree, hf_ipmi_stor_40_entries, tvb, 1, 2, TRUE);
proto_tree_add_item(tree, hf_ipmi_stor_40_free_space, tvb, 3, 2, TRUE);
gint padding;
proto_tree *opt_tree;
proto_item *ti;
- guint8 tmp[2];
const gchar *ctype;
p = offset;
- tmp[0] = tvb_get_guint8(tvb, p++);
- tmp[1] = tvb_get_guint8(tvb, p++);
- p += 2;
+ p += 4;
len = tvb_get_ntohs(tvb, offset+2);
padding = 7 - ((len + 3) % 8);
{
#ifdef HAVE_LIBGCRYPT
ikev2_decrypt_data_t *key_info = NULL;
- gint iv_len, encr_data_len, icd_len, encr_key_len, decr_data_len, md_len;
+ gint iv_len, encr_data_len, icd_len, decr_data_len, md_len;
guint8 pad_len;
guchar *iv = NULL, *encr_data = NULL, *decr_data = NULL, *entire_message = NULL, *md = NULL;
gcry_cipher_hd_t cipher_hd;
if (pinfo->private_data) {
key_info = (ikev2_decrypt_data_t*)(pinfo->private_data);
- encr_key_len = key_info->encr_spec->key_len;
iv_len = key_info->encr_spec->iv_len;
icd_len = key_info->auth_spec->trunc_len;
encr_data_len = length - iv_len - icd_len;
dissect_isup_application_transport_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, proto_tree *parameter_tree, proto_item *parameter_item)
{
- guint8 application_transport_instruction_ind;
guint8 si_and_apm_seg_ind;
guint8 apm_Segmentation_local_ref = 0;
guint16 aci16;
/* Octet 2 */
proto_tree_add_text(parameter_tree, parameter_tvb, offset, -1, "Application transport instruction indicators: ");
- application_transport_instruction_ind = tvb_get_guint8(parameter_tvb, offset);
proto_tree_add_item( parameter_tree, hf_isup_extension_ind, parameter_tvb, offset, 1, FALSE );
proto_tree_add_item( parameter_tree, hf_isup_app_Send_notification_ind, parameter_tvb, offset, 1, FALSE );
proto_tree_add_item( parameter_tree, hf_isup_app_Release_call_ind, parameter_tvb, offset, 1, FALSE );
gboolean bit;
guint8 i, ones = 0, data[MAX_LAPD_PACKET_LEN];
int data_len = 0;
- guint offset = 0, last_packet_end_offset = 0, available;
+ guint offset = 0, available;
guint8 *buff;
tvbuff_t *new_tvb;
tvb_set_free_cb(new_tvb, g_free);
add_new_data_source(pinfo, new_tvb, "Decoded LAPD bitstream");
dissect_lapd(new_tvb, pinfo, tree);
- last_packet_end_offset = offset -1;
data_len = 0;
state = FLAGS;
bit_offset++;
dissect_mmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
/* Set up structures needed to add the protocol subtrees and manage them */
- proto_item *ti, *msg_ti, *attr_list_ti, *vect_attr_ti, *first_value_ti;
+ proto_item *ti, *msg_ti, *attr_list_ti, *vect_attr_ti;
proto_tree *mmrp_tree, *msg_tree, *attr_list_tree, *vect_attr_tree;
/* Make entries in Protocol column and Info column on summary display */
if (attribute_type == MMRP_ATTRIBUTE_TYPE_MAC) {
/* MMRP FirstValue is a Mac Adress*/
- first_value_ti = proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
- MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
- attribute_length, ENC_NA);
+ proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
+ MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
+ attribute_length, ENC_NA);
/* Decode three packed events. */
offset = dissect_mmrp_three_packed_event(vect_attr_tree, tvb,
MMRP_MAC_THREE_PACKED_OFFSET + msg_offset + vect_offset,
}
else if (attribute_type == MMRP_ATTRIBUTE_TYPE_SERVICE) {
/* MMRP Service Requierment*/
- first_value_ti = proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
- MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
- attribute_length, ENC_NA);
+ proto_tree_add_item(vect_attr_tree, hf_mmrp_first_value, tvb,
+ MMRP_FIRST_VALUE_GROUP_OFFSET + msg_offset + vect_offset,
+ attribute_length, ENC_NA);
offset = dissect_mmrp_three_packed_event(vect_attr_tree, tvb,
MMRP_MAC_THREE_PACKED_OFFSET + msg_offset + vect_offset,
number_of_values);
column_info *cinfo;
proto_tree *nbns_tree = NULL;
proto_item *ti;
- guint16 id, flags, opcode, rcode, quest, ans, auth, add;
+ guint16 id, flags, opcode, quest, ans, auth, add;
int cur_off;
nbns_data_offset = offset;
id = tvb_get_ntohs(tvb, offset + NBNS_ID);
flags = tvb_get_ntohs(tvb, offset + NBNS_FLAGS);
opcode = (guint16) ((flags & F_OPCODE) >> OPCODE_SHIFT);
- rcode = (guint16) (flags & F_RCODE);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s",
guint16 msg_type;
guint32 msg_length;
guint32 avp_length;
- guint32 session_id;
guint32 seq_num;
conversation_t *conversation;
pana_conv_info_t *pana_info;
msg_length = tvb_get_ntohs(tvb, 2);
flags = tvb_get_ntohs(tvb, 4);
msg_type = tvb_get_ntohs(tvb, 6);
- session_id = tvb_get_ntohl(tvb, 8);
seq_num = tvb_get_ntohl(tvb, 12);
avp_length = msg_length - 16;
guint16 AS_number;
guint8 reserved;
guint8 attribute;
- guint16 op_AS_nu_high_oct;
int l;
l = (l_and_or_type& Mask_L)>>7;
if(obj_class == PCEP_XRO_OBJ){
reserved = tvb_get_guint8(tvb, offset+2);
attribute = tvb_get_guint8(tvb, offset+3);
- op_AS_nu_high_oct = tvb_get_ntohs(tvb, offset+4);
AS_number = tvb_get_ntohs(tvb, offset+6);
ti = proto_tree_add_item(pcep_subobj_tree, pcep_filter[PCEPF_SUBOBJ_AUTONOMOUS_SYS_NUM], tvb, offset, length, FALSE);
{
int i;
int start;
- int length;
-
/* clear the args from the last string */
for (i=0 ; i<cmd_argc ; i++)
start++;
}
- length = 0;
-
if (*text == '\n') {
/* a newline seperates commands in the buffer */
text++;
if (tree) {
int channel;
- guint8 maxpower;
flags = tvb_get_letohl(tvb, offset);
freq = tvb_get_letohs(tvb, offset + 4);
channel = tvb_get_guint8(tvb, offset + 6);
- maxpower = tvb_get_guint8(tvb, offset + 7);
proto_tree_add_uint(radiotap_tree,
hf_radiotap_xchannel,
tvb, offset + 6, 1,
fp_info *fpinf;
rlc_info *rlcinf;
guint32 orig_num;
- guint8 seq, ext;
+ guint8 seq;
guint8 next_byte, offs = 0;
gint16 pos, num_li = 0;
gboolean is_truncated, li_is_on_2_bytes;
next_byte = tvb_get_guint8(tvb, offs++);
seq = next_byte >> 1;
- ext = next_byte & 0x01;
/* show sequence number and extension bit */
if (tree) {
static void dissect_norm_info(struct _norm *norm, proto_tree *tree,
tvbuff_t *tvb, guint offset, packet_info *pinfo _U_)
{
- guint8 flags;
proto_item *ti;
proto_tree *flag_tree;
offset = dissect_grrtetc(tree, tvb, offset);
ti = proto_tree_add_item(tree, hf.flags, tvb, offset, 1, FALSE);
- flags = tvb_get_guint8(tvb, offset);
flag_tree = proto_item_add_subtree(ti, ett.flags);
proto_tree_add_item(flag_tree, hf.flag.repair, tvb, offset, 1, FALSE);
proto_tree_add_item(flag_tree, hf.flag.explicit, tvb, offset, 1, FALSE);
dissect_sccpmg_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *sccpmg_tree)
{
guint8 message_type;
- guint8 offset = 0;
/* Extract the message type; all other processing is based on this */
message_type = tvb_get_guint8(tvb, SCCPMG_MESSAGE_TYPE_OFFSET);
- offset = SCCPMG_MESSAGE_TYPE_LENGTH;
if (check_col(pinfo->cinfo, COL_INFO))
col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str(message_type, sccpmg_message_type_acro_values, "Unknown"));
proto_item *fmtp_item, *media_format_item;
proto_tree *fmtp_tree;
gint offset, next_offset, tokenlen, n, colon_offset;
- gint start_offset;
/*??guint8 *field_name;*/
guint8 *payload_type;
guint8 *attribute_value;
tokenlen = next_offset - offset;
- start_offset = offset;
proto_tree_add_item(sdp_media_attribute_tree, hf_media_encoding_name, tvb,
offset, tokenlen, FALSE);
proto_tree *sebek_tree;
proto_item *ti;
int offset = 0;
- int datalen = 0;
nstime_t ts;
int sebek_ver = 0;
int sebek_type = 0;
proto_tree_add_item(sebek_tree, hf_sebek_cmd, tvb, offset, 12, FALSE);
offset += 12;
- datalen = tvb_get_letohl(tvb, offset);
proto_tree_add_item(sebek_tree, hf_sebek_len, tvb, offset, 4, FALSE);
offset += 4;
proto_tree_add_item(sebek_tree, hf_sebek_cmd, tvb, offset, 12, FALSE);
offset += 12;
- datalen = tvb_get_ntohl(tvb, offset);
proto_tree_add_item(sebek_tree, hf_sebek_len, tvb, offset, 4, FALSE);
offset += 4;
next_tvb = tvb_new_subset(tvb, start, length, -1);
handle = dissector_get_string_handle(media_type_dissector_table, "text/xml");
if (handle != NULL) {
- gboolean dissected;
- dissected = call_dissector(handle, next_tvb, pinfo, subtree);
+ call_dissector(handle, next_tvb, pinfo, subtree);
}
}
proto_item* sub_item = NULL;
proto_tree* sub_tree = NULL;
gint32 res;
- gint32 state;
if (tree) {
sub_item = proto_tree_add_item(tree, hf_stat_stat_res, tvb,
offset = dissect_rpc_uint32(tvb,sub_tree,hf_stat_stat_res_res,offset);
if (res==STAT_SUCC) {
- state = tvb_get_ntohl(tvb, offset);
offset = dissect_rpc_uint32(tvb,sub_tree,hf_stat_stat_res_state,offset);
} else {
offset += 4;
proto_item *temp_item;
gint offset = 0;
- guint16 framesize, idcode;
+ guint16 framesize;
/* SYNC and flags */
temp_item = proto_tree_add_item(tree, hf_sync, tvb, offset, 2, FALSE);
/* IDCODE */
proto_tree_add_item(tree, hf_idcode, tvb, offset, 2, FALSE);
- idcode = tvb_get_ntohs(tvb, offset); offset += 2;
+ offset += 2;
/* SOC */
{
proto_tree *tn3270_tree;
proto_item *ti;
gint offset = 0;
- gint tn3270_cmd = 0;
conversation_t *conversation;
tn3270_conv_info_t *tn3270_info = NULL;
offset += dissect_tn3270e_header(tn3270_tree, tvb, offset);
}
while (tvb_offset_exists(tvb, offset)) {
- tn3270_cmd = tvb_get_guint8(tvb, offset);
if (pinfo->srcport == tn3270_info->outbound_port) {
col_set_str(pinfo->cinfo, COL_INFO, "TN3270 Data from Mainframe");
offset += dissect_outbound_stream(tn3270_tree, tvb, offset);
dissect_start_of_header(proto_tree *tn5250_tree, tvbuff_t *tvb, gint offset)
{
int start = offset;
- int length = 0;
/*TODO: Warn on invalid length. <= 7 */
static const int *byte[] = {
{ 0, 0, 0, 0 }
};
- length = tvb_get_guint8(tvb, offset);
offset += tn5250_add_hf_items(tn5250_tree, tvb, offset,
start_of_header_fields);
proto_item *urr_ie_item;
proto_tree *urr_ie_tree;
char *string;
- guint16 GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port, communication_port;
+ guint16 GPRS_user_data_transport_UDP_port,UNC_tcp_port,RTP_UDP_port,RTCP_UDP_port;
guint32 udr;
conversation_t *conversation;
address dst_addr, null_addr;
break;
case 25:
/* 11.2.25 Communication Port Identity */
- communication_port = tvb_get_ntohs(tvb,ie_offset);
proto_tree_add_item(urr_ie_tree, hf_uma_urr_communication_port, tvb, ie_offset, 2, FALSE);
break;
gboolean little_endian)
{
int offset = 0, *offsetp = &offset, left;
- unsigned char errorcode, error;
+ unsigned char errorcode;
proto_item *ti;
proto_tree *t;
ti = proto_tree_add_item(tree, proto_x11, tvb, 0, -1, FALSE);
t = proto_item_add_subtree(ti, ett_x11);
- error = tvb_get_guint8(tvb, offset);
CARD8(error);
errorcode = tvb_get_guint8(tvb, offset);