add support for UDP packets
Merge pull request #2 from adferguson/udp_support

add support for UDP packets
fix packet marshalling
- tested with IGMPv3 packets
oops. add missing UDP length field
UDP length contains header length
Recognize DEI field on VLAN-tagged packets

Closes #8
set IP packet len during marshalling
merge
Merge pull request #4 from adferguson/marshalling_fix

fix packet marshalling

Tests on quickcheck branch passing with this branch.
quickcheck: test framework setup and initial implementation

This commit sets up the initial testing framework for ocaml-packet, and
also includes round-trip testing for uninterpreted ethernet packets.
quickcheck: roundtrip property for ARP packets

Note that the packets aren't exactly well-formed ARP packets. For
example, the destination MAC address is not the broadcast address.
However, this still properly tests serialization/deserialization.
quickcheck: roundtrip property for IP packets

This testing revealed two bugs:

  * The ident field was not being properly marshalled, and in fact were
    never used. In its place, the code wrote the tos byte
  * The code flipped the order of the flags and fragment offset bits
    marshalling
quickcheck: do not error when IPv4 options present

This, I have been informed, will break "real-world applications." These
words are unfamiliar to me, but I trust the source. And now the source
trusts the source.
quickcheck: refactor arbitrary payload generation
quickcheck: roundtrip property for UDP packets
quickcheck: fix UDP test name, rm debug printf
quickcheck: roundtrip testing for TCP packets

This testing revealed one bug:

  * The NS flag is in a different byte than the rest of the flags. In
    particular it's in the same byte as the data offset. If it was ever
    set in an incoming packet, that flag would be dropped by the shift
    of the offset byte.
quickcheck: fix arbitrary_uint4 definition

The previous definition of arbitrary_unit4 was really arbitrary_uint3.
Correct the definition by introducing arbitrary_uint32_bits, which takes
the number of bits to randomly assign in the Int32.

The VLAN arbitrary instance does require three random bits, and for that
the code now uses arbitrary_uint32_bits directly.
Added test instructions to README.md
Merge pull request #12 from frenetic-lang/quickcheck

QuickCheck testing