Permalink
Switch branches/tags
Nothing to show
Commits on Nov 23, 2017
  1. Switch eunit -> common test

    msantos committed Nov 23, 2017
    TBD: send test is failing
Commits on Nov 22, 2017
  1. Allow {verbose,0}

    msantos committed Nov 22, 2017
Commits on Nov 21, 2017
  1. demacrofy: remove IS_LTZERO() macro

    msantos committed Nov 21, 2017
    Return from epcap_priv_drop() on error.
Commits on Nov 20, 2017
  1. epcap_return: return on failure

    msantos committed Nov 20, 2017
    If opening the pcap descriptor fails, return and allow the main flow
    control to exit.
    
    Save the pcap error message to the epcap state. Currently the error
    message is discarded. The plan is to send it to the port process.
Commits on Nov 19, 2017
  1. demacrofy: return errno

    msantos committed Nov 19, 2017
    Begin removing macros. Error messages written to stderr are not
    structured and difficult to capture by the caller of the function.
    
    Exit with ENOMEM on allocation failures. A future change could return an
    error tuple to the caller: {error, enomem}.
Commits on Nov 14, 2017
Commits on Nov 13, 2017
Commits on Jul 15, 2017
Commits on Oct 19, 2016
  1. Add dialyzer warnings

    msantos committed Oct 19, 2016
Commits on Sep 26, 2016
Commits on Sep 1, 2016
  1. rebar3: update gitignore

    msantos committed Sep 1, 2016
Commits on Jul 31, 2016
  1. test: use EPCAP_TEST_EXEC for privs

    msantos committed Jul 31, 2016
    For example, on OpenBSD:
    
        EPCAP_TEST_EXEC="doas" rebar3 eunit
Commits on Jul 23, 2016
Commits on Jul 22, 2016
  1. Build epcap with fortify

    msantos committed Jul 22, 2016
Commits on Jul 21, 2016
  1. rebar3.config.script: remove duplicate flags

    msantos committed Jul 21, 2016
    Avoid appending redundant compiler flags.
    
    Use a port to spawn cc to retrieve the exit status. Store the test code
    for the pcap_create test in /tmp by default (set the TMPDIR environment
    variable to change this).
Commits on Jul 20, 2016
  1. Switch to rebar3

    msantos committed Jul 20, 2016
    Use rebar3 and a makefile to generate the port binary. The makefile
    introduces some changes for the compiler flags which may need cleaning up.
    
    Linker and compiler flags are passed to the makefile using environment
    variables.
    
    Some things left to do:
    
    * remove duplication of flags generated by rebar.config.script
    
    * add gcc hardening flags to makefile
    
    * move to common test
Commits on Aug 14, 2015
  1. Add spec for epcap:timeout/0

    ates committed Aug 14, 2015
Commits on Aug 12, 2015
Commits on Jun 9, 2015
  1. Merge pull request #20 from yannayl/patch-1

    msantos committed Jun 9, 2015
    Update deps config to explicitly use branch master
  2. Update deps config to explicitly use branch master

    yannayl committed Jun 9, 2015
    Update the dep configuration of pkt to explicitly use the master *branch*.
    This is the de-facto convention (as implemented in rebar3 as well).
    See: rebar/rebar#507
Commits on Apr 21, 2015
  1. Merge pull request #19 from yannayl/fix_gitignore

    msantos committed Apr 21, 2015
    Fix gitignore of generated files
  2. Fix gitignore of generated files

    yannayl committed Apr 21, 2015
    Ignoring *.d files generated by driver compiler.
Commits on Feb 22, 2015
  1. solaris: update compiler options

    msantos committed Feb 22, 2015
    Compile using POSIX 200112L/C99 on Solaris to pull in a modern struct
    iovec definition.  __EXTENSIONS__ is required for types like u_char
    which ared used by pcap.
Commits on Jan 11, 2015
  1. Add type specs

    msantos committed Jan 11, 2015
Commits on Jan 10, 2015
  1. Add start_link/0,1

    msantos committed Jan 10, 2015
    start/0,1 is now an unlinked start. Update the docs, tests and examples
    to use start_link/0,1.
Commits on Jan 9, 2015
  1. Clean up gitignore

    msantos committed Jan 9, 2015
Commits on Jan 5, 2015
  1. Set the default filter to match any packet

    msantos committed Jan 5, 2015
    Imitiate tcpdump and match any packet by default.
Commits on Jan 4, 2015
  1. makefile: add dialyzer target

    msantos committed Jan 4, 2015
Commits on Jan 3, 2015
  1. Fix duplicate command line options

    msantos committed Jan 3, 2015
    Specifying the chroot and timeout options would result in duplicate
    options being passed to the epcap executable.
Commits on Jan 2, 2015
  1. Update README

    msantos committed Jan 2, 2015
  2. Bump version; copyright heartbeat

    msantos committed Jan 2, 2015
    Remove the CONTRIBUTORS section since it is always out of sync and
    github makes it easy to see the contributors.
  3. tests: make the tests work on Solaris

    msantos committed Jan 2, 2015
    More fun for Solaris: if promiscuous mode is not enabled, outgoing
    packets will not be captured. This apparently applies to versions of
    Solaris using the DLPI interface. Versions of Solaris post-11 apparently
    use the BPF interface just like everyone else.
    
    It also explains why (after spending more time than I'd like to admit
    debugging this even though I vaguely remember having to set promiscuous
    mode when testing on Solaris years ago) after resorting to building the
    latest libpcap on SmartOS, epcap error'ed out in pcap_activate() when attempting
    to do a BIOCGDLTLIST because, although looking like a Solaris 11 system
    and claiming to be one, SmartOS actually uses DLPI and not BPF for packet
    capture.
  4. Suppress compile warning on Solaris

    msantos committed Jan 2, 2015
    And this is why we can't have nice things, Solaris. Solaris still uses
    caddr_t (which is an alias for char*) for iov_base. Apparently this
    has been changed to void* in Solaris 11 but on the Solaris variant I am
    testing on (SmartOS, whose uname humourously reports itself as 5.11),
    the default for iov_base is caddr_t unless you ask for XPG4_2 which
    will include a whole world of pain when you just wanted to suppress a
    compiler warning without the evils of casting ...
    
    So the alternatives seem to be ifdef'ing the code where iov_base is set
    just for Solaris, adding a EPCAP_IOV_BASE macro where a cast to caddr_t
    is done just for Solaris or punishing everybody by muddying the code
    with a cast to void with all the oddities and potentials for undefined
    behaviour that entails but, hey, less typing!