scapy.contrib.eigrp

EIGRP Scapy Extension

version

2009-08-13

copyright

2009 by Jochen Bartl

e-mail

lobo@c3a.de / jochen.bartl@gmail.com

license

GPL v2

:TODO

Known bugs
Thanks

  • TLV code derived from the CDP implementation of scapy. (Thanks to Nicolas Bareil and Arnaud Ebalard)

    http://trac.secdev.org/scapy/ticket/18

  • IOS / EIGRP Version Representation FIX by Dirk Loss

class scapy.contrib.eigrp.EIGRP

Bases: scapy.packet.Packet

aliastypes
fields_desc
EIGRP fields

ver

ByteField

2

opcode

ByteEnumField

5

chksum

XShortField

None

flags

FlagsField (32 bits)

<Flag 0 ()>

seq

IntField

0

ack

IntField

0

asn

IntField

100

tlvlist

RepeatedTlvListField

[]

mysummary()
post_build(p, pay)
class scapy.contrib.eigrp.EIGRPAuthData

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPAuthData fields

type

XShortField

2

len

FieldLenField

None

authtype

ShortEnumField

2

keysize

ShortField

None

keyid

IntField

1

nullpad

StrFixedLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

authdata

StrLenField

<RandString>

post_build(p, pay)
class scapy.contrib.eigrp.EIGRPExtRoute

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPExtRoute fields

type

XShortField

259

len

FieldLenField

None

nexthop

IPField

'192.168.0.0'

originrouter

IPField

'192.168.0.1'

originasn

IntField

0

tag

IntField

0

externalmetric

IntField

0

reserved

ShortField

0

extprotocolid

ByteEnumField

3

flags

FlagsField (8 bits)

<Flag 0 ()>

delay

IntField

0

bandwidth

IntField

256

mtu

ThreeBytesField

1500

hopcount

ByteField

0

reliability

ByteField

255

load

ByteField

0

reserved2

XShortField

0

prefixlen

ByteField

24

dst

EigrpIPField

'192.168.1.0'

class scapy.contrib.eigrp.EIGRPGeneric

Bases: scapy.packet.Packet

aliastypes
fields_desc
EIGRPGeneric fields

type

XShortField

0

len

FieldLenField

None

value

StrLenField

b'\x00'

guess_payload_class(p)
class scapy.contrib.eigrp.EIGRPIntRoute

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPIntRoute fields

type

XShortField

258

len

FieldLenField

None

nexthop

IPField

'192.168.0.0'

delay

IntField

128000

bandwidth

IntField

256

mtu

ThreeBytesField

1500

hopcount

ByteField

0

reliability

ByteField

255

load

ByteField

0

reserved

XShortField

0

prefixlen

ByteField

24

dst

EigrpIPField

'192.168.1.0'

class scapy.contrib.eigrp.EIGRPNms

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPNms fields

type

XShortField

5

len

ShortField

8

nms

IntField

2

class scapy.contrib.eigrp.EIGRPParam

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPParam fields

type

XShortField

1

len

ShortField

12

k1

ByteField

1

k2

ByteField

0

k3

ByteField

1

k4

ByteField

0

k5

ByteField

0

reserved

ByteField

0

holdtime

ShortField

15

class scapy.contrib.eigrp.EIGRPSeq

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPSeq fields

type

XShortField

3

len

ShortField

None

addrlen

ByteField

4

ipaddr

IPField (Cond)

'192.168.0.1'

ip6addr

IP6Field (Cond)

'2001::'

post_build(p, pay)
class scapy.contrib.eigrp.EIGRPStub

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPStub fields

type

XShortField

6

len

ShortField

6

flags

FlagsField (16 bits)

<Flag 13 (connected+summary+receive-only)>

class scapy.contrib.eigrp.EIGRPSwVer

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPSwVer fields

type

XShortField

4

len

ShortField

8

ios

ShortVersionField

3072

eigrp

ShortVersionField

258

class scapy.contrib.eigrp.EIGRPv6ExtRoute

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPv6ExtRoute fields

type

XShortField

1027

len

FieldLenField

None

nexthop

IP6Field

'::'

originrouter

IPField

'192.168.0.1'

originasn

IntField

0

tag

IntField

0

externalmetric

IntField

0

reserved

ShortField

0

extprotocolid

ByteEnumField

3

flags

FlagsField (8 bits)

<Flag 0 ()>

delay

IntField

0

bandwidth

IntField

256000

mtu

ThreeBytesField

1500

hopcount

ByteField

1

reliability

ByteField

0

load

ByteField

1

reserved2

XShortField

0

prefixlen

ByteField

8

dst

EigrpIP6Field

'::'

class scapy.contrib.eigrp.EIGRPv6IntRoute

Bases: scapy.contrib.eigrp.EIGRPGeneric

aliastypes
fields_desc
EIGRPv6IntRoute fields

type

XShortField

1026

len

FieldLenField

None

nexthop

IP6Field

'::'

delay

IntField

128000

bandwidth

IntField

256000

mtu

ThreeBytesField

1500

hopcount

ByteField

1

reliability

ByteField

255

load

ByteField

0

reserved

XShortField

0

prefixlen

ByteField

16

dst

EigrpIP6Field

'2001::'

class scapy.contrib.eigrp.EigrpIP6Field(name, default, length=None, length_from=None)

Bases: scapy.fields.StrField, scapy.fields.IP6Field

This is a special field type for handling ip addresses of destination networks in internal and external route updates.

any2i(pkt, x)
getfield(pkt, s)
h2i(pkt, x)
i2len(pkt, x)
i2m(pkt, x)
i2repr(pkt, x)
length_from
m2i(pkt, x)
prefixlen_to_bytelen(plen)
randval()
class scapy.contrib.eigrp.EigrpIPField(name, default, length=None, length_from=None)

Bases: scapy.fields.StrField, scapy.fields.IPField

This is a special field type for handling ip addresses of destination networks in internal and external route updates.

EIGRP removes zeros from the host portion of the ip address if the netmask is 8, 16 or 24 bits.

getfield(pkt, s)
h2i(pkt, x)
i2len(pkt, x)
i2m(pkt, x)
length_from
m2i(pkt, x)
prefixlen_to_bytelen(tmp_len)
randval()
class scapy.contrib.eigrp.RepeatedTlvListField(name, default, cls)

Bases: scapy.fields.PacketListField

addfield(pkt, s, val)
getfield(pkt, s)
class scapy.contrib.eigrp.ShortVersionField(name, default)

Bases: scapy.fields.ShortField

h2i(pkt, x)

The field accepts string values like v12.1, v1.1 or integer values. String values have to start with a “v” folled by a floating point number. Valid numbers are between 0 and 255.

i2repr(pkt, x)
randval()