diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-07-25 14:43:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-07-25 14:43:24 +0000 |
commit | 9da0482007cada9ff7da4ef2035bb0e7ed2d0ee5 (patch) | |
tree | eed9a63280ea5cf4d3613dfb958b1a607715b00d /src/common/util.h | |
parent | efc7f1ef8fdfa00d8574e66aa0f20036b053dc11 (diff) | |
download | tor-9da0482007cada9ff7da4ef2035bb0e7ed2d0ee5.tar.gz tor-9da0482007cada9ff7da4ef2035bb0e7ed2d0ee5.zip |
r17358@pc-10-8-1-079: nickm | 2008-07-25 16:41:03 +0200
Split out the address manipulation functions from compat and util: they were about 21% of the total of those, and spread out too much.
svn:r16208
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/common/util.h b/src/common/util.h index c2e1604cbe..dafeb25c1d 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -264,40 +264,6 @@ char *expand_filename(const char *filename); struct smartlist_t *tor_listdir(const char *dirname); int path_is_relative(const char *filename) ATTR_PURE; -/* Net helpers */ -int is_internal_IP(uint32_t ip, int for_listening) ATTR_PURE; -int parse_addr_port(int severity, const char *addrport, char **address, - uint32_t *addr, uint16_t *port_out); -int parse_port_range(const char *port, uint16_t *port_min_out, - uint16_t *port_max_out); -int parse_addr_and_port_range(const char *s, uint32_t *addr_out, - maskbits_t *maskbits_out, uint16_t *port_min_out, - uint16_t *port_max_out); -int addr_mask_get_bits(uint32_t mask); -int addr_mask_cmp_bits(uint32_t a1, uint32_t a2, maskbits_t bits); -int tor_inet_ntoa(const struct in_addr *in, char *buf, size_t buf_len); -char *tor_dup_addr(const tor_addr_t *addr) ATTR_MALLOC; -char *tor_dup_ip(uint32_t addr) ATTR_MALLOC; -int get_interface_address(int severity, uint32_t *addr); - -int get_interface_address6(int severity, sa_family_t family, tor_addr_t *addr); -int tor_addr_compare(const tor_addr_t *addr1, const tor_addr_t *addr2); -int tor_addr_compare_masked(const tor_addr_t *addr1, const tor_addr_t *addr2, - maskbits_t mask); -unsigned int tor_addr_hash(const tor_addr_t *addr); -int tor_addr_is_v4(const tor_addr_t *addr); -int tor_addr_is_internal(const tor_addr_t *ip, int for_listening) ATTR_PURE; -int tor_addr_parse_mask_ports(const char *s, - tor_addr_t *addr_out, maskbits_t *mask_out, - uint16_t *port_min_out, uint16_t *port_max_out); -const char * tor_addr_to_str(char *dest, const tor_addr_t *addr, int len, - int decorate); -int tor_addr_from_str(tor_addr_t *addr, const char *src); -void tor_addr_copy(tor_addr_t *dest, const tor_addr_t *src); -void tor_addr_from_ipv4h(tor_addr_t *dest, uint32_t v4addr); -int tor_addr_is_null(const tor_addr_t *addr); -int tor_addr_is_loopback(const tor_addr_t *addr); - /* Process helpers */ void start_daemon(void); void finish_daemon(const char *desired_cwd); |