suricata
decode-pppoe.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  PPPOESessionHdr_
 
struct  PPPOEDiscoveryTag_
 
struct  PPPOEDiscoveryHdr_
 

Macros

#define PPPOE_SESSION_HEADER_MIN_LEN   7
 
#define PPPOE_DISCOVERY_HEADER_MIN_LEN   6
 
#define PPPOE_SESSION_GET_VERSION(hdr)   ((hdr)->pppoe_version_type & 0xF0) >> 4
 
#define PPPOE_SESSION_GET_TYPE(hdr)   ((hdr)->pppoe_version_type & 0x0F)
 
#define PPPOE_DISCOVERY_GET_VERSION(hdr)   ((hdr)->pppoe_version_type & 0xF0) >> 4
 
#define PPPOE_DISCOVERY_GET_TYPE(hdr)   ((hdr)->pppoe_version_type & 0x0F)
 
#define PPPOE_CODE_PADI   0x09
 
#define PPPOE_CODE_PADO   0x07
 
#define PPPOE_CODE_PADR   0x19
 
#define PPPOE_CODE_PADS   0x65
 
#define PPPOE_CODE_PADT   0xa7
 
#define PPPOE_TAG_END_OF_LIST   0x0000 /* End-Of-List */
 
#define PPPOE_TAG_SERVICE_NAME   0x0101 /* Service-Name */
 
#define PPPOE_TAG_AC_NAME   0x0102 /* AC-Name */
 
#define PPPOE_TAG_HOST_UNIQ   0x0103 /* Host-Uniq */
 
#define PPPOE_TAG_AC_COOKIE   0x0104 /* AC-Cookie */
 
#define PPPOE_TAG_VENDOR_SPECIFIC   0x0105 /* Vendor-Specific */
 
#define PPPOE_TAG_RELAY_SESSION_ID   0x0110 /* Relay-Session-Id */
 
#define PPPOE_TAG_SERVICE_NAME_ERROR   0x0201 /* Service-Name-Error */
 
#define PPPOE_TAG_AC_SYS_ERROR   0x0202 /* AC-System Error */
 
#define PPPOE_TAG_GEN_ERROR   0x0203 /* Generic-Error */
 

Typedefs

typedef struct PPPOESessionHdr_ PPPOESessionHdr
 

Functions

struct PPPOEDiscoveryTag_ __attribute__ ((__packed__)) PPPOEDiscoveryTag
 DNP3 link header. More...
 
void DecodePPPOERegisterTests (void)
 Registers PPPOE unit tests. More...
 

Variables

uint16_t pppoe_tag_type
 
uint16_t pppoe_tag_length
 
uint8_t pppoe_version_type
 
uint8_t pppoe_code
 
uint16_t discovery_id
 
uint16_t pppoe_length
 

Detailed Description

Author
James Riden james.nosp@m.r@eu.nosp@m.rope..nosp@m.com

Definition in file decode-pppoe.h.

Macro Definition Documentation

◆ PPPOE_CODE_PADI

#define PPPOE_CODE_PADI   0x09

Definition at line 60 of file decode-pppoe.h.

◆ PPPOE_CODE_PADO

#define PPPOE_CODE_PADO   0x07

Definition at line 61 of file decode-pppoe.h.

◆ PPPOE_CODE_PADR

#define PPPOE_CODE_PADR   0x19

Definition at line 62 of file decode-pppoe.h.

◆ PPPOE_CODE_PADS

#define PPPOE_CODE_PADS   0x65

Definition at line 63 of file decode-pppoe.h.

◆ PPPOE_CODE_PADT

#define PPPOE_CODE_PADT   0xa7

Definition at line 64 of file decode-pppoe.h.

◆ PPPOE_DISCOVERY_GET_TYPE

#define PPPOE_DISCOVERY_GET_TYPE (   hdr)    ((hdr)->pppoe_version_type & 0x0F)

Definition at line 34 of file decode-pppoe.h.

◆ PPPOE_DISCOVERY_GET_VERSION

#define PPPOE_DISCOVERY_GET_VERSION (   hdr)    ((hdr)->pppoe_version_type & 0xF0) >> 4

