optimizate inject packt test case
This commit is contained in:
@@ -36,6 +36,9 @@ uint16_t packet_get_raw_len(const struct packet *pkt);
|
||||
const char *packet_get_payload(const struct packet *pkt);
|
||||
uint16_t packet_get_payload_len(const struct packet *pkt);
|
||||
|
||||
struct packet *imitate_tcp_packet(const struct packet *origin_pkt, uint32_t tcp_seq, uint32_t tcp_ack, uint8_t tcp_flags, const char *tcp_payload, uint16_t tcp_payload_len);
|
||||
struct packet *imitate_udp_packet(const struct packet *origin_pkt, const char *udp_payload, uint16_t udp_payload_len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -49,15 +49,9 @@ typedef int plugin_on_polling_func(void *plugin_env);
|
||||
int stellar_polling_plugin_register(struct stellar *st, plugin_on_polling_func on_polling, void *plugin_env);
|
||||
|
||||
uint16_t stellar_get_current_thread_index();
|
||||
|
||||
// return inject packet length, return 0 if failed
|
||||
int stellar_inject_tcp_rst(struct stellar *st, const struct session *sess, enum flow_direction inject_dir);
|
||||
int stellar_inject_tcp_fin(struct stellar *st, const struct session *sess, enum flow_direction inject_dir);
|
||||
int stellar_inject_tcp_payload(struct stellar *st, const struct session *sess, enum flow_direction inject_dir, const char *payload, uint16_t len);
|
||||
int stellar_inject_udp_payload(struct stellar *st, const struct session *sess, enum flow_direction inject_dir, const char *payload, uint16_t len);
|
||||
int stellar_inject_ctrl_msg(struct stellar *st, const struct session *sess, const struct sids *sids, const char *msg, uint16_t len);
|
||||
|
||||
int stellar_main(int argc, char **argv);
|
||||
// only send user crafted packet, can't send packet which come from network
|
||||
void stellar_send_crafted_packet(struct stellar *st, struct packet *pkt);
|
||||
int stellar_run(int argc, char **argv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user