2018-06-27 02:42:47 +02:00
|
|
|
/* Copyright (c) 2003-2004, Roger Dingledine
|
|
|
|
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
|
|
|
|
* Copyright (c) 2007-2018, The Tor Project, Inc. */
|
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
2018-07-10 18:22:01 +02:00
|
|
|
/**
|
2018-07-10 18:50:38 +02:00
|
|
|
* \file inaddr.h
|
|
|
|
* \brief Header for inaddr.c.
|
2018-07-10 18:22:01 +02:00
|
|
|
**/
|
2018-06-27 02:42:47 +02:00
|
|
|
|
2018-07-10 18:50:38 +02:00
|
|
|
#ifndef TOR_INADDR_H
|
|
|
|
#define TOR_INADDR_H
|
|
|
|
|
|
|
|
#include "orconfig.h"
|
2018-06-27 02:42:47 +02:00
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
struct in_addr;
|
2018-07-10 18:50:38 +02:00
|
|
|
|
2018-06-27 02:42:47 +02:00
|
|
|
int tor_inet_aton(const char *str, struct in_addr *addr);
|
|
|
|
/** Length of a buffer to allocate to hold the results of tor_inet_ntoa.*/
|
|
|
|
#define INET_NTOA_BUF_LEN 16
|
|
|
|
int tor_inet_ntoa(const struct in_addr *in, char *buf, size_t buf_len);
|
|
|
|
|
2018-07-10 18:50:38 +02:00
|
|
|
const char *tor_inet_ntop(int af, const void *src, char *dst, size_t len);
|
|
|
|
int tor_inet_pton(int af, const char *src, void *dst);
|
|
|
|
|
2018-06-27 02:42:47 +02:00
|
|
|
#endif
|