scapy.contrib.spbm

SPB框架创建示例

注意外部的Dot1Q以太网类型标记(0x88e7)

boneEther = Ether(dst = '00:bb:00:00:90:00',src = '00:bb:00:00:40:00',type = 0x8100)#noqa:E501主线Dot1Q = Dot1Q(vlan = 4051,类型= 0x88e7)骨干网服务ID = SPBM(prio = 1,isid = 20011)customerEther = Ether(dst = '00:1b:4f:5e:ca:00',src = '00:00:00:00:00 :01',type = 0x8100)#noqa:E501 customerDot1Q = Dot1Q(prio = 1,vlan = 11,type = 0x0800)customerIP = IP(src = '10 .100.11.10',dst = '10 .100.12.10',id = 0x0629,len = 106)#noqa:E501客户UDP = UDP(sport = 1024,dport = 1025,chksum = 0,len = 86)

spb_example = boneEther / backboneDot1Q / backboneServiceID / customerEther / customerDot1Q / customerIP / customerUDP /"有效负载"#noqa:E501

class scapy.contrib.spbm.SPBM

Bases: scapy.packet.Packet

aliastypes
fields_desc
显示类似RFC的架构
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| PRIO|D|N|R|RES|                      ISID                     |
+-+-+-+-+-+-+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                            Fig. SPBM                             
SPBM字段

prio

BitField (3位)

0

dei

BitField (1位)

0

nca

BitField (1位)

0

res1

BitField (1位)

0

res2

BitField (2位)

0

isid

ThreeBytesField

0

mysummary()
payload_guess

可能的子层: Ether