suricata
|
Go to the source code of this file.
Functions | |
PktVar * | PktVarGet (Packet *p, uint32_t id) |
int | PktVarAddKeyValue (Packet *p, uint8_t *key, uint16_t ksize, uint8_t *value, uint16_t size) |
add a key-value pktvar to the pkt More... | |
int | PktVarAdd (Packet *p, uint32_t id, uint8_t *value, uint16_t size) |
add a key-value pktvar to the pkt More... | |
void | PktVarFree (PktVar *pv) |
Implements per packet vars
move away from a linked list implementation
use different datatypes, such as string, int, etc.
have more than one instance of the same var, and be able to match on a specific one, or one all at a time. So if a certain capture matches multiple times, we can operate on all of them.
Definition in file pkt-var.c.
int PktVarAdd | ( | Packet * | p, |
uint32_t | id, | ||
uint8_t * | value, | ||
uint16_t | size | ||
) |
add a key-value pktvar to the pkt
r | 0 ok, -1 error |
Definition at line 86 of file pkt-var.c.
References PktVar_::id, PktVar_::next, Packet_::pktvar, SCCalloc, unlikely, PktVar_::value, and PktVar_::value_len.
int PktVarAddKeyValue | ( | Packet * | p, |
uint8_t * | key, | ||
uint16_t | ksize, | ||
uint8_t * | value, | ||
uint16_t | size | ||
) |
add a key-value pktvar to the pkt
r | 0 ok, -1 error |
Definition at line 56 of file pkt-var.c.
References PktVar_::key, PktVar_::key_len, PktVar_::next, Packet_::pktvar, SCCalloc, unlikely, PktVar_::value, and PktVar_::value_len.
void PktVarFree | ( | PktVar * | pv | ) |
Definition at line 111 of file pkt-var.c.
References PktVar_::key, PktVar_::next, PktVarFree(), SCFree, and PktVar_::value.
Referenced by GenericVarFree(), PacketDestructor(), PacketReinit(), and PktVarFree().
Definition at line 40 of file pkt-var.c.
References PktVar_::id, PktVar_::next, and Packet_::pktvar.