scapy.layers.ppp module

PPP (Point to Point Protocol)

[RFC 1661]

class scapy.layers.ppp.DIR_PPP

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.DIR_PPP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (DIR_PPP).direction>]
payload_guess = [({}, <class 'scapy.layers.ppp.PPP'>)]
class scapy.layers.ppp.HDLC

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.HDLC'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (HDLC).address>, <Field (HDLC).control>]
payload_guess = [({}, <class 'scapy.layers.ppp.PPP'>)]
class scapy.layers.ppp.PPP

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPP'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
fields_desc = [<Field (PPP).proto>]
payload_guess = [({'proto': 49703}, <class 'scapy.layers.eap.EAP'>), ({'proto': 33}, <class 'scapy.layers.inet.IP'>), ({'proto': 87}, <class 'scapy.layers.inet6.IPv6'>), ({'proto': 49699}, <class 'scapy.layers.ppp.PPP_CHAP'>), ({'proto': 32801}, <class 'scapy.layers.ppp.PPP_IPCP'>), ({'proto': 32851}, <class 'scapy.layers.ppp.PPP_ECP'>), ({'proto': 49185}, <class 'scapy.layers.ppp.PPP_LCP'>), ({'proto': 49187}, <class 'scapy.layers.ppp.PPP_PAP'>)]
class scapy.layers.ppp.PPP_

Bases: scapy.layers.ppp.PPP

aliastypes = [<class 'scapy.layers.ppp.PPP_'>, <class 'scapy.layers.ppp.PPP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_).proto>]
class scapy.layers.ppp.PPP_CHAP

Bases: scapy.packet.Packet

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

DEV: true if self is an answer from other

classmethod dispatch_hook(_pkt=None, *_, **kargs)
extract_padding(pay)

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 (PPP_CHAP).code>, <Field (PPP_CHAP).id>, <Field (PPP_CHAP).len>, <Field (PPP_CHAP).data>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.ppp.PPP_CHAP_ChallengeResponse

Bases: scapy.layers.ppp.PPP_CHAP

aliastypes = [<class 'scapy.layers.ppp.PPP_CHAP_ChallengeResponse'>, <class 'scapy.layers.ppp.PPP_CHAP'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (PPP_CHAP_ChallengeResponse).code>, <Field (PPP_CHAP_ChallengeResponse).id>, <Field (PPP_CHAP_ChallengeResponse).len>, <Field (PPP_CHAP_ChallengeResponse).value_size>, <Field (PPP_CHAP_ChallengeResponse).value>, <Field (PPP_CHAP_ChallengeResponse).optional_name>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.ppp.PPP_ECP

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPP_ECP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_ECP).code>, <Field (PPP_ECP).id>, <Field (PPP_ECP).len>, <Field (PPP_ECP).options>]
class scapy.layers.ppp.PPP_ECP_Option

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPP_ECP_Option'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(pay)

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 (PPP_ECP_Option).type>, <Field (PPP_ECP_Option).len>, <Field (PPP_ECP_Option).data>]
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 = [<class 'scapy.layers.ppp.PPP_ECP_Option_OUI'>, <class 'scapy.layers.ppp.PPP_ECP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_ECP_Option_OUI).type>, <Field (PPP_ECP_Option_OUI).len>, <Field (PPP_ECP_Option_OUI).oui>, <Field (PPP_ECP_Option_OUI).subtype>, <Field (PPP_ECP_Option_OUI).data>]
class scapy.layers.ppp.PPP_IPCP

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPP_IPCP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_IPCP).code>, <Field (PPP_IPCP).id>, <Field (PPP_IPCP).len>, <Field (PPP_IPCP).options>]
class scapy.layers.ppp.PPP_IPCP_Option

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPP_IPCP_Option'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(pay)

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 (PPP_IPCP_Option).type>, <Field (PPP_IPCP_Option).len>, <Field (PPP_IPCP_Option).data>]
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 = [<class 'scapy.layers.ppp.PPP_IPCP_Option_DNS1'>, <class 'scapy.layers.ppp.PPP_IPCP_Option_IPAddress'>, <class 'scapy.layers.ppp.PPP_IPCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1).type>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).len>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).data>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).garbage>]
class scapy.layers.ppp.PPP_IPCP_Option_DNS2

Bases: scapy.layers.ppp.PPP_IPCP_Option_IPAddress

aliastypes = [<class 'scapy.layers.ppp.PPP_IPCP_Option_DNS2'>, <class 'scapy.layers.ppp.PPP_IPCP_Option_IPAddress'>, <class 'scapy.layers.ppp.PPP_IPCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS2).type>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).len>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).data>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).garbage>]
class scapy.layers.ppp.PPP_IPCP_Option_IPAddress

Bases: scapy.layers.ppp.PPP_IPCP_Option

aliastypes = [<class 'scapy.layers.ppp.PPP_IPCP_Option_IPAddress'>, <class 'scapy.layers.ppp.PPP_IPCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_IPCP_Option_IPAddress).type>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).len>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).data>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).garbage>]
class scapy.layers.ppp.PPP_IPCP_Option_NBNS1

Bases: scapy.layers.ppp.PPP_IPCP_Option_IPAddress

aliastypes = [<class 'scapy.layers.ppp.PPP_IPCP_Option_NBNS1'>, <class 'scapy.layers.ppp.PPP_IPCP_Option_IPAddress'>, <class 'scapy.layers.ppp.PPP_IPCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_NBNS1).type>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).len>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).data>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).garbage>]
class scapy.layers.ppp.PPP_IPCP_Option_NBNS2

Bases: scapy.layers.ppp.PPP_IPCP_Option_IPAddress

aliastypes = [<class 'scapy.layers.ppp.PPP_IPCP_Option_NBNS2'>, <class 'scapy.layers.ppp.PPP_IPCP_Option_IPAddress'>, <class 'scapy.layers.ppp.PPP_IPCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_NBNS2).type>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).len>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).data>, <Field (PPP_IPCP_Option_IPAddress,PPP_IPCP_Option_DNS1,PPP_IPCP_Option_DNS2,PPP_IPCP_Option_NBNS1,PPP_IPCP_Option_NBNS2).garbage>]
class scapy.layers.ppp.PPP_LCP

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(pay)

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 (PPP_LCP,PPP_LCP_Terminate).code>, <Field (PPP_LCP,PPP_LCP_Terminate).id>, <Field (PPP_LCP,PPP_LCP_Terminate).len>, <Field (PPP_LCP,PPP_LCP_Terminate).data>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.ppp.PPP_LCP_ACCM_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_ACCM_Option'>, <class 'scapy.layers.ppp.PPP_LCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_ACCM_Option).type>, <Field (PPP_LCP_ACCM_Option).len>, <Field (PPP_LCP_ACCM_Option).accm>]
class scapy.layers.ppp.PPP_LCP_Auth_Protocol_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Auth_Protocol_Option'>, <class 'scapy.layers.ppp.PPP_LCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_Auth_Protocol_Option).type>, <Field (PPP_LCP_Auth_Protocol_Option).len>, <Field (PPP_LCP_Auth_Protocol_Option).auth_protocol>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
class scapy.layers.ppp.PPP_LCP_Callback_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Callback_Option'>, <class 'scapy.layers.ppp.PPP_LCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_Callback_Option).type>, <Field (PPP_LCP_Callback_Option).len>, <Field (PPP_LCP_Callback_Option).operation>, <Field (PPP_LCP_Callback_Option).message>]
class scapy.layers.ppp.PPP_LCP_Code_Reject

