Wireshark mailing list archives
Re: Obtain ip address in lua script
From: Stig Bjørlykke <stig () bjorlykke org>
Date: Mon, 12 Oct 2009 11:11:49 +0200
On Mon, Oct 12, 2009 at 10:59 AM, Awadhesh Kumar <awadhesh.usa () gmail com> wrote:
a) How can I get the source ip address of packets in this script file
Define the extractor outside the function InDirectnip_proto.dissector, like this: ip_addr_f = Field.new("ip.src") Inside the dissector function you fetch the value using this extractor, something like this: if (ip_addr_f()) then print(tostring(ip_addr_f())) end
b) is there any way to register multiple udp port in single lua file?
Sure, just add more udp_table:add() -- Stig Bjørlykke ___________________________________________________________________________ Sent via: Wireshark-users mailing list <wireshark-users () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-users Unsubscribe: https://wireshark.org/mailman/options/wireshark-users mailto:wireshark-users-request () wireshark org?subject=unsubscribe
Current thread:
- Obtain ip address in lua script Awadhesh Kumar (Oct 12)
- Re: Obtain ip address in lua script Stig Bjørlykke (Oct 12)