scapy.contrib.ospf module

OSPF extension for Scapy <http://www.secdev.org/scapy>

This module provides Scapy layers for the Open Shortest Path First routing protocol as defined in RFC 2328 and RFC 5340.

Copyright (c) 2008 Dirk Loss : mail dirk-loss de Copyright (c) 2010 Jochen Bartl : jochen.bartl gmail com

class scapy.contrib.ospf.FieldLenField32Bits(name, default, length_of=None, fmt='H', count_of=None, adjust=<function FieldLenField.<lambda>>, fld=None)

Bases: scapy.fields.FieldLenField

i2repr(pkt, x)

Convert internal value to a nice representation

class scapy.contrib.ospf.LLS_Crypto_Auth

Bases: scapy.contrib.ospf.LLS_Generic_TLV

aliastypes = [<class 'scapy.contrib.ospf.LLS_Crypto_Auth'>, <class 'scapy.contrib.ospf.LLS_Generic_TLV'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLS_Crypto_Auth).type>, <Field (LLS_Crypto_Auth).len>, <Field (LLS_Crypto_Auth).sequence>, <Field (LLS_Crypto_Auth).authdata>]
class scapy.contrib.ospf.LLS_Extended_Options

Bases: scapy.contrib.ospf.LLS_Generic_TLV

aliastypes = [<class 'scapy.contrib.ospf.LLS_Extended_Options'>, <class 'scapy.contrib.ospf.LLS_Generic_TLV'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLS_Extended_Options).type>, <Field (LLS_Extended_Options).len>, <Field (LLS_Extended_Options).options>]
class scapy.contrib.ospf.LLS_Generic_TLV

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.LLS_Generic_TLV'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (LLS_Generic_TLV).type>, <Field (LLS_Generic_TLV).len>, <Field (LLS_Generic_TLV).val>]
guess_payload_class(p)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.contrib.ospf.OSPFOptionsField(name='options', default=0, size=8, names=None)

Bases: scapy.fields.FlagsField

class scapy.contrib.ospf.OSPF_BaseLSA

Bases: scapy.packet.Packet

An abstract base class for Link State Advertisements

