tls: add dtls_recv_packet() (#89)

This commit is contained in:
Alfred E. Heggestad 2017-10-30 15:13:11 +01:00 committed by Richard Aas
parent f8b24b462d
commit 14e312f86c
2 changed files with 16 additions and 0 deletions

View file

@ -90,6 +90,8 @@ void dtls_set_handlers(struct tls_conn *tc, dtls_estab_h *estabh,
dtls_recv_h *recvh, dtls_close_h *closeh, void *arg);
const struct sa *dtls_peer(const struct tls_conn *tc);
void dtls_set_peer(struct tls_conn *tc, const struct sa *peer);
void dtls_recv_packet(struct dtls_sock *sock, const struct sa *src,
struct mbuf *mb);
#ifdef USE_OPENSSL

View file

@ -829,6 +829,20 @@ void dtls_set_mtu(struct dtls_sock *sock, size_t mtu)
}
void dtls_recv_packet(struct dtls_sock *sock, const struct sa *src,
struct mbuf *mb)
{
struct sa addr;
if (!sock || !src || !mb)
return;
addr = *src;
recv_handler(&addr, mb, sock);
}
#ifdef TLS_BIO_OPAQUE
BIO_METHOD *tls_method_udp(void)
{