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()

◆ DecodeICMPV4RegisterTests()

void DecodeICMPV4RegisterTests ( void  )

Registers ICMPV4 unit test.

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

References UtRegisterTest().

Here is the call graph for this function:

◆ ICMPv4GetCounterpart()

int ICMPv4GetCounterpart ( uint8_t  type)
Return values
typecounterpart type or -1

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

References CASE_CODE, ICMP_ADDRESS, ICMP_ADDRESSREPLY, ICMP_ECHO, ICMP_ECHOREPLY, ICMP_INFO_REPLY, ICMP_INFO_REQUEST, ICMP_ROUTERADVERT, ICMP_ROUTERSOLICIT, ICMP_TIMESTAMP, ICMP_TIMESTAMPREPLY, and type.

Referenced by DecodeICMPV4().

Here is the caller graph for this function: