X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Flinux%2Finet.h;h=4cca05c9678e760a07c0c8dcd88f73cc90ddfdc1;hb=3e370b29d35fb01bfb92c2814d6f79bf6a2cb970;hp=6c5587af118d477354d7f738a688babd6524340f;hpb=ab396e91bfe953db26fa1083d9c3e7a4fbe0334a;p=firefly-linux-kernel-4.4.55.git diff --git a/include/linux/inet.h b/include/linux/inet.h index 6c5587af118d..4cca05c9678e 100644 --- a/include/linux/inet.h +++ b/include/linux/inet.h @@ -42,9 +42,16 @@ #ifndef _LINUX_INET_H #define _LINUX_INET_H -#ifdef __KERNEL__ #include +/* + * These mimic similar macros defined in user-space for inet_ntop(3). + * See /usr/include/netinet/in.h . + */ +#define INET_ADDRSTRLEN (16) +#define INET6_ADDRSTRLEN (48) + extern __be32 in_aton(const char *str); -#endif +extern int in4_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); +extern int in6_pton(const char *src, int srclen, u8 *dst, int delim, const char **end); #endif /* _LINUX_INET_H */