[dts] [PATCH V1] dep: remove local scapy module pfcp

LihongX Ma lihongx.ma at intel.com
Wed Oct 28 22:51:24 CET 2020


use scapy module pfcp to combine pkt

Signed-off-by: LihongX Ma <lihongx.ma at intel.com>
---
 dep/scapy_modules/pfcp.py | 24 ------------------------
 1 file changed, 24 deletions(-)
 delete mode 100644 dep/scapy_modules/pfcp.py

diff --git a/dep/scapy_modules/pfcp.py b/dep/scapy_modules/pfcp.py
deleted file mode 100644
index 33f2510..0000000
--- a/dep/scapy_modules/pfcp.py
+++ /dev/null
@@ -1,24 +0,0 @@
-from scapy.packet import Packet, bind_layers, Padding
-from scapy.fields import *
-from scapy.layers.inet import UDP
-
-class PFCP(Packet):
-    name = "PFCP"
-    fields_desc =  [ BitField("version", 1, 3),
-                     BitField("MP", 0, 4),
-                     BitField("Sfield", 0, 1),
-                     ByteField("MsgType", 0),
-                     ShortField("len", None),
-                     LongField("SEID", 0),
-                     ThreeBytesField("SeqNum", 0),
-                     BitField("MsgPrio", 0, 4),
-                     BitField("spare", 0, 4)]
-
-
-    def post_build(self, pkt, pay):
-        if self.len is None:
-            l = len(pkt)+len(pay)
-            pkt = pkt[:2]+struct.pack("!H", l)+pkt[4:]
-        return pkt+pay
-
-bind_layers(UDP, PFCP, dport=8805)
-- 
2.7.4



More information about the dts mailing list