suricata
|
Go to the source code of this file.
Data Structures | |
struct | ICMPV4Hdr_ |
struct | ICMPV4ExtHdr_ |
struct | ICMPV4Vars_ |
struct | ICMPV4RtrAdvert_ |
struct | ICMPV4Timestamp_ |
Macros | |
#define | ICMPV4_HEADER_LEN 8 |
#define | ICMP_ECHOREPLY 0 /* Echo Reply */ |
#define | ICMP_DEST_UNREACH 3 /* Destination Unreachable */ |
#define | ICMP_SOURCE_QUENCH 4 /* Source Quench */ |
#define | ICMP_REDIRECT 5 /* Redirect (change route) */ |
#define | ICMP_ECHO 8 /* Echo Request */ |
#define | ICMP_ROUTERADVERT 9 |
#define | ICMP_ROUTERSOLICIT 10 |
#define | ICMP_TIME_EXCEEDED 11 /* Time Exceeded */ |
#define | ICMP_PARAMETERPROB 12 /* Parameter Problem */ |
#define | ICMP_TIMESTAMP 13 /* Timestamp Request */ |
#define | ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */ |
#define | ICMP_INFO_REQUEST 15 /* Information Request */ |
#define | ICMP_INFO_REPLY 16 /* Information Reply */ |
#define | ICMP_ADDRESS 17 /* Address Mask Request */ |
#define | ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ |
#define | NR_ICMP_TYPES 18 |
#define | ICMP_NET_UNREACH 0 /* Network Unreachable */ |
#define | ICMP_HOST_UNREACH 1 /* Host Unreachable */ |
#define | ICMP_PROT_UNREACH 2 /* Protocol Unreachable */ |
#define | ICMP_PORT_UNREACH 3 /* Port Unreachable */ |
#define | ICMP_FRAG_NEEDED 4 /* Fragmentation Needed/DF set */ |
#define | ICMP_SR_FAILED 5 /* Source Route failed */ |
#define | ICMP_NET_UNKNOWN 6 |
#define | ICMP_HOST_UNKNOWN 7 |
#define | ICMP_HOST_ISOLATED 8 |
#define | ICMP_NET_ANO 9 |
#define | ICMP_HOST_ANO 10 |
#define | ICMP_NET_UNR_TOS 11 |
#define | ICMP_HOST_UNR_TOS 12 |
#define | ICMP_PKT_FILTERED 13 /* Packet filtered */ |
#define | ICMP_PREC_VIOLATION 14 /* Precedence violation */ |
#define | ICMP_PREC_CUTOFF 15 /* Precedence cut off */ |
#define | NR_ICMP_UNREACH 15 /* instead of hardcoding immediate value */ |
#define | ICMP_REDIR_NET 0 /* Redirect Net */ |
#define | ICMP_REDIR_HOST 1 /* Redirect Host */ |
#define | ICMP_REDIR_NETTOS 2 /* Redirect Net for TOS */ |
#define | ICMP_REDIR_HOSTTOS 3 /* Redirect Host for TOS */ |
#define | ICMP_EXC_TTL 0 /* TTL count exceeded */ |
#define | ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ |
#define | ICMPV4_GET_TYPE(p) (p)->icmpv4h->type |
#define | ICMPV4_GET_CODE(p) (p)->icmpv4h->code |
#define | CLEAR_ICMPV4_PACKET(p) |
#define | ICMPV4_HEADER_PKT_OFFSET 8 |
#define | ICMPV4_GET_TYPE(p) (p)->icmpv4h->type |
#define | ICMPV4_GET_CODE(p) (p)->icmpv4h->code |
#define | ICMPV4_GET_RAW_CSUM(p) SCNtohs((p)->icmpv4h->checksum) |
#define | ICMPV4_GET_CSUM(p) (p)->icmpv4h->checksum |
#define | ICMPV4_GET_ID(p) ((p)->l4.vars.icmpv4.id) |
#define | ICMPV4_GET_SEQ(p) ((p)->l4.vars.icmpv4.seq) |
#define | ICMPV4_GET_EMB_PROTO(p) (p)->l4.vars.icmpv4.emb_ip4_proto |
#define | ICMPV4_GET_HLEN_ICMPV4H(p) (p)->l4.vars.icmpv4.hlen |
#define | ICMPV4_DEST_UNREACH_IS_VALID(p) |
#define | ICMPV4_IS_ERROR_MSG(type) |
Typedefs | |
typedef struct ICMPV4Hdr_ | ICMPV4Hdr |
typedef struct ICMPV4ExtHdr_ | ICMPV4ExtHdr |
typedef struct ICMPV4Vars_ | ICMPV4Vars |
Functions | |
struct ICMPV4RtrAdvert_ | __attribute__ ((__packed__)) ICMPV4RtrAdvert |
DNP3 link header. More... | |
void | DecodeICMPV4RegisterTests (void) |
Registers ICMPV4 unit test. More... | |
int | ICMPv4GetCounterpart (uint8_t type) |
Variables | |
uint8_t | naddr |
uint8_t | addr_sz |
uint32_t | orig_ts |
uint32_t | rx_ts |
uint32_t | tx_ts |
Definition in file decode-icmpv4.h.
#define CLEAR_ICMPV4_PACKET | ( | p | ) |
Definition at line 218 of file decode-icmpv4.h.
#define ICMP_ADDRESS 17 /* Address Mask Request */ |
Definition at line 73 of file decode-icmpv4.h.
#define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ |
Definition at line 76 of file decode-icmpv4.h.
#define ICMP_DEST_UNREACH 3 /* Destination Unreachable */ |
Definition at line 37 of file decode-icmpv4.h.
#define ICMP_ECHO 8 /* Echo Request */ |
Definition at line 46 of file decode-icmpv4.h.
#define ICMP_ECHOREPLY 0 /* Echo Reply */ |
Definition at line 34 of file decode-icmpv4.h.
#define ICMP_EXC_FRAGTIME 1 /* Fragment Reass time exceeded */ |
Definition at line 156 of file decode-icmpv4.h.
#define ICMP_EXC_TTL 0 /* TTL count exceeded */ |
Definition at line 153 of file decode-icmpv4.h.
#define ICMP_FRAG_NEEDED 4 /* Fragmentation Needed/DF set */ |
Definition at line 97 of file decode-icmpv4.h.
#define ICMP_HOST_ANO 10 |
Definition at line 115 of file decode-icmpv4.h.
#define ICMP_HOST_ISOLATED 8 |
Definition at line 109 of file decode-icmpv4.h.
#define ICMP_HOST_UNKNOWN 7 |
Definition at line 106 of file decode-icmpv4.h.
#define ICMP_HOST_UNR_TOS 12 |
Definition at line 121 of file decode-icmpv4.h.
#define ICMP_HOST_UNREACH 1 /* Host Unreachable */ |
Definition at line 88 of file decode-icmpv4.h.
#define ICMP_INFO_REPLY 16 /* Information Reply */ |
Definition at line 70 of file decode-icmpv4.h.
#define ICMP_INFO_REQUEST 15 /* Information Request */ |
Definition at line 67 of file decode-icmpv4.h.
#define ICMP_NET_ANO 9 |
Definition at line 112 of file decode-icmpv4.h.
#define ICMP_NET_UNKNOWN 6 |
Definition at line 103 of file decode-icmpv4.h.
#define ICMP_NET_UNR_TOS 11 |
Definition at line 118 of file decode-icmpv4.h.
#define ICMP_NET_UNREACH 0 /* Network Unreachable */ |
Definition at line 85 of file decode-icmpv4.h.
#define ICMP_PARAMETERPROB 12 /* Parameter Problem */ |
Definition at line 58 of file decode-icmpv4.h.
#define ICMP_PKT_FILTERED 13 /* Packet filtered */ |
Definition at line 124 of file decode-icmpv4.h.
#define ICMP_PORT_UNREACH 3 /* Port Unreachable */ |
Definition at line 94 of file decode-icmpv4.h.
#define ICMP_PREC_CUTOFF 15 /* Precedence cut off */ |
Definition at line 131 of file decode-icmpv4.h.
#define ICMP_PREC_VIOLATION 14 /* Precedence violation */ |
Definition at line 127 of file decode-icmpv4.h.
#define ICMP_PROT_UNREACH 2 /* Protocol Unreachable */ |
Definition at line 91 of file decode-icmpv4.h.
#define ICMP_REDIR_HOST 1 /* Redirect Host */ |
Definition at line 142 of file decode-icmpv4.h.
#define ICMP_REDIR_HOSTTOS 3 /* Redirect Host for TOS */ |
Definition at line 148 of file decode-icmpv4.h.
#define ICMP_REDIR_NET 0 /* Redirect Net */ |
Definition at line 139 of file decode-icmpv4.h.
#define ICMP_REDIR_NETTOS 2 /* Redirect Net for TOS */ |
Definition at line 145 of file decode-icmpv4.h.
#define ICMP_REDIRECT 5 /* Redirect (change route) */ |
Definition at line 43 of file decode-icmpv4.h.
#define ICMP_ROUTERADVERT 9 |
Definition at line 49 of file decode-icmpv4.h.
#define ICMP_ROUTERSOLICIT 10 |
Definition at line 52 of file decode-icmpv4.h.
#define ICMP_SOURCE_QUENCH 4 /* Source Quench */ |
Definition at line 40 of file decode-icmpv4.h.
#define ICMP_SR_FAILED 5 /* Source Route failed */ |
Definition at line 100 of file decode-icmpv4.h.
#define ICMP_TIME_EXCEEDED 11 /* Time Exceeded */ |
Definition at line 55 of file decode-icmpv4.h.
#define ICMP_TIMESTAMP 13 /* Timestamp Request */ |
Definition at line 61 of file decode-icmpv4.h.
#define ICMP_TIMESTAMPREPLY 14 /* Timestamp Reply */ |
Definition at line 64 of file decode-icmpv4.h.
#define ICMPV4_DEST_UNREACH_IS_VALID | ( | p | ) |
macro for checking if a ICMP DEST UNREACH packet is valid for use in other parts of the engine, such as the flow engine.
Definition at line 254 of file decode-icmpv4.h.
#define ICMPV4_GET_CODE | ( | p | ) | (p)->icmpv4h->code |
marco for icmpv4 code access
macro for icmpv4 "code" access
Definition at line 229 of file decode-icmpv4.h.
#define ICMPV4_GET_CODE | ( | p | ) | (p)->icmpv4h->code |
marco for icmpv4 code access
macro for icmpv4 "code" access
Definition at line 229 of file decode-icmpv4.h.
#define ICMPV4_GET_CSUM | ( | p | ) | (p)->icmpv4h->checksum |
Definition at line 232 of file decode-icmpv4.h.
#define ICMPV4_GET_EMB_PROTO | ( | p | ) | (p)->l4.vars.icmpv4.emb_ip4_proto |
macro for icmpv4 embedded "protocol" access
Definition at line 244 of file decode-icmpv4.h.
#define ICMPV4_GET_HLEN_ICMPV4H | ( | p | ) | (p)->l4.vars.icmpv4.hlen |
macro for icmpv4 header length
Definition at line 247 of file decode-icmpv4.h.
#define ICMPV4_GET_ID | ( | p | ) | ((p)->l4.vars.icmpv4.id) |
macro for icmpv4 "id" access
Definition at line 237 of file decode-icmpv4.h.
#define ICMPV4_GET_RAW_CSUM | ( | p | ) | SCNtohs((p)->icmpv4h->checksum) |
macro for icmpv4 "csum" access
Definition at line 231 of file decode-icmpv4.h.
#define ICMPV4_GET_SEQ | ( | p | ) | ((p)->l4.vars.icmpv4.seq) |
macro for icmpv4 "seq" access
Definition at line 239 of file decode-icmpv4.h.
#define ICMPV4_GET_TYPE | ( | p | ) | (p)->icmpv4h->type |
marco for icmpv4 type access
macro for icmpv4 "type" access
Definition at line 227 of file decode-icmpv4.h.
#define ICMPV4_GET_TYPE | ( | p | ) | (p)->icmpv4h->type |
marco for icmpv4 type access
macro for icmpv4 "type" access
Definition at line 227 of file decode-icmpv4.h.
#define ICMPV4_HEADER_LEN 8 |
Definition at line 31 of file decode-icmpv4.h.
#define ICMPV4_HEADER_PKT_OFFSET 8 |
Definition at line 224 of file decode-icmpv4.h.
#define ICMPV4_IS_ERROR_MSG | ( | type | ) |
marco for checking if a ICMP packet is an error message or an query message.
Definition at line 268 of file decode-icmpv4.h.
#define NR_ICMP_TYPES 18 |
Definition at line 79 of file decode-icmpv4.h.
#define NR_ICMP_UNREACH 15 /* instead of hardcoding immediate value */ |
Definition at line 134 of file decode-icmpv4.h.
typedef struct ICMPV4ExtHdr_ ICMPV4ExtHdr |
typedef struct ICMPV4Hdr_ ICMPV4Hdr |
typedef struct ICMPV4Vars_ ICMPV4Vars |
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.
uint8_t addr_sz |
Size of each advertised address
Definition at line 4 of file decode-icmpv4.h.
uint8_t naddr |
Number of advertised addresses
Definition at line 1 of file decode-icmpv4.h.
uint32_t orig_ts |
Definition at line 0 of file decode-icmpv4.h.
uint32_t rx_ts |
Definition at line 1 of file decode-icmpv4.h.
uint32_t tx_ts |
Definition at line 2 of file decode-icmpv4.h.