scapy.contrib.isis

IS-IS Scapy Extension

copyright

2014-2016 BENOCS GmbH,柏林(德国)

author

Marcel Patzlaff, mpatzlaff @ benocs . com Michal Kaliszan, mkaliszan @ benocs . com

license

GPLv2

该模块是免费软件; 您可以根据自由软件基金会发布的GNU通用公共许可证的条款重新分发和/或修改它; 许可的版本2,或(由您选择)任何更高的版本.

分发该模块是希望它会有用,但是没有任何保证; 甚至没有对适销性或特定用途适用性的暗示保证. 有关更多详细信息,请参见GNU通用公共许可证.

description

This module provides Scapy layers for the Intermediate System to Intermediate System routing protocol as defined in RFC 1195.

当前,它(部分)支持以下RF​​C的打包/编码要求:* RFC 1195(仅与TCP / IP相关的部分)* RFC 3358(可选校验和)* RFC 5301(动态主机名扩展)* RFC 5302(域范围)前缀分配)* RFC 5303(三次握手)* RFC 5304(加密认证)* RFC 5308(使用IS-IS路由IPv6)

TODO
  • 数据包关系(请求,响应)

  • 支持最新的RFC:* RFC 5305(流量工程)* RFC 5307(支持G-MPLS)* RFC 5310(通用密码认证)* RFC 5316(AS间MPLS和G-MPLS TE)

class scapy.contrib.isis.ISIS_32bitAdministrativeTagSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_32bitAdministrativeTagSubTlv字段

type

ByteEnumField

1

len

FieldLenField

None

tags

FieldListField

[]

class scapy.contrib.isis.ISIS_64bitAdministrativeTagSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_64bitAdministrativeTagSubTlv字段

type

ByteEnumField

2

len

FieldLenField

None

tags

FieldListField

[]

class scapy.contrib.isis.ISIS_AdministrativeGroupSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_AdministrativeGroupSubTlv字段

code

ByteEnumField

3

len

FieldLenField

None

admingroup

IPField

'0.0.0.1'

class scapy.contrib.isis.ISIS_AreaEntry

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
ISIS_AreaEntry字段

arealen

FieldLenField

None

areaid

ISIS_AreaIdField

'49'

class scapy.contrib.isis.ISIS_AreaIdField(name, default, length_from)

Bases: scapy.fields.Field

addfield(pkt, s, val)
getfield(pkt, s)
i2len(pkt, x)
i2m(pkt, x)
length_from
m2i(pkt, x)
randval()
class scapy.contrib.isis.ISIS_AreaTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_AreaTlv字段

type

ByteEnumField

1

len

FieldLenField

None

areas

PacketListField

[]

class scapy.contrib.isis.ISIS_AuthenticationTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_AuthenticationTlv字段

type

ByteEnumField

10

len

FieldLenField

None

authtype

ByteEnumField

1

password

BoundStrLenField

b''

class scapy.contrib.isis.ISIS_BufferSizeTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_BufferSizeTlv字段

type

ByteEnumField

14

len

ByteField

2

lspbuffersize

ShortField

1497

class scapy.contrib.isis.ISIS_ChecksumTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_ChecksumTlv字段

type

ByteEnumField

12

len

ByteField

2

checksum

XShortField

None

class scapy.contrib.isis.ISIS_CircuitTypeField(name='circuittype', default=2, size=8, names=None)

Bases: scapy.fields.FlagsField

class scapy.contrib.isis.ISIS_CommonHdr

Bases: scapy.packet.Packet

aliastypes
fields_desc
ISIS_CommonHdr字段

nlpid

ByteEnumField

131

hdrlen

ByteField

None

version

ByteField

1

idlen

ByteField

0

pdutype

ByteEnumField

None

pduversion

ByteField

1

hdrreserved

ByteField

0

maxareaaddr

ByteField

0

payload_guess

可能的子层: ISIS_L1_CSNPISIS_L1_LAN_HelloISIS_L1_LSPISIS_L1_PSNPISIS_L2_CSNPISIS_L2_LAN_HelloISIS_L2_LSPISIS_L2_PSNPISIS_P2P_Hello

post_build(pkt, pay)
class scapy.contrib.isis.ISIS_DynamicHostnameTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_DynamicHostnameTlv字段

type

ByteEnumField

137

len

FieldLenField

None

hostname

BoundStrLenField

b''

