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

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%


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
permanent link

answered 13 Apr '12, 08:44

bstn's gravatar image

bstn
3751415
accept rate: 14%

edited 13 Apr '12, 08:45

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×1,620
×637
×431

question asked: 13 Apr '12, 02:34

question was seen: 5,475 times

last updated: 13 Apr '12, 08:45

p​o​w​e​r​e​d by O​S​Q​A