This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Give a name to an ip in lua wireshark

0

Hi,

how can i give a name to an ip address of a tcp packet in lua?

(I want to see in wireshark a name instead of the ip address).

Thanks.

asked 13 Apr '12, 02:34

Zvika's gravatar image

Zvika
6224
accept rate: 0%


One Answer:

0

Name resolution and Lua are independent of each other; and Wireshark Lua has no built-in API to control name resolution, but you can do it with the following instructions (untested).

  1. Make sure name resolution is enabled in preferences: Preferences > Name Resolution > Enable network name resolution

  2. Creates a hosts file at:

    • %APPDATA%\\Wireshark\\hosts (Windows)
    • ~/.wireshark/hosts (*nix)
  3. For each custom name, add an entry to the hosts file on a new line in the form of:

    {ipaddress} {name}

Ex: This hosts file has 3 custom name resolutions:

192.168.1.1 wifi_router
192.168.1.2 wifi_clientA
192.168.1.3 wifi_clientB

answered 13 Apr '12, 08:44

bstn's gravatar image

bstn
3751415
accept rate: 14%

edited 13 Apr '12, 08:45