aboutsummaryrefslogtreecommitdiff
path: root/src/exit/exit.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-21 19:06:33 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-21 19:06:33 +0000
commit7e7ac6e0b1230a74684f13ced5c49dfaf52f3753 (patch)
treeaab762d1000f1978746678ca80076a746c799738 /src/exit/exit.h
parentf8afff12b68488033fb322a332dca1dc0536f1da (diff)
downloadgnunet-7e7ac6e0b1230a74684f13ced5c49dfaf52f3753.tar.gz
gnunet-7e7ac6e0b1230a74684f13ced5c49dfaf52f3753.zip
-document ICMP MESH messages better, discard ICMP payload on exit->mesh->vpn path for certain ICMP types
Diffstat (limited to 'src/exit/exit.h')
-rw-r--r--src/exit/exit.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/exit/exit.h b/src/exit/exit.h
index 92918b92a..f7366df20 100644
--- a/src/exit/exit.h
+++ b/src/exit/exit.h
@@ -218,7 +218,10 @@ struct GNUNET_EXIT_IcmpServiceMessage
218 struct GNUNET_MessageHeader header; 218 struct GNUNET_MessageHeader header;
219 219
220 /** 220 /**
221 * Address family, AF_INET or AF_INET6, in network byte order. 221 * Address family, AF_INET or AF_INET6, in network byte order. This
222 * AF value determines if the 'icmp_header' is ICMPv4 or ICMPv6.
223 * The receiver (exit) may still have to translate (PT) to the services'
224 * ICMP version (if possible).
222 */ 225 */
223 int32_t af; 226 int32_t af;
224 227
@@ -232,7 +235,10 @@ struct GNUNET_EXIT_IcmpServiceMessage
232 */ 235 */
233 struct GNUNET_TUN_IcmpHeader icmp_header; 236 struct GNUNET_TUN_IcmpHeader icmp_header;
234 237
235 /* followed by ICMP payload */ 238 /* followed by ICMP payload; however, for certain ICMP message
239 types where the payload is the original IP packet, the payload
240 is omitted as it is useless for the receiver (who will need
241 to create some fake payload manually) */
236}; 242};
237 243
238 244
@@ -249,18 +255,25 @@ struct GNUNET_EXIT_IcmpInternetMessage
249 255
250 /** 256 /**
251 * Address family, AF_INET or AF_INET6, in network byte order. 257 * Address family, AF_INET or AF_INET6, in network byte order.
258 * Determines both the ICMP version used in the 'icmp_header' and
259 * the IP address format that is used for the target IP. If
260 * PT is necessary, the sender has already done it.
252 */ 261 */
253 int32_t af; 262 int32_t af;
254 263
255 /** 264 /**
256 * ICMP header to use. 265 * ICMP header to use. Must match the target 'af' given
266 * above.
257 */ 267 */
258 struct GNUNET_TUN_IcmpHeader icmp_header; 268 struct GNUNET_TUN_IcmpHeader icmp_header;
259 269
260 /* followed by IP address of the destination; either 270 /* followed by IP address of the destination; either
261 'struct in_addr' or 'struct in6_addr', depending on af */ 271 'struct in_addr' or 'struct in6_addr', depending on af */
262 272
263 /* followed by ICMP payload */ 273 /* followed by ICMP payload; however, for certain ICMP message
274 types where the payload is the original IP packet, the payload
275 is omitted as it is useless for the receiver (who will need
276 to create some fake payload manually) */
264}; 277};
265 278
266 279
@@ -277,15 +290,19 @@ struct GNUNET_EXIT_IcmpToVPNMessage
277 290
278 /** 291 /**
279 * Address family, AF_INET or AF_INET6, in network byte order. 292 * Address family, AF_INET or AF_INET6, in network byte order.
293 * Useful to determine if this is an ICMPv4 or ICMPv6 header.
280 */ 294 */
281 int32_t af; 295 int32_t af;
282 296
283 /** 297 /**
284 * ICMP header to use. 298 * ICMP header to use. ICMPv4 or ICMPv6, depending on 'af'.
285 */ 299 */
286 struct GNUNET_TUN_IcmpHeader icmp_header; 300 struct GNUNET_TUN_IcmpHeader icmp_header;
287 301
288 /* followed by ICMP payload */ 302 /* followed by ICMP payload; however, for certain ICMP message
303 types where the payload is the original IP packet, the payload
304 is omitted as it is useless for the receiver (who will need
305 to create some fake payload manually) */
289}; 306};
290 307
291 308