tor  0.4.2.0-alpha-dev
inaddr.h
Go to the documentation of this file.
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 
11 #ifndef TOR_INADDR_H
12 #define TOR_INADDR_H
13 
14 #include "orconfig.h"
15 #include <stddef.h>
16 
17 struct in_addr;
18 
19 int tor_inet_aton(const char *str, struct in_addr *addr);
21 #define INET_NTOA_BUF_LEN 16
22 int tor_inet_ntoa(const struct in_addr *in, char *buf, size_t buf_len);
23 
24 const char *tor_inet_ntop(int af, const void *src, char *dst, size_t len);
25 int tor_inet_pton(int af, const char *src, void *dst);
26 
27 #endif /* !defined(TOR_INADDR_H) */
const char * tor_inet_ntop(int af, const void *src, char *dst, size_t len)
Definition: inaddr.c:77
int tor_inet_pton(int af, const char *src, void *dst)
Definition: inaddr.c:166
int tor_inet_ntoa(const struct in_addr *in, char *buf, size_t buf_len)
Definition: inaddr.c:58
int tor_inet_aton(const char *str, struct in_addr *addr)
Definition: inaddr.c:38