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] How to get Destination IP in plugin

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


From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 3 Jan 2008 17:49:11 -0800


On Jan 3, 2008, at 4:08 PM, Diaconou, Alex wrote:

What about extracting the column info?

That's not a supported feature; the data in the address columns is generated from pinfo->{dl_src,net_src,src} and pinfo->{dl_dst,net_dst, dst}.

Can I get the IP address as a
string from the SOURCe or DESTINATION column of the packet(s) in
question?

No, but you can get the address as a binary value from pinfo- >{src,dst} and then convert it to a string using ip_to_str() or ip_to_str_buf() for IPv4 addresses and ip6_to_str() or ip6_to_str_buf() for IPv6 addresses (or address_to_str() or address_to_str_buf() if you have an address structure and want to handle all possible address types). The expectation is that the address-as-a-string would be used only for stuff to be shown directly to users, and that a dissector would do all the other work with binary addresses.

  • Follow-Ups:
    • Re: [Wireshark-dev] How to get Destination IP in plugin
      • From: Diaconou, Alex
  • References:
    • [Wireshark-dev] How to get Destination IP in plugin
      • From: Diaconou, Alex
    • Re: [Wireshark-dev] How to get Destination IP in plugin
      • From: Guy Harris
    • Re: [Wireshark-dev] How to get Destination IP in plugin
      • From: Diaconou, Alex
  • Prev by Date: Re: [Wireshark-dev] How to get Destination IP in plugin
  • Next by Date: Re: [Wireshark-dev] Compilation error in asn.1 file
  • Previous by thread: Re: [Wireshark-dev] How to get Destination IP in plugin
  • Next by thread: Re: [Wireshark-dev] How to get Destination IP in plugin
  • Index(es):
    • Date
    • Thread

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