Bases: scapy.layers.ppp.PPP_LCP

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Code_Reject'>, <class 'scapy.layers.ppp.PPP_LCP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_Code_Reject).code>, <Field (PPP_LCP_Code_Reject).id>, <Field (PPP_LCP_Code_Reject).len>, <Field (PPP_LCP_Code_Reject).rejected_packet>]
class scapy.layers.ppp.PPP_LCP_Configure

Bases: scapy.layers.ppp.PPP_LCP

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Configure'>, <class 'scapy.layers.ppp.PPP_LCP'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (PPP_LCP_Configure).code>, <Field (PPP_LCP_Configure).id>, <Field (PPP_LCP_Configure).len>, <Field (PPP_LCP_Configure).options>]
class scapy.layers.ppp.PPP_LCP_Discard_Request

Bases: scapy.layers.ppp.PPP_LCP

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Discard_Request'>, <class 'scapy.layers.ppp.PPP_LCP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_Discard_Request).code>, <Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).id>, <Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).len>, <Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).magic_number>, <Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).data>]
class scapy.layers.ppp.PPP_LCP_Echo

Bases: scapy.layers.ppp.PPP_LCP_Discard_Request

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Echo'>, <class 'scapy.layers.ppp.PPP_LCP_Discard_Request'>, <class 'scapy.layers.ppp.PPP_LCP'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).code>, <Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).id>, <Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).len>, <Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).magic_number>, <Field (PPP_LCP_Discard_Request,PPP_LCP_Echo).data>]
class scapy.layers.ppp.PPP_LCP_MRU_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_MRU_Option'>, <class 'scapy.layers.ppp.PPP_LCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_MRU_Option).type>, <Field (PPP_LCP_MRU_Option).len>, <Field (PPP_LCP_MRU_Option).max_recv_unit>]
class scapy.layers.ppp.PPP_LCP_Magic_Number_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Magic_Number_Option'>, <class 'scapy.layers.ppp.PPP_LCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_Magic_Number_Option).type>, <Field (PPP_LCP_Magic_Number_Option).len>, <Field (PPP_LCP_Magic_Number_Option).magic_number>]
class scapy.layers.ppp.PPP_LCP_Option

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Option'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(pay)

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 (PPP_LCP_Option).type>, <Field (PPP_LCP_Option).len>, <Field (PPP_LCP_Option).data>]
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 = [<class 'scapy.layers.ppp.PPP_LCP_Protocol_Reject'>, <class 'scapy.layers.ppp.PPP_LCP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_Protocol_Reject).code>, <Field (PPP_LCP_Protocol_Reject).id>, <Field (PPP_LCP_Protocol_Reject).len>, <Field (PPP_LCP_Protocol_Reject).rejected_protocol>, <Field (PPP_LCP_Protocol_Reject).rejected_information>]
class scapy.layers.ppp.PPP_LCP_Quality_Protocol_Option

Bases: scapy.layers.ppp.PPP_LCP_Option

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Quality_Protocol_Option'>, <class 'scapy.layers.ppp.PPP_LCP_Option'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_LCP_Quality_Protocol_Option).type>, <Field (PPP_LCP_Quality_Protocol_Option).len>, <Field (PPP_LCP_Quality_Protocol_Option).quality_protocol>, <Field (PPP_LCP_Quality_Protocol_Option).data>]
class scapy.layers.ppp.PPP_LCP_Terminate

Bases: scapy.layers.ppp.PPP_LCP

aliastypes = [<class 'scapy.layers.ppp.PPP_LCP_Terminate'>, <class 'scapy.layers.ppp.PPP_LCP'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (PPP_LCP,PPP_LCP_Terminate).code>, <Field (PPP_LCP,PPP_LCP_Terminate).id>, <Field (PPP_LCP,PPP_LCP_Terminate).len>, <Field (PPP_LCP,PPP_LCP_Terminate).data>]
class scapy.layers.ppp.PPP_PAP

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPP_PAP'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *_, **kargs)
extract_padding(pay)

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 (PPP_PAP).code>, <Field (PPP_PAP).id>, <Field (PPP_PAP).len>, <Field (PPP_PAP).data>]
class scapy.layers.ppp.PPP_PAP_Request

