Add implementation of injecting tcp rst package

This commit is contained in:
luwenpeng
2024-04-30 15:30:43 +08:00
parent dc37306594
commit 95e0982fd1
3 changed files with 248 additions and 1 deletions

View File

@@ -10,6 +10,14 @@ extern "C"
uint16_t stellar_get_current_thread_index();
// return 0: success, -1: failed
int stellar_inject_icmp_unreach(const struct session *sess, enum session_direction inj_dir, uint16_t thr_idx);
int stellar_inject_tcp_rst(const struct session *sess, enum session_direction inj_dir, uint16_t thr_idx);
int stellar_inject_tcp_payload(const struct session *sess, enum session_direction inj_dir, uint16_t thr_idx, const char *payload, uint16_t len);
int stellar_inject_udp_payload(const struct session *sess, enum session_direction inj_dir, uint16_t thr_idx, const char *payload, uint16_t len);
int stellar_inject_ctrl_msg(const struct session *sess, uint16_t *sids, int nr_sid, uint16_t thr_idx, const char *msg, uint16_t len);
int stellar_inject_stateless_pkt(uint16_t link_id, uint16_t thr_idx, const char *packet, uint16_t len);
#ifdef __cplusplus
}
#endif