The system provides a Python object for PPP packet encapsulated in PPPoE packets: alc.ppp.
LCP (read-only)
IPCP (read-only)
IP6CP(read-only)
alc.ppp has following attributes to represent the PPP header fields:
Table: PPP header field attributes displays information about PPP header field attributes.
Class attributes | PPP header field | Access |
---|---|---|
alc.ppp.protocol |
Integer, protocol field in ppp header |
Read |
alc.ppp.code |
Integer, code field in ppp protocol header |
Read |
alc.ppp.id |
Integer, identifier field in ppp protocol header |
Read |
alc.ppp.len |
Integer, length field in ppp protocol header |
Read |
The following is a list of functions of alc.ppp:
alc.ppp.getOptionList()
Returns a tuple that includes type of existing PPP options in the packet. The order of the element in the tuple is as same as the options appear in the packet. If there are multiple instances of same option, then each instance is one element in the tuple.
alc.ppp.get(op-type)
Returns a tuple of strings, each string represent one instance of the specified option, the value of this string is exact bytes of the option_data as it appears in packet (excludes option_type and option_len); if the option does not exist, return (); if a specific instance’s option_length=0, return ‟” for this instance.