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: "Diaconou, Alex" <alex.diaconou@xxxxxxxx>
Date: Fri, 04 Jan 2008 12:32:56 -0700

Guy,

Thanks a lot for the help, I got it working how I needed!

Alex

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of Guy Harris
Sent: Thursday, January 03, 2008 5:49 PM
To: Developer support list for Wireshark
Subject: Re: [Wireshark-dev] How to get Destination IP in plugin


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.
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev

  • 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
    • Re: [Wireshark-dev] How to get Destination IP in plugin
      • From: Guy Harris
  • Prev by Date: Re: [Wireshark-dev] U3 and PortableApps installers
  • Next by Date: [Wireshark-dev] Timing information in Wireshark follow tcp stream
  • Previous by thread: Re: [Wireshark-dev] How to get Destination IP in plugin
  • Next by thread: [Wireshark-dev] wireshark 0.99.7 crash on MacOS X 10.5 (Leopard)
  • Index(es):
    • Date
    • Thread

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