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: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 02 Sep 2006 14:28:47 -0700

Andrew Schweitzer wrote:

Should I use field arrays? That seems like an awful lot of fields (100 * about 10) to add to the protocol's field list.

Does each of the 100 packet types have fields that appear in no other packet type? If so, then, yes, that's a lot of fields, but that's how we do it in other protocols.

Can you add a field list to a subtree?

What do you mean by "field array" and "field list"? Are we talking about each packet type having about 10 *different* fields, or 10 instances of the *same* field, e.g. a protocol with a request to get a list of IP addresses from the other machine and a reply containing the IP addresses wouldn't have "proto.reply.ip_addr_1", "proto.reply.ip_addr_2", "proto.reply.ip_addr_3", etc. fields, it'd just have several instances of "proto.reply.ip_addr".

I see that NBNS defines multiple protocols.

No, NBNS is one protocol, not multiple protocols.

The file named "packet-nbns.c" contains dissectors for multiple protocols, but that's for historical reasons, as the comment at the beginning of the file says; one could argue that there should be "packet-nbns.c" with the NBNS dissector, "packet-nbds.c" with the NBDS dissector, and "packet-nbss.c" with the NBSS dissector. Those are three different protocols, even though they're all defined by the same RFCs (1001 and 1002).

Should I define a different protocol for each message type?

No.  You said "*a* proprietary protocol", so it's just one protocol.

That also seems excessive.

Not only would it be excessive, it would be the wrong thing to do.

  • Follow-Ups:
    • Re: [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
      • From: Andrew Schweitzer
  • References:
    • [Wireshark-dev] newbie question about dissecting protocol with many message subtypes
      • From: Andrew Schweitzer
  • Prev by Date: [Wireshark-dev] [patch] new dissector for ETHERNET Powerlink v1
  • Next by Date: Re: [Wireshark-dev] FW: Listen_rtp plugin
  • Previous by thread: [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