@@ -450,25 +450,25 @@ void wolfSSL_SetIOWriteFlags(WOLFSSL* ssl, int flags);
450450/*!
451451 \ingroup IO
452452
453- \brief This function sets the nxSocket and nxWait members of the nxCtx
453+ \brief This function sets the nxTcpSocket and nxWait members of the nxCtx
454454 struct within the WOLFSSL structure.
455455
456456 \return none No returns.
457457
458458 \param ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
459- \param nxSocket a pointer to type NX_TCP_SOCKET that is set to the
460- nxSocket member of the nxCTX structure.
461- \param waitOption a ULONG type that is set to the nxWait member of
459+ \param nxsocket a pointer to type NX_TCP_SOCKET that is set to the
460+ nxTcpSocket member of the nxCtx structure.
461+ \param waitoption a ULONG type that is set to the nxWait member of
462462 the nxCtx structure.
463463
464464 _Example_
465465 \code
466466 WOLFSSL* ssl = wolfSSL_new(ctx);
467- NX_TCP_SOCKET* nxSocket ;
468- ULONG waitOption ;
467+ NX_TCP_SOCKET* nxsocket ;
468+ ULONG waitoption ;
469469 …
470- if(ssl != NULL || nxSocket != NULL || waitOption <= 0){
471- wolfSSL_SetIO_NetX(ssl, nxSocket, waitOption );
470+ if(ssl != NULL || nxsocket != NULL || waitoption <= 0){
471+ wolfSSL_SetIO_NetX(ssl, nxsocket, waitoption );
472472 } else {
473473 // You need to pass in good parameters.
474474 }
@@ -481,6 +481,41 @@ void wolfSSL_SetIOWriteFlags(WOLFSSL* ssl, int flags);
481481void wolfSSL_SetIO_NetX (WOLFSSL * ssl , NX_TCP_SOCKET * nxsocket ,
482482 ULONG waitoption );
483483
484+ /*!
485+ \ingroup IO
486+
487+ \brief This function configures the NetX Duo UDP context for a DTLS
488+ session. It stores the UDP socket, destination IP address (by value),
489+ destination port, and wait option into the WOLFSSL nxCtx structure.
490+ Requires WOLFSSL_NETX_DUO to be defined (ThreadX NetX Duo SDK).
491+
492+ \return none No returns.
493+
494+ \param ssl a pointer to a WOLFSSL structure, created using wolfSSL_new().
495+ \param nxsocket a pointer to an NX_UDP_SOCKET already created and bound.
496+ \param nxdip the destination NXD_ADDRESS (passed by value; IPv4 or IPv6).
497+ \param nxport the destination UDP port number.
498+ \param waitoption a ULONG NetX wait option (e.g. NX_WAIT_FOREVER or ticks).
499+
500+ _Example_
501+ \code
502+ WOLFSSL* ssl = wolfSSL_new(ctx);
503+ NX_UDP_SOCKET udpsocket;
504+ NXD_ADDRESS peeraddr;
505+ USHORT peerport = 4433;
506+ ULONG wait = NX_WAIT_FOREVER;
507+ // … initialise udpsocket and peeraddr …
508+ wolfSSL_SetIO_NetX_Dtls(ssl, &udpsocket, peeraddr, peerport, wait);
509+ \endcode
510+
511+ \sa wolfSSL_SetIO_NetX
512+ \sa NetX_SendTo
513+ \sa NetX_ReceiveFrom
514+ */
515+ void wolfSSL_SetIO_NetX_Dtls (WOLFSSL * ssl , NX_UDP_SOCKET * nxsocket ,
516+ NXD_ADDRESS nxdip , USHORT nxport ,
517+ ULONG waitoption );
518+
484519/*!
485520 \brief This function sets the callback for the CBIOCookie member of the
486521 WOLFSSL_CTX structure. The CallbackGenCookie type is a function pointer
0 commit comments