Permalink
Browse files

Display the IP address in a human friendly format

  • Loading branch information...
1 parent 25944d9 commit 680b1291a56845beec173ffa6b7d79941461e145 @msantos committed Mar 13, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/sniff.erl
View
@@ -99,12 +99,12 @@ handle_info({packet, DLT, Time, Len, Packet}, sniffing, _) ->
% Source
{source_macaddr, string:join(ether_addr(Ether#ether.shost), ":")},
- {source_address, Saddr},
+ {source_address, inet_parse:ntoa(Saddr)},
{source_port, port(sport, Hdr)},
% Destination
{destination_macaddr, string:join(ether_addr(Ether#ether.dhost), ":")},
- {destination_address, Daddr},
+ {destination_address, inet_parse:ntoa(Daddr)},
{destination_port, port(dport, Hdr)},
{protocol, pkt:proto(Proto)},

0 comments on commit 680b129

Please sign in to comment.