aliastypes = [<class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.ospf.OSPF_DBDesc

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_DBDesc'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_DBDesc).mtu>, <Field (OSPF_DBDesc).options>, <Field (OSPF_DBDesc).dbdescr>, <Field (OSPF_DBDesc).ddseq>, <Field (OSPF_DBDesc).lsaheaders>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.contrib.ospf.OSPF_External_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPF_External_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).age>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).options>, <Field (OSPF_External_LSA).type>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).id>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).adrouter>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).seq>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).chksum>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).len>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).mask>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).ebit>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).reserved>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).metric>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).fwdaddr>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).tag>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.contrib.ospf.OSPF_Hdr

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_Hdr'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (OSPF_Hdr).version>, <Field (OSPF_Hdr).type>, <Field (OSPF_Hdr).len>, <Field (OSPF_Hdr).src>, <Field (OSPF_Hdr).area>, <Field (OSPF_Hdr).chksum>, <Field (OSPF_Hdr).authtype>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
hashret()

DEV: returns a string that has the same value for a request and its answer.

payload_guess = [({'type': 1}, <class 'scapy.contrib.ospf.OSPF_Hello'>), ({'type': 2}, <class 'scapy.contrib.ospf.OSPF_DBDesc'>), ({'type': 3}, <class 'scapy.contrib.ospf.OSPF_LSReq'>), ({'type': 4}, <class 'scapy.contrib.ospf.OSPF_LSUpd'>), ({'type': 5}, <class 'scapy.contrib.ospf.OSPF_LSAck'>)]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.ospf.OSPF_Hello

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_Hello'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_Hello).mask>, <Field (OSPF_Hello).hellointerval>, <Field (OSPF_Hello).options>, <Field (OSPF_Hello).prio>, <Field (OSPF_Hello).deadinterval>, <Field (OSPF_Hello).router>, <Field (OSPF_Hello).backup>, <Field (OSPF_Hello).neighbors>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.contrib.ospf.OSPF_LLS_Hdr

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_LLS_Hdr'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_LLS_Hdr).chksum>, <Field (OSPF_LLS_Hdr).len>, <Field (OSPF_LLS_Hdr).llstlv>]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.ospf.OSPF_LSA_Hdr

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_LSA_Hdr'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OSPF_LSA_Hdr).age>, <Field (OSPF_LSA_Hdr).options>, <Field (OSPF_LSA_Hdr).type>, <Field (OSPF_LSA_Hdr).id>, <Field (OSPF_LSA_Hdr).adrouter>, <Field (OSPF_LSA_Hdr).seq>, <Field (OSPF_LSA_Hdr).chksum>, <Field (OSPF_LSA_Hdr).len>]
class scapy.contrib.ospf.OSPF_LSAck

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_LSAck'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (OSPF_LSAck).lsaheaders>]
class scapy.contrib.ospf.OSPF_LSReq

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_LSReq'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_LSReq).requests>]
class scapy.contrib.ospf.OSPF_LSReq_Item

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_LSReq_Item'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OSPF_LSReq_Item).type>, <Field (OSPF_LSReq_Item).id>, <Field (OSPF_LSReq_Item).adrouter>]
class scapy.contrib.ospf.OSPF_LSUpd

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_LSUpd'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_LSUpd).lsacount>, <Field (OSPF_LSUpd).lsalist>]

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPF_Link'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OSPF_Link).id>, <Field (OSPF_Link).data>, <Field (OSPF_Link).type>, <Field (OSPF_Link).toscount>, <Field (OSPF_Link).metric>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.contrib.ospf.OSPF_NSSA_External_LSA

Bases: scapy.contrib.ospf.OSPF_External_LSA

aliastypes = [<class 'scapy.contrib.ospf.OSPF_NSSA_External_LSA'>, <class 'scapy.contrib.ospf.OSPF_External_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).age>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).options>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).type>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).id>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).adrouter>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).seq>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).chksum>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).len>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).mask>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).ebit>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).reserved>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).metric>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).fwdaddr>, <Field (OSPF_External_LSA,OSPF_NSSA_External_LSA).tag>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.contrib.ospf.OSPF_Network_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPF_Network_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_Network_LSA).age>, <Field (OSPF_Network_LSA).options>, <Field (OSPF_Network_LSA).type>, <Field (OSPF_Network_LSA).id>, <Field (OSPF_Network_LSA).adrouter>, <Field (OSPF_Network_LSA).seq>, <Field (OSPF_Network_LSA).chksum>, <Field (OSPF_Network_LSA).len>, <Field (OSPF_Network_LSA).mask>, <Field (OSPF_Network_LSA).routerlist>]
class scapy.contrib.ospf.OSPF_Router_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPF_Router_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_Router_LSA).age>, <Field (OSPF_Router_LSA).options>, <Field (OSPF_Router_LSA).type>, <Field (OSPF_Router_LSA).id>, <Field (OSPF_Router_LSA).adrouter>, <Field (OSPF_Router_LSA).seq>, <Field (OSPF_Router_LSA).chksum>, <Field (OSPF_Router_LSA).len>, <Field (OSPF_Router_LSA).flags>, <Field (OSPF_Router_LSA).reserved>, <Field (OSPF_Router_LSA).linkcount>, <Field (OSPF_Router_LSA).linklist>]
class scapy.contrib.ospf.OSPF_SummaryASBR_LSA

Bases: scapy.contrib.ospf.OSPF_SummaryIP_LSA

