ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] query regarding gtp_handle funtion and decoderfunction.

From: "Anders Broman \(AL/EAB\)" <anders.broman@xxxxxxxxxxxx>
Date: Tue, 5 Sep 2006 15:35:30 +0200
Hi,
Are you adding decoding of:
#define GTP_EXT_OMC_ID  0x8F   /* 3G 143 TLV OMC Identity 7.7.42 */
 
If so what you need to do is to add code in
Line 4487
static int
decode_gtp_omc_id(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) {
 
 guint16  length;
 
 length = tvb_get_ntohs(tvb, offset + 1);
 
 proto_tree_add_text(tree, tvb, offset, 3+length, "%s length : %u", val_to_str(GTP_EXT_OMC_ID, gtp_val, "Unknown"), length);
 
 return 3 + length;
 
}
 
To do the actual decoding.
Best regards
Anders


From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of prashanth joshi
Sent: den 5 september 2006 12:06
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] query regarding gtp_handle funtion and decoderfunction.

Hi all,
I'm adding a decoder for the gtp protocol. My query is :
1 ) So gtp_handle will do the dissection. It refers to the file packet_gtp.c .
Finds the hex value for example in the following statement :
#define      GTP_EXT_XXX      0x8f
 and then if its value in the header matches 0x8f, refers to the (val, decode_fun)  pair and then calls decode_fun to handle the decoding.
Now my question is : will the pointer tvb ( which is tvb_buff * tvb) be incremented automatically when it enters the function decode_fun ? Or we have to explicitly increment the pointer tvb in the decoder functin to account for the byte containing 0x8f value in the tvb?
 
 
My other questions are :
2) I'm trying to locate the file containing the definition for the function gtp_handle. But I'm not able to find it. Kindly can one please tell me where its definition is?
 
3) Before actually starting the decoding in our decode function what is the code that we have to write and what that is for?
 
regards,
Prashanth


Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.