aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/gnunet-service-cadet_connection.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-13 20:23:53 +0000
committerChristian Grothoff <christian@grothoff.org>2015-07-13 20:23:53 +0000
commitb199b782b393d0fc04b5978edd69e36d6ae7ea64 (patch)
tree5b5f2c590f3e08240f734a255a8db15f413cfb65 /src/cadet/gnunet-service-cadet_connection.h
parent16d646a12f744c19e307c1c0139e3303a6263806 (diff)
downloadgnunet-b199b782b393d0fc04b5978edd69e36d6ae7ea64.tar.gz
gnunet-b199b782b393d0fc04b5978edd69e36d6ae7ea64.zip
adding moderately expensive instrumentation to track down invariant violation #3846 in CADET
Diffstat (limited to 'src/cadet/gnunet-service-cadet_connection.h')
-rw-r--r--src/cadet/gnunet-service-cadet_connection.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.h b/src/cadet/gnunet-service-cadet_connection.h
index b72536533..a6d0a7096 100644
--- a/src/cadet/gnunet-service-cadet_connection.h
+++ b/src/cadet/gnunet-service-cadet_connection.h
@@ -102,10 +102,14 @@ struct CadetConnectionQueue;
102 * @param fwd Was this a FWD going message? 102 * @param fwd Was this a FWD going message?
103 * @param size Size of the message. 103 * @param size Size of the message.
104 */ 104 */
105typedef void (*GCC_sent) (void *cls, 105typedef void
106 struct CadetConnection *c, 106(*GCC_sent) (void *cls,
107 struct CadetConnectionQueue *q, 107 struct CadetConnection *c,
108 uint16_t type, int fwd, size_t size); 108 struct CadetConnectionQueue *q,
109 uint16_t type,
110 int fwd,
111 size_t size);
112
109 113
110/** 114/**
111 * Core handler for connection creation. 115 * Core handler for connection creation.
@@ -113,37 +117,38 @@ typedef void (*GCC_sent) (void *cls,
113 * @param cls Closure (unused). 117 * @param cls Closure (unused).
114 * @param peer Sender (neighbor). 118 * @param peer Sender (neighbor).
115 * @param message Message. 119 * @param message Message.
116 * 120 * @return #GNUNET_OK to keep the connection open,
117 * @return GNUNET_OK to keep the connection open, 121 * #GNUNET_SYSERR to close it (signal serious error)
118 * GNUNET_SYSERR to close it (signal serious error)
119 */ 122 */
120int 123int
121GCC_handle_create (void *cls, const struct GNUNET_PeerIdentity *peer, 124GCC_handle_create (void *cls,
125 const struct GNUNET_PeerIdentity *peer,
122 const struct GNUNET_MessageHeader *message); 126 const struct GNUNET_MessageHeader *message);
123 127
128
124/** 129/**
125 * Core handler for path confirmations. 130 * Core handler for path confirmations.
126 * 131 *
127 * @param cls closure 132 * @param cls closure
128 * @param message message 133 * @param message message
129 * @param peer peer identity this notification is about 134 * @param peer peer identity this notification is about
130 * 135 * @return #GNUNET_OK to keep the connection open,
131 * @return GNUNET_OK to keep the connection open, 136 * #GNUNET_SYSERR to close it (signal serious error)
132 * GNUNET_SYSERR to close it (signal serious error)
133 */ 137 */
134int 138int
135GCC_handle_confirm (void *cls, const struct GNUNET_PeerIdentity *peer, 139GCC_handle_confirm (void *cls,
140 const struct GNUNET_PeerIdentity *peer,
136 const struct GNUNET_MessageHeader *message); 141 const struct GNUNET_MessageHeader *message);
137 142
143
138/** 144/**
139 * Core handler for notifications of broken paths 145 * Core handler for notifications of broken paths
140 * 146 *
141 * @param cls Closure (unused). 147 * @param cls Closure (unused).
142 * @param id Peer identity of sending neighbor. 148 * @param id Peer identity of sending neighbor.
143 * @param message Message. 149 * @param message Message.
144 * 150 * @return #GNUNET_OK to keep the connection open,
145 * @return GNUNET_OK to keep the connection open, 151 * #GNUNET_SYSERR to close it (signal serious error)
146 * GNUNET_SYSERR to close it (signal serious error)
147 */ 152 */
148int 153int
149GCC_handle_broken (void* cls, 154GCC_handle_broken (void* cls,