suricata
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 "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.

Macros

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

Functions

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

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

Decode ICMPv6

Definition in file decode-icmpv6.c.

Macro Definition Documentation

◆ CASE_CODE

#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.

Parameters
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 188 of file decode-icmpv6.c.

References ICMPV6Hdr_::code, DecodeThreadVars_::counter_icmpv6, 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.

Todo:
More ICMPv6 tests

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

References UtRegisterTest().

Here is the call graph for this function:

◆ ICMPv6GetCounterpart()