Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Display the IP address in a human friendly format

  • Loading branch information...
commit 680b1291a56845beec173ffa6b7d79941461e145 1 parent 25944d9
@msantos authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/sniff.erl
View
4 src/sniff.erl
@@ -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)},
Please sign in to comment.
Something went wrong with that request. Please try again.