aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-20 17:54:36 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-20 17:54:36 +0000
commit12af87539b3380e97a9433930e4fa60cd825c157 (patch)
tree20117d0755a39f369a7c7bcc38a39d2c0c84ba1a /src/or/or.h
parentc8c36dd227eec2454cfe3aaa74720cc5897864ac (diff)
downloadtor-12af87539b3380e97a9433930e4fa60cd825c157.tar
tor-12af87539b3380e97a9433930e4fa60cd825c157.tar.gz
r9303@Kushana: nickm | 2006-10-20 12:07:34 -0400
Start implementing reason extension for stream events to match the one one used by circuit events. (Not a complete implementation yet; actual reasons are not passed to control.c) svn:r8777
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 86c626a77..ae116d044 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -464,6 +464,10 @@ typedef enum {
#define RELAY_COMMAND_RENDEZVOUS_ESTABLISHED 39
#define RELAY_COMMAND_INTRODUCE_ACK 40
+/* XXXX Placeholder: remove me as soon as we have correct reasons sent
+ * everywhere. */
+#define END_STREAM_REASON_FIXME_XXXX 0
+
#define END_STREAM_REASON_MISC 1
#define END_STREAM_REASON_RESOLVEFAILED 2
#define END_STREAM_REASON_CONNECTREFUSED 3
@@ -479,6 +483,10 @@ typedef enum {
#define END_STREAM_REASON_TORPROTOCOL 13
#define END_STREAM_REASON_NOTDIRECTORY 14
+/* OR this with the argument to control_event_stream_status to indicate that
+ * the reason came from an END cell. */
+#define END_STREAM_REASON_FLAG_REMOTE 512
+
/* These high-numbered end reasons are not part of the official spec,
* and are not intended to be put in relay end cells. They are here
* to be more informative when sending back socks replies to the
@@ -2089,7 +2097,8 @@ int connection_control_process_inbuf(control_connection_t *conn);
int control_event_circuit_status(origin_circuit_t *circ,
circuit_status_event_t e, int reason);
int control_event_stream_status(edge_connection_t *conn,
- stream_status_event_t e);
+ stream_status_event_t e,
+ int reason);
int control_event_or_conn_status(or_connection_t *conn,
or_conn_status_event_t e);
int control_event_bandwidth_used(uint32_t n_read, uint32_t n_written);