Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Feb 5, 2015
  1. Fix compile failures caused by changes in pkt

    Removing the PF_INET6 macro from pkt broke building tracert.
    Conditionally include a macro that figures out the value of PF_INET6 at
    runtime. A side effect of this change is that tracrt should now work on
    platforms other than Linux.
    The function to determine the value of PF_INET6 (tracert:family/1) should
    be centralized in procket in the future. procket has a similar function
    but it is not exported.
    Pin the dependencies to tags on procket and pkt as suggested by
    @divolgin in:
    Reported by @tnt-dev in:
    Thanks divolgin/tnt-dev!
  2. Suppress informational messages from gen_server

    At some point, the erlang open_port mechanism for passing in file
    descriptors seems to have changed. When the fd is closed, an exit
    message is generated.
    It also seems that a port is opened for each fd:
        erlang:open_port({fd,1,1}, [binary,stream])
    One of the ports exits immediately.
    Modify the info callback to ignore exit messages.
Commits on Feb 14, 2014
  1. makefile: add dialyzer target

Commits on Dec 2, 2013
Commits on May 22, 2013
Commits on May 21, 2013
  1. ping: simplify cleanup

  2. icmp6: reverse RFC3542 on linux

    Linux reverses the filter macros in RFC3542. OpenBSD, FreeBSD and Solaris
    follow the RFC.
    Add option to retrieve the filter setting on the socket.
  3. icmp6: enforce ICMPv6 filters

    Allow setting ICMPv6 filters on a socket.
    Filters appear to be working but broken: using icmp6_filter_setpassall/0
    blocks all the packets and setting icmp6_filter_setblockall/0 allows
    all packets.
Commits on May 19, 2013
  1. ptun: remove guard

  2. ptun: macro cleanup

  3. ptun: fix ping tunnel client/server

    The ptun example has been broken since ping/3 was changed to flush all
    the remaining ICMP messages in the mailbox. This resulted in some of the
    packets being lost.
Commits on May 18, 2013
  1. Open ICMP socket in passive mode by default

    To prevent mailbox flooding, open the socket in passive mode. ping/3
    will automatically put the socket into active mode when it runs, so no
    change to code calling ping/1,2,3 is required.
Commits on May 17, 2013
  1. Consistenly use milliseconds

    Return the elapsed time in milliseconds, to be consistent with timeout
    option and with ping(8).
  2. Merge branch 'dev'

  3. Retrieve the TTL for IPv6 sockets

    Display the IPV6_UNICAST_HOPS setting for the socket. This is not the
    TTL contained in the packet; it is the max ttl for the socket.
  4. Fix ICMP6 error messages

  5. Add option to set the socket TTL

    Works for IPv4. For IPv6, the IPV6_UNICAST_HOPS is properly set, but the
    ICMP6 time exceeded is dropped by gen_icmp (timeout error is returned
  6. Include TTL from IP header

    For IPv4 packets, include the TTL from the IP header. For IPv6 packets,
    the inet driver does not return the header so the atom 'undefined' is
    returned instead.
  7. ping/1,2,3: convert ICMP details into a tuple

    Use a constant arity-3 tuple for the ping attributes (id, sequence
    number and elapsed time). In the case of an ICMP error, not enough of
    the packet header may be returned to calculate the time, so the atom
    'undefined' is returned.
  8. Merge branch 'flatten-tuple' into tuple

  9. tracert: simplify socket privileges

    Attempt to open the raw socket before calling the procket setuid helper.
    Fix IPv6 UDP traceroute. Bind the socket by default.
  10. Simplify socket privileges

    Attempt to open the ICMP socket before falling back to the procket
    setuid helper. Remove the setuid option.
Commits on May 16, 2013
  1. Update copyright; use semver

Commits on Apr 6, 2013
  1. Update rebar URL

Commits on Oct 31, 2012
  1. Flatten tuple returned by ping/1,2,3

    The tuple returned by ping/1,2,3 was frankly bizarre.
Commits on Oct 27, 2012
  1. Fix accidental variable match

Commits on Oct 18, 2012
  1. Clarify the units for the elapsed time

    Thanks again, MononcQc!
  2. Correct documented reply for ping/1,2,3

    The last element of the reply should be a 2-tuple, not a 4-tuple. Thanks
Commits on Jul 29, 2012
  1. Return posix error from init/1

    Instead of crashing, return errno from init. Since open is a wrapper
    around start_link, the calling process will crash too.
Something went wrong with that request. Please try again.