1gnutls_dtls_cookie_send(3) gnutls gnutls_dtls_cookie_send(3)
2
3
4
6 gnutls_dtls_cookie_send - API function
7
9 #include <gnutls/dtls.h>
10
11 int gnutls_dtls_cookie_send(gnutls_datum_t * key, void * client_data,
12 size_t client_data_size, gnutls_dtls_prestate_st * prestate,
13 gnutls_transport_ptr_t ptr, gnutls_push_func push_func);
14
16 gnutls_datum_t * key
17 is a random key to be used at cookie generation
18
19 void * client_data
20 contains data identifying the client (i.e. address)
21
22 size_t client_data_size
23 The size of client's data
24
25 gnutls_dtls_prestate_st * prestate
26 The previous cookie returned by gnutls_dtls_cookie_verify()
27
28 gnutls_transport_ptr_t ptr
29 A transport pointer to be used by push_func
30
31 gnutls_push_func push_func
32 A function that will be used to reply
33
35 This function can be used to prevent denial of service attacks to a
36 DTLS server by requiring the client to reply using a cookie sent by
37 this function. That way it can be ensured that a client we allocated
38 resources for (i.e. gnutls_session_t) is the one that the original
39 incoming packet was originated from.
40
41 This function must be called at the first incoming packet, prior to
42 allocating any resources and must be succeeded by
43 gnutls_dtls_cookie_verify().
44
46 the number of bytes sent, or a negative error code.
47
49 3.0
50
52 Report bugs to <bugs@gnutls.org>.
53 Home page: http://www.gnutls.org
54
55
57 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
58 Copying and distribution of this file, with or without modification,
59 are permitted in any medium without royalty provided the copyright
60 notice and this notice are preserved.
61
63 The full documentation for gnutls is maintained as a Texinfo manual.
64 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
65 visit
66
67 http://www.gnutls.org/manual/
68
69gnutls 3.6.5 gnutls_dtls_cookie_send(3)