scapy.layers.sctp module

SCTP (Stream Control Transmission Protocol).

class scapy.layers.sctp.ChunkParamField(name, default, count_from=None, length_from=None)

Bases: scapy.fields.PacketListField

m2i(p, m)

Convert machine value to internal value

class scapy.layers.sctp.GapAckField(name, default)

Bases: scapy.fields.Field

any2i(pkt, x)

Try to understand the most input values possible and make an internal value from them

i2m(pkt, x)

Convert internal value to machine value

m2i(pkt, x)

Convert machine value to internal value

class scapy.layers.sctp.SCTP

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTP'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (SCTP).sport>, <Field (SCTP).dport>, <Field (SCTP).tag>, <Field (SCTP).chksum>]
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.layers.sctp.SCTPChunkAbort

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkAbort'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkAbort).type>, <Field (SCTPChunkAbort).reserved>, <Field (SCTPChunkAbort).TCB>, <Field (SCTPChunkAbort).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkAddressConf

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkAddressConf'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkAddressConf).type>, <Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).flags>, <Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).len>, <Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).seq>, <Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).params>]
class scapy.layers.sctp.SCTPChunkAddressConfAck

Bases: scapy.layers.sctp.SCTPChunkAddressConf

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkAddressConfAck'>, <class 'scapy.layers.sctp.SCTPChunkAddressConf'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).type>, <Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).flags>, <Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).len>, <Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).seq>, <Field (SCTPChunkAddressConf,SCTPChunkAddressConfAck).params>]
class scapy.layers.sctp.SCTPChunkAuthentication

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkAuthentication'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkAuthentication).type>, <Field (SCTPChunkAuthentication).flags>, <Field (SCTPChunkAuthentication).len>, <Field (SCTPChunkAuthentication).shared_key_id>, <Field (SCTPChunkAuthentication).HMAC_function>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkCookieAck

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkCookieAck'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkCookieAck).type>, <Field (SCTPChunkCookieAck).flags>, <Field (SCTPChunkCookieAck).len>]
class scapy.layers.sctp.SCTPChunkCookieEcho

Bases: scapy.layers.sctp.SCTPChunkError

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkCookieEcho'>, <class 'scapy.layers.sctp.SCTPChunkError'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkCookieEcho).type>, <Field (SCTPChunkCookieEcho).flags>, <Field (SCTPChunkCookieEcho).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkData

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkData'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkData).type>, <Field (SCTPChunkData).reserved>, <Field (SCTPChunkData).delay_sack>, <Field (SCTPChunkData).unordered>, <Field (SCTPChunkData).beginning>, <Field (SCTPChunkData).ending>, <Field (SCTPChunkData).len>, <Field (SCTPChunkData).tsn>, <Field (SCTPChunkData).stream_id>, <Field (SCTPChunkData).stream_seq>, <Field (SCTPChunkData).proto_id>, <scapy.fields.PadField object>]
payload_guess = [({'dport': 3868}, <class 'scapy.contrib.diameter.DiamG'>), ({'sport': 3868}, <class 'scapy.contrib.diameter.DiamG'>), ({'proto_id': 46}, <class 'scapy.contrib.diameter.DiamG'>), ({'proto_id': 47}, <class 'scapy.contrib.diameter.DiamG'>)]
class scapy.layers.sctp.SCTPChunkError

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkError'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkError).type>, <Field (SCTPChunkError).flags>, <Field (SCTPChunkError).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkHeartbeatAck

