suricata
decode-pppoe.c File Reference
#include "suricata-common.h"
#include "packet-queue.h"
#include "decode.h"
#include "decode-ppp.h"
#include "decode-pppoe.h"
#include "decode-events.h"
#include "flow.h"
#include "util-unittest.h"
#include "util-debug.h"
Include dependency graph for decode-pppoe.c:

Go to the source code of this file.

Functions

int DecodePPPOEDiscovery (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len, PacketQueue *pq)
 Main decoding function for PPPOE Discovery packets. More...
 
int DecodePPPOESession (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len, PacketQueue *pq)
 Main decoding function for PPPOE Session packets. More...
 
void DecodePPPOERegisterTests (void)
 Registers PPPOE unit tests. More...
 

Detailed Description

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

PPPOE Decoder

Definition in file decode-pppoe.c.

Function Documentation

int DecodePPPOEDiscovery ( ThreadVars tv,
DecodeThreadVars dtv,
Packet p,
const uint8_t *  pkt,
uint32_t  len,
PacketQueue pq 
)

Main decoding function for PPPOE Discovery packets.

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

References DecodeThreadVars_::counter_pppoe, ENGINE_SET_INVALID_EVENT, PPPOE_CODE_PADI, PPPOE_CODE_PADO, PPPOE_CODE_PADR, PPPOE_CODE_PADS, PPPOE_CODE_PADT, PPPOE_DISCOVERY_HEADER_MIN_LEN, pppoe_length, PPPOE_MALFORMED_TAGS, PPPOE_PKT_TOO_SMALL, PPPOE_WRONG_CODE, Packet_::pppoedh, SCLogDebug, SCNtohs, StatsIncr(), TM_ECODE_FAILED, and TM_ECODE_OK.

Referenced by DecodeEthernet(), DecodePPPOESession(), and DecodeVLAN().

Here is the call graph for this function:

Here is the caller graph for this function:

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:

int DecodePPPOESession ( ThreadVars tv,
DecodeThreadVars dtv,
Packet p,
const uint8_t *  pkt,
uint32_t  len,
PacketQueue pq 
)