diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-05 07:24:49 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2023-10-05 07:24:49 +0200 |
commit | 96c6d62c6a149b0645b6a2a487a7e24e09b5fbc9 (patch) | |
tree | bc1ac68addde60b5413fa5fdcc87b571a7e3bc89 /src/transport | |
parent | 5df04510362413a6c215365879058f5c445e1f3c (diff) | |
download | gnunet-96c6d62c6a149b0645b6a2a487a7e24e09b5fbc9.tar.gz gnunet-96c6d62c6a149b0645b6a2a487a7e24e09b5fbc9.zip |
Remove old transport struct definitions
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/transport.h | 423 |
1 files changed, 0 insertions, 423 deletions
diff --git a/src/transport/transport.h b/src/transport/transport.h index 38f1b220a..66f17ee5b 100644 --- a/src/transport/transport.h +++ b/src/transport/transport.h | |||
@@ -34,36 +34,6 @@ | |||
34 | 34 | ||
35 | 35 | ||
36 | /** | 36 | /** |
37 | * For how long do we allow unused bandwidth | ||
38 | * from the past to carry over into the future? (in seconds) | ||
39 | */ | ||
40 | #define MAX_BANDWIDTH_CARRY_S GNUNET_CONSTANTS_MAX_BANDWIDTH_CARRY_S | ||
41 | |||
42 | /** | ||
43 | * How often do we (at most) do a full quota | ||
44 | * recalculation? (in ms) | ||
45 | */ | ||
46 | #define MIN_QUOTA_REFRESH_TIME 2000 | ||
47 | |||
48 | /** | ||
49 | * What's the maximum number of sockets transport uses for validation and | ||
50 | * neighbors | ||
51 | */ | ||
52 | #define DEFAULT_MAX_FDS 256 | ||
53 | |||
54 | /** | ||
55 | * Maximum frequency for re-evaluating latencies for all transport addresses. | ||
56 | */ | ||
57 | #define LATENCY_EVALUATION_MAX_DELAY \ | ||
58 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1) | ||
59 | |||
60 | /** | ||
61 | * Maximum frequency for re-evaluating latencies for connected addresses. | ||
62 | */ | ||
63 | #define CONNECTED_LATENCY_EVALUATION_MAX_DELAY \ | ||
64 | GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1) | ||
65 | |||
66 | /** | ||
67 | * Similar to GNUNET_TRANSPORT_NotifyDisconnect but in and out quotas are | 37 | * Similar to GNUNET_TRANSPORT_NotifyDisconnect but in and out quotas are |
68 | * included here. These values are not required outside transport_api | 38 | * included here. These values are not required outside transport_api |
69 | * | 39 | * |
@@ -166,32 +136,6 @@ struct DisconnectInfoMessage | |||
166 | 136 | ||
167 | 137 | ||
168 | /** | 138 | /** |
169 | * Message used to set a particular bandwidth quota. Sent TO the | ||
170 | * service to set an incoming quota, sent FROM the service to update | ||
171 | * an outgoing quota. | ||
172 | * | ||
173 | * NOTE: no longer used in TNG! | ||
174 | */ | ||
175 | struct QuotaSetMessage | ||
176 | { | ||
177 | /** | ||
178 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_SET_QUOTA | ||
179 | */ | ||
180 | struct GNUNET_MessageHeader header; | ||
181 | |||
182 | /** | ||
183 | * Quota. | ||
184 | */ | ||
185 | struct GNUNET_BANDWIDTH_Value32NBO quota; | ||
186 | |||
187 | /** | ||
188 | * About which peer are we talking here? | ||
189 | */ | ||
190 | struct GNUNET_PeerIdentity peer; | ||
191 | }; | ||
192 | |||
193 | |||
194 | /** | ||
195 | * Message used to notify the transport API about a message | 139 | * Message used to notify the transport API about a message |
196 | * received from the network. The actual message follows. | 140 | * received from the network. The actual message follows. |
197 | */ | 141 | */ |
@@ -309,371 +253,6 @@ struct OutboundMessage | |||
309 | }; | 253 | }; |
310 | 254 | ||
311 | 255 | ||
312 | #if ! (defined(GNUNET_TRANSPORT_COMMUNICATION_VERSION) || \ | ||
313 | defined(GNUNET_TRANSPORT_CORE_VERSION)) | ||
314 | |||
315 | |||
316 | /** | ||
317 | * Message used to notify the transport API about an address to string | ||
318 | * conversion. Message is followed by the string with the humand-readable | ||
319 | * address. For each lookup, multiple results may be returned. The | ||
320 | * last message must have a @e res of #GNUNET_OK and an @e addr_len | ||
321 | * of zero. | ||
322 | */ | ||
323 | struct AddressToStringResultMessage | ||
324 | { | ||
325 | /** | ||
326 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY | ||
327 | */ | ||
328 | struct GNUNET_MessageHeader header; | ||
329 | |||
330 | /** | ||
331 | * #GNUNET_OK if the conversion succeeded, | ||
332 | * #GNUNET_SYSERR if it failed | ||
333 | */ | ||
334 | uint32_t res GNUNET_PACKED; | ||
335 | |||
336 | /** | ||
337 | * Length of the following string, zero if @e is #GNUNET_SYSERR | ||
338 | */ | ||
339 | uint32_t addr_len GNUNET_PACKED; | ||
340 | }; | ||
341 | |||
342 | |||
343 | /** | ||
344 | * Message from the library to the transport service | ||
345 | * asking for converting a transport address to a | ||
346 | * human-readable UTF-8 string. | ||
347 | */ | ||
348 | struct AddressLookupMessage | ||
349 | { | ||
350 | /** | ||
351 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING | ||
352 | */ | ||
353 | struct GNUNET_MessageHeader header; | ||
354 | |||
355 | /** | ||
356 | * Should the conversion use numeric IP addresses (otherwise | ||
357 | * a reverse DNS lookup is OK -- if applicable). | ||
358 | */ | ||
359 | int16_t numeric_only GNUNET_PACKED; | ||
360 | |||
361 | /** | ||
362 | * Length of the (binary) address in bytes, in big-endian. | ||
363 | */ | ||
364 | uint16_t addrlen GNUNET_PACKED; | ||
365 | |||
366 | /** | ||
367 | * timeout to give up (for DNS resolution timeout mostly) | ||
368 | */ | ||
369 | struct GNUNET_TIME_RelativeNBO timeout; | ||
370 | |||
371 | /* followed by @e addrlen bytes of the actual address, then | ||
372 | * followed by the 0-terminated name of the transport */ | ||
373 | }; | ||
374 | |||
375 | |||
376 | /** | ||
377 | * Message from the transport service to the library containing information | ||
378 | * about a peer. Information contained are: | ||
379 | * - current address used to communicate with this peer | ||
380 | * - state | ||
381 | * - state timeout | ||
382 | * | ||
383 | * Memory layout: | ||
384 | * [AddressIterateResponseMessage][address[addrlen]][transportname[pluginlen]] | ||
385 | */ | ||
386 | struct ValidationIterateResponseMessage | ||
387 | { | ||
388 | /** | ||
389 | * Type is #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_RESPONSE | ||
390 | */ | ||
391 | struct GNUNET_MessageHeader header; | ||
392 | |||
393 | /** | ||
394 | * For alignment. | ||
395 | */ | ||
396 | uint32_t reserved; | ||
397 | |||
398 | /** | ||
399 | * Peer identity | ||
400 | */ | ||
401 | struct GNUNET_PeerIdentity peer; | ||
402 | |||
403 | /** | ||
404 | * Local info about the address | ||
405 | */ | ||
406 | uint32_t local_address_info GNUNET_PACKED; | ||
407 | |||
408 | /** | ||
409 | * Address length | ||
410 | */ | ||
411 | uint32_t addrlen GNUNET_PACKED; | ||
412 | |||
413 | /** | ||
414 | * Length of the plugin name | ||
415 | */ | ||
416 | uint32_t pluginlen GNUNET_PACKED; | ||
417 | |||
418 | /** | ||
419 | * State | ||
420 | */ | ||
421 | uint32_t state GNUNET_PACKED; | ||
422 | |||
423 | /** | ||
424 | * At what time did we successfully validate the address last. | ||
425 | * Will be NEVER if the address failed validation. | ||
426 | */ | ||
427 | struct GNUNET_TIME_AbsoluteNBO last_validation; | ||
428 | |||
429 | /** | ||
430 | * Until when is the address believed to be valid. | ||
431 | * Will be ZERO if the address is not believed to be valid. | ||
432 | */ | ||
433 | struct GNUNET_TIME_AbsoluteNBO valid_until; | ||
434 | |||
435 | /** | ||
436 | * When will we next try to validate the address (typically | ||
437 | * done before @e valid_until happens). | ||
438 | */ | ||
439 | struct GNUNET_TIME_AbsoluteNBO next_validation; | ||
440 | }; | ||
441 | |||
442 | |||
443 | /** | ||
444 | * Message from the library to the transport service | ||
445 | * asking for binary addresses known for a peer. | ||
446 | */ | ||
447 | struct ValidationMonitorMessage | ||
448 | { | ||
449 | /** | ||
450 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_REQUEST | ||
451 | */ | ||
452 | struct GNUNET_MessageHeader header; | ||
453 | |||
454 | /** | ||
455 | * One shot call or continuous replies? | ||
456 | */ | ||
457 | uint32_t one_shot GNUNET_PACKED; | ||
458 | |||
459 | /** | ||
460 | * The identity of the peer to look up. | ||
461 | */ | ||
462 | struct GNUNET_PeerIdentity peer; | ||
463 | }; | ||
464 | |||
465 | |||
466 | /** | ||
467 | * Message from the library to the transport service | ||
468 | * asking for binary addresses known for a peer. | ||
469 | */ | ||
470 | struct PeerMonitorMessage | ||
471 | { | ||
472 | /** | ||
473 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST | ||
474 | */ | ||
475 | struct GNUNET_MessageHeader header; | ||
476 | |||
477 | /** | ||
478 | * One shot call or continuous replies? | ||
479 | */ | ||
480 | uint32_t one_shot GNUNET_PACKED; | ||
481 | |||
482 | /** | ||
483 | * The identity of the peer to look up. | ||
484 | */ | ||
485 | struct GNUNET_PeerIdentity peer; | ||
486 | }; | ||
487 | |||
488 | |||
489 | /** | ||
490 | * Message from the library to the transport service | ||
491 | * asking for binary addresses known for a peer. | ||
492 | */ | ||
493 | struct TrafficMetricMessage | ||
494 | { | ||
495 | /** | ||
496 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC | ||
497 | */ | ||
498 | struct GNUNET_MessageHeader header; | ||
499 | |||
500 | /** | ||
501 | * Always zero. | ||
502 | */ | ||
503 | uint32_t reserved GNUNET_PACKED; | ||
504 | |||
505 | /** | ||
506 | * The identity of the peer to look up. | ||
507 | */ | ||
508 | struct GNUNET_PeerIdentity peer; | ||
509 | |||
510 | /** | ||
511 | * Fake properties to generate. | ||
512 | */ | ||
513 | struct GNUNET_ATS_PropertiesNBO properties; | ||
514 | |||
515 | /** | ||
516 | * Fake delay to add on inbound traffic. | ||
517 | */ | ||
518 | struct GNUNET_TIME_RelativeNBO delay_in; | ||
519 | |||
520 | /** | ||
521 | * Fake delay to add on outbound traffic. | ||
522 | */ | ||
523 | struct GNUNET_TIME_RelativeNBO delay_out; | ||
524 | }; | ||
525 | |||
526 | |||
527 | /** | ||
528 | * Message from the transport service to the library containing information | ||
529 | * about a peer. Information contained are: | ||
530 | * - current address used to communicate with this peer | ||
531 | * - state | ||
532 | * - state timeout | ||
533 | * | ||
534 | * Memory layout: | ||
535 | * [AddressIterateResponseMessage][address[addrlen]][transportname[pluginlen]] | ||
536 | */ | ||
537 | struct PeerIterateResponseMessage | ||
538 | { | ||
539 | /** | ||
540 | * Type is #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE | ||
541 | */ | ||
542 | struct GNUNET_MessageHeader header; | ||
543 | |||
544 | /** | ||
545 | * For alignment. | ||
546 | */ | ||
547 | uint32_t reserved; | ||
548 | |||
549 | /** | ||
550 | * Peer identity | ||
551 | */ | ||
552 | struct GNUNET_PeerIdentity peer; | ||
553 | |||
554 | /** | ||
555 | * Timeout for the state this peer is in | ||
556 | */ | ||
557 | struct GNUNET_TIME_AbsoluteNBO state_timeout; | ||
558 | |||
559 | /** | ||
560 | * Local info about the address | ||
561 | */ | ||
562 | uint32_t local_address_info GNUNET_PACKED; | ||
563 | |||
564 | /** | ||
565 | * State this peer is in as an `enum GNUNET_TRANSPORT_PeerState` | ||
566 | */ | ||
567 | uint32_t state GNUNET_PACKED; | ||
568 | |||
569 | /** | ||
570 | * Address length | ||
571 | */ | ||
572 | uint32_t addrlen GNUNET_PACKED; | ||
573 | |||
574 | /** | ||
575 | * Length of the plugin name | ||
576 | */ | ||
577 | uint32_t pluginlen GNUNET_PACKED; | ||
578 | }; | ||
579 | |||
580 | |||
581 | /** | ||
582 | * Change in blacklisting (either request or notification, | ||
583 | * depending on which direction it is going). | ||
584 | */ | ||
585 | struct BlacklistMessage | ||
586 | { | ||
587 | /** | ||
588 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_QUERY or | ||
589 | * #GNUNET_MESSAGE_TYPE_TRANSPORT_BLACKLIST_REPLY. | ||
590 | */ | ||
591 | struct GNUNET_MessageHeader header; | ||
592 | |||
593 | /** | ||
594 | * 0 for the query, #GNUNET_OK (allowed) or #GNUNET_SYSERR (disallowed) | ||
595 | * for the response. | ||
596 | */ | ||
597 | uint32_t is_allowed GNUNET_PACKED; | ||
598 | |||
599 | /** | ||
600 | * Which peer is being blacklisted or queried? | ||
601 | */ | ||
602 | struct GNUNET_PeerIdentity peer; | ||
603 | }; | ||
604 | |||
605 | |||
606 | /** | ||
607 | * Transport-level connection status update. | ||
608 | */ | ||
609 | struct TransportPluginMonitorMessage | ||
610 | { | ||
611 | /** | ||
612 | * Type will be #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_EVENT. | ||
613 | */ | ||
614 | struct GNUNET_MessageHeader header; | ||
615 | |||
616 | /** | ||
617 | * An `enum GNUNET_TRANSPORT_SessionState` in NBO. | ||
618 | */ | ||
619 | uint16_t session_state GNUNET_PACKED; | ||
620 | |||
621 | /** | ||
622 | * #GNUNET_YES if this is an inbound connection, | ||
623 | * #GNUNET_NO if this is an outbound connection, | ||
624 | * #GNUNET_SYSERR if connections of this plugin | ||
625 | * are so fundamentally bidirectional | ||
626 | * that they have no 'initiator' | ||
627 | * Value given in NBO. | ||
628 | */ | ||
629 | int16_t is_inbound GNUNET_PACKED; | ||
630 | |||
631 | /** | ||
632 | * Number of messages waiting transmission. | ||
633 | */ | ||
634 | uint32_t msgs_pending GNUNET_PACKED; | ||
635 | |||
636 | /** | ||
637 | * Number of bytes waiting for transmission. | ||
638 | */ | ||
639 | uint32_t bytes_pending GNUNET_PACKED; | ||
640 | |||
641 | /** | ||
642 | * When will this transport plugin session time out? | ||
643 | */ | ||
644 | struct GNUNET_TIME_AbsoluteNBO timeout; | ||
645 | |||
646 | /** | ||
647 | * Until how long is this plugin currently blocked from reading? | ||
648 | */ | ||
649 | struct GNUNET_TIME_AbsoluteNBO delay; | ||
650 | |||
651 | /** | ||
652 | * Which peer is this connection for? | ||
653 | */ | ||
654 | struct GNUNET_PeerIdentity peer; | ||
655 | |||
656 | /** | ||
657 | * Unique identifier for the session. | ||
658 | */ | ||
659 | uint64_t session_id; | ||
660 | |||
661 | /** | ||
662 | * Length of the plugin name in bytes, including 0-termination. | ||
663 | */ | ||
664 | uint16_t plugin_name_len GNUNET_PACKED; | ||
665 | |||
666 | /** | ||
667 | * Length of the plugin address in bytes. | ||
668 | */ | ||
669 | uint16_t plugin_address_len GNUNET_PACKED; | ||
670 | |||
671 | /* followed by 0-terminated plugin name and | ||
672 | @e plugin_address_len bytes of plugin address */ | ||
673 | }; | ||
674 | |||
675 | #else | ||
676 | |||
677 | /* *********************** TNG messages ***************** */ | 256 | /* *********************** TNG messages ***************** */ |
678 | 257 | ||
679 | /** | 258 | /** |
@@ -1243,8 +822,6 @@ struct RequestHelloValidationMessage | |||
1243 | /* followed by 0-terminated address to validate */ | 822 | /* followed by 0-terminated address to validate */ |
1244 | }; | 823 | }; |
1245 | 824 | ||
1246 | #endif | ||
1247 | |||
1248 | GNUNET_NETWORK_STRUCT_END | 825 | GNUNET_NETWORK_STRUCT_END |
1249 | 826 | ||
1250 | /* end of transport.h */ | 827 | /* end of transport.h */ |