2019-03-13 15:09:54 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
2019-10-11 10:50:42 +01:00
|
|
|
#include <bits/stdint.h>
|
2019-05-28 11:53:16 +02:00
|
|
|
#include <sys/cdefs.h>
|
2019-03-13 15:09:54 +01:00
|
|
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
typedef uint32_t in_addr_t;
|
2019-03-14 15:18:15 +01:00
|
|
|
in_addr_t inet_addr(const char*);
|
2019-03-13 15:09:54 +01:00
|
|
|
|
|
|
|
|
#define INADDR_ANY ((in_addr_t)0)
|
2019-03-14 15:18:15 +01:00
|
|
|
#define INADDR_NONE ((in_addr_t)-1)
|
2020-01-15 22:03:56 +01:00
|
|
|
#define INADDR_LOOPBACK 0x7f000001
|
2019-03-13 15:09:54 +01:00
|
|
|
|
2019-09-19 21:40:06 +02:00
|
|
|
#define IP_TTL 2
|
|
|
|
|
|
2020-01-01 20:45:02 -06:00
|
|
|
struct in_addr {
|
|
|
|
|
uint32_t s_addr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct sockaddr_in {
|
|
|
|
|
uint16_t sin_family;
|
|
|
|
|
uint16_t sin_port;
|
|
|
|
|
struct in_addr sin_addr;
|
|
|
|
|
char sin_zero[8];
|
|
|
|
|
};
|
|
|
|
|
|
2019-03-13 15:09:54 +01:00
|
|
|
__END_DECLS
|