inet_common.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * stolen from net-tools-1.59 and stripped down for busybox by
  3. * Erik Andersen <andersen@codepoet.org>
  4. *
  5. * Heavily modified by Manuel Novoa III Mar 12, 2001
  6. *
  7. * Version: $Id: inet_common.h,v 1.4 2004/03/10 07:42:37 mjn3 Exp $
  8. *
  9. */
  10. #include <features.h>
  11. #include <sys/types.h>
  12. #include <sys/socket.h>
  13. #include <arpa/inet.h>
  14. extern const char bb_INET_default[]; /* = "default" */
  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. #ifdef CONFIG_FEATURE_IPV6
  26. extern int INET6_resolve(const char *name, struct sockaddr_in6 *sin6);
  27. extern int INET6_rresolve(char *name, size_t len, struct sockaddr_in6 *sin6, int numeric);
  28. #endif