mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 14:33:52 +01:00
Merge pull request #14149 from miri64/sock_dtls/enh/udp_sock_getter
sock_dtls: provide getter function for UDP sock
This commit is contained in:
commit
5ab1633c04
@ -259,6 +259,12 @@ int sock_dtls_create(sock_dtls_t *sock, sock_udp_t *udp_sock,
|
||||
return 0;
|
||||
}
|
||||
|
||||
sock_udp_t *sock_dtls_get_udp_sock(sock_dtls_t *sock)
|
||||
{
|
||||
assert(sock);
|
||||
return sock->udp_sock;
|
||||
}
|
||||
|
||||
int sock_dtls_session_init(sock_dtls_t *sock, const sock_udp_ep_t *ep,
|
||||
sock_dtls_session_t *remote)
|
||||
{
|
||||
|
||||
@ -557,7 +557,7 @@ void sock_dtls_init(void);
|
||||
*
|
||||
* @param[out] sock The resulting DTLS sock object
|
||||
* @param[in] udp_sock Existing UDP sock initialized with
|
||||
* @ref sock_udp_create()to be used underneath.
|
||||
* @ref sock_udp_create() to be used underneath.
|
||||
* @param[in] tag Credential tag of @p sock. The sock will only use
|
||||
* credentials with the same tag given here.
|
||||
* @param[in] version [DTLS version](@ref sock_dtls_prot_version) to use.
|
||||
@ -569,6 +569,17 @@ void sock_dtls_init(void);
|
||||
int sock_dtls_create(sock_dtls_t *sock, sock_udp_t *udp_sock,
|
||||
credman_tag_t tag, unsigned version, unsigned role);
|
||||
|
||||
/**
|
||||
* @brief Get underlying UDP sock.
|
||||
*
|
||||
* @pre `sock != NULL`.
|
||||
*
|
||||
* @param[in] sock DTLS sock to get UDP sock from.
|
||||
*
|
||||
* @return The underlying UDP sock.
|
||||
*/
|
||||
sock_udp_t *sock_dtls_get_udp_sock(sock_dtls_t *sock);
|
||||
|
||||
/**
|
||||
* @brief Initialize session handshake.
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user