diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:06:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:06:04 +0000 |
commit | 2f0649f6fe411d7e07c8d56cf8ea56db53536da8 (patch) | |
tree | 778611fb52176dce1ad06c68e87b2cb348ca0f7b /usr/include/netinet/in.h | |
parent | Initial commit. (diff) | |
download | klibc-upstream.tar.xz klibc-upstream.zip |
Adding upstream version 2.0.13.upstream/2.0.13upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'usr/include/netinet/in.h')
-rw-r--r-- | usr/include/netinet/in.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/usr/include/netinet/in.h b/usr/include/netinet/in.h new file mode 100644 index 0000000..7a13d2d --- /dev/null +++ b/usr/include/netinet/in.h @@ -0,0 +1,38 @@ +/* + * netinet/in.h + */ + +#ifndef _NETINET_IN_H +#define _NETINET_IN_H + +#include <sys/types.h> +#include <klibc/extern.h> +#include <stdint.h> +#include <endian.h> /* Must be included *before* <linux/in.h> */ +#include <sys/socket.h> /* Must be included *before* <linux/in.h> */ +#include <linux/in.h> + +#ifndef htons +# define htons(x) __cpu_to_be16(x) +#endif +#ifndef ntohs +# define ntohs(x) __be16_to_cpu(x) +#endif +#ifndef htonl +# define htonl(x) __cpu_to_be32(x) +#endif +#ifndef ntohl +# define ntohl(x) __be32_to_cpu(x) +#endif +#ifndef htonq +# define htonq(x) __cpu_to_be64(x) +#endif +#ifndef ntohq +# define ntohq(x) __be64_to_cpu(x) +#endif + +#define IPPORT_RESERVED 1024 + +__extern int bindresvport(int sd, struct sockaddr_in *sin); + +#endif /* _NETINET_IN_H */ |