summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brown2006-06-18 01:34:48 +0200
committerMichael Brown2006-06-18 01:34:48 +0200
commit15397db2b4f8ca9a79d71341aa70a847706e4112 (patch)
tree03daf07ddd075bda16a1096719e47eee906ef03c /src
parentMade the temporary buffer part of the TCP senddata() API, to ease the (diff)
downloadipxe-15397db2b4f8ca9a79d71341aa70a847706e4112.tar.gz
ipxe-15397db2b4f8ca9a79d71341aa70a847706e4112.tar.xz
ipxe-15397db2b4f8ca9a79d71341aa70a847706e4112.zip
Placeholder
Diffstat (limited to 'src')
-rw-r--r--src/include/gpxe/udp.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/include/gpxe/udp.h b/src/include/gpxe/udp.h
new file mode 100644
index 000000000..d47b9d259
--- /dev/null
+++ b/src/include/gpxe/udp.h
@@ -0,0 +1,49 @@
+#ifndef _GPXE_UDP_H
+#define _GPXE_UDP_H
+
+/** @file
+ *
+ * UDP protocol
+ *
+ * This file defines the gPXE UDP API.
+ *
+ */
+
+#include <stddef.h>
+#include <gpxe/in.h>
+
+struct udp_connection;
+
+/**
+ * UDP operations
+ *
+ */
+struct udp_operations {
+ /**
+ * New data received
+ *
+ * @v conn UDP connection
+ * @v data Data
+ * @v len Length of data
+ */
+ void ( * newdata ) ( struct udp_connection *conn,
+ void *data, size_t len );
+};
+
+/**
+ * A UDP connection
+ *
+ */
+struct udp_connection {
+ /** Address of the remote end of the connection */
+ struct sockaddr_in sin;
+ /** Operations table for this connection */
+ struct udp_operations *udp_op;
+};
+
+extern void udp_connect ( struct udp_connection *conn );
+extern void udp_send ( struct udp_connection *conn, const void *data,
+ size_t len );
+extern void udp_close ( struct udp_connection *conn );
+
+#endif /* _GPXE_UDP_H */