From f82b85c979cdda0ff5acd49079f6dd09cff5736a Mon Sep 17 00:00:00 2001 From: luwenpeng Date: Tue, 28 May 2024 10:26:29 +0800 Subject: Optimize integration testing - Add injection package plug-in - Add libstellar_dynamic.so to facilitate unit testing of upper-level plug-ins --- include/CMakeLists.txt | 14 +++++++------- include/stellar/stellar.h | 10 ++++++---- 2 files changed, 13 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index bb0e98b..881c5ea 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,7 +1,7 @@ -install(FILES stellar/utils.h DESTINATION include/stellar/ COMPONENT Profile) -install(FILES stellar/tuple.h DESTINATION include/stellar/ COMPONENT Profile) -install(FILES stellar/packet.h DESTINATION include/stellar/ COMPONENT Profile) -install(FILES stellar/session.h DESTINATION include/stellar/ COMPONENT Profile) -install(FILES stellar/stellar.h DESTINATION include/stellar/ COMPONENT Profile) -install(FILES stellar/session_mq.h DESTINATION include/stellar/ COMPONENT Profile) -install(FILES stellar/session_exdata.h DESTINATION include/stellar/ COMPONENT Profile) \ No newline at end of file +install(FILES stellar/utils.h DESTINATION include/stellar/ COMPONENT HEADER) +install(FILES stellar/tuple.h DESTINATION include/stellar/ COMPONENT HEADER) +install(FILES stellar/packet.h DESTINATION include/stellar/ COMPONENT HEADER) +install(FILES stellar/session.h DESTINATION include/stellar/ COMPONENT HEADER) +install(FILES stellar/stellar.h DESTINATION include/stellar/ COMPONENT HEADER) +install(FILES stellar/session_mq.h DESTINATION include/stellar/ COMPONENT HEADER) +install(FILES stellar/session_exdata.h DESTINATION include/stellar/ COMPONENT HEADER) \ No newline at end of file diff --git a/include/stellar/stellar.h b/include/stellar/stellar.h index 1797770..1c2e0b6 100644 --- a/include/stellar/stellar.h +++ b/include/stellar/stellar.h @@ -52,10 +52,12 @@ int stellar_polling_plugin_register(struct stellar *st, plugin_on_polling_func uint16_t stellar_get_current_thread_index(); // return inject packet length, return 0 if failed -int stellar_inject_tcp_rst(const struct session *sess, enum flow_direction inject_dir); -int stellar_inject_tcp_fin(const struct session *sess, enum flow_direction inject_dir); -int stellar_inject_payload(const struct session *sess, enum flow_direction inject_dir, const char *payload, uint16_t len); -int stellar_inject_ctrl_msg(const struct session *sess, const struct sid_list *sids, const char *msg, uint16_t len); +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_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 sid_list *sids, const char *msg, uint16_t len); + +int stellar_main(int argc, char **argv); #ifdef __cplusplus } -- cgit v1.2.3