wireshark-How to convert the ip into hostname using tshark

I used the below command to get the list of IP address of various entity,but i am not able to convert (identify) the hostname.

 tshark -r test_call_1.pcap -T fields -e ip.src -e tcp.srcport -e ip.dst -e tcp.dstport  tcp

sample output

192.30.16.95    21      192.30.160.2    43118
192.30.16.95    21      192.30.160.2    43118
192.30.16.95    21      192.30.160.2    43118
192.30.160.2    45791   192.30.16.95    45431

Can any one guide me on how to resolve these ip's to hostnames?

Thanks in Advance

M.Muralidharan

Answers


To get tshark to print hostnames you need to enable hostname resolution by specifying the '-N n' option and selecting the hostname fields instead of the ip address by using e.g '-e ip.src_host'.

For example:

tshark -r test_call_1.pcap -N n -T fields -e ip.src_host -e tcp.srcport -e ip.dst_host -e tcp.dstport tcp

Need Your Help

Styling of charts externally

javascript charts

Is it possible to translate(detach) bar colors stated in js file to separate css stylesheet. How to assign classes to this values?

Remove Specific Type of Children from Grid Control

wpf wpf-controls

I want to remove a suppose control whose type is of border, from the grid control. how can I achieve it in WPF C# ?