decode-icmpv6.c File Reference
#include "suricata-common.h"
#include "decode-icmpv6.h"
#include "decode.h"
#include "decode-tcp.h"
#include "decode-sctp.h"
#include "decode-udp.h"
#include "decode-events.h"
#include "util-unittest.h"
#include "flow.h"
#include "util-debug.h"
#include "util-print.h"
#include "util-validate.h"
#include "pkt-var.h"
#include "util-profiling.h"
#include "host.h"
Include dependency graph for decode-icmpv6.c:

Go to the source code of this file.


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


int ICMPv6GetCounterpart (uint8_t type)
int DecodeICMPV6 (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, const uint8_t *pkt, uint32_t len)
 Decode ICMPV6 packets and fill the Packet with the decoded info. More...
void DecodeICMPV6RegisterTests (void)
 Registers ICMPV6 unit tests. More...

Detailed Description

Victor Julien

Decode ICMPv6

Definition in file decode-icmpv6.c.

Macro Definition Documentation


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

Function Documentation

◆ DecodeICMPV6()

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

Decode ICMPV6 packets and fill the Packet with the decoded info.

tvPointer to the thread variables
dtvPointer to the decode thread variables
pPointer to the packet we are filling
pktPointer to the raw packet buffer
lenthe len of the rest of the packet not processed yet
Return values
voidNo return value

Definition at line 189 of file decode-icmpv6.c.

References ICMPV6Hdr_::code, DecodeThreadVars_::counter_icmpv6, DEBUG_VALIDATE_BUG_ON, dtv, ENGINE_SET_EVENT, ENGINE_SET_INVALID_EVENT, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_REJECTROUTE, Packet_::icmp_d, Packet_::icmp_s, ICMPV6_GET_CODE, ICMPV6_GET_TYPE, ICMPV6_HEADER_LEN, ICMPV6_PKT_TOO_SMALL, ICMPV6_UNKNOWN_CODE, ICMPv6GetCounterpart(), Packet_::icmpv6h, len, Packet_::payload, Packet_::payload_len, Packet_::proto, SCLogDebug, StatsIncr(), TM_ECODE_FAILED, tv, ICMPV6Hdr_::type, and unlikely.

Here is the call graph for this function:

◆ DecodeICMPV6RegisterTests()

void DecodeICMPV6RegisterTests ( void  )

Registers ICMPV6 unit tests.

More ICMPv6 tests

Definition at line 1563 of file decode-icmpv6.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ ICMPv6GetCounterpart()