suricata
pkt-var.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int WARN_UNUSED PktVarAddKeyValue (Packet *, uint8_t *, uint16_t, uint8_t *, uint16_t)
 add a key-value pktvar to the pkt More...
 
int WARN_UNUSED PktVarAdd (Packet *, uint32_t id, uint8_t *, uint16_t)
 add a key-value pktvar to the pkt More...
 
PktVarPktVarGet (Packet *, uint32_t id)
 
void PktVarFree (PktVar *)
 

Detailed Description

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

Definition in file pkt-var.h.

Function Documentation

◆ PktVarAdd()

int WARN_UNUSED PktVarAdd ( Packet p,
uint32_t  id,
uint8_t *  value,
uint16_t  size 
)

add a key-value pktvar to the pkt

Return values
r0 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.

◆ PktVarAddKeyValue()

int WARN_UNUSED PktVarAddKeyValue ( Packet p,
uint8_t *  key,
uint16_t  ksize,
uint8_t *  value,
uint16_t  size 
)

add a key-value pktvar to the pkt

Return values
r0 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.

◆ PktVarFree()

void PktVarFree ( PktVar )

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PktVarGet()

PktVar* PktVarGet ( Packet ,
uint32_t  id 
)

Definition at line 40 of file pkt-var.c.

References PktVar_::id, PktVar_::next, and Packet_::pktvar.