scapy.layers.ppp

PPP (Point to Point Protocol)

[RFC 1661]

class scapy.layers.ppp.DIR_PPP

Bases: scapy.packet.Packet

aliastypes
fields_desc
DIR_PPP fields

direction

ByteEnumField

0

payload_guess

Possible sublayers: PPP

class scapy.layers.ppp.HDLC

Bases: scapy.packet.Packet

aliastypes
fields_desc
HDLC fields

address

XByteField

255

control

XByteField

3

payload_guess

Possible sublayers: PPP

class scapy.layers.ppp.PPP

Bases: scapy.packet.Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)
fields_desc
PPP fields

proto

_PPPProtoField

33

payload_guess

Possible sublayers: EAP, IP, IPv6, PPP_CHAP, PPP_ECP, PPP_IPCP, PPP_LCP, PPP_PAP

class scapy.layers.ppp.PPP_CHAP

Bases: scapy.packet.Packet

aliastypes
answers(other)
classmethod dispatch_hook(_pkt=None, *_, **kargs)
extract_padding(pay)
fields_desc
PPP_CHAP fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

data

StrLenField

b''

mysummary()
class scapy.layers.ppp.PPP_CHAP_ChallengeResponse

Bases: scapy.layers.ppp.PPP_CHAP

aliastypes
answers(other)
fields_desc
PPP_CHAP_ChallengeResponse fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

value_size

FieldLenField

None

value

XStrLenField

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

optional_name

StrLenField

b''

mysummary()
class scapy.layers.ppp.PPP_ECP

Bases: scapy.packet.Packet

aliastypes
fields_desc
PPP_ECP fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

options

PacketListField

[]

class scapy.layers.ppp.PPP_ECP_Option

Bases: scapy.packet.Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(pay)
fields_desc
PPP_ECP_Option fields

type

ByteEnumField

None

len

FieldLenField

None

data

StrLenField

b''

classmethod register_variant()
registered_options = {None: <class 'scapy.layers.ppp.PPP_ECP_Option'>, 0: <class 'scapy.layers.ppp.PPP_ECP_Option_OUI'>}
class scapy.layers.ppp.PPP_ECP_Option_OUI

Bases: scapy.layers.ppp.PPP_ECP_Option

aliastypes
fields_desc
PPP_ECP_Option_OUI fields

type

ByteEnumField

0

len

FieldLenField

None

oui

StrFixedLenField

b''

subtype

ByteField

0

data

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP

Bases: scapy.packet.Packet

aliastypes
fields_desc
PPP_IPCP fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

options

PacketListField

[]

class scapy.layers.ppp.PPP_IPCP_Option

Bases: scapy.packet.Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(pay)
fields_desc
PPP_IPCP_Option fields

type

ByteEnumField

None

len

FieldLenField

None

data

StrLenField

b''

classmethod register_variant()
registered_options = {None: <class 'scapy.layers.ppp.PPP_IPCP_Option'>, 3: <class 'scapy.layers.ppp.PPP_IPCP_Option_IPAddress'>, 129: <class 'scapy.layers.ppp.PPP_IPCP_Option_DNS1'>, 131: <class 'scapy.layers.ppp.PPP_IPCP_Option_DNS2'>, 130: <class 'scapy.layers.ppp.PPP_IPCP_Option_NBNS1'>, 132: <class 'scapy.layers.ppp.PPP_IPCP_Option_NBNS2'>}
class scapy.layers.ppp.PPP_IPCP_Option_DNS1

Bases: scapy.layers.ppp.PPP_IPCP_Option_IPAddress

aliastypes
fields_desc
PPP_IPCP_Option_DNS1 fields

type

ByteEnumField

129

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP_Option_DNS2

Bases: scapy.layers.ppp.PPP_IPCP_Option_IPAddress

aliastypes
fields_desc
PPP_IPCP_Option_DNS2 fields

type

ByteEnumField

131

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP_Option_IPAddress

Bases: scapy.layers.ppp.PPP_IPCP_Option

aliastypes
fields_desc
PPP_IPCP_Option_IPAddress fields

type

ByteEnumField

