|
suricata
|
#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"
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 |
Functions | |
| bool | DecodeVXLANEnabledForPort (const uint16_t sp, 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) |
VXLAN tunneling scheme decoder.
This implementation is based on the following specification doc: https://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-00
Definition in file decode-vxlan.c.
| #define VXLAN_DEFAULT_PORT 4789 |
Definition at line 47 of file decode-vxlan.c.
| #define VXLAN_DEFAULT_PORT_S "4789" |
Definition at line 48 of file decode-vxlan.c.
| #define VXLAN_HEADER_LEN sizeof(VXLANHeader) |
Definition at line 43 of file decode-vxlan.c.
| #define VXLAN_MAX_PORTS 4 |
Definition at line 45 of file decode-vxlan.c.
| #define VXLAN_UNSET_PORT -1 |
Definition at line 46 of file decode-vxlan.c.
| typedef struct VXLANHeader_ VXLANHeader |
| int DecodeVXLAN | ( | ThreadVars * | tv, |
| DecodeThreadVars * | dtv, | ||
| Packet * | p, | ||
| const uint8_t * | pkt, | ||
| uint32_t | len | ||
| ) |
| pkt | payload data directly above UDP header |
| len | length in bytes of pkt |
Definition at line 122 of file decode-vxlan.c.
References DecodeThreadVars_::counter_vxlan, DEBUG_VALIDATE_BUG_ON, ThreadVars_::decode_pq, DECODE_TUNNEL_IPV4, DECODE_TUNNEL_IPV6, DECODE_TUNNEL_UNSET, DECODE_TUNNEL_VLAN, dtv, ENGINE_SET_INVALID_EVENT, eth_type, ETHERNET_HEADER_LEN, ETHERNET_TYPE_8021AD, ETHERNET_TYPE_8021QINQ, ETHERNET_TYPE_ARP, ETHERNET_TYPE_IP, ETHERNET_TYPE_IPV6, ETHERNET_TYPE_VLAN, VXLANHeader_::flags, len, PacketEnqueueNoLock(), PacketTunnelPktSetup(), PKT_SET_SRC, PKT_SRC_DECODER_VXLAN, VXLANHeader_::res, SCLogDebug, SCNtohs, StatsIncr(), TM_ECODE_FAILED, TM_ECODE_OK, tv, unlikely, VXLANHeader_::vni, VXLAN_HEADER_LEN, and VXLAN_UNKNOWN_PAYLOAD_TYPE.
Referenced by DecodeUDP().


| void DecodeVXLANConfig | ( | void | ) |
Definition at line 98 of file decode-vxlan.c.
References SCConfGetBool(), SCConfGetNode(), SCConfNode_::val, and VXLAN_DEFAULT_PORT_S.
Referenced by DecodeGlobalConfig().


| bool DecodeVXLANEnabledForPort | ( | const uint16_t | sp, |
| const uint16_t | dp | ||
| ) |
Definition at line 62 of file decode-vxlan.c.
References SCLogDebug, and VXLAN_UNSET_PORT.
Referenced by DecodeUDP().

| void DecodeVXLANRegisterTests | ( | void | ) |
Definition at line 270 of file decode-vxlan.c.
References UtRegisterTest().
