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] newbie question about dissecting protocol with many message subtypes

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


From: Andrew Schweitzer <a.schweitzer.grps@xxxxxxxxx>
Date: Sat, 02 Sep 2006 19:19:09 -0400

Guy Harris wrote:
The common practice, however, is to define one array, even with protocols that have one data structure per message. There is no practical difference between calling proto_register_field_array() once and calling it multiple times, other than the latter being slightly less efficient; the structure of the protocol doesn't dictate the way you register fields.


Ok, I think I got it, thanks. So I guess the hf[] array is just a flat repository for information about how to display fields in the gui? I suppose we use comments and field names (e.g. "field.subfield.subsubfield") to clarify what we are adding?

so hf[] might look like this:
hf[] = {
//Header fields
.... - actual declarations -
//Msg type X fields
.... - actual declarations -
//Msg type X+1 fields
... - actual declarations -

etc...?



If the first 3-5 fields are common to multiple message types, you'd only register each of those fields once, and use it in all of those message types.

Got it.


  • Follow-Ups:
    • Re: [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
      • From: Guy Harris
  • References:
    • [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
      • From: Andrew Schweitzer
    • Re: [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
      • From: Guy Harris
    • Re: [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
      • From: Andrew Schweitzer
    • Re: [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
      • From: Guy Harris
  • Prev by Date: Re: [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
  • Next by Date: Re: [Wireshark-dev] new dissector for ETHERNET Powerlink v1
  • Previous by thread: Re: [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
  • Next by thread: Re: [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
  • Index(es):
    • Date
    • Thread

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