|
suricata
|

Go to the source code of this file.
Typedefs | |
| typedef struct Packet_ | Packet |
| typedef struct Flow_ | Flow |
Enumerations | |
| enum | PacketL3Types { PACKET_L3_UNKNOWN = 0, PACKET_L3_IPV4, PACKET_L3_IPV6, PACKET_L3_ARP } |
Functions | |
| uint8_t | SCPacketGetIPProto (const Packet *p) |
| Get IP proto regardless of IP version. More... | |
| bool | SCPacketIsToServer (const Packet *p) |
| Test whether the packet is marked as flowing to the server. More... | |
| bool | SCPacketIsToClient (const Packet *p) |
| Test whether the packet is marked as flowing to the client. More... | |
| enum PacketL3Types | SCPacketGetL3Type (const Packet *p) |
| Get the type of the packet's L3 layer. More... | |
| const uint8_t * | SCPacketGetL3 (const Packet *p, uint32_t *len) |
| Get the L3 packet data, starting at the L3 header. More... | |
| Flow * | SCPacketGetFlow (const Packet *p) |
| Get the flow associated with the packet. More... | |
| void | SCPacketGetTimeAsParts (const Packet *p, uint64_t *secs, uint64_t *usecs) |
| Get packet timestamp as individual values. More... | |
Definition at line 1 of file packet-bindgen.h.
Definition at line 1 of file packet-bindgen.h.
| enum PacketL3Types |
| Enumerator | |
|---|---|
| PACKET_L3_UNKNOWN | |
| PACKET_L3_IPV4 | |
| PACKET_L3_IPV6 | |
| PACKET_L3_ARP | |
Definition at line 24 of file packet-bindgen.h.
Get the flow associated with the packet.
Definition at line 300 of file packet.c.
References Packet_::flow, and p.
| uint8_t SCPacketGetIPProto | ( | const Packet * | p | ) |
| const uint8_t* SCPacketGetL3 | ( | const Packet * | p, |
| uint32_t * | len | ||
| ) |
Get the L3 packet data, starting at the L3 header.
The returned data is borrowed from p and is valid only while its packet buffer remains valid and unchanged. For IPv4 and IPv6 the length comes from the IP header and includes the IPv6 base header. For ARP it is the fixed ARP header length. Trailing padding is excluded. The decoder has already validated the length against the captured packet length.
| p | Packet to inspect, or NULL. |
| len | Non-NULL output pointer, set to zero when no data is returned. |
| NULL | The packet is NULL or has no decoded L3 layer. |
Definition at line 271 of file packet.c.
References Packet_::l3, len, p, PACKET_L3_IPV4, and PacketL3::type.
| enum PacketL3Types SCPacketGetL3Type | ( | const Packet * | p | ) |
| void SCPacketGetTimeAsParts | ( | const Packet * | p, |
| uint64_t * | secs, | ||
| uint64_t * | usecs | ||
| ) |
Get packet timestamp as individual values.
Definition at line 308 of file packet.c.
References p, SCTIME_SECS, SCTIME_USECS, and Packet_::ts.
| bool SCPacketIsToClient | ( | const Packet * | p | ) |
Test whether the packet is marked as flowing to the client.
Requires a valid packet. Returns false when the direction flag is not set.
Definition at line 243 of file packet.c.
References p, and PKT_IS_TOCLIENT.
| bool SCPacketIsToServer | ( | const Packet * | p | ) |
Test whether the packet is marked as flowing to the server.
Requires a valid packet. Returns false when the direction flag is not set.
Definition at line 233 of file packet.c.
References p, and PKT_IS_TOSERVER.