Commit Graph

71 Commits

Author SHA1 Message Date
Nick Mathewson
7239262f71 Don't tell anybody, but we're going OO here. This patch splits
circuit_t into origin_circuit_t and or_circuit_t.  I fixed some
segaults; there may be more.  We still need to move more rendezvous
stuff into subtypes.

This is a trial run for splitting up connection_t; if the approach is
insane, please say so soon so we can do something smarter.

Also, this discards the old HALF_OPEN code, which nobody seems to
want.


svn:r6817
2006-07-23 07:37:35 +00:00
Roger Dingledine
411f37d534 fix typo
svn:r6549
2006-06-06 00:05:39 +00:00
Peter Palfrader
a4ec555228 change INET_NTOA_BUF_LEN+1 to INET_NTOA_BUF_LEN
add a comment in a few places where we add weird numbers to buffer lengths


svn:r6161
2006-03-14 23:40:37 +00:00
Nick Mathewson
bd8ffccae7 More cleanups noticed by weasel; also, remove macros that nobody uses.
svn:r6143
2006-03-12 23:31:16 +00:00
Nick Mathewson
474c60b743 Cleanup on time-relaqted constants. New conventions:
1) Surround all constants by (parens), whether we'll be using them
     in a denominator or not.
  2) Express all time periods as products (24*60*60), not as multiplied-out
     constants (86400).
  3) Comments like "(60*60) /* one hour */" are as pointless as comments
     like "c = a + b; /* set c to the sum of a and b */".  Remove them.
  4) All time periods should be #defined constants, not given inline.
  5) All time periods should have doxygen comments.
  6) All time periods, unless specified, are in seconds.  It's not necessary
     to say so.

To summarize, the old (lack of) style would allow:

  #define FOO_RETRY_INTERVAL 60*60 /* one hour (seconds) */
  next_try = now + 3600;

The new style is:

  /** How often do we reattempt foo? */
  #define FOO_RETRY_INTERVAL (60*60)

  next_try = now + RETRY_INTERVAL;


svn:r6142
2006-03-12 22:48:18 +00:00
Roger Dingledine
25ed4b66e3 be quieter about hidserv descriptors that are too old or too new.
we can't do anything about them anyway.


svn:r6073
2006-02-21 06:23:57 +00:00
Roger Dingledine
259c65ab08 the last of the log convention conversion. finally.
svn:r6005
2006-02-13 10:33:00 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Nick Mathewson
4f38670328 Fix a potential memory stomp on servers running hidden services. Found by weasel with valgrind. Backport candidate.
svn:r5579
2005-12-14 02:19:27 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
f9b0be526e Use LD_BUG as appropriate; convert rend* and router* to new logging interface; use new circ_log_path interface
svn:r5302
2005-10-24 19:39:45 +00:00
Nick Mathewson
1bd3f6cc9a Update more files to new log stuff.
svn:r5286
2005-10-18 22:56:40 +00:00
Peter Palfrader
7b15f77dd6 Make a few INFO log lines into DEBUG
svn:r5257
2005-10-17 02:13:36 +00:00
Nick Mathewson
92451f74a8 Reformat inconsistent function declarations.
svn:r5160
2005-09-30 01:09:52 +00:00
Roger Dingledine
a5ea401b2e a few more hints on a rare but mysterious warning
svn:r4966
2005-09-09 20:58:44 +00:00
Roger Dingledine
35b78b2d8e clean up the rendezvous warn log msgs, and downgrade some to info
svn:r4964
2005-09-09 19:54:28 +00:00
Roger Dingledine
3333d27f41 we were mangling memory because we weren't allocing enough
for the hidserv desc
nick can you check that this is enough now?


svn:r4628
2005-07-22 00:18:25 +00:00
Roger Dingledine
1efeb3908a let hidden service descriptors publish 0 intro points
nick, please check the logic here


svn:r4627
2005-07-22 00:14:58 +00:00
Nick Mathewson
ec83652357 Logic to implement rendezvous/introduction via unknown servers.
- Add a new extend_info_t datatype to hold information needed to
  extend a circuit (addr,port,keyid,onion_key).  Use it in cpath and
  build_state.  Make appropriate functions take or return it instead of
  routerinfo_t or keyid.

- #if 0 needless check in circuit_get_by_edge_conn; if nobody triggers this
  error in 0.1.0.10, nobody will trigger it.

- Implement new hidden service descriptor format, which contains "extend
  info" for introduction points, along with protocol version list.
  - Parse new format.
  - Generate new format
  - Cache old and new formats alongside each other.
  - Directories serve "old" format if asked in old way, "newest available"
    format if asked in new way.
  - Use new format to find introduction points if possible; otherwise fall
    back.  Keep nickname lists and extendinfo lists in sync.
  - Tests for new format.

- Implement new "v2" INTRODUCE cell format.
  - Accept new format
  - Use new format if we have a versioned service descriptor that says the
    server accepts the new format.