class scapy.contrib.isis.ISIS_ExtendedIpPrefix

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
ISIS_ExtendedIpPrefix字段

metric

IntField

1

updown

BitField (1位)

0

subtlvindicator

BitField (1位)

0

pfxlen

BitFieldLenField (6位)

None

pfx

IPPrefixField

('0.0.0.0', 1)

subtlvslen

FieldLenField (Cond)

None

subtlvs

PacketListField (Cond)

[]

class scapy.contrib.isis.ISIS_ExtendedIpReachabilityTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_ExtendedIpReachabilityTlv字段

type

ByteEnumField

135

len

FieldLenField

None

pfxs

PacketListField

[]

class scapy.contrib.isis.ISIS_ExtendedIsNeighbourEntry

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
ISIS_ExtendedIsNeighbourEntry字段

neighbourid

ISIS_NodeIdField

'0102.0304.0506.07'

metric

ThreeBytesField

1

subtlvslen

FieldLenField

None

subtlvs

PacketListField

[]

class scapy.contrib.isis.ISIS_ExtendedIsReachabilityTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_ExtendedIsReachabilityTlv字段

type

ByteEnumField

22

len

FieldLenField

None

neighbours

PacketListField

[]

class scapy.contrib.isis.ISIS_ExternalIpReachabilityTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_ExternalIpReachabilityTlv字段

type

ByteEnumField

130

len

FieldLenField

None

entries

PacketListField

[]

class scapy.contrib.isis.ISIS_GenericSubTlv

Bases: scapy.contrib.isis._ISIS_GenericTlv_Base

aliastypes
fields_desc
ISIS_GenericSubTlv字段

type

ByteField

0

len

FieldLenField

None

val

BoundStrLenField

b''

class scapy.contrib.isis.ISIS_GenericTlv

Bases: scapy.contrib.isis._ISIS_GenericTlv_Base

aliastypes
fields_desc
ISIS_GenericTlv字段

type

ByteField

0

len

FieldLenField

None

val

BoundStrLenField

b''

class scapy.contrib.isis.ISIS_IPv4InterfaceAddressSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_IPv4InterfaceAddressSubTlv字段

type

ByteEnumField

6

len

FieldLenField

None

address

IPField

'0.0.0.0'

class scapy.contrib.isis.ISIS_IPv4NeighborAddressSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_IPv4NeighborAddressSubTlv字段

type

ByteEnumField

8

len

FieldLenField

None

address

IPField

'0.0.0.0'

class scapy.contrib.isis.ISIS_IPv6InterfaceAddressSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_IPv6InterfaceAddressSubTlv字段

type

ByteEnumField

12

len

FieldLenField

None

address

IP6Field

'::'

class scapy.contrib.isis.ISIS_IPv6NeighborAddressSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_IPv6NeighborAddressSubTlv字段

type

ByteEnumField

13

len

FieldLenField

None

address

IP6Field

'::'

class scapy.contrib.isis.ISIS_InternalIpReachabilityTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_InternalIpReachabilityTlv字段

type

ByteEnumField

128

len

FieldLenField

None

entries

PacketListField

[]

class scapy.contrib.isis.ISIS_IpInterfaceAddressTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_IpInterfaceAddressTlv字段

type

ByteEnumField

132

len

FieldLenField

None

addresses

FieldListField

[]

class scapy.contrib.isis.ISIS_IpReachabilityEntry

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
ISIS_IpReachabilityEntry字段

defmetric

ByteField

1

delmetric

ByteField

128

expmetric

ByteField

128

errmetric

ByteField

128

ipaddress

IPField

'0.0.0.0'

subnetmask

IPField

'255.255.255.255'

class scapy.contrib.isis.ISIS_Ipv6InterfaceAddressTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_Ipv6InterfaceAddressTlv字段

type

ByteEnumField

232

len

FieldLenField

None

addresses

IP6ListField

[]

class scapy.contrib.isis.ISIS_Ipv6Prefix

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
ISIS_Ipv6Prefix字段

metric

IntField

1

updown

BitField (1位)

0

external

BitField (1位)

0

subtlvindicator

BitField (1位)

0

reserved

BitField (5位)

0

pfxlen

FieldLenField

None

pfx

IP6PrefixField

('::', 1)

subtlvslen

FieldLenField (Cond)

None

subtlvs

PacketListField (Cond)

[]

