suricata
decode-udp.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  UDPHdr_
 

Macros

#define UDP_HEADER_LEN   8
 
#define UDP_GET_RAW_LEN(udph)   SCNtohs((udph)->uh_len)
 
#define UDP_GET_RAW_SRC_PORT(udph)   SCNtohs((udph)->uh_sport)
 
#define UDP_GET_RAW_DST_PORT(udph)   SCNtohs((udph)->uh_dport)
 
#define UDP_GET_RAW_SUM(udph)   SCNtohs((udph)->uh_sum)
 
#define UDP_GET_LEN(p)   UDP_GET_RAW_LEN(p->udph)
 
#define UDP_GET_SRC_PORT(p)   UDP_GET_RAW_SRC_PORT(p->udph)
 
#define UDP_GET_DST_PORT(p)   UDP_GET_RAW_DST_PORT(p->udph)
 
#define UDP_GET_SUM(p)   UDP_GET_RAW_SUM(p->udph)
 
#define CLEAR_UDP_PACKET(p)
 

Functions

struct UDPHdr_ __attribute__ ((__packed__)) UDPHdr
 DNP3 link header. More...
 
void DecodeUDPV4RegisterTests (void)
 

Variables

uint16_t uh_sport
 
uint16_t uh_dport
 
uint16_t uh_len
 
uint16_t uh_sum
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Definition in file decode-udp.h.

Macro Definition Documentation

◆ CLEAR_UDP_PACKET

#define CLEAR_UDP_PACKET (   p)
Value:
do { \
(p)->level4_comp_csum = -1; \
(p)->udph = NULL; \
} while (0)

Definition at line 50 of file decode-udp.h.

◆ UDP_GET_DST_PORT

#define UDP_GET_DST_PORT (   p)    UDP_GET_RAW_DST_PORT(p->udph)

Definition at line 38 of file decode-udp.h.

◆ UDP_GET_LEN

#define UDP_GET_LEN (   p)    UDP_GET_RAW_LEN(p->udph)

Definition at line 36 of file decode-udp.h.

◆ UDP_GET_RAW_DST_PORT

#define UDP_GET_RAW_DST_PORT (   udph)    SCNtohs((udph)->uh_dport)

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

◆ UDP_GET_RAW_LEN

#define UDP_GET_RAW_LEN (   udph)    SCNtohs((udph)->uh_len)

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

◆ UDP_GET_RAW_SRC_PORT

#define UDP_GET_RAW_SRC_PORT (   udph)    SCNtohs((udph)->uh_sport)

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

◆ UDP_GET_RAW_SUM

#define UDP_GET_RAW_SUM (   udph)    SCNtohs((udph)->uh_sum)

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

◆ UDP_GET_SRC_PORT

#define UDP_GET_SRC_PORT (   p)    UDP_GET_RAW_SRC_PORT(p->udph)

Definition at line 37 of file decode-udp.h.

◆ UDP_GET_SUM

#define UDP_GET_SUM (   p)    UDP_GET_RAW_SUM(p->udph)

Definition at line 39 of file decode-udp.h.

◆ UDP_HEADER_LEN

#define UDP_HEADER_LEN   8

Definition at line 28 of file decode-udp.h.

Function Documentation

◆ DecodeUDPV4RegisterTests()

void DecodeUDPV4RegisterTests ( void  )

Definition at line 221 of file decode-udp.c.

References UtRegisterTest().

Here is the call graph for this function:

Variable Documentation

◆ uh_dport

uint16_t uh_dport

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

◆ uh_len

uint16_t uh_len

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

◆ uh_sport

uint16_t uh_sport

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

◆ uh_sum

uint16_t uh_sum

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