variable PPPOE_CODE

Values used by the PPPoE header's code field, distinguishing Session data from the five Discovery stage packet types.

Examples

Example 1

import { assertEquals } from "@std/assert";
import { PPPOE_CODE } from "@binstruct/pppoe";

assertEquals(PPPOE_CODE.PADI, 0x09);
assertEquals(PPPOE_CODE.SESSION_DATA, 0x00);

Properties

Session stage data — the payload carries a PPP frame.

PADO: number

PPPoE Active Discovery Offer, sent by an Access Concentrator in reply to a PADI.

PADI: number

PPPoE Active Discovery Initiation, broadcast by a Host to begin Discovery.

PADR: number

PPPoE Active Discovery Request, sent by a Host to the chosen Access Concentrator.

PADS: number

PPPoE Active Discovery Session-confirmation, sent by an Access Concentrator in reply to a PADR.

PADT: number

PPPoE Active Discovery Terminate, sent by either peer to end a session.

Usage

import { PPPOE_CODE } from ".";