Point-to-Point Protocol Header

PPP header abstraction type and helper functions.

struct ppp_hdr_t

Header of a PPP packet.

A PPP packet is transmited as a payload of an HDLC packet. PPP packets only carry information about control protocol of a PPP stack (Link Control Protocol, IP Control Protocol, etc). IP packets encapsulated in HDLC frame are not considered PPP packet.

The format of PPP header plus payload is:

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Code | Identifier | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload … +-+-+-+-+

uint8_t code

Code of PPP packet.

uint8_t id

Identifier PPP of packet.

byteorder.h::network_uint16_t length

Length of PPP packet including payload.