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/ipc/ipc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/sp/transport/ipc/ipc.c') diff --git a/src/sp/transport/ipc/ipc.c b/src/sp/transport/ipc/ipc.c index 67038e2e..6bf4445b 100644 --- a/src/sp/transport/ipc/ipc.c +++ b/src/sp/transport/ipc/ipc.c @@ -1,5 +1,5 @@ // -// Copyright 2024 Staysail Systems, Inc. +// Copyright 2025 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // Copyright 2019 Devolutions // @@ -956,8 +956,14 @@ ipc_pipe_get(void *arg, const char *name, void *buf, size_t *szp, nni_type t) return (nni_stream_get(p->conn, name, buf, szp, t)); } +static size_t +ipc_pipe_size(void) +{ + return (sizeof(ipc_pipe)); +} + static nni_sp_pipe_ops ipc_tran_pipe_ops = { - .p_size = sizeof(ipc_pipe), + .p_size = ipc_pipe_size, .p_init = ipc_pipe_init, .p_fini = ipc_pipe_fini, .p_stop = ipc_pipe_stop, -- cgit v1.2.3-70-g09d2