3.6. PacketΒΆ
Packet manipulation utilities.
EnumsFunctionspacket_status enum
Packet status.
Values:
- STATUS_NORMAL -
Packet captured by Haka.
- STATUS_FORGED -
Packet forged.
- STATUS_SENT -
Packet already sent on the network.
packet_mode enum
Packet capture mode.
Values:
- MODE_NORMAL -
Normal mode (read/write).
- MODE_PASSTHROUGH -
Listen mode (read-only).
Variablesbool packet_init(struct packet_module_state * state)Initialize packet internals for a given thread.
void packet_addref(struct packet * pkt)Increment packet ref count.
Decrement packet ref count and release it if needed.
struct packet * packet_new(size_t size)Create a new packet.
Get the timestamp of the packet.
Get the id of the packet.
Get the packet payload.
const char * packet_dissector(struct packet * pkt)Get the packet dissector to use.
void packet_drop(struct packet * pkt)Drop the packet.
void packet_accept(struct packet * pkt)Accept a packet and send it on the network.
Send a packet. The packet will re-enter Haka to be filtered like a new packet.
int packet_receive(struct engine_thread * engine, struct packet ** pkt)Wait for some packet to be availabe.
size_t packet_mtu(struct packet * pkt)Get the packet mtu.
enum packet_status packet_state(struct packet * pkt)Get the packet state.
enum packet_mode packet_mode()Current packet capture mode.
struct time_realm network_time
class packet