2016-01-16 23:45:16 +01:00
|
|
|
/*
|
|
|
|
* Written by the Chair for Operating Systems, RWTH Aachen University
|
|
|
|
*
|
|
|
|
* NO Copyright (C) 2010-2011, Stefan Lankes
|
|
|
|
* consider these trivial macros to be public domain.
|
|
|
|
*
|
|
|
|
* These functions are distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
*/
|
|
|
|
|
2016-01-10 03:13:31 +01:00
|
|
|
#ifndef __NETINET_IN_H__
|
|
|
|
#define __NETINET_IN_H__
|
|
|
|
|
|
|
|
#include <stddef.h>
|
2016-05-31 00:29:21 +02:00
|
|
|
#include <stdint.h>
|
2016-01-10 03:13:31 +01:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2016-01-21 09:33:52 +01:00
|
|
|
typedef uint16_t in_port_t;
|
|
|
|
|
|
|
|
int inet_pton(int af, const char *src, void *dst);
|
2016-01-10 03:13:31 +01:00
|
|
|
|
|
|
|
/** 255.255.255.255 */
|
|
|
|
#define IPADDR_NONE ((uint32_t)0xffffffffUL)
|
|
|
|
/** 127.0.0.1 */
|
|
|
|
#define IPADDR_LOOPBACK ((uint32_t)0x7f000001UL)
|
|
|
|
/** 0.0.0.0 */
|
|
|
|
#define IPADDR_ANY ((uint32_t)0x00000000UL)
|
|
|
|
/** 255.255.255.255 */
|
|
|
|
#define IPADDR_BROADCAST ((uint32_t)0xffffffffUL)
|
|
|
|
|
|
|
|
/** 255.255.255.255 */
|
|
|
|
#define INADDR_NONE IPADDR_NONE
|
|
|
|
/** 127.0.0.1 */
|
|
|
|
#define INADDR_LOOPBACK IPADDR_LOOPBACK
|
|
|
|
/** 0.0.0.0 */
|
|
|
|
#define INADDR_ANY IPADDR_ANY
|
|
|
|
/** 255.255.255.255 */
|
|
|
|
#define INADDR_BROADCAST IPADDR_BROADCAST
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __NETINET_IN_H__ */
|