Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

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

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


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.
  • Follow-Ups:
    • Re: [Wireshark-dev] query regarding gtp_handle funtion and decoderfunction.
      • From: prashanth joshi
  • References:
    • [Wireshark-dev] query regarding gtp_handle funtion and decoder function.
      • From: prashanth joshi
  • Prev by Date: [Wireshark-dev] Patch for bug 1092 - need review
  • Next by Date: Re: [Wireshark-dev] Patch for bug 1092 - need review
  • Previous by thread: [Wireshark-dev] query regarding gtp_handle funtion and decoder function.
  • Next by thread: Re: [Wireshark-dev] query regarding gtp_handle funtion and decoderfunction.
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation