From 3d954bfd2f658ac05a0f20a1241738ed3e3fdd28 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 5 Feb 2014 11:10:02 +0100 Subject: Move lib to the root. --- tests/udp.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/udp.h (limited to 'tests/udp.h') diff --git a/tests/udp.h b/tests/udp.h new file mode 100644 index 0000000..a8d5f23 --- /dev/null +++ b/tests/udp.h @@ -0,0 +1,20 @@ +/* Copyright 2011, NORDUnet A/S. All rights reserved. */ +/* See LICENSE for licensing information. */ + +#include +#include +#include + +typedef ssize_t (*data_cb) (const uint8_t *buf, ssize_t len); + +struct polldata { + int s; + data_cb cb; + struct timeval *timeout; +}; + +struct polldata *udp_server (const char *bindto, struct timeval *timeout, data_cb cb); +ssize_t udp_poll (struct polldata *data); +void udp_free_polldata (struct polldata *data); + +ssize_t hd (const uint8_t *buf, ssize_t len); -- cgit v1.1