Add sctp authentication to sctp_lib
This only works for linux >=5.4. When enabled, it will use
a shared key to authenticate messages. The functionality is
controlled by a flag and behind a linux version check.
Performance degradation is minimal, even for smaller messages
and unnoticeable when measuring overall system performance.
Change-Id: I836e61ec38a0c116fd7244b771437738ccca9828
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/aos/network/sctp_client.h b/aos/network/sctp_client.h
index 5affecc..c6b6324 100644
--- a/aos/network/sctp_client.h
+++ b/aos/network/sctp_client.h
@@ -17,7 +17,8 @@
class SctpClient {
public:
SctpClient(std::string_view remote_host, int remote_port, int streams,
- std::string_view local_host = "0.0.0.0", int local_port = 9971);
+ std::string_view local_host = "0.0.0.0", int local_port = 9971,
+ std::vector<uint8_t> sctp_auth_key = {});
~SctpClient() {}