X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Farpa%2Finet.h;h=9d20a15ba4226aeb28b026b9bcb29179faf6d3a2;hb=25e6fee27f4a293728dd15b659170e7b9c7db9bc;hp=b604f60b18006896e30a2407591655cf5bea8395;hpb=3ed8c9f2df0b5f0bfe1006037c46d4f32ec6ca7b;p=musl diff --git a/include/arpa/inet.h b/include/arpa/inet.h index b604f60b..9d20a15b 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -5,17 +5,8 @@ extern "C" { #endif +#include #include -#include - -#define __NEED_socklen_t -#define __NEED_in_addr_t -#define __NEED_in_port_t -#define __NEED_uint16_t -#define __NEED_uint32_t -#define __NEED_struct_in_addr - -#include uint32_t htonl(uint32_t); uint16_t htons(uint16_t); @@ -23,16 +14,15 @@ uint32_t ntohl(uint32_t); uint16_t ntohs(uint16_t); in_addr_t inet_addr (const char *); +in_addr_t inet_network (const char *); char *inet_ntoa (struct in_addr); -int inet_pton (int, const char *, void *); -const char *inet_ntop (int, const void *, char *, socklen_t); - -int inet_aton (const char *, struct in_addr *); /* nonstandard but widely used */ +int inet_pton (int, const char *__restrict, void *__restrict); +const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t); -#undef INET_ADDRSTRLEN -#undef INET6_ADDRSTRLEN -#define INET_ADDRSTRLEN 16 -#define INET6_ADDRSTRLEN 46 +int inet_aton (const char *, struct in_addr *); +struct in_addr inet_makeaddr(in_addr_t, in_addr_t); +in_addr_t inet_lnaof(struct in_addr); +in_addr_t inet_netof(struct in_addr); #ifdef __cplusplus }