diff options
| author | luwenpeng <[email protected]> | 2024-05-28 10:26:29 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2024-05-28 14:30:42 +0800 |
| commit | f82b85c979cdda0ff5acd49079f6dd09cff5736a (patch) | |
| tree | fa4ae0829d915f6b7d32429fbacdd6a4477c0131 /include | |
| parent | 54385ed08b1a7fdef93e23c0d9c6eb207efb2fb1 (diff) | |
Optimize integration testing
- Add injection package plug-in
- Add libstellar_dynamic.so to facilitate unit testing of upper-level plug-ins
Diffstat (limited to 'include')
| -rw-r--r-- | include/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | include/stellar/stellar.h | 10 |
2 files changed, 13 insertions, 11 deletions
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 } |
