Kernel/IPStack - (minor) TODO retransmit timer
[tpg/acess2.git] / Usermode / Libraries / libpsocket.so_src / include_exp / netinet / in.h
index 3a289eb..0f4e887 100644 (file)
@@ -8,6 +8,7 @@
 #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;
@@ -19,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;
 };
@@ -27,6 +28,9 @@ struct sockaddr_in
 #define INADDR_ANY     0x00000000
 #define INADDR_BROADCAST       0xFFFFFFFF
 
+#define IPPORT_RESERVED        1024
+#define IPPORT_UNRESERVED      0xC000
+
 // getsockopt/setsockopt(level)
 enum {
        IPPROTO_IP = 1,
@@ -35,19 +39,26 @@ enum {
        IPPROTO_UDP
 };
 
+#define INET_ADDRSTRLEN        16
+#define INET6_ADDRSTRLEN       48      // linux
+
 struct in6_addr
 {
        unsigned char   s6_addr[16];
 };
 
+extern struct in6_addr in6addr_any;
+
 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;
        uint32_t        sin6_scope_id;
 };
 
+#include <arpa/inet.h> // for hton*/ntoh* (bochs)
+
 #endif
 

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