1/* 2 * Copyright 2009-2012 Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5#ifndef _INET_H_ 6#define _INET_H_ 7 8 9#include <netinet/in.h> 10#include <sys/cdefs.h> 11#include <sys/param.h> 12#include <sys/types.h> 13 14 15#ifdef __cplusplus 16extern "C" { 17#endif 18 19in_addr_t inet_addr(const char* addressString); 20int inet_aton(const char* addressString, struct in_addr* address); 21char* inet_cidr_ntop(int family, const void* source, int bits, 22 char* dest, size_t destSize); 23int inet_cidr_pton(int family, const char* sourceString, void* dest, 24 int* _bits); 25u_long inet_lnaof(struct in_addr address); 26struct in_addr inet_makeaddr(u_long net, u_long host); 27char* inet_net_ntop(int family, const void* source, int bits, 28 char* dest, size_t destSize); 29int inet_net_pton(int family, const char* sourceString, void* dest, 30 size_t destSize); 31char* inet_neta(u_long source, char* dest, size_t destSize); 32u_long inet_netof(struct in_addr address); 33u_long inet_network(const char* addressString); 34char* inet_ntoa(struct in_addr address); 35const char* inet_ntop(int family, const void* source, char* dest, 36 socklen_t destSize); 37int inet_pton(int family, const char* sourceString, void* dest); 38u_int inet_nsap_addr(const char* sourceString, u_char* dest, 39 int destSize); 40char* inet_nsap_ntoa(int sourceLength, const u_char* source, 41 char* dest); 42 43#ifdef __cplusplus 44} 45#endif 46 47#endif /* _INET_H_ */ 48