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] Dissect a packet base header bits

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


From: Stephen Fisher <stephentfisher@xxxxxxxxx>
Date: Tue, 6 Mar 2007 23:59:24 -0800

On Tue, Mar 06, 2007 at 11:46:33PM -0800, Steven Le wrote:

> Thanks. How can I register hf_foo_data?

Take a look at the sample dissector code in doc/README.developer between 
the "Cut here" lines and section 1.6.

> I want to print out binary data.

Use FT_BYTES in the registration above.

> On the other hand, the length of data is altered each time the message 
> is sent . tvb_get_length will get the length of current offset to end 
> of payload, wont it?

I think he meant tvb_length() instead of tvb_get_length().  

The function tvb_length(tvb) returns the size of the entire tvb.  
tvb_length_remaining(tvb, offset) will return the length remaining 
starting at the offset.


Steve

  • Follow-Ups:
    • Re: [Wireshark-dev] Dissect a packet base header bits
      • From: Steven Le
  • References:
    • Re: [Wireshark-dev] Dissect a packet base header bits
      • From: Steven Le
    • Re: [Wireshark-dev] Dissect a packet base header bits
      • From: Jaap Keuter
    • Re: [Wireshark-dev] Dissect a packet base header bits
      • From: Steven Le
  • Prev by Date: Re: [Wireshark-dev] Dissect a packet base header bits
  • Next by Date: Re: [Wireshark-dev] [Patch] Add "Copy as Filter" menu item
  • Previous by thread: Re: [Wireshark-dev] Dissect a packet base header bits
  • Next by thread: Re: [Wireshark-dev] Dissect a packet base header bits
  • Index(es):
    • Date
    • Thread

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