diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-12 11:32:59 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-12 11:32:59 -0800 |
commit | 76b5adaf554a0d636ba5eeb9bd1d25659f45167f (patch) | |
tree | da7cdcbf0344628e0f021ede17670f33b7aa8cdd | |
parent | aa5dfee7c6cef6bd51ab93e94a3590b7a4d590a6 (diff) |
networking header additions
-rw-r--r-- | system/include/net/arpa/inet.h | 19 | ||||
-rw-r--r-- | system/include/net/netinet/in.h | 6 |
2 files changed, 24 insertions, 1 deletions
diff --git a/system/include/net/arpa/inet.h b/system/include/net/arpa/inet.h index 93223d32..06d44183 100644 --- a/system/include/net/arpa/inet.h +++ b/system/include/net/arpa/inet.h @@ -1,4 +1,10 @@ -/* */ + +#ifndef _NET_ARPA_INET_H +#define _NET_ARPA_INET_H + +#ifdef __cplusplus +extern "C" { +#endif #include <stdint.h> @@ -8,3 +14,14 @@ uint32_t ntohl(uint32_t netlong); uint16_t ntohs(uint16_t netshort); int inet_aton(const char *cp, struct in_addr *addr); +char *inet_ntoa(struct in_addr in); + +typedef long in_addr_t; +in_addr_t inet_addr(const char *cp); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/system/include/net/netinet/in.h b/system/include/net/netinet/in.h index 76532916..4547696b 100644 --- a/system/include/net/netinet/in.h +++ b/system/include/net/netinet/in.h @@ -6,6 +6,12 @@ extern "C" { #endif +enum { + IPPROTO_IP = 0, +#define IPPROTO_IP IPPROTO_IP + IPPROTO_MAX +}; + #define INET_ADDRSTRLEN 16 #define INADDR_ANY 0 |