suricata
decode-vxlan.c File Reference
#include "suricata-common.h"
#include "decode.h"
#include "decode-vxlan.h"
#include "decode-events.h"
#include "detect.h"
#include "detect-engine-port.h"
#include "flow.h"
#include "util-validate.h"
#include "util-unittest.h"
#include "util-debug.h"
#include "conf-yaml-loader.h"
Include dependency graph for decode-vxlan.c:

Go to the source code of this file.

Data Structures

struct  VXLANHeader_
 

Macros

#define VXLAN_HEADER_LEN   sizeof(VXLANHeader)
 
#define VXLAN_MAX_PORTS   4
 
#define VXLAN_UNSET_PORT   -1
 
#define VXLAN_DEFAULT_PORT   4789
 
#define VXLAN_DEFAULT_PORT_S   "4789"
 

Typedefs

typedef struct VXLANHeader_ VXLANHeader
 

Enumerations

enum  VXLANReservedCheckMode { VXLAN_RES_CHECK_STRICT = 0, VXLAN_RES_CHECK_PERMISSIVE }
 

Functions

bool DecodeVXLANEnabledForPort (const uint16_t dp)
 
void DecodeVXLANConfig (void)
 
int DecodeVXLAN (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len)
 
void DecodeVXLANRegisterTests (void)
 

Variables

typedef __attribute__
 DNP3 application header. More...
 

Detailed Description

Author
Henrik Kramshoej hlk@k.nosp@m.rams.nosp@m.e.org

VXLAN tunneling scheme decoder.

This implementation is based on the following specification doc: https://tools.ietf.org/html/rfc7348

Definition in file decode-vxlan.c.

Macro Definition Documentation

◆ VXLAN_DEFAULT_PORT

#define VXLAN_DEFAULT_PORT   4789

Definition at line 48 of file decode-vxlan.c.

◆ VXLAN_DEFAULT_PORT_S

#define VXLAN_DEFAULT_PORT_S   "4789"

Definition at line 49 of file decode-vxlan.c.

◆ VXLAN_HEADER_LEN

#define VXLAN_HEADER_LEN   sizeof(VXLANHeader)

Definition at line 44 of file decode-vxlan.c.

◆ VXLAN_MAX_PORTS

#define VXLAN_MAX_PORTS   4

Definition at line 46 of file decode-vxlan.c.

◆ VXLAN_UNSET_PORT

#define VXLAN_UNSET_PORT   -1

Definition at line 47 of file decode-vxlan.c.

Typedef Documentation

◆ VXLANHeader

typedef struct VXLANHeader_ VXLANHeader

Enumeration Type Documentation

◆ VXLANReservedCheckMode

Enumerator
VXLAN_RES_CHECK_STRICT 
VXLAN_RES_CHECK_PERMISSIVE 

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

Function Documentation

◆ DecodeVXLAN()

int DecodeVXLAN ( ThreadVars tv,
DecodeThreadVars dtv,
Packet p,
const uint8_t *  pkt,
uint32_t  len 
)
Parameters
pktpayload data directly above UDP header
lenlength in bytes of pkt
Note
p->flow is not set yet at this point, so we cannot easily check if the flow is unidirectional here.

Definition at line 144 of file decode-vxlan.c.

References DEBUG_VALIDATE_BUG_ON, and unlikely.

◆ DecodeVXLANConfig()

void DecodeVXLANConfig ( void  )

Definition at line 104 of file decode-vxlan.c.

References SCConfGetBool().

Referenced by DecodeGlobalConfig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DecodeVXLANEnabledForPort()

bool DecodeVXLANEnabledForPort ( const uint16_t  dp)

Definition at line 68 of file decode-vxlan.c.

References SCLogDebug.

◆ DecodeVXLANRegisterTests()

void DecodeVXLANRegisterTests ( void  )

Definition at line 572 of file decode-vxlan.c.

References UtRegisterTest().

Here is the call graph for this function:

Variable Documentation

◆ __attribute__

struct StreamingBufferSegment_ __attribute__

DNP3 application header.

DNP3 internal indicators.

Part of the application header for responses only.