aliastypes = [<class 'scapy.contrib.ospf.OSPF_SummaryASBR_LSA'>, <class 'scapy.contrib.ospf.OSPF_SummaryIP_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).age>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).options>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).type>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).id>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).adrouter>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).seq>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).chksum>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).len>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).mask>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).reserved>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).metric>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.contrib.ospf.OSPF_SummaryIP_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPF_SummaryIP_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).age>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).options>, <Field (OSPF_SummaryIP_LSA).type>, <Field (OSPF_SummaryIP_LSA).id>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).adrouter>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).seq>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).chksum>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).len>, <Field (OSPF_SummaryIP_LSA).mask>, <Field (OSPF_SummaryIP_LSA,OSPF_SummaryASBR_LSA).reserved>, <Field (OSPF_SummaryIP_LSA).metric>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.contrib.ospf.OSPFv3OptionsField(name='options', default=0, size=24, names=None)

Bases: scapy.fields.FlagsField

class scapy.contrib.ospf.OSPFv3PrefixOptionsField(name='prefixoptions', default=0, size=8, names=None)

Bases: scapy.fields.FlagsField

class scapy.contrib.ospf.OSPFv3_AS_External_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_AS_External_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).age>, <Field (OSPFv3_AS_External_LSA).type>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).id>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).adrouter>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).seq>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).chksum>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).len>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).flags>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).metric>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).prefixlen>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).prefixoptions>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).reflstype>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).prefix>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.contrib.ospf.OSPFv3_DBDesc

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_DBDesc'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_DBDesc).reserved>, <Field (OSPFv3_DBDesc).options>, <Field (OSPFv3_DBDesc).mtu>, <Field (OSPFv3_DBDesc).reserved2>, <Field (OSPFv3_DBDesc).dbdescr>, <Field (OSPFv3_DBDesc).ddseq>, <Field (OSPFv3_DBDesc).lsaheaders>]
class scapy.contrib.ospf.OSPFv3_Hdr

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Hdr'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_Hdr).version>, <Field (OSPFv3_Hdr).type>, <Field (OSPFv3_Hdr).len>, <Field (OSPFv3_Hdr).src>, <Field (OSPFv3_Hdr).area>, <Field (OSPFv3_Hdr).chksum>, <Field (OSPFv3_Hdr).instance>, <Field (OSPFv3_Hdr).reserved>]
payload_guess = [({'type': 1}, <class 'scapy.contrib.ospf.OSPFv3_Hello'>), ({'type': 2}, <class 'scapy.contrib.ospf.OSPFv3_DBDesc'>), ({'type': 3}, <class 'scapy.contrib.ospf.OSPFv3_LSReq'>), ({'type': 4}, <class 'scapy.contrib.ospf.OSPFv3_LSUpd'>), ({'type': 5}, <class 'scapy.contrib.ospf.OSPFv3_LSAck'>)]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.ospf.OSPFv3_Hello

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Hello'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_Hello).intid>, <Field (OSPFv3_Hello).prio>, <Field (OSPFv3_Hello).options>, <Field (OSPFv3_Hello).hellointerval>, <Field (OSPFv3_Hello).deadinterval>, <Field (OSPFv3_Hello).router>, <Field (OSPFv3_Hello).backup>, <Field (OSPFv3_Hello).neighbors>]
class scapy.contrib.ospf.OSPFv3_Inter_Area_Prefix_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Inter_Area_Prefix_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_Inter_Area_Prefix_LSA).age>, <Field (OSPFv3_Inter_Area_Prefix_LSA).type>, <Field (OSPFv3_Inter_Area_Prefix_LSA).id>, <Field (OSPFv3_Inter_Area_Prefix_LSA).adrouter>, <Field (OSPFv3_Inter_Area_Prefix_LSA).seq>, <Field (OSPFv3_Inter_Area_Prefix_LSA).chksum>, <Field (OSPFv3_Inter_Area_Prefix_LSA).len>, <Field (OSPFv3_Inter_Area_Prefix_LSA).reserved>, <Field (OSPFv3_Inter_Area_Prefix_LSA).metric>, <Field (OSPFv3_Inter_Area_Prefix_LSA).prefixlen>, <Field (OSPFv3_Inter_Area_Prefix_LSA).prefixoptions>, <Field (OSPFv3_Inter_Area_Prefix_LSA).reserved2>, <Field (OSPFv3_Inter_Area_Prefix_LSA).prefix>]
class scapy.contrib.ospf.OSPFv3_Inter_Area_Router_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Inter_Area_Router_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_Inter_Area_Router_LSA).age>, <Field (OSPFv3_Inter_Area_Router_LSA).type>, <Field (OSPFv3_Inter_Area_Router_LSA).id>, <Field (OSPFv3_Inter_Area_Router_LSA).adrouter>, <Field (OSPFv3_Inter_Area_Router_LSA).seq>, <Field (OSPFv3_Inter_Area_Router_LSA).chksum>, <Field (OSPFv3_Inter_Area_Router_LSA).len>, <Field (OSPFv3_Inter_Area_Router_LSA).reserved>, <Field (OSPFv3_Inter_Area_Router_LSA).options>, <Field (OSPFv3_Inter_Area_Router_LSA).reserved2>, <Field (OSPFv3_Inter_Area_Router_LSA).metric>, <Field (OSPFv3_Inter_Area_Router_LSA).router>]
class scapy.contrib.ospf.OSPFv3_Intra_Area_Prefix_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Intra_Area_Prefix_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_Intra_Area_Prefix_LSA).age>, <Field (OSPFv3_Intra_Area_Prefix_LSA).type>, <Field (OSPFv3_Intra_Area_Prefix_LSA).id>, <Field (OSPFv3_Intra_Area_Prefix_LSA).adrouter>, <Field (OSPFv3_Intra_Area_Prefix_LSA).seq>, <Field (OSPFv3_Intra_Area_Prefix_LSA).chksum>, <Field (OSPFv3_Intra_Area_Prefix_LSA).len>, <Field (OSPFv3_Intra_Area_Prefix_LSA).prefixes>, <Field (OSPFv3_Intra_Area_Prefix_LSA).reflstype>, <Field (OSPFv3_Intra_Area_Prefix_LSA).reflsid>, <Field (OSPFv3_Intra_Area_Prefix_LSA).refadrouter>, <Field (OSPFv3_Intra_Area_Prefix_LSA).prefixlist>]
class scapy.contrib.ospf.OSPFv3_LSA_Hdr

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_LSA_Hdr'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OSPFv3_LSA_Hdr).age>, <Field (OSPFv3_LSA_Hdr).type>, <Field (OSPFv3_LSA_Hdr).id>, <Field (OSPFv3_LSA_Hdr).adrouter>, <Field (OSPFv3_LSA_Hdr).seq>, <Field (OSPFv3_LSA_Hdr).chksum>, <Field (OSPFv3_LSA_Hdr).len>]
class scapy.contrib.ospf.OSPFv3_LSAck

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_LSAck'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_LSAck).lsaheaders>]
class scapy.contrib.ospf.OSPFv3_LSReq

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_LSReq'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_LSReq).requests>]
class scapy.contrib.ospf.OSPFv3_LSReq_Item

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_LSReq_Item'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OSPFv3_LSReq_Item).reserved>, <Field (OSPFv3_LSReq_Item).type>, <Field (OSPFv3_LSReq_Item).id>, <Field (OSPFv3_LSReq_Item).adrouter>]
class scapy.contrib.ospf.OSPFv3_LSUpd

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_LSUpd'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_LSUpd).lsacount>, <Field (OSPFv3_LSUpd).lsalist>]

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Link'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OSPFv3_Link).type>, <Field (OSPFv3_Link).reserved>, <Field (OSPFv3_Link).metric>, <Field (OSPFv3_Link).intid>, <Field (OSPFv3_Link).neighintid>, <Field (OSPFv3_Link).neighbor>]