- Add documentation for functions and data types.


svn:r4506
2005-06-29 21:46:55 +00:00
Nick Mathewson
232861ba42 Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
svn:r4411
2005-06-11 18:52:12 +00:00
Nick Mathewson
0831823763 Change end-of-file NLNL convention. It turns out arma I and I agree.
svn:r4382
2005-06-09 19:03:31 +00:00
Nick Mathewson
a6f51001a5 New whitespace normalization rule: no blank line at EOF.
svn:r4378
2005-06-09 16:46:51 +00:00
Roger Dingledine
5265bbd2b8 first iteration of scrubbing sensitive strings from logs.
also generally clean up log messages.


svn:r4174
2005-05-03 10:04:08 +00:00
Nick Mathewson
11d20d78a0 Adjust maximum skew and age for rendezvous descriptors: adjust code to make skew add to age.
svn:r3995
2005-04-03 05:36:23 +00:00
Nick Mathewson
349ee1abea Clean up rend cache on shutdown
svn:r3714
2005-02-28 22:38:00 +00:00
Roger Dingledine
38be533c69 Handle unavailable hidden services better. We try each intro point
until none are left, then we try to refetch the descriptor. If it's
the same one we had before, then close streams right then. Whenever
a new stream arrives, even if it's right after, optimistically try
refetching the descriptor, just in case.


svn:r3379
2005-01-19 23:15:59 +00:00
Nick Mathewson
7fbd297532 Suggestion from weasel: Make tor --version --version dump the cvs Id of every file.
svn:r3019
2004-11-29 22:25:31 +00:00
Nick Mathewson
6f5dbefa7e Normalize space: add one between every control keyword and control clause.
svn:r3003
2004-11-28 09:05:49 +00:00
Roger Dingledine
7c9a707900 remove emacs droppings, since nick says he doesn't need them anymore
svn:r2989
2004-11-26 04:00:55 +00:00
Nick Mathewson
5a5be93f80 Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
svn:r2758
2004-11-09 20:04:00 +00:00
Roger Dingledine
394554cfbf Clean up copyrights.
Break connection_consider_empty_buckets() out of
connection_read_bucket_decrement().


svn:r2698
2004-11-07 01:33:06 +00:00
Roger Dingledine
85c79ffbc7 canonicalize "src" and "dest" arg order in crypto.c (and others)
svn:r2644
2004-11-02 02:28:51 +00:00
Nick Mathewson
6980929e64 Use strlcpy, not strcpy.
svn:r2610
2004-10-27 06:48:16 +00:00
Nick Mathewson
1c9426d6e0 Build without warnings on mac gcc 3.3
svn:r2487
2004-10-14 03:18:14 +00:00
Roger Dingledine
aebc3a03ba more int to size_t conversions, fixing one or more amd64 bugs
plus a whitespace patch on config.c from vicman


svn:r2482
2004-10-14 02:47:09 +00:00
Roger Dingledine
7459d067a5 now base16_encode() and base32_encode() can't ever fail
svn:r2103
2004-07-22 08:30:06 +00:00
Nick Mathewson
7511fbf993 Resolve some XXXs
svn:r1889
2004-05-18 15:35:21 +00:00
Nick Mathewson
537fb82cbb Make some functions static
svn:r1857
2004-05-12 20:58:27 +00:00
Nick Mathewson
81922a125c More doxygenation.
svn:r1832
2004-05-10 04:34:48 +00:00
Roger Dingledine
c6d4a00c5f more doxygen markup
plenty more remains


svn:r1824
2004-05-09 16:47:25 +00:00
Nick Mathewson
682a805092 Comments for nearly all non-tricky files
svn:r1796
2004-05-05 21:32:43 +00:00
Roger Dingledine
25d54257fb use tor_assert
remove obsolete BUF_OK macro


svn:r1697
2004-04-25 20:37:37 +00:00
Nick Mathewson
a5bfe84509 ACK/NAK INTRODUCE1 requests. (We do no useful processing on them yet)
svn:r1597
2004-04-12 23:33:47 +00:00
Roger Dingledine
2321d21b3b bump allowed rend desc skew from 60 mins to 90 mins
svn:r1593
2004-04-12 09:44:38 +00:00
Roger Dingledine
3b97a54226 when rend_cache_store warns, give more detail
svn:r1572
2004-04-08 20:13:28 +00:00
Roger Dingledine
4122e2de11 stop being so eager to have rend_cache_store reject the
service descriptor


svn:r1566
2004-04-08 05:08:27 +00:00
Nick Mathewson
bb46d782ab Be endianly-correct for rendezvous functionality
svn:r1565
2004-04-08 04:47:39 +00:00
Nick Mathewson
40f7324eea Allow service descriptors with no intro points
svn:r1557
2004-04-08 03:02:50 +00:00