[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Obtain ip address in lua script
- From: Awadhesh Kumar <awadhesh.usa@...>
- Date: Mon, 12 Oct 2009 11:05:14 +0530
I have written LUA scripts which dissect proprietary packets from network. I had written the lua scripts as
-- declare our protocol
InDirectnip_proto = Proto("INIPD","NIP","NIP Messages")
-- create a function to dissect it
pinfo.cols.protocol = "INIPD"
-- load the udp.port table
udp_table = DissectorTable.get("udp.port")
-- register caicd direct mip protocol to handle udp port 50019
I need help to get the following
a) How can I get the source ip address of packets in this script file
I tried to get the ip address as
but i got the error "A Field extractor must be defined before Taps
or Dissectors get called" in wireshark. Please help me how to define
extarctor before dissectors gets called.
b) is there any way to register multiple udp port in single lua file?
Thanks in Advance