aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-09-12 11:31:50 +0000
committerChristian Grothoff <christian@grothoff.org>2016-09-12 11:31:50 +0000
commit02ccdcf0ef5c039224a397f057b2a76f54364d92 (patch)
treedb9e4faee6831b965fedb5648915a556be5ff091 /src/cadet/cadet.h
parent17987cc9db00b169dd8bff5a620e5d5ab51ff044 (diff)
downloadgnunet-02ccdcf0ef5c039224a397f057b2a76f54364d92.tar.gz
gnunet-02ccdcf0ef5c039224a397f057b2a76f54364d92.zip
realigning CADET messages and bumping message types to avoid interactions with incompatible old versions complicating diagnostics
Diffstat (limited to 'src/cadet/cadet.h')
-rw-r--r--src/cadet/cadet.h108
1 files changed, 56 insertions, 52 deletions
diff --git a/src/cadet/cadet.h b/src/cadet/cadet.h
index 063711fd2..3ff93c254 100644
--- a/src/cadet/cadet.h
+++ b/src/cadet/cadet.h
@@ -69,16 +69,17 @@ GNUNET_NETWORK_STRUCT_BEGIN
69 */ 69 */
70struct GNUNET_CADET_PortMessage 70struct GNUNET_CADET_PortMessage
71{ 71{
72 /** 72 /**
73 * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_[OPEN|CLOSE] 73 * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_OPEN
74 * 74 * or #GNUNET_MESSAGE_TYPE_CADET_LOCAL_PORT_CLOSE
75 * Size: sizeof(struct GNUNET_CADET_ChannelMessage) 75 *
76 */ 76 * Size: sizeof(struct GNUNET_CADET_ChannelMessage)
77 */
77 struct GNUNET_MessageHeader header; 78 struct GNUNET_MessageHeader header;
78 79
79 /** 80 /**
80 * Port to open/close. 81 * Port to open/close.
81 */ 82 */
82 struct GNUNET_HashCode port GNUNET_PACKED; 83 struct GNUNET_HashCode port GNUNET_PACKED;
83}; 84};
84 85
@@ -96,31 +97,31 @@ typedef uint32_t CADET_ChannelNumber;
96 */ 97 */
97struct GNUNET_CADET_ChannelCreateMessage 98struct GNUNET_CADET_ChannelCreateMessage
98{ 99{
99 /** 100 /**
100 * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_CREATE 101 * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_CREATE
101 * 102 *
102 * Size: sizeof(struct GNUNET_CADET_ChannelCreateMessage) 103 * Size: sizeof(struct GNUNET_CADET_ChannelCreateMessage)
103 */ 104 */
104 struct GNUNET_MessageHeader header; 105 struct GNUNET_MessageHeader header;
105 106
106 /** 107 /**
107 * ID of a channel controlled by this client. 108 * ID of a channel controlled by this client.
108 */ 109 */
109 CADET_ChannelNumber channel_id GNUNET_PACKED; 110 CADET_ChannelNumber channel_id GNUNET_PACKED;
110 111
111 /** 112 /**
112 * Channel's peer 113 * Channel's peer
113 */ 114 */
114 struct GNUNET_PeerIdentity peer; 115 struct GNUNET_PeerIdentity peer;
115 116
116 /** 117 /**
117 * Port of the channel. 118 * Port of the channel.
118 */ 119 */
119 struct GNUNET_HashCode port; 120 struct GNUNET_HashCode port;
120 121
121 /** 122 /**
122 * Options. 123 * Options.
123 */ 124 */
124 uint32_t opt GNUNET_PACKED; 125 uint32_t opt GNUNET_PACKED;
125}; 126};
126 127
@@ -130,16 +131,16 @@ struct GNUNET_CADET_ChannelCreateMessage
130 */ 131 */
131struct GNUNET_CADET_ChannelDestroyMessage 132struct GNUNET_CADET_ChannelDestroyMessage
132{ 133{
133 /** 134 /**
134 * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_DESTROY 135 * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_TUNNEL_DESTROY
135 * 136 *
136 * Size: sizeof(struct GNUNET_CADET_ChannelDestroyMessage) 137 * Size: sizeof(struct GNUNET_CADET_ChannelDestroyMessage)
137 */ 138 */
138 struct GNUNET_MessageHeader header; 139 struct GNUNET_MessageHeader header;
139 140
140 /** 141 /**
141 * ID of a channel controlled by this client. 142 * ID of a channel controlled by this client.
142 */ 143 */
143 CADET_ChannelNumber channel_id GNUNET_PACKED; 144 CADET_ChannelNumber channel_id GNUNET_PACKED;
144}; 145};
145 146
@@ -149,19 +150,19 @@ struct GNUNET_CADET_ChannelDestroyMessage
149 */ 150 */
150struct GNUNET_CADET_LocalData 151struct GNUNET_CADET_LocalData
151{ 152{
152 /** 153 /**
153 * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA 154 * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_DATA
154 */ 155 */
155 struct GNUNET_MessageHeader header; 156 struct GNUNET_MessageHeader header;
156 157
157 /** 158 /**
158 * ID of the channel 159 * ID of the channel
159 */ 160 */
160 uint32_t id GNUNET_PACKED; 161 uint32_t id GNUNET_PACKED;
161 162
162 /** 163 /**
163 * Payload follows 164 * Payload follows
164 */ 165 */
165}; 166};
166 167
167 168
@@ -171,14 +172,14 @@ struct GNUNET_CADET_LocalData
171 */ 172 */
172struct GNUNET_CADET_LocalAck 173struct GNUNET_CADET_LocalAck
173{ 174{
174 /** 175 /**
175 * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK 176 * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_ACK
176 */ 177 */
177 struct GNUNET_MessageHeader header; 178 struct GNUNET_MessageHeader header;
178 179
179 /** 180 /**
180 * ID of the channel allowed to send more data. 181 * ID of the channel allowed to send more data.
181 */ 182 */
182 CADET_ChannelNumber channel_id GNUNET_PACKED; 183 CADET_ChannelNumber channel_id GNUNET_PACKED;
183 184
184}; 185};
@@ -190,7 +191,8 @@ struct GNUNET_CADET_LocalAck
190struct GNUNET_CADET_LocalInfo 191struct GNUNET_CADET_LocalInfo
191{ 192{
192 /** 193 /**
193 * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO[_TUNNEL,_PEER] 194 * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL or
195 * #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER
194 */ 196 */
195 struct GNUNET_MessageHeader header; 197 struct GNUNET_MessageHeader header;
196 198
@@ -217,7 +219,8 @@ struct GNUNET_CADET_LocalInfo
217struct GNUNET_CADET_LocalInfoPeer 219struct GNUNET_CADET_LocalInfoPeer
218{ 220{
219 /** 221 /**
220 * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER[S] 222 * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEER or
223 * #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS
221 */ 224 */
222 struct GNUNET_MessageHeader header; 225 struct GNUNET_MessageHeader header;
223 226
@@ -246,7 +249,8 @@ struct GNUNET_CADET_LocalInfoPeer
246struct GNUNET_CADET_LocalInfoTunnel 249struct GNUNET_CADET_LocalInfoTunnel
247{ 250{
248 /** 251 /**
249 * Type: GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL[S] 252 * Type: #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL
253 * or #GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS
250 */ 254 */
251 struct GNUNET_MessageHeader header; 255 struct GNUNET_MessageHeader header;
252 256