Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Commits on Feb 17, 2015
  1. Copyright heartbeat

    authored
  2. Pin deps

    authored
Commits on Apr 6, 2013
  1. Convert integer macros to arity 1

    authored
    Manually convert the macros extracting integers from binaries to an
    arity-1 macro. Compiles and a quick review of the diff but probably some
    copy/paste errors lurking here.
  2. Copyright heartbeat

    authored
  3. Fix rebar URL

    authored
Commits on Sep 23, 2012
  1. Whitespace cleanup

    authored
Commits on Apr 14, 2012
  1. rfkill: list should return a rfkill_event record

    authored
    Match the doc and return the record rather than a tagged proplist.
Commits on Apr 13, 2012
Commits on Feb 18, 2012
  1. Whitespace

    authored
  2. Split rfkill record and constants into a header

    authored
    Correct the return value of rfkill:list/0 in the documentation.
  3. Cleanup README

    authored
Commits on Dec 5, 2011
Commits on Sep 23, 2011
  1. Remove macro

    authored
  2. Update README

    authored
  3. Fix proplist returned by wierl:format

    authored
    Broken by a previous change.
Commits on Sep 22, 2011
  1. Account for padding of structs

    authored
Commits on Sep 18, 2011
  1. rfkill: check for fd errors

    authored
Commits on Sep 4, 2011
  1. Return an error for bad/unsupported frames

    authored
    Return an error rather than throwing an exception.
Commits on Sep 3, 2011
  1. Fix FCS on frames without lengths

    authored
    Pull out the checksum from ambiguous frames before parsing them again.
Commits on Sep 2, 2011
  1. Allow the caller to set the initial FCS state

    authored
    If the caller knows the system supports FCS, the gen_server state can be
    set on startup. This avoids the case where the first few frames are
    frames without a length, and so will include the FCS in the frame body.
  2. Support unpacking of FCS in ambiguous frames

    authored
    Keep the driver support for FCS (i.e., whether the driver provides all
    packets (including corrupted packets) and the FCS) in the gen_server
    state.
    
    Return the checksum to the user as an integer. If the checksum is not
    available, return 0 (is 0 a possible checksum? should we return
    something else? An atom, -1, ...?).
    
    If the system supports checksums, the gen_server state is updated on
    every frame. This is probably inefficient.
    
    The inital state of the fcs field is false. This means it's possible to
    have 1 frame incorrectly parsed, e.g., if a frame without a length is
    received as the first packet.
Commits on Aug 15, 2011
  1. Return the frame checksum

    authored
    Modify the return value of wierl_frame:type/2 to include the frame
    checksum. If the checksum is not available, an empty binary is returned.
    
    The last element of some of the packets is a variable length field
    so there is no way of telling if the driver include an FCS. In these
    ambiguos cases, the wierl_frame:type/2 returns the atom 'false'. It is
    up to the caller to pull out the checksum.
    
    At the moment, the FCS is discarded:
    
    * wierl_monitor: the FCS should be checked and, based upon an option, if
      the check fails, the frame should be discarded
    
    * wierl_monitor: the FCS driver "status" (whether the driver provides
      the FCS) should be kept in the gen_server state. If the FCS status of
      the frame is ambigous, the gen_server will take the status of the last
      frame.
    
    * wierl_monitor: provide an option to override FCS mode
Commits on Aug 14, 2011
  1. Update comments

    authored
    Setting the mode will never go into an infinite loop now, it will be
    killed by the init timeout.
Commits on Aug 13, 2011
  1. Correct return value of wierl_scan:list

    authored
    wierl_scan:list was returning {atom(), [binary()|...]}, when it should
    have been returning {atom(), binary()}.
  2. Improve binary match

    authored
Commits on Aug 12, 2011
  1. Move DLT check to init

    authored
    On multi-core systems, getting the datalink would hang in active mode.
    The socket had likely been already passed to open_port and beam was
    consuming all the events (meaning the read in datalinktype would always
    return {error,eagain}).
    
    Fix the hang by moving the datalink check to the synchronous init.
    Simplify the datalink code by using the start_link timeout option.
    
    Rename the header record to dlt.
Commits on Aug 11, 2011
  1. Update examples and TODO

    authored
  2. Error out if the interface does not come up

    authored
    Wait for 2 seconds for the interface to become ready. On my netbook,
    getting the datalink type will sometimes loop forever. When I ran tcpdump
    on the interface there weren't any frames received. The interface seems
    to be stuck.
    
    Bringing the interface up and down, etc, didn't help but rebooting did.
    
    Had something to do with the Ubuntu network manager running at the same
    time the interface was being toggled into monitor mode. Usually this
    works ok but it's better to shut down the network manager first:
    
    service network-manager stop
  3. Temp fix: ignore 4 trailing bytes of frame

    authored
    Some drivers append 4 extra bytes to the frame. Possibly this is the FCS
    (which is 4 bytes). Check later if all the frames have 4 extra bytes,
    but for now, ignore the trailing bytes in the management frame.
Commits on Aug 9, 2011
  1. Add support for datalink types

    authored
    Convert wierl_monitor to a gen_server to support DLTs beside the radiotap
    format. PRISM headers are still used by some drivers.
    
    Carry the header type in a gen_server, since on Linux the DLT is put in
    the hatype field of the struct sockaddr_ll for each packet (for BSDs,
    the DLT is retrieved using an ioctl on the fd (BIOCGDLT). We'll need to
    support this as well when we port to Mac OS X). This simplifies cleanup
    of fd's on exit as well.
    
    Remove close/2,3. Terminating the gen_server only closes the socket,
    the mode is not changed. Add mode/1 to change the interface operating
    mode. mode/1 is slightly broken, since it needs to lookup up the
    interface name in the gen_server state, which will already have been
    terminated.
  2. Remove debugs

    authored
Something went wrong with that request. Please try again.