aboutsummaryrefslogtreecommitdiff
path: root/system/include/net
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-10-06 15:37:11 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-10-06 15:37:11 -0700
commitce6b7ea953dd0a974a0123e6674803a3b0b1f5a2 (patch)
treec902f3cee4e949565f4388bb5fd1462a932eff41 /system/include/net
parent5e4a111053b401069fb4581bba191d60f9f6e527 (diff)
socket header stuff
Diffstat (limited to 'system/include/net')
-rw-r--r--system/include/net/arpa/inet.h1
-rw-r--r--system/include/net/netdb.h18
-rw-r--r--system/include/net/netinet/in.h2
3 files changed, 20 insertions, 1 deletions
diff --git a/system/include/net/arpa/inet.h b/system/include/net/arpa/inet.h
index 2cc6f45a..76ad8b5f 100644
--- a/system/include/net/arpa/inet.h
+++ b/system/include/net/arpa/inet.h
@@ -4,3 +4,4 @@ uint32_t ntohl(uint32_t netlong);
uint16_t ntohs(uint16_t netshort);
+int inet_aton(const char *cp, struct in_addr *addr);
diff --git a/system/include/net/netdb.h b/system/include/net/netdb.h
index 27ce5b22..3b6f3389 100644
--- a/system/include/net/netdb.h
+++ b/system/include/net/netdb.h
@@ -1,2 +1,18 @@
-/* */
+
+struct addrinfo
+{
+ int ai_flags;
+ int ai_family;
+ int ai_socktype;
+ int ai_protocol;
+ socklen_t ai_addrlen;
+ struct sockaddr *ai_addr;
+ char *ai_canonname;
+ struct addrinfo *ai_next;
+};
+
+extern int getaddrinfo(const char *name, const char *service, const struct addrinfo *req, struct addrinfo **pai);
+extern void freeaddrinfo(struct addrinfo *ai);
+extern int getnameinfo (struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, unsigned int flags);
+const char *gai_strerror(int ecode);
diff --git a/system/include/net/netinet/in.h b/system/include/net/netinet/in.h
index 57576236..0def3127 100644
--- a/system/include/net/netinet/in.h
+++ b/system/include/net/netinet/in.h
@@ -1,4 +1,6 @@
+#define INET_ADDRSTRLEN 16
+
struct in_addr {
unsigned long s_addr;
};