3

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP_Option_NBNS1

Bases: scapy.layers.ppp.PPP_IPCP_Option_IPAddress

aliastypes
fields_desc
PPP_IPCP_Option_NBNS1 fields

type

ByteEnumField

130

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP_Option_NBNS2

Bases: scapy.layers.ppp.PPP_IPCP_Option_IPAddress

aliastypes
fields_desc
PPP_IPCP_Option_NBNS2 fields

type

ByteEnumField

132

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_LCP

Bases: scapy.packet.Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(pay)
fields_desc
PPP_LCP fields

code

ByteEnumField

5

id

XByteField

0

len

FieldLenField

None

data

StrLenField

b''

mysummary()
class scapy.layers.ppp.PPP_LCP_ACCM_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes
fields_desc
PPP_LCP_ACCM_Option fields

type

ByteEnumField

2

len

ByteField

6

accm

BitField (32 bits)

0

class scapy.layers.ppp.PPP_LCP_Auth_Protocol_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes
fields_desc
PPP_LCP_Auth_Protocol_Option fields

type

ByteEnumField

3

len

FieldLenField

None

auth_protocol

ShortEnumField

49187

data

StrLenField (Cond)

b''

algorithm

ByteEnumField (Cond)

5

class scapy.layers.ppp.PPP_LCP_Callback_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes
fields_desc
PPP_LCP_Callback_Option fields

type

ByteEnumField

13

len

FieldLenField

None

operation

ByteEnumField

0

message

StrLenField

b''

class scapy.layers.ppp.PPP_LCP_Code_Reject

Bases: scapy.layers.ppp.PPP_LCP

aliastypes
fields_desc
PPP_LCP_Code_Reject fields

code

ByteEnumField

7

id

XByteField

0

len

FieldLenField

None

rejected_packet

PacketField

None

class scapy.layers.ppp.PPP_LCP_Configure

Bases: scapy.layers.ppp.PPP_LCP

aliastypes
answers(other)
fields_desc
PPP_LCP_Configure fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

options

PacketListField

[]

class scapy.layers.ppp.PPP_LCP_Discard_Request

Bases: scapy.layers.ppp.PPP_LCP

aliastypes
fields_desc
PPP_LCP_Discard_Request fields

code

ByteEnumField

11

id

XByteField

0

len

FieldLenField

None

magic_number

IntField

None

data

StrLenField

b''

class scapy.layers.ppp.PPP_LCP_Echo

Bases: scapy.layers.ppp.PPP_LCP_Discard_Request

aliastypes
answers(other)
fields_desc
PPP_LCP_Echo fields

code

ByteEnumField

9

id

XByteField

0

len

FieldLenField

None

magic_number

IntField

None

data

StrLenField

b''

class scapy.layers.ppp.PPP_LCP_MRU_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes
fields_desc
PPP_LCP_MRU_Option fields

type

ByteEnumField

1

len

ByteField

4

max_recv_unit

ShortField

1500

class scapy.layers.ppp.PPP_LCP_Magic_Number_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes
fields_desc
PPP_LCP_Magic_Number_Option fields

type

ByteEnumField

5

len

ByteField

6

magic_number

IntField

None

class scapy.layers.ppp.PPP_LCP_Option

Bases: scapy.packet.Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(pay)
fields_desc
PPP_LCP_Option fields

type

ByteEnumField

None

len

FieldLenField

None

data

StrLenField

None

classmethod register_variant()
registered_options = {None: <class 'scapy.layers.ppp.PPP_LCP_Option'>, 1: <class 'scapy.layers.ppp.PPP_LCP_MRU_Option'>, 2: <class 'scapy.layers.ppp.PPP_LCP_ACCM_Option'>, 3: <class 'scapy.layers.ppp.PPP_LCP_Auth_Protocol_Option'>, 4: <class 'scapy.layers.ppp.PPP_LCP_Quality_Protocol_Option'>, 5: <class 'scapy.layers.ppp.PPP_LCP_Magic_Number_Option'>, 13: <class 'scapy.layers.ppp.PPP_LCP_Callback_Option'>}
class scapy.layers.ppp.PPP_LCP_Protocol_Reject

