Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 8, 2015
  1. icmp: add types to records

    authored
    Also fix extraction of "unused" field from ICMP packet.
Commits on Mar 19, 2015
  1. @shun159
Commits on Mar 18, 2015
  1. @shun159

    Fixed system_capability, port_desc, system_name and

    shun159 authored
    system_desc fields to more human readable.
Commits on Mar 17, 2015
  1. @shun159

    Add LLDP codec

    shun159 authored
Commits on Jun 13, 2014
  1. @josemic

    Merge pull request #19 from josemic/ipv4_and_ipv6_checksum_verification

    josemic authored
    Ipv4 and ipv6 checksum verification
Commits on May 17, 2014
  1. @ates
Commits on Apr 23, 2014
  1. @maxlapshin

    IGMPv3 type 0x22 support

    maxlapshin authored
Commits on Apr 22, 2014
  1. @ates

    Add 802.1Q codec

    ates authored
Commits on Apr 15, 2014
  1. @josemic

    Added UDP ipv6 checksum, checksum calculation and verification functi…

    josemic authored
    …ons and test cases.
    
    Updated version number.
Commits on Apr 7, 2014
  1. @josemic
Commits on Feb 12, 2014
Commits on Feb 10, 2014
  1. @ates

    Return not SCTP chunks as binary

    ates authored
Commits on Dec 20, 2013
  1. @ates
Commits on Nov 16, 2013
  1. @josemic

    Ommitted variable 'F'

    josemic authored committed
  2. @josemic
Commits on Nov 13, 2013
  1. @ates

    Add VRRP codec

    ates authored
Commits on Nov 12, 2013
  1. @ates
Commits on Oct 29, 2013
Commits on Oct 27, 2013
Commits on Oct 26, 2013
Commits on Oct 25, 2013
  1. test: add test for gre

    authored
  2. decode: represent a packet as a tuple

    authored
    The value returned by decapsulate/1,2 is a list of records with a
    trailing binary. Clean up the representation of a packet by using:
    
        {Headers, Payload}
    
    Where Headers consists of a list of Erlang records for each protocol
    header and payload is a binary.
    
    The protocol codecs also return a tuple:
    
        {Header, Payload}
    
    Where Header is an Erlang record. This means the possible
    representations of a packet are:
    
        {#ether{}, binary()}
        {[#ether{}], binary()} % identical
        {[], binary()} % a payload without a protocol header
Commits on Oct 24, 2013
Commits on Oct 23, 2013
  1. decapsulate/decode: re-work packet decapsulation

    authored
    Add decapsulate/2 and decode/1,2.
    
    The arity-2 functions allow the caller to specify the protocol type. For
    example:
    
        pkt:decode(icmp6, Bin)
    
    Will decode the data as an ICMP6 packet (the default is ethernet).
    
    decapsulate/1,2 is used when the caller is only concerned with the
    "happy" case. It will crash if the packet is invalid. The caller can
    catch the crash.
    
    If the caller does not want to crash and wants the contents of what has
    been so far decoded, they can use decode/1,2:
    
        case pkt:decode(en10mb, Bin) of
            {ok, [#ether{}, #ipv4{saddr = Saddr}, #tcp{sport = Sport}, Payload]} ->
                {{Saddr, Sport}, Payload};
            {error, [#ether{}, #ipv4{saddr = Saddr}], {tcp, Payload}} ->
                % if the TCP header was invalid
                {error, {Saddr, Payload}}
        end.
    
    decode/1,2 is likely slower than decapsulate/1,2.
Commits on Oct 22, 2013
  1. tests: add more protocol tests

    authored
Commits on Oct 21, 2013
  1. tests: normalize the naming

    authored
  2. test: add test for arp

    authored
  3. Rename pkt_tcp:tcp_options/1 to options/1

    authored
    Also remove pkt:tcp_options/1 for now. Modify the test to call
    pkt_tcp:options/1 directly.
  4. tests: match tests with modules

    authored
    Add a basic test for decapsulation.
  5. @ates
  6. makesum: calculate the length of the payload

    authored
    Rather than using the size of the actual payload, use the the size of
    the payload as calculated from the IPv4 and TCP headers.
Something went wrong with that request. Please try again.