Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Apr 06, 2013

  1. Michael Santos

    Convert integer macros to arity 1

    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.
    authored
  2. Michael Santos

    Copyright heartbeat

    authored
  3. Michael Santos

    Fix rebar URL

    authored

Sep 23, 2012

  1. Michael Santos

    Whitespace cleanup

    authored

Apr 14, 2012

  1. Michael Santos

    rfkill: list should return a rfkill_event record

    Match the doc and return the record rather than a tagged proplist.
    authored

Apr 13, 2012

  1. Michael Santos

    Remove unnecessary success clause from try

    authored

Feb 18, 2012

  1. Michael Santos

    Whitespace

    authored
  2. Michael Santos

    Split rfkill record and constants into a header

    Correct the return value of rfkill:list/0 in the documentation.
    authored
  3. Michael Santos

    Cleanup README

    authored

Dec 05, 2011

  1. Michael Santos

    Use the wordalign function exported from procket

    authored

Sep 23, 2011

  1. Michael Santos

    Remove macro

    authored
  2. Michael Santos

    Update README

    authored
  3. Michael Santos

    Fix proplist returned by wierl:format

    Broken by a previous change.
    authored

Sep 22, 2011

  1. Michael Santos

    Add padding after 4 byte event header on 64-bit

    authored
  2. Michael Santos

    Account for padding of structs

    authored

Sep 18, 2011

  1. Michael Santos

    rfkill: check for fd errors

    authored

Sep 04, 2011

  1. Michael Santos

    Return an error for bad/unsupported frames

    Return an error rather than throwing an exception.
    authored

Sep 03, 2011

  1. Michael Santos

    Fix FCS on frames without lengths

    Pull out the checksum from ambiguous frames before parsing them again.
    authored

Sep 02, 2011

  1. Michael Santos

    Allow the caller to set the initial FCS state

    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.
    authored
  2. Michael Santos

    Support unpacking of FCS in ambiguous frames

    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.
    authored

Aug 15, 2011

  1. Michael Santos

    Return the frame checksum

    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
    authored

Aug 14, 2011

  1. Michael Santos

    Update comments

    Setting the mode will never go into an infinite loop now, it will be
    killed by the init timeout.
    authored

Aug 13, 2011

  1. Michael Santos

    Correct return value of wierl_scan:list

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

    Improve binary match

    authored

Aug 12, 2011

  1. Michael Santos

    Move DLT check to init

    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.
    authored

Aug 11, 2011

  1. Michael Santos

    Use an error tuple instead of throwing an exception

    authored
  2. Michael Santos

    Update examples and TODO

    authored
  3. Michael Santos

    Error out if the interface does not come up

    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
    authored
  4. Michael Santos

    Temp fix: ignore 4 trailing bytes of frame

    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.
    authored
  5. Michael Santos

    Add support for {active,true} mode

    authored

Aug 09, 2011

  1. Michael Santos

    Add support for PRISM header format

    authored
  2. Michael Santos

    Add support for datalink types

    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.
    authored
  3. Michael Santos

    Remove debugs

    authored

Aug 08, 2011

  1. Michael Santos

    frame_type -> type; frame_control -> control

    authored

Aug 07, 2011

  1. Michael Santos

    Support mode change on some devices

    Some drivers apparently need the device to be up before doing a mode
    change.
    authored
Something went wrong with that request. Please try again.