3
0

inet_common.h 971 B

123456789101112131415161718192021222324252627282930
  1. /* vi: set sw=4 ts=4: */
  2. /*
  3. * stolen from net-tools-1.59 and stripped down for busybox by
  4. * Erik Andersen <andersen@codepoet.org>
  5. *
  6. * Heavily modified by Manuel Novoa III Mar 12, 2001
  7. *
  8. * Version: $Id: inet_common.h,v 1.4 2004/03/10 07:42:37 mjn3 Exp $
  9. *
  10. */
  11. #include <features.h>
  12. #include <sys/types.h>
  13. #include <sys/socket.h>
  14. #include "platform.h"
  15. /* hostfirst!=0 If we expect this to be a hostname,
  16. try hostname database first
  17. */
  18. extern int INET_resolve(const char *name, struct sockaddr_in *s_in, int hostfirst);
  19. /* numeric: & 0x8000: "default" instead of "*",
  20. * & 0x4000: host instead of net,
  21. * & 0x0fff: don't resolve
  22. */
  23. extern int INET_rresolve(char *name, size_t len, struct sockaddr_in *s_in,
  24. int numeric, unsigned int netmask);
  25. extern int INET6_resolve(const char *name, struct sockaddr_in6 *sin6);
  26. extern int INET6_rresolve(char *name, size_t len, struct sockaddr_in6 *sin6, int numeric);