[tor-bugs] #9166 [Tor]: Write a UTP-based channel implementation
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Aug 12 14:04:51 UTC 2013
#9166: Write a UTP-based channel implementation
---------------------------+------------------------------------------------
Reporter: nickm | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Tor: unspecified
Component: Tor | Version:
Keywords: tor-relay utp | Parent: #9165
Points: | Actualpoints:
---------------------------+------------------------------------------------
Comment(by robgjansen):
Replying to [comment:21 karsten]:
> Replying to [comment:20 karsten]:
> > [...] But I didn't find where we're informed about new incoming bytes
from existing connections. Maybe this happens in a place that is not
intercepted by Shadow?
>
> Correction: `utp_read_callback` isn't only called for new incoming
connections, but also for new incoming bytes on existing connections.
AFAIK.
This is the code that adds the libevent listener:
{{{
ev = tor_event_new(tor_libevent_get_base(), utp_listener,
EV_READ|EV_PERSIST, &utp_read_callback, NULL);
retval = event_add(ev, NULL);
log_notice(LD_NET, "Added uTP read event: %d, %d", ev!=NULL, retval);
}}}
This is telling libevent to call utp_read_callback whenever there is data
ready to read (EV_READ) from the socket, and to pass utp_read_callback a
NULL user argument. AFAIK, waiting for data on this utp_listener socket
should be identical to any other socket, from Shadow's perspective.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9166#comment:22>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list