2004-04-15 19:54:34 +04:00
|
|
|
/*
|
2009-11-11 17:28:18 +03:00
|
|
|
* Copyright 2009, Haiku, Inc. All Rights Reserved.
|
2006-08-08 16:33:33 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-07-09 16:24:59 +04:00
|
|
|
#ifndef _INET_H_
|
2004-04-15 19:54:34 +04:00
|
|
|
#define _INET_H_
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-10-25 19:13:00 +04:00
|
|
|
|
2006-08-08 16:33:33 +04:00
|
|
|
#include <netinet/in.h>
|
2009-11-11 17:28:18 +03:00
|
|
|
#include <sys/cdefs.h>
|
2005-12-19 16:26:54 +03:00
|
|
|
#include <sys/param.h>
|
2006-08-08 16:33:33 +04:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-11-11 17:28:18 +03:00
|
|
|
in_addr_t inet_addr(const char* addressString);
|
|
|
|
int inet_aton(const char* addressString, struct in_addr* address);
|
|
|
|
char* inet_cidr_ntop(int family, const void* source, int bits,
|
|
|
|
char* dest, size_t destSize);
|
|
|
|
int inet_cidr_pton(int family, const char* sourceString, void* dest,
|
|
|
|
int* _bits);
|
|
|
|
u_long inet_lnaof(struct in_addr address);
|
|
|
|
struct in_addr inet_makeaddr(u_long net, u_long host);
|
|
|
|
char* inet_net_ntop(int family, const void* source, int bits,
|
|
|
|
char* dest, size_t destSize);
|
|
|
|
int inet_net_pton(int family, const char* sourceString, void* dest,
|
|
|
|
size_t destSize);
|
|
|
|
char* inet_neta(u_long source, char* dest, size_t destSize);
|
|
|
|
u_long inet_netof(struct in_addr address);
|
|
|
|
u_long inet_network(const char* addressString);
|
|
|
|
char* inet_ntoa(struct in_addr address);
|
2009-11-10 01:18:34 +03:00
|
|
|
const char* inet_ntop(int family, const void* source, char* dest,
|
2009-11-11 20:03:34 +03:00
|
|
|
socklen_t destSize);
|
2009-11-11 17:28:18 +03:00
|
|
|
int inet_pton(int family, const char* sourceString, void* dest);
|
|
|
|
u_int inet_nsap_addr(const char* sourceString, u_char* dest,
|
|
|
|
int destSize);
|
|
|
|
char* inet_nsap_ntoa(int sourceLength, const u_char* source,
|
|
|
|
char* dest);
|
2004-05-13 04:56:00 +04:00
|
|
|
|
2006-08-08 16:33:33 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2004-05-13 04:56:00 +04:00
|
|
|
|
2006-08-08 16:33:33 +04:00
|
|
|
#endif /* _INET_H_ */
|