Commit Graph

13 Commits

Author SHA1 Message Date
hecke d8b24c7138 Tazmen sniffer protocol layer (#1004)
* add TaZmen Sniffer Protocol (TZSP) layer #1000

* add tests for TZSP layer #1000

* cleanups from PR reviews #1000

* fix ranges used in state tags #1000

* add some corner case tests #1000

* add support for unknown tag type #1000

use type TZSPTagUnknown if tag type is not known.

+ related tests

* fixing a nasty grammar bug #1000

* add YesNoByteField #1000

+ tests

* use YesNoByteField instead of generated dicts for conditional tags #1000

* use orb instead of unpack for accessing payload bytes #1000
2018-02-23 12:56:46 +01:00
Guillaume Valadon df68a68497 Do not use '_' in unit tests 2018-01-30 13:23:30 +01:00
Pierre LALET 984fdcf30a Python 2 / 3: fix StrField and subclasses 2018-01-08 12:17:50 +01:00
Pierre LALET 360a012550 Python 2 & 3: fix bytes / str 2018-01-06 23:56:37 +01:00
Guillaume Valadon 6a7c6d5bb5 LELongField test 2017-12-20 19:21:57 +01:00
gpotter2 07dedfded9 [Windows] Loading speedup (pcapdnet cache) + cleanup (#927) 2017-12-12 15:16:31 +01:00
gpotter2 12873283bf Fix DNS compression 2017-10-19 21:01:58 +02:00
Pierre LALET 8075633d17 Python 3: fix fields 2017-09-30 01:40:24 +02:00
Florian Maury f30d24fab0 Add next_cls_cb attribute to PacketListField
- this feature adds the ability to have a PacketListField
    of heterogeneous Packet types with dynamic discovery
    of the next type. This discovery can be based on any elements
    including previously parsed packets, underlayers, remaining
    bytes (look ahead), and last parsed packet.
  - this feature also adds the ability to parse PacketListFields
    where neither the length nor the number of elements can be
    predicted before parsing. This could be done previously using
    a length_from callback that did significant peeks into the
    string to parse, but it felt clumsy.
2017-09-19 11:30:01 +02:00
gpotter2 d02b7f5bf2 New tests to avoid randomness of coverage 2017-04-22 19:48:24 +02:00
gpotter2 d2d7d2dac9 Auto parser on tests 2017-03-21 22:38:45 +01:00
Florian Maury c8261e4dc7 Adding callbacks to EnumField and lots of EnumField tests
- this feature allows conversion of large ranges where
    all entries coalesce to the same representation without bloating
    a dict. For instance, 0x0 to 0xffff all display as "toto" except
    a few odds 0x2 which are displayed as "tutu".
    Before this feature, you needed to write
    enum = {x: 'toto' for x in xrange(0, 0xffff)
    enum[2] = 'tutu'
    XShortEnumField('test', 0, enum)
2017-02-07 10:18:43 +01:00
Florian Maury 784f44c880 Moving into another file the unit tests related to fields 2017-02-07 10:18:41 +01:00