aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-20 14:54:49 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-20 14:54:49 +0000
commit4c630a158187a48ba585167b0ede49bd524d6f8d (patch)
treece1c39ef45e87f31ebb56d38c7d0e9038811e85b /src/transport/transport.h
parentf71fb2816cee37e823abcaa9d79c149ba90ff4cd (diff)
downloadgnunet-4c630a158187a48ba585167b0ede49bd524d6f8d.tar.gz
gnunet-4c630a158187a48ba585167b0ede49bd524d6f8d.zip
-use separate message types for TRY_CONNECT and TRY_DISCONNECT
Diffstat (limited to 'src/transport/transport.h')
-rw-r--r--src/transport/transport.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h
index 01d1b1722..af6e16ece 100644
--- a/src/transport/transport.h
+++ b/src/transport/transport.h
@@ -163,6 +163,7 @@ struct DisconnectInfoMessage
163 163
164}; 164};
165 165
166
166/** 167/**
167 * Message type for sending a request connect message 168 * Message type for sending a request connect message
168 * to the transport service. Must be done before transport 169 * to the transport service. Must be done before transport
@@ -172,14 +173,14 @@ struct DisconnectInfoMessage
172struct TransportRequestConnectMessage 173struct TransportRequestConnectMessage
173{ 174{
174 /** 175 /**
175 * Message header 176 * Message header with type #GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_CONNECT
176 */ 177 */
177 struct GNUNET_MessageHeader header; 178 struct GNUNET_MessageHeader header;
178 179
179 /** 180 /**
180 * Connect (#GNUNET_YES) or connect (#GNUNET_NO). 181 * Reserved (0).
181 */ 182 */
182 uint32_t connect; 183 uint32_t reserved GNUNET_PACKED;
183 184
184 /** 185 /**
185 * Identity of the peer we would like to connect to. 186 * Identity of the peer we would like to connect to.
@@ -187,6 +188,30 @@ struct TransportRequestConnectMessage
187 struct GNUNET_PeerIdentity peer; 188 struct GNUNET_PeerIdentity peer;
188}; 189};
189 190
191
192/**
193 * Message type for sending a request connection to
194 * a peer to be torn down.
195 */
196struct TransportRequestDisconnectMessage
197{
198 /**
199 * Message header with type #GNUNET_MESSAGE_TYPE_TRANSPORT_REQUEST_DISCONNECT
200 */
201 struct GNUNET_MessageHeader header;
202
203 /**
204 * Reserved (0).
205 */
206 uint32_t reserved GNUNET_PACKED;
207
208 /**
209 * Identity of the peer we would like to connect to.
210 */
211 struct GNUNET_PeerIdentity peer;
212};
213
214
190/** 215/**
191 * Message used to set a particular bandwidth quota. Sent TO the 216 * Message used to set a particular bandwidth quota. Sent TO the
192 * service to set an incoming quota, sent FROM the service to update 217 * service to set an incoming quota, sent FROM the service to update