Bases: scapy.layers.sctp.SCTPChunkHeartbeatReq

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkHeartbeatAck'>, <class 'scapy.layers.sctp.SCTPChunkHeartbeatReq'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkHeartbeatReq,SCTPChunkHeartbeatAck).type>, <Field (SCTPChunkHeartbeatReq,SCTPChunkHeartbeatAck).flags>, <Field (SCTPChunkHeartbeatReq,SCTPChunkHeartbeatAck).len>, <Field (SCTPChunkHeartbeatReq,SCTPChunkHeartbeatAck).params>]
class scapy.layers.sctp.SCTPChunkHeartbeatReq

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkHeartbeatReq'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkHeartbeatReq).type>, <Field (SCTPChunkHeartbeatReq,SCTPChunkHeartbeatAck).flags>, <Field (SCTPChunkHeartbeatReq,SCTPChunkHeartbeatAck).len>, <Field (SCTPChunkHeartbeatReq,SCTPChunkHeartbeatAck).params>]
class scapy.layers.sctp.SCTPChunkInit

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkInit'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkInit).type>, <Field (SCTPChunkInit,SCTPChunkInitAck).flags>, <Field (SCTPChunkInit,SCTPChunkInitAck).len>, <Field (SCTPChunkInit,SCTPChunkInitAck).init_tag>, <Field (SCTPChunkInit,SCTPChunkInitAck).a_rwnd>, <Field (SCTPChunkInit,SCTPChunkInitAck).n_out_streams>, <Field (SCTPChunkInit,SCTPChunkInitAck).n_in_streams>, <Field (SCTPChunkInit,SCTPChunkInitAck).init_tsn>, <Field (SCTPChunkInit,SCTPChunkInitAck).params>]
class scapy.layers.sctp.SCTPChunkInitAck

Bases: scapy.layers.sctp.SCTPChunkInit

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkInitAck'>, <class 'scapy.layers.sctp.SCTPChunkInit'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkInit,SCTPChunkInitAck).type>, <Field (SCTPChunkInit,SCTPChunkInitAck).flags>, <Field (SCTPChunkInit,SCTPChunkInitAck).len>, <Field (SCTPChunkInit,SCTPChunkInitAck).init_tag>, <Field (SCTPChunkInit,SCTPChunkInitAck).a_rwnd>, <Field (SCTPChunkInit,SCTPChunkInitAck).n_out_streams>, <Field (SCTPChunkInit,SCTPChunkInitAck).n_in_streams>, <Field (SCTPChunkInit,SCTPChunkInitAck).init_tsn>, <Field (SCTPChunkInit,SCTPChunkInitAck).params>]
class scapy.layers.sctp.SCTPChunkParamAdaptationLayer

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamAdaptationLayer'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamAdaptationLayer).type>, <Field (SCTPChunkParamAdaptationLayer).len>, <Field (SCTPChunkParamAdaptationLayer).indication>]
class scapy.layers.sctp.SCTPChunkParamAddIPAddr

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamAddIPAddr'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamAddIPAddr).type>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).len>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).correlation_id>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).addr_type>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).addr_len>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.layers.sctp.SCTPChunkParamChunkList

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamChunkList'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamChunkList).type>, <Field (SCTPChunkParamChunkList).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamCookiePreservative

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamCookiePreservative'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamCookiePreservative).type>, <Field (SCTPChunkParamCookiePreservative).len>, <Field (SCTPChunkParamCookiePreservative).sug_cookie_inc>]
class scapy.layers.sctp.SCTPChunkParamDelIPAddr

Bases: scapy.layers.sctp.SCTPChunkParamAddIPAddr

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamDelIPAddr'>, <class 'scapy.layers.sctp.SCTPChunkParamAddIPAddr'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr).type>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).len>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).correlation_id>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).addr_type>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).addr_len>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.layers.sctp.SCTPChunkParamECNCapable

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamECNCapable'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamECNCapable).type>, <Field (SCTPChunkParamECNCapable).len>]
class scapy.layers.sctp.SCTPChunkParamErrorIndication

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamErrorIndication'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamErrorIndication).type>, <Field (SCTPChunkParamErrorIndication).len>, <Field (SCTPChunkParamErrorIndication).correlation_id>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamFwdTSN

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamFwdTSN'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamFwdTSN).type>, <Field (SCTPChunkParamFwdTSN).len>]
class scapy.layers.sctp.SCTPChunkParamHearbeatInfo

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamHearbeatInfo'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamHearbeatInfo).type>, <Field (SCTPChunkParamHearbeatInfo).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamHostname

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamHostname'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamHostname).type>, <Field (SCTPChunkParamHostname).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamIPv4Addr

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamIPv4Addr'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamIPv4Addr).type>, <Field (SCTPChunkParamIPv4Addr).len>, <Field (SCTPChunkParamIPv4Addr).addr>]
class scapy.layers.sctp.SCTPChunkParamIPv6Addr

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamIPv6Addr'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamIPv6Addr).type>, <Field (SCTPChunkParamIPv6Addr).len>, <Field (SCTPChunkParamIPv6Addr).addr>]
class scapy.layers.sctp.SCTPChunkParamRandom

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamRandom'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamRandom).type>, <Field (SCTPChunkParamRandom).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamRequestedHMACFunctions

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamRequestedHMACFunctions'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamRequestedHMACFunctions).type>, <Field (SCTPChunkParamRequestedHMACFunctions).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamSetPrimaryAddr

