suricata
decode-icmpv4.c File Reference
#include "suricata-common.h"
#include "decode.h"
#include "decode-events.h"
#include "decode-ipv4.h"
#include "decode-icmpv4.h"
#include "flow.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "util-debug.h"
#include "util-print.h"
#include "util-validate.h"
Include dependency graph for decode-icmpv4.c:

Go to the source code of this file.

Macros

#define CASE_CODE(t, r)   case (t): return r; case (r): return t;
 

Functions

int DecodeICMPV4 (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len)
 Main ICMPv4 decoding function. More...
 
int ICMPv4GetCounterpart (uint8_t type)
 
void DecodeICMPV4RegisterTests (void)
 Registers ICMPV4 unit test. More...
 

Detailed Description

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

Decode ICMPv4

Definition in file decode-icmpv4.c.

Macro Definition Documentation

◆ CASE_CODE

#define CASE_CODE (   t,
 
)    case (t): return r; case (r): return t;

Function Documentation

◆ DecodeICMPV4()

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

Main ICMPv4 decoding function.

DecodeICMPV4

Definition at line 143 of file decode-icmpv4.c.

References DecodeThreadVars_::counter_icmpv4, dtv, ENGINE_SET_INVALID_EVENT, ICMPV4_HEADER_LEN, ICMPV4_PKT_TOO_SMALL, len, StatsIncr(), TM_ECODE_FAILED, and tv.

Here is the call graph for this function:

◆ DecodeICMPV4RegisterTests()

void DecodeICMPV4RegisterTests ( void  )

Registers ICMPV4 unit test.

Definition at line 793 of file decode-icmpv4.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ ICMPv4GetCounterpart()

int ICMPv4GetCounterpart ( uint8_t  type)