[V1] dep: remove local scapy module pfcp

Message ID 1603921884-27190-1-git-send-email-lihongx.ma@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] dep: remove local scapy module pfcp |

Commit Message

Ma, LihongX Oct. 28, 2020, 9:51 p.m. UTC
  use scapy module pfcp to combine pkt

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

Comments

Tu, Lijuan Nov. 3, 2020, 2:47 a.m. UTC | #1
> use scapy module pfcp to combine pkt
> 
> Signed-off-by: LihongX Ma <lihongx.ma@intel.com>

Applied
  

Patch

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)