suricata
decode-pppoe.h File Reference
#include "decode.h"
#include "threadvars.h"
Include dependency graph for decode-pppoe.h:
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_LEN   8
 
#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

#define PPPOE_CODE_PADI   0x09

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

Referenced by DecodePPPOEDiscovery().

#define PPPOE_CODE_PADO   0x07

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

Referenced by DecodePPPOEDiscovery().

#define PPPOE_CODE_PADR   0x19

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

Referenced by DecodePPPOEDiscovery().

#define PPPOE_CODE_PADS   0x65

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

Referenced by DecodePPPOEDiscovery().

#define PPPOE_CODE_PADT   0xa7

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

Referenced by DecodePPPOEDiscovery().

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

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

Referenced by DecodePPPOESession().

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

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

Referenced by DecodePPPOESession().

#define PPPOE_DISCOVERY_HEADER_MIN_LEN   6

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

Referenced by DecodePPPOEDiscovery().

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

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

Referenced by DecodePPPOESession().

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

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

Referenced by DecodePPPOESession().

#define PPPOE_SESSION_HEADER_LEN   8

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

Referenced by DecodePPPOESession().

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Typedef Documentation

Function Documentation

void DecodePPPOERegisterTests ( void  )

Registers PPPOE unit tests.

Todo:
More PPPOE tests

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

References UtRegisterTest().

Here is the call graph for this function:

Variable Documentation

uint16_t discovery_id

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

uint8_t pppoe_code

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

uint16_t pppoe_length

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

Referenced by DecodePPPOEDiscovery().

uint16_t pppoe_tag_length

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

uint16_t pppoe_tag_type

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

uint8_t pppoe_version_type

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