summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/socket.h
diff options
context:
space:
mode:
authorMichael Brown2006-08-02 02:06:30 +0200
committerMichael Brown2006-08-02 02:06:30 +0200
commite24a6cb5253d27f43f9afe9e1acae78d66ec20bc (patch)
treec1699ceeeefe363aaceaec5a7e429d0bacc97efd /src/include/gpxe/socket.h
parentAdded features that will be required for PXE UDP support. (diff)
downloadipxe-e24a6cb5253d27f43f9afe9e1acae78d66ec20bc.tar.gz
ipxe-e24a6cb5253d27f43f9afe9e1acae78d66ec20bc.tar.xz
ipxe-e24a6cb5253d27f43f9afe9e1acae78d66ec20bc.zip
Moved the basic struct sockaddr out of in.h.
Diffstat (limited to 'src/include/gpxe/socket.h')
-rw-r--r--src/include/gpxe/socket.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/include/gpxe/socket.h b/src/include/gpxe/socket.h
new file mode 100644
index 00000000..a89b3aff
--- /dev/null
+++ b/src/include/gpxe/socket.h
@@ -0,0 +1,31 @@
+#ifndef _GPXE_SOCKET_H
+#define _GPXE_SOCKET_H
+
+/** @file
+ *
+ * Socket addresses
+ *
+ */
+
+/* Network address family numbers */
+#define AF_INET 1
+#define AF_INET6 2
+
+/** A socket address family */
+typedef uint16_t sa_family_t;
+
+/**
+ * Generalized socket address structure
+ *
+ * This contains the fields common to socket addresses for all address
+ * families.
+ */
+struct sockaddr {
+ /** Socket address family
+ *
+ * This is an AF_XXX constant.
+ */
+ sa_family_t sa_family;
+};
+
+#endif /* _GPXE_SOCKET_H */