ipv4.h 523 B

1234567891011121314151617
  1. /* Copyright (c) 2003-2004, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. #ifndef TOR_IPV4_H
  6. #define TOR_IPV4_H
  7. #include <stddef.h>
  8. struct in_addr;
  9. int tor_inet_aton(const char *str, struct in_addr *addr);
  10. /** Length of a buffer to allocate to hold the results of tor_inet_ntoa.*/
  11. #define INET_NTOA_BUF_LEN 16
  12. int tor_inet_ntoa(const struct in_addr *in, char *buf, size_t buf_len);
  13. #endif