Definition at line 33 of file decode-pppoe.h.

◆ PPPOE_DISCOVERY_HEADER_MIN_LEN

#define PPPOE_DISCOVERY_HEADER_MIN_LEN   6

Definition at line 30 of file decode-pppoe.h.

◆ PPPOE_SESSION_GET_TYPE

#define PPPOE_SESSION_GET_TYPE (   hdr)    ((hdr)->pppoe_version_type & 0x0F)

Definition at line 32 of file decode-pppoe.h.

◆ PPPOE_SESSION_GET_VERSION

#define PPPOE_SESSION_GET_VERSION (   hdr)    ((hdr)->pppoe_version_type & 0xF0) >> 4

Definition at line 31 of file decode-pppoe.h.

◆ PPPOE_SESSION_HEADER_MIN_LEN

#define PPPOE_SESSION_HEADER_MIN_LEN   7

Definition at line 29 of file decode-pppoe.h.

◆ PPPOE_TAG_AC_COOKIE

#define PPPOE_TAG_AC_COOKIE   0x0104 /* AC-Cookie */

Definition at line 71 of file decode-pppoe.h.

◆ PPPOE_TAG_AC_NAME

#define PPPOE_TAG_AC_NAME   0x0102 /* AC-Name */

Definition at line 69 of file decode-pppoe.h.

◆ PPPOE_TAG_AC_SYS_ERROR

#define PPPOE_TAG_AC_SYS_ERROR   0x0202 /* AC-System Error */

Definition at line 75 of file decode-pppoe.h.

◆ PPPOE_TAG_END_OF_LIST

#define PPPOE_TAG_END_OF_LIST   0x0000 /* End-Of-List */

Definition at line 67 of file decode-pppoe.h.

◆ PPPOE_TAG_GEN_ERROR

#define PPPOE_TAG_GEN_ERROR   0x0203 /* Generic-Error */

Definition at line 76 of file decode-pppoe.h.

◆ PPPOE_TAG_HOST_UNIQ

#define PPPOE_TAG_HOST_UNIQ   0x0103 /* Host-Uniq */

Definition at line 70 of file decode-pppoe.h.

◆ PPPOE_TAG_RELAY_SESSION_ID

#define PPPOE_TAG_RELAY_SESSION_ID   0x0110 /* Relay-Session-Id */

Definition at line 73 of file decode-pppoe.h.

◆ PPPOE_TAG_SERVICE_NAME

#define PPPOE_TAG_SERVICE_NAME   0x0101 /* Service-Name */

Definition at line 68 of file decode-pppoe.h.

◆ PPPOE_TAG_SERVICE_NAME_ERROR

#define PPPOE_TAG_SERVICE_NAME_ERROR   0x0201 /* Service-Name-Error */

Definition at line 74 of file decode-pppoe.h.

◆ PPPOE_TAG_VENDOR_SPECIFIC

#define PPPOE_TAG_VENDOR_SPECIFIC   0x0105 /* Vendor-Specific */

Definition at line 72 of file decode-pppoe.h.

Typedef Documentation

◆ PPPOESessionHdr

Function Documentation

◆ DecodePPPOERegisterTests()

void DecodePPPOERegisterTests ( void  )

Registers PPPOE unit tests.

Todo:
More PPPOE tests

Definition at line 540 of file decode-pppoe.c.

References UtRegisterTest().

Here is the call graph for this function:

Variable Documentation

◆ discovery_id

uint16_t discovery_id

Definition at line 2 of file decode-pppoe.h.

◆ pppoe_code

uint8_t pppoe_code

Definition at line 1 of file decode-pppoe.h.

◆ pppoe_length

uint16_t pppoe_length

Definition at line 3 of file decode-pppoe.h.

Referenced by DecodePPPOEDiscovery().

◆ pppoe_tag_length

uint16_t pppoe_tag_length

Definition at line 1 of file decode-pppoe.h.

◆ pppoe_tag_type

uint16_t pppoe_tag_type

Definition at line 0 of file decode-pppoe.h.

◆ pppoe_version_type

uint8_t pppoe_version_type

Definition at line 0 of file decode-pppoe.h.