Skip to content

Commit

Permalink
Display the IP address in a human friendly format
Browse files Browse the repository at this point in the history
  • Loading branch information
msantos committed Mar 13, 2012
1 parent 25944d9 commit 680b129
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sniff.erl
Expand Up @@ -99,12 +99,12 @@ handle_info({packet, DLT, Time, Len, Packet}, sniffing, _) ->


% Source % Source
{source_macaddr, string:join(ether_addr(Ether#ether.shost), ":")}, {source_macaddr, string:join(ether_addr(Ether#ether.shost), ":")},
{source_address, Saddr}, {source_address, inet_parse:ntoa(Saddr)},
{source_port, port(sport, Hdr)}, {source_port, port(sport, Hdr)},


% Destination % Destination
{destination_macaddr, string:join(ether_addr(Ether#ether.dhost), ":")}, {destination_macaddr, string:join(ether_addr(Ether#ether.dhost), ":")},
{destination_address, Daddr}, {destination_address, inet_parse:ntoa(Daddr)},
{destination_port, port(dport, Hdr)}, {destination_port, port(dport, Hdr)},


{protocol, pkt:proto(Proto)}, {protocol, pkt:proto(Proto)},
Expand Down

0 comments on commit 680b129

Please sign in to comment.