From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 3A28547CD for ; Thu, 21 Apr 2016 05:00:07 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 20 Apr 2016 19:59:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,512,1455004800"; d="scan'208";a="89049206" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 20 Apr 2016 19:59:57 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u3L2xs9m009350; Thu, 21 Apr 2016 10:59:54 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u3L2xpra030409; Thu, 21 Apr 2016 10:59:53 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u3L2xpUw030405; Thu, 21 Apr 2016 10:59:51 +0800 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Thu, 21 Apr 2016 10:59:49 +0800 Message-Id: <1461207590-30373-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH 1/2] dep: add module for 802.1br protocal X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2016 03:00:07 -0000 Signed-off-by: Marvin Liu 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 +## This program is published under a GPLv2 license + +## Copyright (c) 2016 Marvin liu + +""" +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