suricata
|
#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"
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... | |
Decode ICMPv4
Definition in file decode-icmpv4.c.
#define CASE_CODE | ( | t, | |
r | |||
) | case (t): return r; case (r): return t; |
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.
void DecodeICMPV4RegisterTests | ( | void | ) |
Registers ICMPV4 unit test.
Definition at line 793 of file decode-icmpv4.c.
References UtRegisterTest().
int ICMPv4GetCounterpart | ( | uint8_t | type | ) |
type | counterpart type or -1 |
Definition at line 345 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.