inaddr.h 740 B

123456789101112131415161718192021222324252627
  1. /* Copyright (c) 2003-2004, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2019, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. /**
  6. * \file inaddr.h
  7. * \brief Header for inaddr.c.
  8. **/
  9. #ifndef TOR_INADDR_H
  10. #define TOR_INADDR_H
  11. #include "orconfig.h"
  12. #include <stddef.h>
  13. struct in_addr;
  14. int tor_inet_aton(const char *str, struct in_addr *addr);
  15. /** Length of a buffer to allocate to hold the results of tor_inet_ntoa.*/
  16. #define INET_NTOA_BUF_LEN 16
  17. int tor_inet_ntoa(const struct in_addr *in, char *buf, size_t buf_len);
  18. const char *tor_inet_ntop(int af, const void *src, char *dst, size_t len);
  19. int tor_inet_pton(int af, const char *src, void *dst);
  20. #endif