Bases: scapy.layers.ppp.PPP_LCP

aliastypes
fields_desc
PPP_LCP_Protocol_Reject fields

code

ByteEnumField

8

id

XByteField

0

len

FieldLenField

None

rejected_protocol

ShortEnumField

None

rejected_information

PacketField

None

class scapy.layers.ppp.PPP_LCP_Quality_Protocol_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes
fields_desc
PPP_LCP_Quality_Protocol_Option fields

type

ByteEnumField

4

len

FieldLenField

None

quality_protocol

ShortEnumField

49189

data

StrLenField

b''

class scapy.layers.ppp.PPP_LCP_Terminate

Bases: scapy.layers.ppp.PPP_LCP

aliastypes
answers(other)
fields_desc
PPP_LCP_Terminate fields

code

ByteEnumField

5

id

XByteField

0

len

FieldLenField

None

data

StrLenField

b''

class scapy.layers.ppp.PPP_PAP

Bases: scapy.packet.Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *_, **kargs)
extract_padding(pay)
fields_desc
PPP_PAP fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

data

StrLenField

b''

class scapy.layers.ppp.PPP_PAP_Request

Bases: scapy.layers.ppp.PPP_PAP

aliastypes
fields_desc
PPP_PAP_Request fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

username_len

FieldLenField

None

username

StrLenField

None

passwd_len

FieldLenField

None

password

StrLenField

None

mysummary()
class scapy.layers.ppp.PPP_PAP_Response

Bases: scapy.layers.ppp.PPP_PAP

aliastypes
answers(other)
fields_desc
PPP_PAP_Response fields

code

ByteEnumField

2

id

XByteField

0

len

FieldLenField

None

msg_len

FieldLenField

None

message

StrLenField

b''

mysummary()
class scapy.layers.ppp.PPPoE

Bases: scapy.packet.Packet

aliastypes
fields_desc
PPPoE fields

version

BitField (4 bits)

1

type

BitField (4 bits)

1

code

ByteEnumField

0

sessionid

XShortField

0

len

ShortField

None

payload_guess

Possible sublayers: PPP

post_build(p, pay)
class scapy.layers.ppp.PPPoED

Bases: scapy.layers.ppp.PPPoE

aliastypes
code_list = {0: 'PPP Session Stage', 7: 'PPPoE Active Discovery Offer (PADO)', 9: 'PPPoE Active Discovery Initiation (PADI)', 10: 'PPPoE Active Discovery Session-Grant (PADG)', 11: 'PPPoE Active Discovery Session-Credit Response (PADC)', 12: 'PPPoE Active Discovery Quality (PADQ)', 25: 'PPPoE Active Discovery Request (PADR)', 101: 'PPPoE Active Discovery Session-confirmation (PADS)', 167: 'PPPoE Active Discovery Terminate (PADT)'}
fields_desc
PPPoED fields

version

BitField (4 bits)

1

type

BitField (4 bits)

1

code

ByteEnumField

9

sessionid

XShortField

0

len

ShortField

None

payload_guess

Possible sublayers: PPPoED_Tags

class scapy.layers.ppp.PPPoED_Tags

Bases: scapy.packet.Packet

aliastypes
fields_desc
PPPoED_Tags fields

tag_list

PacketListField

[]

class scapy.layers.ppp.PPPoETag

Bases: scapy.packet.Packet

aliastypes
extract_padding(s)
fields_desc
PPPoETag fields

tag_type

ShortEnumField

None

tag_len

FieldLenField

None

tag_value

StrLenField

b''

tag_list = {0: 'End-Of-List', 257: 'Service-Name', 258: 'AC-Name', 259: 'Host-Uniq', 260: 'AC-Cookie', 261: 'Vendor-Specific', 262: 'Credits', 263: 'Metrics', 264: 'Sequence Number', 265: 'Credit Scale Factor', 272: 'Relay-Session-Id', 288: 'PPP-Max-Payload', 513: 'Service-Name-Error', 514: 'AC-System-Error', 515: 'Generic-Error'}
scapy.layers.ppp.adjust_auth_len(pkt, x)