Add packet_build.cpp support imitate_tcp_packet() / imitate_udp_packet()

This commit is contained in:
luwenpeng
2024-04-24 11:40:00 +08:00
parent ffead24e45
commit d8963af5f8
16 changed files with 444 additions and 441 deletions

View File

@@ -24,15 +24,12 @@ enum packet_direction packet_get_direction(const struct packet *pkt);
enum packet_action
{
PACKET_ACTION_FORWARD = 0, // must be zero
PACKET_ACTION_FORWARD = 0,
PACKET_ACTION_DROP = 1,
PACKET_ACTION_DEFER = 2, // TODO
};
void packet_set_action(struct packet *pkt, enum packet_action action);
enum packet_action packet_get_action(const struct packet *pkt);
uint64_t packet_get_session_id(const struct packet *pkt);
const char *packet_get_raw_data(const struct packet *pkt);
uint16_t packet_get_raw_len(const struct packet *pkt);