class scapy.contrib.isis.ISIS_Ipv6ReachabilityTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_Ipv6ReachabilityTlv字段

type

ByteEnumField

236

len

FieldLenField

None

pfxs

PacketListField

[]

class scapy.contrib.isis.ISIS_IsNeighbourTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_IsNeighbourTlv字段

type

ByteEnumField

6

len

FieldLenField

None

neighbours

FieldListField

[]

class scapy.contrib.isis.ISIS_IsReachabilityEntry

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
ISIS_IsReachabilityEntry字段

defmetric

ByteField

1

delmetric

ByteField

128

expmetric

ByteField

128

errmetric

ByteField

128

neighbourid

ISIS_NodeIdField

'0102.0304.0506.07'

class scapy.contrib.isis.ISIS_IsReachabilityTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_IsReachabilityTlv字段

type

ByteEnumField

2

len

FieldLenField

None

virtual

ByteField

0

neighbours

PacketListField

[]

class scapy.contrib.isis.ISIS_L1_CSNP

Bases: scapy.contrib.isis._ISIS_CSNP_Base

aliastypes
answers(other)
fields_desc
ISIS_L1_CSNP字段

pdulength

_ISIS_PduLengthField

None

sourceid

ISIS_NodeIdField

'0102.0304.0506.00'

startlspid

ISIS_LspIdField

'0000.0000.0000.00-00'

endlspid

ISIS_LspIdField

'FFFF.FFFF.FFFF.FF-FF'

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_L1_LAN_Hello

Bases: scapy.contrib.isis._ISIS_LAN_HelloBase

aliastypes
fields_desc
ISIS_L1_LAN_Hello字段

circuittype

ISIS_CircuitTypeField (8位)

<Flag 2 (L2)>

sourceid

ISIS_SystemIdField

'0102.0304.0506'

holdingtime

ShortField

30

pdulength

_ISIS_PduLengthField

None

priority

ByteField

1

lanid

ISIS_NodeIdField

'0000.0000.0000.00'

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_L1_LSP

Bases: scapy.contrib.isis._ISIS_LSP_Base

aliastypes
answers(other)
fields_desc
ISIS_L1_LSP字段

pdulength

_ISIS_PduLengthField

None

lifetime

ShortField

1199

lspid

ISIS_LspIdField

'0102.0304.0506.00-00'

seqnum

XIntField

1

checksum

XShortField

None

typeblock

FlagsField (8位)

<Flag 3 (L1+L2)>

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_L1_PSNP

Bases: scapy.contrib.isis._ISIS_PSNP_Base

aliastypes
answers(other)
fields_desc
ISIS_L1_PSNP字段

pdulength

_ISIS_PduLengthField

None

sourceid

ISIS_NodeIdField

'0102.0304.0506.00'

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_L2_CSNP

Bases: scapy.contrib.isis._ISIS_CSNP_Base

aliastypes
answers(other)
fields_desc
ISIS_L2_CSNP字段

pdulength

_ISIS_PduLengthField

None

sourceid

ISIS_NodeIdField

'0102.0304.0506.00'

startlspid

ISIS_LspIdField

'0000.0000.0000.00-00'

endlspid

ISIS_LspIdField

'FFFF.FFFF.FFFF.FF-FF'

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_L2_LAN_Hello

Bases: scapy.contrib.isis._ISIS_LAN_HelloBase

aliastypes
fields_desc
ISIS_L2_LAN_Hello字段

circuittype

ISIS_CircuitTypeField (8位)

<Flag 2 (L2)>

sourceid

ISIS_SystemIdField

'0102.0304.0506'

holdingtime

ShortField

30

pdulength

_ISIS_PduLengthField

None

priority

ByteField

1

lanid

ISIS_NodeIdField

'0000.0000.0000.00'

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_L2_LSP

Bases: scapy.contrib.isis._ISIS_LSP_Base

aliastypes
answers(other)
fields_desc
ISIS_L2_LSP字段

pdulength

_ISIS_PduLengthField

None

lifetime

ShortField

1199

lspid

ISIS_LspIdField

'0102.0304.0506.00-00'

seqnum

XIntField

1

checksum

XShortField

None

typeblock

FlagsField (8位)

<Flag 3 (L1+L2)>

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_L2_PSNP

Bases: scapy.contrib.isis._ISIS_PSNP_Base

aliastypes
answers(other)
fields_desc
ISIS_L2_PSNP字段

pdulength

_ISIS_PduLengthField