Bases: scapy.layers.sctp.SCTPChunkParamAddIPAddr

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamSetPrimaryAddr'>, <class 'scapy.layers.sctp.SCTPChunkParamAddIPAddr'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamAddIPAddr,SCTPChunkParamSetPrimaryAddr).type>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).len>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).correlation_id>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).addr_type>, <Field (SCTPChunkParamAddIPAddr,SCTPChunkParamDelIPAddr,SCTPChunkParamSetPrimaryAddr).addr_len>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.layers.sctp.SCTPChunkParamStateCookie

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamStateCookie'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamStateCookie).type>, <Field (SCTPChunkParamStateCookie).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamSuccessIndication

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamSuccessIndication'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamSuccessIndication).type>, <Field (SCTPChunkParamSuccessIndication).len>, <Field (SCTPChunkParamSuccessIndication).correlation_id>]
class scapy.layers.sctp.SCTPChunkParamSupportedAddrTypes

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamSupportedAddrTypes'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamSupportedAddrTypes).type>, <Field (SCTPChunkParamSupportedAddrTypes).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamSupportedExtensions

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamSupportedExtensions'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamSupportedExtensions).type>, <Field (SCTPChunkParamSupportedExtensions).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkParamUnrocognizedParam

Bases: scapy.layers.sctp._SCTPChunkParam, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkParamUnrocognizedParam'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkParamUnrocognizedParam).type>, <Field (SCTPChunkParamUnrocognizedParam).len>, <scapy.fields.PadField object>]
class scapy.layers.sctp.SCTPChunkSACK

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkSACK'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkSACK).type>, <Field (SCTPChunkSACK).flags>, <Field (SCTPChunkSACK).len>, <Field (SCTPChunkSACK).cumul_tsn_ack>, <Field (SCTPChunkSACK).a_rwnd>, <Field (SCTPChunkSACK).n_gap_ack>, <Field (SCTPChunkSACK).n_dup_tsn>, <Field (SCTPChunkSACK).gap_ack_list>, <Field (SCTPChunkSACK).dup_tsn_list>]
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.layers.sctp.SCTPChunkShutdown

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkShutdown'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkShutdown).type>, <Field (SCTPChunkShutdown).flags>, <Field (SCTPChunkShutdown).len>, <Field (SCTPChunkShutdown).cumul_tsn_ack>]
class scapy.layers.sctp.SCTPChunkShutdownAck

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkShutdownAck'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkShutdownAck).type>, <Field (SCTPChunkShutdownAck).flags>, <Field (SCTPChunkShutdownAck).len>]
class scapy.layers.sctp.SCTPChunkShutdownComplete

Bases: scapy.layers.sctp._SCTPChunkGuessPayload, scapy.packet.Packet

aliastypes = [<class 'scapy.layers.sctp.SCTPChunkShutdownComplete'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (SCTPChunkShutdownComplete).type>, <Field (SCTPChunkShutdownComplete).reserved>, <Field (SCTPChunkShutdownComplete).TCB>, <Field (SCTPChunkShutdownComplete).len>]
scapy.layers.sctp.crc32c(buf)