summaryrefslogtreecommitdiff
path: root/src/udp-serv.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-03-11 21:16:51 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-03-11 21:16:51 +0100
commit8f97c15c8c6a6dd19b911b7e5f2bbeb81af8e59a (patch)
tree2315a6e051685ec165df0bcd9d3fad102f86e290 /src/udp-serv.c
parent3871a9b6a7400f45f9c11c49f4c12b1b8f4b7d15 (diff)
downloadgnutls-8f97c15c8c6a6dd19b911b7e5f2bbeb81af8e59a.tar.gz
Added --mtu option.
Diffstat (limited to 'src/udp-serv.c')
-rw-r--r--src/udp-serv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udp-serv.c b/src/udp-serv.c
index a5ba6e4d88..8ac3158354 100644
--- a/src/udp-serv.c
+++ b/src/udp-serv.c
@@ -21,7 +21,7 @@ static ssize_t pull_func(gnutls_transport_ptr_t p, void * data, size_t size);
#define MAX_BUFFER 255 /* Longest string to echo */
-int udp_server(const char* name, int port)
+int udp_server(const char* name, int port, int mtu)
{
int sock, ret;
struct sockaddr_in cli_addr;
@@ -53,6 +53,7 @@ int udp_server(const char* name, int port)
continue;
session = initialize_session(1);
+ if (mtu) gnutls_dtls_set_mtu(session, mtu);
priv.session = session;
priv.fd = sock;