From 8bcb82d245a5fce1bd519e2f99250dedf11e763d Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 27 Apr 2025 18:40:40 -0700 Subject: Introduce DTLS transport for NNG. This introduces a new experimental transport for DTLS, that provides encryption over UDP. It has a simpler protocol than the current UDP SP protocol (but we intend to fix that by making the UDP transport simpler in a follow up!) There are a few other fixes in the TLS layer itself, and in the build, that were needed to accomplish this work. Also there was an endianness bug in the UDP protocol handling, which is fixed here. --- src/sp/transport.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/sp/transport.c') diff --git a/src/sp/transport.c b/src/sp/transport.c index e1c2737e..1f2e0021 100644 --- a/src/sp/transport.c +++ b/src/sp/transport.c @@ -105,6 +105,9 @@ extern void nni_sp_wss_register(void); #ifdef NNG_TRANSPORT_FDC extern void nni_sp_sfd_register(void); #endif +#ifdef NNG_TRANSPORT_DTLS +extern void nni_sp_dtls_register(void); +#endif void nni_sp_tran_sys_init(void) @@ -133,6 +136,9 @@ nni_sp_tran_sys_init(void) #ifdef NNG_TRANSPORT_FDC nni_sp_sfd_register(); #endif +#ifdef NNG_TRANSPORT_DTLS + nni_sp_dtls_register(); +#endif } // nni_sp_tran_sys_fini finalizes the entire transport system, including all -- cgit v1.2.3-70-g09d2