From c0be2937ff10d4874a2980a86fd2db2e21c2b518 Mon Sep 17 00:00:00 2001 From: Martin Gallo Date: Wed, 27 Aug 2014 02:50:08 +0000 Subject: [PATCH 1/3] Created new branch fields --HG-- branch : fields From 720ee76d9a99d1cad88846eabf600a38d1a78f0e Mon Sep 17 00:00:00 2001 From: Martin Gallo Date: Wed, 27 Aug 2014 09:32:24 -0300 Subject: [PATCH 2/3] Added SignedShortField --HG-- branch : fields --- scapy/fields.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scapy/fields.py b/scapy/fields.py index 91df1adaa..57dd3dc91 100644 --- a/scapy/fields.py +++ b/scapy/fields.py @@ -280,6 +280,10 @@ class ShortField(Field): def __init__(self, name, default): Field.__init__(self, name, default, "H") +class SignedShortField(Field): + def __init__(self, name, default): + Field.__init__(self, name, default, "h") + class LEShortField(Field): def __init__(self, name, default): Field.__init__(self, name, default, " Date: Wed, 27 Aug 2014 09:45:24 -0300 Subject: [PATCH 3/3] Added SignedShortField to the doc --HG-- branch : fields --- doc/scapy/build_dissect.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/scapy/build_dissect.rst b/doc/scapy/build_dissect.rst index 70bdac75f..b5743cafb 100644 --- a/doc/scapy/build_dissect.rst +++ b/doc/scapy/build_dissect.rst @@ -856,6 +856,7 @@ Legend: XByteField ShortField + SignedShortField LEShortField XShortField