[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Debug EXTENDCIRCUIT
Update of /home/or/cvsroot/tor/contrib
In directory moria.mit.edu:/tmp/cvs-serv8582/contrib
Modified Files:
tor-control.py
Log Message:
Debug EXTENDCIRCUIT
Index: tor-control.py
===================================================================
RCS file: /home/or/cvsroot/tor/contrib/tor-control.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- tor-control.py 23 Mar 2005 19:15:09 -0000 1.6
+++ tor-control.py 24 Mar 2005 01:08:25 -0000 1.7
@@ -201,6 +201,12 @@
tp, body = receive_reply(s,[MSG_TYPE_DONE])
return _parseKV(body)
+def extend_circuit(s, circid, hops):
+ msg = struct.pack("!L",circid) + ",".join(hops) + "\0"
+ send_message(s,MSG_TYPE_EXTENDCIRCUIT,msg)
+ tp, body = receive_reply(s,[MSG_TYPE_DONE])
+ return body
+
def listen_for_events(s):
while(1):
_,type,body = receive_message(s)
@@ -225,6 +231,7 @@
("1.2.3.4", "foobaz.com"),
("frebnitz.com", "5.6.7.8"),
(".", "abacinator.onion")])`
+ print `extend_circuit(s,0,["moria1"])`
send_signal(s,1)
#save_conf(s)