Usermode/libc,libpsocket - Various fixes to psockets and errno
[tpg/acess2.git] / Usermode / Libraries / libpsocket.so_src / include_exp / netinet / in.h
index 8abf766..9323f24 100644 (file)
@@ -1,6 +1,14 @@
+/*
+ * Acess2 POSIX Sockets Emulation
+ * - By John Hodge (thePowersGang)
+ *
+ * netinet/in.h
+ * - ?Addressing?
+ */
 #ifndef _LIBPSOCKET__NETINET__IN_H_
 #define _LIBPSOCKET__NETINET__IN_H_
 
+#include <sys/socket.h>        // sa_family_t
 #include <stdint.h>
 
 typedef uint32_t       in_addr_t;
@@ -12,7 +20,7 @@ struct in_addr
 
 struct sockaddr_in
 {
-       uint16_t        sin_family;
+       sa_family_t     sin_family;
        uint16_t        sin_port;
        struct in_addr  sin_addr;
 };
@@ -22,7 +30,7 @@ struct sockaddr_in
 
 // getsockopt/setsockopt(level)
 enum {
-       IPPROTO_IP,
+       IPPROTO_IP = 1,
        IPPROTO_ICMP,
        IPPROTO_TCP,
        IPPROTO_UDP
@@ -35,7 +43,7 @@ struct in6_addr
 
 struct sockaddr_in6
 {
-       uint16_t        sin6_family;
+       sa_family_t     sin6_family;
        uint16_t        sin6_port;
        uint32_t        sin6_flowinfo;
        struct in6_addr sin6_addr;

UCC git Repository :: git.ucc.asn.au