[tor-bugs] #16204 [Tor]: Use opaque trunnel structures?

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed May 27 15:00:52 UTC 2015


#16204: Use opaque trunnel structures?
------------------------+--------------------------
     Reporter:  nickm   |      Owner:
         Type:  defect  |     Status:  new
     Priority:  normal  |  Milestone:  Tor: 0.2.???
    Component:  Tor     |    Version:
   Resolution:          |   Keywords:
Actual Points:          |  Parent ID:
       Points:          |
------------------------+--------------------------

Comment (by dgoulet):

 My two cents on that. One of the point of using trunnel is to have "safe
 object manipulation functions". We define a data structure with a simple
 syntax and then trunnel takes care of creating safe accessors along with
 safe parsing/encoding functions and the C ABI.

 Not using those very thoroughly makes trunnel half useful here and
 possibly dangerous in case of a typo or wrong constant used in a memcpy().
 Using trunnel avoids human mistake like putting 32 instead of 16 as a
 length.

 Downside is that the API of trunnel is cast in stone for a tor release but
 that's fine I think since it's self contained in the code base. Opaque
 object also makes it much more easier to handle ABI changes since you can
 route a deprecated API call to the new one.

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


More information about the tor-bugs mailing list