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] Get 3 bytes

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


From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 12 Mar 2007 17:00:35 -0700


On Mar 12, 2007, at 4:32 PM, Steven Le wrote:

guint32 is 32 bits --> so type mismatch???

No, no type mismatch. I know of no C implementations on modern machines that support a 24-bit integral data type, so there's no "guint24" type. A 24-bit value fits in 32 bits, so guint32 works fine for the routines to get 24-bit values.

However, as Stephen Fisher noted, unless you actually need to look at the value, just use proto_tree_add_item().

  • Follow-Ups:
    • Re: [Wireshark-dev] Get 3 bytes
      • From: Steven Le
  • References:
    • [Wireshark-dev] Get 3 bytes
      • From: Steven Le
  • Prev by Date: Re: [Wireshark-dev] proto_add_tree_item versus proto_add_tree_string
  • Next by Date: Re: [Wireshark-dev] what is the best entry point / file in debugging Wiresharp src in VC++?
  • Previous by thread: Re: [Wireshark-dev] Get 3 bytes
  • Next by thread: Re: [Wireshark-dev] Get 3 bytes
  • Index(es):
    • Date
    • Thread

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