2005-06-10 17:12:03 +02:00
|
|
|
/*
|
|
|
|
arpa/inet.h
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ARPA__INET_H
|
|
|
|
#define _ARPA__INET_H
|
|
|
|
|
2005-09-30 14:41:25 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2005-06-10 17:12:03 +02:00
|
|
|
/* Open Group Base Specifications Issue 6 (not complete): */
|
2005-07-11 15:00:43 +02:00
|
|
|
|
2005-09-30 14:41:25 +02:00
|
|
|
#ifndef _IN_ADDR_T
|
|
|
|
#define _IN_ADDR_T
|
|
|
|
/* Has to match corresponding declaration in <netinet/in.h> */
|
|
|
|
typedef uint32_t in_addr_t;
|
|
|
|
#endif /* _IN_ADDR_T */
|
|
|
|
|
2005-07-11 15:00:43 +02:00
|
|
|
#ifndef _STRUCT_IN_ADDR
|
|
|
|
#define _STRUCT_IN_ADDR
|
|
|
|
/* Has to match corresponding declaration in <netinet/in.h> */
|
|
|
|
struct in_addr
|
|
|
|
{
|
|
|
|
in_addr_t s_addr;
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2005-07-27 13:42:54 +02:00
|
|
|
_PROTOTYPE( uint32_t htonl, (uint32_t _hostval) );
|
|
|
|
_PROTOTYPE( uint16_t htons, (uint16_t _hostval) );
|
|
|
|
_PROTOTYPE( char *inet_ntoa, (struct in_addr _in) );
|
|
|
|
_PROTOTYPE( uint32_t ntohl, (uint32_t _netval) );
|
|
|
|
_PROTOTYPE( uint16_t ntohs, (uint16_t _netval) );
|
2005-06-10 17:12:03 +02:00
|
|
|
|
2006-06-22 13:45:59 +02:00
|
|
|
#ifdef _MINIX
|
|
|
|
/* Additional functions */
|
|
|
|
_PROTOTYPE( int inet_aton, (const char *_cp, struct in_addr *_pin) );
|
|
|
|
#endif
|
|
|
|
|
2010-01-21 07:38:17 +01:00
|
|
|
#ifdef _POSIX_SOURCE
|
|
|
|
in_addr_t inet_addr(const char *cp);
|
|
|
|
#endif
|
|
|
|
|
2005-06-10 17:12:03 +02:00
|
|
|
#endif /* _ARPA__INET_H */
|
2010-01-21 07:38:17 +01:00
|
|
|
|