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

Give a name to an ip in lua wireshark



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).


asked 13 Apr '12, 02:34

Zvika's gravatar image

accept rate: 0%

One Answer:


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: wifi_router wifi_clientA wifi_clientB

answered 13 Apr '12, 08:44

bstn's gravatar image

accept rate: 14%

edited 13 Apr '12, 08:45