forked from meetecho/janus-gateway
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dtls-bio.h
36 lines (30 loc) · 1.28 KB
/
dtls-bio.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*! \file dtls-bio.h
* \author Lorenzo Miniero <[email protected]>
* \copyright GNU General Public License v3
* \brief OpenSSL BIO filter for fragmentation (headers)
* \details Implementation of an OpenSSL BIO filter to fix the broken
* behaviour of fragmented packets when using mem BIOs (as we do in
* Janus). See https://mta.openssl.org/pipermail/openssl-users/2015-June/001503.html
* and https://github.com/meetecho/janus-gateway/issues/252 for more details.
*
* \ingroup protocols
* \ref protocols
*/
#ifndef _JANUS_DTLS_BIO_H
#define _JANUS_DTLS_BIO_H
#include <openssl/err.h>
#include <openssl/ssl.h>
/*! \brief OpenSSL BIO filter for fragmentation initialization */
int janus_dtls_bio_filter_init(void);
/*! \brief OpenSSL BIO filter for fragmentation constructor */
BIO_METHOD *BIO_janus_dtls_filter(void);
/*! \brief Set the MTU for the BIO filter
* \note The default starting MTU is 1472, in case fragmentation is needed
* the OpenSSL DTLS stack automatically decreases it. That said, if
* you know for sure the MTU in the network Janus is deployed in is
* smaller than that, it makes sense to configure an according value to
* start from
* @param start_mtu The MTU to start from (1472 by default)
*/
void janus_dtls_bio_filter_set_mtu(int start_mtu);
#endif