File indexing completed on 2025-01-18 10:00:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #ifndef GNUTLS_DTLS_H
0028 #define GNUTLS_DTLS_H
0029
0030 #include <gnutls/gnutls.h>
0031
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035
0036 #define GNUTLS_COOKIE_KEY_SIZE 16
0037
0038 void gnutls_dtls_set_timeouts(gnutls_session_t session,
0039 unsigned int retrans_timeout,
0040 unsigned int total_timeout);
0041
0042 unsigned int gnutls_dtls_get_mtu(gnutls_session_t session);
0043 unsigned int gnutls_dtls_get_data_mtu(gnutls_session_t session);
0044
0045 void gnutls_dtls_set_mtu(gnutls_session_t session, unsigned int mtu);
0046 int gnutls_dtls_set_data_mtu(gnutls_session_t session, unsigned int mtu);
0047
0048 unsigned int gnutls_dtls_get_timeout(gnutls_session_t session);
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061 typedef struct {
0062 unsigned int record_seq;
0063 unsigned int hsk_read_seq;
0064 unsigned int hsk_write_seq;
0065 } gnutls_dtls_prestate_st;
0066
0067 int gnutls_dtls_cookie_send(gnutls_datum_t *key, void *client_data,
0068 size_t client_data_size,
0069 gnutls_dtls_prestate_st *prestate,
0070 gnutls_transport_ptr_t ptr,
0071 gnutls_push_func push_func);
0072
0073 int gnutls_dtls_cookie_verify(gnutls_datum_t *key, void *client_data,
0074 size_t client_data_size, void *_msg,
0075 size_t msg_size,
0076 gnutls_dtls_prestate_st *prestate);
0077
0078 void gnutls_dtls_prestate_set(gnutls_session_t session,
0079 gnutls_dtls_prestate_st *prestate);
0080
0081 unsigned int gnutls_record_get_discarded(gnutls_session_t session);
0082
0083 #ifdef __cplusplus
0084 }
0085 #endif
0086
0087 #endif