Moved the basic struct sockaddr out of in.h.
authorMichael Brown <mcb30@etherboot.org>
Wed, 2 Aug 2006 00:06:30 +0000 (00:06 +0000)
committerMichael Brown <mcb30@etherboot.org>
Wed, 2 Aug 2006 00:06:30 +0000 (00:06 +0000)
src/include/gpxe/socket.h [new file with mode: 0644]

diff --git a/src/include/gpxe/socket.h b/src/include/gpxe/socket.h
new file mode 100644 (file)
index 0000000..a89b3af
--- /dev/null
@@ -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 */