suricata
|
#include "decode.h"
Go to the source code of this file.
Functions | |
void | PacketDrop (Packet *p, const uint8_t action, enum PacketDropReason r) |
issue drop action More... | |
bool | PacketCheckAction (const Packet *p, const uint8_t a) |
void | PacketInit (Packet *p) |
Initialize a packet structure for use. More... | |
void | PacketReleaseRefs (Packet *p) |
void | PacketReinit (Packet *p) |
Recycle a packet structure for reuse. More... | |
void | PacketRecycle (Packet *p) |
void | PacketDestructor (Packet *p) |
Cleanup a packet so that we can free it. No memset needed.. More... | |
bool PacketCheckAction | ( | const Packet * | p, |
const uint8_t | a | ||
) |
Definition at line 49 of file packet.c.
References Packet_::action, likely, and Packet_::root.
Referenced by AlertJsonHeader(), CaptureStatsUpdate(), EveAddVerdict(), RejectSendIPv4ICMP(), RejectSendIPv4TCP(), RejectSendIPv6ICMP(), and RejectSendIPv6TCP().
void PacketDestructor | ( | Packet * | p | ) |
Cleanup a packet so that we can free it. No memset needed..
Definition at line 152 of file packet.c.
References PacketAlerts_::alerts, Packet_::alerts, Packet_::app_layer_events, AppLayerDecoderEventsFreeEvents(), PACKET_FREE_EXTDATA, PACKET_PROFILING_RESET, PacketAlertFree(), PacketReleaseRefs(), Packet_::persistent, Packet_::pktvar, PktVarFree(), SCSpinDestroy, and Packet_::tunnel_lock.
Referenced by PacketFree().
void PacketDrop | ( | Packet * | p, |
const uint8_t | action, | ||
enum PacketDropReason | r | ||
) |
issue drop action
Set drop (+reject) flags in both current and root packet.
action | action bit flags. Must be limited to ACTION_DROP_REJECT|ACTION_ALERT |
Definition at line 33 of file packet.c.
References Packet_::action, ACTION_ALERT, ACTION_DROP_REJECT, DEBUG_VALIDATE_BUG_ON, Packet_::drop_reason, PKT_DROP_REASON_INNER_PACKET, PKT_DROP_REASON_NOT_SET, and Packet_::root.
Referenced by ExceptionPolicyParse().
void PacketInit | ( | Packet * | p | ) |
Initialize a packet structure for use.
Definition at line 63 of file packet.c.
References PacketAlerts_::alerts, Packet_::alerts, Packet_::livedev, PacketAlertCreate(), Packet_::persistent, SCSpinInit, and Packet_::tunnel_lock.
Referenced by PacketGetFromAlloc().
void PacketRecycle | ( | Packet * | p | ) |
Definition at line 143 of file packet.c.
References PacketReinit(), and PacketReleaseRefs().
void PacketReinit | ( | Packet * | p | ) |
Recycle a packet structure for reuse.
Definition at line 80 of file packet.c.
References Packet_::app_update_direction, CLEAR_ADDR, Packet_::datalink, Packet_::dp, Packet_::drop_reason, Packet_::dst, Packet_::flags, Packet_::flowflags, PACKET_FREE_EXTDATA, PACKET_RESET_ACTION, PacketTunnelNone, Packet_::pkt_src, Packet_::pktvar, PktVarFree(), Packet_::proto, Packet_::recursion_level, SCTIME_INIT, Packet_::sp, Packet_::src, Packet_::ts, Packet_::ttype, Packet_::vlan_id, and Packet_::vlan_idx.
Referenced by PacketRecycle().
void PacketReleaseRefs | ( | Packet * | p | ) |
Definition at line 70 of file packet.c.
Referenced by PacketDestructor(), and PacketRecycle().