Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user-space ping example #336

Merged
merged 3 commits into from
Nov 5, 2017
Merged

Commits on Aug 8, 2017

  1. Add a simple ICMPv4 ping example

    This uses the socket stack to implement a subset of the standard
    `ping` command.
    
    Signed-off-by: David Scott <dave@recoil.org>
    djs55 committed Aug 8, 2017
    Configuration menu
    Copy the full SHA
    8370bb8 View commit details
    Browse the repository at this point in the history
  2. icmpv4_socket: listen should block forever

    Previously the listen function would exit after receiving one packet;
    while the stack-direct loop would run until a low-level network error.
    
    This patch makes the icmpv4_socket listen function block forever
    and process packets in background threads with `Lwt.async`.
    
    Signed-off-by: David Scott <dave@recoil.org>
    djs55 committed Aug 8, 2017
    Configuration menu
    Copy the full SHA
    e7fe08c View commit details
    Browse the repository at this point in the history
  3. icmpv4_socket: correct the IPv4 total_length field

    On some OSes (particularly macOS) the IP header returned to userspace
    has a bogus total length (e.g. 16384). This probably reflects an internal
    kernel buffer size rather than the on-the-wire size of the original
    packet.
    
    This patch corrects the IPv4 header total length so that the IPv4 parser
    can parse the result. Previously it would return an Error.
    
    Signed-off-by: David Scott <dave@recoil.org>
    djs55 committed Aug 8, 2017
    Configuration menu
    Copy the full SHA
    e08cf5e View commit details
    Browse the repository at this point in the history