Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Feb 14, 2015
  1. Remove procket_msg module

    authored
Commits on Oct 11, 2013
  1. listen: increase the default backlog to 128

    authored
    Increase the default listenq to 128 (the standard max for most systems).
    Values exceeding the system limit are truncated to the system max. The
    behaviour of 0 and negative numbers is system dependent.
    
    UNP says about the backlog:
    
        Historically, sample code always shows a backlog of 5, as that was the
        maximum value supported by 4.2BSD. This was adequate in the 1980s when
        busy servers would handle only a few hundred connections per day. But with
        the growth of the World Wide Web (WWW), where busy servers handle millions
        of connections per day, this small number is completely inadequate. Busy
        HTTP servers must specify a much larger backlog, and newer kernels must
        support larger values.
Commits on May 28, 2013
Commits on May 3, 2013
  1. Whitespace cleanup

    authored
Commits on Jun 21, 2012
  1. @yamt

    make bpf work on NetBSD

    yamt authored
Commits on Mar 11, 2012
Commits on May 13, 2011
Commits on May 9, 2011
  1. Portability pixie dust for ioctl macros

    authored
    First attempt at supporting the ioctl request macros on bsd and linux.
    The result seems to work but doesn't seem to be quite right yet.
    
    On BSD systems, the top 3 bits indicate the direction of the request:
    
    8 : ioctl parameter will be copied from user space into the kernel
    4 : ioctl parameter will be copied into the user supplied buffer from
        the kernel
    2 : no parameters are used
    
    The remaining 13 bits are used to indicate the size of the parameter.
    
    On Linux systems, only the top 2 bits are used. Setting both bits to 0
    indicates a void parameter. The meaning of the bits is reversed:
    
    8 : ioctl parameter will be copied into the user supplied buffer from
        the kernel
    4 : ioctl parameter will be copied from user space into the kernel
    
    The remaining 14 bits is used to hold the length of the parameter.
  2. Support tuntap interfaces

    authored
Commits on Apr 23, 2011
  1. Remove support for decoding datalink types

    authored
    Move the support to pkt.
Commits on Apr 20, 2011
  1. bpf: include header length in padding calculation

    authored
    The bpf man page states when calculating the start of the next packet,
    use:
    
        p = (char *)p + BPF_WORDALIGN(p->bh_hdrlen + p->bh_caplen)
    
    Add a BPF_WORDALIGN macro for compat use.
Commits on Apr 19, 2011
  1. Support filtering using BPF byte code

    authored
    Add support for loading filters into the BPF device.
    
    Filters are set by calling:
    
        bpf:ctl(Socket, setf, Filter).
    
    Where filter is a list of binaries. For example, the rules to filter
    IP addresses used in the bpf man page would look like:
    
    -define(ETHERTYPE_IP, 16#0800).
    ip() ->
        [
            ?BPF_STMT(?BPF_LD+?BPF_H+?BPF_ABS, 12),
            ?BPF_JUMP(?BPF_JMP+?BPF_JEQ+?BPF_K, ?ETHERTYPE_IP, 0, 8),
            ?BPF_STMT(?BPF_LD+?BPF_W+?BPF_ABS, 26),
            ?BPF_JUMP(?BPF_JMP+?BPF_JEQ+?BPF_K, 16#8003700f, 0, 2),
            ?BPF_STMT(?BPF_LD+?BPF_W+?BPF_ABS, 30),
            ?BPF_JUMP(?BPF_JMP+?BPF_JEQ+?BPF_K, 16#80037023, 3, 4),
            ?BPF_JUMP(?BPF_JMP+?BPF_JEQ+?BPF_K, 16#80037023, 0, 3),
            ?BPF_STMT(?BPF_LD+?BPF_W+?BPF_ABS, 30),
            ?BPF_JUMP(?BPF_JMP+?BPF_JEQ+?BPF_K, 16#8003700f, 0, 1),
            ?BPF_STMT(?BPF_RET+?BPF_K, ?SIZEOF_U_INT-1),
            ?BPF_STMT(?BPF_RET+?BPF_K, 0)
        ].
    
    The ?BPF_STMT and ?BPF_JUMP macros are a just convenience when
    re-using existing examples. They simply call bpf:stmt/2 and bpf:jump/4.
Commits on Apr 1, 2011
  1. Awkward conditional macro definitions

    authored
    Hackishly prevent a conflict with pkt which defines the sames macros.
Commits on Dec 21, 2010
  1. Add header file

    authored
    Temporary header file: header files should be moved into a separate lib,
    along with the epcap_net header/lib.
Something went wrong with that request. Please try again.