diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-09 22:04:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-09 22:04:11 +0000 |
commit | 1dd22b0d681848af9980e5202e38b1a307cf2094 (patch) | |
tree | e013a7f735f2e967222890d87136bd5b76c1f803 /src/transport/transport.h | |
parent | c9f75566447fd3a9c5c304dbc8e31fd68b6aa3ed (diff) | |
download | gnunet-1dd22b0d681848af9980e5202e38b1a307cf2094.tar.gz gnunet-1dd22b0d681848af9980e5202e38b1a307cf2094.zip |
clarify prettyprinter API and protocols, make sure implementations are consistent in their implemenation, doxygen fixes, indentation fixes, subtle semantic fixes
Diffstat (limited to 'src/transport/transport.h')
-rw-r--r-- | src/transport/transport.h | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h index 68c685c29..cbbefb7e1 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -278,31 +278,32 @@ struct SendOkMessage | |||
278 | 278 | ||
279 | /** | 279 | /** |
280 | * Message used to notify the transport API about an address to string | 280 | * Message used to notify the transport API about an address to string |
281 | * conversion. Message is followed by the string with length strlen | 281 | * conversion. Message is followed by the string with the humand-readable |
282 | * address. For each lookup, multiple results may be returned. The | ||
283 | * last message must have a @e res of #GNUNET_OK and an @e addr_len | ||
284 | * of zero. | ||
282 | */ | 285 | */ |
283 | struct AddressToStringResultMessage | 286 | struct AddressToStringResultMessage |
284 | { | 287 | { |
285 | 288 | ||
286 | /** | 289 | /** |
287 | * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_SEND_OK | 290 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY |
288 | */ | 291 | */ |
289 | struct GNUNET_MessageHeader header; | 292 | struct GNUNET_MessageHeader header; |
290 | 293 | ||
291 | /** | 294 | /** |
292 | * GNUNET_OK if the conversion succeeded, | 295 | * #GNUNET_OK if the conversion succeeded, |
293 | * GNUNET_SYSERR if it failed | 296 | * #GNUNET_SYSERR if it failed |
294 | */ | 297 | */ |
295 | uint32_t res GNUNET_PACKED; | 298 | uint32_t res GNUNET_PACKED; |
296 | 299 | ||
297 | /** | 300 | /** |
298 | * Length of the following string | 301 | * Length of the following string, zero if @e is #GNUNET_SYSERR |
299 | */ | 302 | */ |
300 | uint32_t addr_len GNUNET_PACKED; | 303 | uint32_t addr_len GNUNET_PACKED; |
301 | }; | 304 | }; |
302 | 305 | ||
303 | 306 | ||
304 | |||
305 | |||
306 | /** | 307 | /** |
307 | * Message used to notify the transport service about a message | 308 | * Message used to notify the transport service about a message |
308 | * to be transmitted to another peer. The actual message follows. | 309 | * to be transmitted to another peer. The actual message follows. |
@@ -342,7 +343,7 @@ struct AddressLookupMessage | |||
342 | { | 343 | { |
343 | 344 | ||
344 | /** | 345 | /** |
345 | * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING | 346 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING |
346 | */ | 347 | */ |
347 | struct GNUNET_MessageHeader header; | 348 | struct GNUNET_MessageHeader header; |
348 | 349 | ||
@@ -358,11 +359,11 @@ struct AddressLookupMessage | |||
358 | uint16_t addrlen GNUNET_PACKED; | 359 | uint16_t addrlen GNUNET_PACKED; |
359 | 360 | ||
360 | /** | 361 | /** |
361 | * timeout to give up. | 362 | * timeout to give up (for DNS resolution timeout mostly) |
362 | */ | 363 | */ |
363 | struct GNUNET_TIME_RelativeNBO timeout; | 364 | struct GNUNET_TIME_RelativeNBO timeout; |
364 | 365 | ||
365 | /* followed by 'addrlen' bytes of the actual address, then | 366 | /* followed by @e addrlen bytes of the actual address, then |
366 | * followed by the 0-terminated name of the transport */ | 367 | * followed by the 0-terminated name of the transport */ |
367 | }; | 368 | }; |
368 | 369 | ||
@@ -414,10 +415,19 @@ struct ValidationIterateResponseMessage | |||
414 | */ | 415 | */ |
415 | uint32_t state GNUNET_PACKED; | 416 | uint32_t state GNUNET_PACKED; |
416 | 417 | ||
418 | /** | ||
419 | * FIXME | ||
420 | */ | ||
417 | struct GNUNET_TIME_AbsoluteNBO last_validation; | 421 | struct GNUNET_TIME_AbsoluteNBO last_validation; |
418 | 422 | ||
423 | /** | ||
424 | * FIXME | ||
425 | */ | ||
419 | struct GNUNET_TIME_AbsoluteNBO valid_until; | 426 | struct GNUNET_TIME_AbsoluteNBO valid_until; |
420 | 427 | ||
428 | /** | ||
429 | * FIXME | ||
430 | */ | ||
421 | struct GNUNET_TIME_AbsoluteNBO next_validation; | 431 | struct GNUNET_TIME_AbsoluteNBO next_validation; |
422 | }; | 432 | }; |
423 | 433 | ||
@@ -476,7 +486,7 @@ struct PeerMonitorMessage | |||
476 | struct TrafficMetricMessage | 486 | struct TrafficMetricMessage |
477 | { | 487 | { |
478 | /** | 488 | /** |
479 | * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC | 489 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC |
480 | */ | 490 | */ |
481 | struct GNUNET_MessageHeader header; | 491 | struct GNUNET_MessageHeader header; |
482 | 492 | ||
@@ -535,7 +545,7 @@ struct PeerIterateResponseMessage | |||
535 | uint32_t local_address_info GNUNET_PACKED; | 545 | uint32_t local_address_info GNUNET_PACKED; |
536 | 546 | ||
537 | /** | 547 | /** |
538 | * State this peer is in as #GNUNET_TRANSPORT_PeerState enumeration element | 548 | * State this peer is in as an `enum GNUNET_TRANSPORT_PeerState` |
539 | */ | 549 | */ |
540 | uint32_t state GNUNET_PACKED; | 550 | uint32_t state GNUNET_PACKED; |
541 | 551 | ||
@@ -560,13 +570,13 @@ struct BlacklistMessage | |||
560 | { | 570 | { |
561 | 571 | ||
562 | /** | 572 | /** |
563 | * Type will be GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY or | 573 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY or |
564 | * GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY. | 574 | * #GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY. |
565 | */ | 575 | */ |
566 | struct GNUNET_MessageHeader header; | 576 | struct GNUNET_MessageHeader header; |
567 | 577 | ||
568 | /** | 578 | /** |
569 | * 0 for the query, GNUNET_OK (allowed) or GNUNET_SYSERR (disallowed) | 579 | * 0 for the query, #GNUNET_OK (allowed) or #GNUNET_SYSERR (disallowed) |
570 | * for the response. | 580 | * for the response. |
571 | */ | 581 | */ |
572 | uint32_t is_allowed GNUNET_PACKED; | 582 | uint32_t is_allowed GNUNET_PACKED; |