[dts] [PATCH 1/2] dep: add module for 802.1br protocal

Marvin Liu yong.liu at intel.com
Thu Apr 21 04:59:49 CEST 2016


Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/dep/Dot1BR.py b/dep/Dot1BR.py
new file mode 100644
index 0000000..f985f6a
--- /dev/null
+++ b/dep/Dot1BR.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+## This file is part of Scapy
+## See http://www.secdev.org/projects/scapy for more informations
+## Copyright (C) Philippe Biondi <phil at secdev.org>
+## This program is published under a GPLv2 license
+
+## Copyright (c) 2016 Marvin liu <yong.liu at intel.com>
+
+"""
+VBPE (virtual brige port extenstion)
+"""
+
+from scapy.packet import *
+from scapy.fields import *
+from scapy.layers.l2 import Ether
+
+class Dot1BR(Packet):
+    name = "802.1BR"
+    aliastypes = [ Ether ]
+    fields_desc =  [ 
+                     BitField("EPCP", 0, 3),
+                     BitField("EEDI", 0, 1),
+                     BitField("IngressECIDbase", 0, 12),
+                     BitField("Reserverd", 0, 2),
+                     BitField("GRP", 0, 2),
+                     BitField("ECIDbase", 0, 12),
+                     BitField("IngressECIDext", 0, 8),
+                     BitField("ECIDext", 0, 8),
+                     XShortEnumField("type", 0x0000, ETHER_TYPES) ]
+    def mysummary(self):
+        return self.sprintf("802.1BR E-CID %Ingress_E-CID_base%")
+
+bind_layers(Ether, Dot1BR, type=0x893F)
-- 
1.9.3



More information about the dts mailing list