Bases: scapy.contrib.ospf.OSPF_BaseLSA

class scapy.contrib.ospf.OSPFv3_Network_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Network_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_Network_LSA).age>, <Field (OSPFv3_Network_LSA).type>, <Field (OSPFv3_Network_LSA).id>, <Field (OSPFv3_Network_LSA).adrouter>, <Field (OSPFv3_Network_LSA).seq>, <Field (OSPFv3_Network_LSA).chksum>, <Field (OSPFv3_Network_LSA).len>, <Field (OSPFv3_Network_LSA).reserved>, <Field (OSPFv3_Network_LSA).options>, <Field (OSPFv3_Network_LSA).routerlist>]
class scapy.contrib.ospf.OSPFv3_Prefix_Item

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Prefix_Item'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OSPFv3_Prefix_Item).prefixlen>, <Field (OSPFv3_Prefix_Item).prefixoptions>, <Field (OSPFv3_Prefix_Item).metric>, <Field (OSPFv3_Prefix_Item).prefix>]
class scapy.contrib.ospf.OSPFv3_Router_LSA

Bases: scapy.contrib.ospf.OSPF_BaseLSA

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Router_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_Router_LSA).age>, <Field (OSPFv3_Router_LSA).type>, <Field (OSPFv3_Router_LSA).id>, <Field (OSPFv3_Router_LSA).adrouter>, <Field (OSPFv3_Router_LSA).seq>, <Field (OSPFv3_Router_LSA).chksum>, <Field (OSPFv3_Router_LSA).len>, <Field (OSPFv3_Router_LSA).flags>, <Field (OSPFv3_Router_LSA).options>, <Field (OSPFv3_Router_LSA).linklist>]
class scapy.contrib.ospf.OSPFv3_Type_7_LSA

Bases: scapy.contrib.ospf.OSPFv3_AS_External_LSA

aliastypes = [<class 'scapy.contrib.ospf.OSPFv3_Type_7_LSA'>, <class 'scapy.contrib.ospf.OSPFv3_AS_External_LSA'>, <class 'scapy.contrib.ospf.OSPF_BaseLSA'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).age>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).type>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).id>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).adrouter>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).seq>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).chksum>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).len>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).flags>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).metric>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).prefixlen>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).prefixoptions>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).reflstype>, <Field (OSPFv3_AS_External_LSA,OSPFv3_Type_7_LSA).prefix>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
scapy.contrib.ospf.ospf_lsa_checksum(lsa)