None

sourceid

ISIS_NodeIdField

'0102.0304.0506.00'

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_LinkLocalRemoteIdentifiersSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_LinkLocalRemoteIdentifiersSubTlv字段

type

ByteEnumField

4

len

FieldLenField

8

localid

IntField

'0'

remoteid

IntField

'0'

class scapy.contrib.isis.ISIS_LspEntry

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
ISIS_LspEntry字段

lifetime

ShortField

1200

lspid

ISIS_LspIdField

'0102.0304.0506.07-08'

seqnum

XIntField

1

checksum

XShortField

None

class scapy.contrib.isis.ISIS_LspEntryTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_LspEntryTlv字段

type

ByteEnumField

9

len

FieldLenField

None

entries

PacketListField

[]

class scapy.contrib.isis.ISIS_LspIdField(name, default)

Bases: scapy.contrib.isis._ISIS_IdFieldBase

randval()
class scapy.contrib.isis.ISIS_MaximumLinkBandwidthSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_MaximumLinkBandwidthSubTlv字段

type

ByteEnumField

9

len

FieldLenField

None

maxbw

IEEEFloatField

1000

class scapy.contrib.isis.ISIS_MaximumReservableLinkBandwidthSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_MaximumReservableLinkBandwidthSubTlv字段

type

ByteEnumField

10

len

FieldLenField

None

maxrsvbw

IEEEFloatField

1000

class scapy.contrib.isis.ISIS_NodeIdField(name, default)

Bases: scapy.contrib.isis._ISIS_IdFieldBase

randval()
class scapy.contrib.isis.ISIS_P2PAdjacencyStateTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_P2PAdjacencyStateTlv字段

type

ByteEnumField

240

len

_AdjacencyStateTlvLenField

None

state

ByteEnumField

2

extlocalcircuitid

IntField (Cond)

None

neighboursystemid

ISIS_SystemIdField (Cond)

None

neighbourextlocalcircuitid

IntField (Cond)

None

class scapy.contrib.isis.ISIS_P2P_Hello

Bases: scapy.contrib.isis._ISIS_PduBase

aliastypes
fields_desc
ISIS_P2P_Hello字段

circuittype

ISIS_CircuitTypeField (8位)

<Flag 2 (L2)>

sourceid

ISIS_SystemIdField

'0102.0304.0506'

holdingtime

ShortField

30

pdulength

_ISIS_PduLengthField

None

localcircuitid

ByteField

0

tlvs

_ISIS_TlvListField

[]

class scapy.contrib.isis.ISIS_PaddingTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_PaddingTlv字段

type

ByteEnumField

8

len

FieldLenField

None

padding

BoundStrLenField

b''

class scapy.contrib.isis.ISIS_ProtocolsSupportedTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_ProtocolsSupportedTlv字段

type

ByteEnumField

129

len

FieldLenField

None

nlpids

FieldListField

[]

class scapy.contrib.isis.ISIS_SystemIdField(name, default)

Bases: scapy.contrib.isis._ISIS_IdFieldBase

randval()
class scapy.contrib.isis.ISIS_TEDefaultMetricSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_TEDefaultMetricSubTlv字段

type

ByteEnumField

18

len

FieldLenField

None

temetric

ThreeBytesField

1000

class scapy.contrib.isis.ISIS_TERouterIDTlv

Bases: scapy.contrib.isis.ISIS_GenericTlv

aliastypes
fields_desc
ISIS_TERouterIDTlv字段

type

ByteEnumField

134

len

FieldLenField

None

routerid

IPField

'0.0.0.0'

class scapy.contrib.isis.ISIS_UnreservedBandwidthSubTlv

Bases: scapy.contrib.isis.ISIS_GenericSubTlv

aliastypes
fields_desc
ISIS_UnreservedBandwidthSubTlv字段

type

ByteEnumField

11

len

FieldLenField

None

unrsvbw

FieldListField

[1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000]

scapy.contrib.isis.isis_area2str(area)
scapy.contrib.isis.isis_lspid2str(lspid)
scapy.contrib.isis.isis_nodeid2str(nodeid)
scapy.contrib.isis.isis_str2area(s)
scapy.contrib.isis.isis_str2lspid(s)
scapy.contrib.isis.isis_str2nodeid(s)
scapy.contrib.isis.isis_str2sysid(s)
scapy.contrib.isis.isis_sysid2str(sysid)