X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Finet_common.h;h=4638aa9ebc51a54c701eea97add025fa6b2f5a99;hb=2b1559056cf32c42675ecd937796e1455bcb5c2c;hp=2c5e8f673bc3a2149e97c74b88f3eb0e9adc6871;hpb=c223ced0eab3d7b579b42c4626bb40686bd81c9a;p=oweals%2Fbusybox.git diff --git a/include/inet_common.h b/include/inet_common.h index 2c5e8f673..4638aa9eb 100644 --- a/include/inet_common.h +++ b/include/inet_common.h @@ -1,30 +1,32 @@ +/* vi: set sw=4 ts=4: */ /* * stolen from net-tools-1.59 and stripped down for busybox by - * Erik Andersen + * Erik Andersen * * Heavily modified by Manuel Novoa III Mar 12, 2001 * - * Version: $Id: inet_common.h,v 1.1 2001/11/10 12:18:42 andersen Exp $ - * */ +#ifndef INET_COMMON_H +#define INET_COMMON_H 1 -#include -#include -#include -#include - - -extern const char bb_INET_default[]; /* = "default" */ +PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN /* hostfirst!=0 If we expect this to be a hostname, try hostname database first */ -extern int INET_resolve(const char *name, struct sockaddr_in *s_in, int hostfirst); - +int INET_resolve(const char *name, struct sockaddr_in *s_in, int hostfirst) FAST_FUNC; -/* numeric: & 0x8000: default instead of *, +/* numeric: & 0x8000: "default" instead of "*", * & 0x4000: host instead of net, * & 0x0fff: don't resolve */ -extern int INET_rresolve(char *name, size_t len, struct sockaddr_in *s_in, - int numeric, unsigned int netmask); + +int INET6_resolve(const char *name, struct sockaddr_in6 *sin6) FAST_FUNC; + +/* These return malloced string */ +char *INET_rresolve(struct sockaddr_in *s_in, int numeric, uint32_t netmask) FAST_FUNC; +char *INET6_rresolve(struct sockaddr_in6 *sin6, int numeric) FAST_FUNC; + +POP_SAVED_FUNCTION_VISIBILITY + +#endif