Bases: scapy.layers.ppp.PPP_PAP

aliastypes = [<class 'scapy.layers.ppp.PPP_PAP_Request'>, <class 'scapy.layers.ppp.PPP_PAP'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPP_PAP_Request).code>, <Field (PPP_PAP_Request).id>, <Field (PPP_PAP_Request).len>, <Field (PPP_PAP_Request).username_len>, <Field (PPP_PAP_Request).username>, <Field (PPP_PAP_Request).passwd_len>, <Field (PPP_PAP_Request).password>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.ppp.PPP_PAP_Response

Bases: scapy.layers.ppp.PPP_PAP

aliastypes = [<class 'scapy.layers.ppp.PPP_PAP_Response'>, <class 'scapy.layers.ppp.PPP_PAP'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (PPP_PAP_Response).code>, <Field (PPP_PAP_Response).id>, <Field (PPP_PAP_Response).len>, <Field (PPP_PAP_Response).msg_len>, <Field (PPP_PAP_Response).message>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

class scapy.layers.ppp.PPPoE

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPPoE'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPPoE).version>, <Field (PPPoE).type>, <Field (PPPoE).code>, <Field (PPPoE).sessionid>, <Field (PPPoE).len>]
payload_guess = [({'code': 0}, <class 'scapy.layers.ppp.PPP'>)]
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.ppp.PPPoED

Bases: scapy.layers.ppp.PPPoE

aliastypes = [<class 'scapy.layers.ppp.PPPoED'>, <class 'scapy.layers.ppp.PPPoE'>, <class 'scapy.packet.Packet'>]
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 = [<Field (PPPoED).version>, <Field (PPPoED).type>, <Field (PPPoED).code>, <Field (PPPoED).sessionid>, <Field (PPPoED).len>]
payload_guess = [({'type': 1}, <class 'scapy.layers.ppp.PPPoED_Tags'>)]
class scapy.layers.ppp.PPPoED_Tags

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPPoED_Tags'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (PPPoED_Tags).tag_list>]
class scapy.layers.ppp.PPPoETag

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.ppp.PPPoETag'>, <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 (PPPoETag).tag_type>, <Field (PPPoETag).tag_len>, <Field (PPPoETag).tag_value>]
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)