[tor-bugs] #12376 [Tor]: Refactor and unit-test all the code that looks at network interfaces to get current IP

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Aug 1 02:17:57 UTC 2014


#12376: Refactor and unit-test all the code that looks at network interfaces to get
current IP
-----------------------------+--------------------------------
     Reporter:  rl1987       |      Owner:  rl1987
         Type:  enhancement  |     Status:  needs_revision
     Priority:  normal       |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor          |    Version:  Tor: unspecified
   Resolution:               |   Keywords:  refactoring
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+--------------------------------
Changes (by nickm):

 * status:  assigned => needs_revision


Comment:

 Sorry about the delays!

 reviewing tesolvemyaddr branch:
    * tor_gethostname,(char *name, size_t namelen)) needs documentation.
    * mock functions in test_config.c should documentation (eg, "This is a
 mock function to replace X; this replacement does Y.")
    * Otherwise, this looks fine, assuming test coverage is okay

 reviewing if_addr_refactoring branch:
    * The tests look good, assuming coverage is okay
    * Instead of duplicating the "+#ifdef HAVE_GETIFADDRS ...#elif
 define(_WIN32)) ...#elif defined(SIOCGIFCONF) && defined(HAVE_IOCTL) "
 checks in a few places, it's probably better to have address.h do
 "#define HAVE_IFADDRS_TO_SMARTLIST" in the first case, and #define
 HAVE_IP_ADAPTER_ADDRESSES_TO_SMARTLIST in the second case, and so on.
 Then the other code can check those more readable macros.
    * All the new functions in address.c need documentation.
    * Otherwise, looks good!

 (For more info on our documentation style, and on getting test coverage,
 see doc/HACKING. )

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12376#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list