forked from teawater/libhermit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathin.h
More file actions
48 lines (39 loc) · 1.11 KB
/
in.h
File metadata and controls
48 lines (39 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* 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.
*/
#ifndef __NETINET_IN_H__
#define __NETINET_IN_H__
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
#ifdef __cplusplus
{
#endif
typedef uint16_t in_port_t;
int inet_pton(int af, const char *src, void *dst);
/** 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__ */