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_server.h b/aos/network/sctp_server.h
index 2831a68..a8c70aa 100644
--- a/aos/network/sctp_server.h
+++ b/aos/network/sctp_server.h
@@ -24,7 +24,7 @@
class SctpServer {
public:
SctpServer(int streams, std::string_view local_host = "0.0.0.0",
- int local_port = 9971);
+ int local_port = 9971, std::vector<uint8_t> sctp_auth_key = {});
~SctpServer() {}