#include <netinet/in.h>
#include <stdint.h> // Should be inttypes.h?
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern uint32_t htonl(uint32_t hostlong);
extern uint16_t htons(uint16_t hostshort);
extern uint32_t ntohl(uint32_t netlong);
extern in_addr_t inet_network(const char *cp);
extern char *inet_ntoa(struct in_addr in);
+#ifdef __cplusplus
+}
+#endif
+
#endif