diff options
author | t3sserakt <t3ss@posteo.de> | 2023-10-02 18:10:36 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2023-10-02 18:10:36 +0200 |
commit | 1016d6d193b1af38f90999de25854593c77364a8 (patch) | |
tree | 0eb47530e45cc7b046c672b4c6b8fa76778db35a /src/include/gnunet_testing_ng_lib.h | |
parent | 02a1fdad33c37bf39d4bdbe4c535fcf4c6ed0cc4 (diff) | |
download | gnunet-1016d6d193b1af38f90999de25854593c77364a8.tar.gz gnunet-1016d6d193b1af38f90999de25854593c77364a8.zip |
NEWS: Code moved to the core package to get rid of circular dependencies.
Diffstat (limited to 'src/include/gnunet_testing_ng_lib.h')
-rw-r--r-- | src/include/gnunet_testing_ng_lib.h | 91 |
1 files changed, 90 insertions, 1 deletions
diff --git a/src/include/gnunet_testing_ng_lib.h b/src/include/gnunet_testing_ng_lib.h index 98ba65b59..eff45498b 100644 --- a/src/include/gnunet_testing_ng_lib.h +++ b/src/include/gnunet_testing_ng_lib.h | |||
@@ -621,6 +621,95 @@ typedef void * | |||
621 | (*GNUNET_TESTING_notify_connect_cb) (struct GNUNET_TESTING_Interpreter *is, | 621 | (*GNUNET_TESTING_notify_connect_cb) (struct GNUNET_TESTING_Interpreter *is, |
622 | const struct GNUNET_PeerIdentity *peer); | 622 | const struct GNUNET_PeerIdentity *peer); |
623 | 623 | ||
624 | /** | ||
625 | * Struct to store information needed in callbacks. | ||
626 | * | ||
627 | */ | ||
628 | struct GNUNET_TESTING_ConnectPeersState | ||
629 | { | ||
630 | /** | ||
631 | * Receive callback | ||
632 | */ | ||
633 | struct GNUNET_MQ_MessageHandler *handlers; | ||
634 | |||
635 | /** | ||
636 | * A map with struct GNUNET_MQ_Handle values for each peer this peer | ||
637 | * is connected to. | ||
638 | */ | ||
639 | struct GNUNET_CONTAINER_MultiShortmap *connected_peers_map; | ||
640 | |||
641 | /** | ||
642 | * Handle for transport. | ||
643 | */ | ||
644 | struct GNUNET_TRANSPORT_ApplicationHandle *ah; | ||
645 | |||
646 | /** | ||
647 | * Core handle. | ||
648 | */ | ||
649 | struct GNUNET_TRANSPORT_CoreHandle *th; | ||
650 | |||
651 | /** | ||
652 | * Context for our asynchronous completion. | ||
653 | */ | ||
654 | struct GNUNET_TESTING_AsyncContext ac; | ||
655 | |||
656 | /** | ||
657 | * The testing system of this node. | ||
658 | */ | ||
659 | const struct GNUNET_TESTING_System *tl_system; | ||
660 | |||
661 | // Label of the cmd which started the test system. | ||
662 | const char *create_label; | ||
663 | |||
664 | /** | ||
665 | * Number globally identifying the node. | ||
666 | * | ||
667 | */ | ||
668 | uint32_t num; | ||
669 | |||
670 | /** | ||
671 | * Label of the cmd to start a peer. | ||
672 | * | ||
673 | */ | ||
674 | const char *start_peer_label; | ||
675 | |||
676 | /** | ||
677 | * The topology of the test setup. | ||
678 | */ | ||
679 | struct GNUNET_TESTING_NetjailTopology *topology; | ||
680 | |||
681 | /** | ||
682 | * Connections to other peers. | ||
683 | */ | ||
684 | struct GNUNET_TESTING_NodeConnection *node_connections_head; | ||
685 | |||
686 | struct GNUNET_TESTING_Interpreter *is; | ||
687 | |||
688 | /** | ||
689 | * Number of connections. | ||
690 | */ | ||
691 | unsigned int con_num; | ||
692 | |||
693 | /** | ||
694 | * Number of additional connects this cmd will wait for not triggered by this cmd. | ||
695 | */ | ||
696 | unsigned int additional_connects; | ||
697 | |||
698 | /** | ||
699 | * Number of connections we already have a notification for. | ||
700 | */ | ||
701 | unsigned int con_num_notified; | ||
702 | |||
703 | /** | ||
704 | * Number of additional connects this cmd will wait for not triggered by this cmd we already have a notification for. | ||
705 | */ | ||
706 | unsigned int additional_connects_notified; | ||
707 | |||
708 | /** | ||
709 | * Flag indicating, whether the command is waiting for peers to connect that are configured to connect. | ||
710 | */ | ||
711 | unsigned int wait_for_connect; | ||
712 | }; | ||
624 | 713 | ||
625 | /** | 714 | /** |
626 | * Struct to store information needed in callbacks. | 715 | * Struct to store information needed in callbacks. |
@@ -899,7 +988,7 @@ struct GNUNET_TESTING_StartPeerState | |||
899 | op (hello_size, const size_t) \ | 988 | op (hello_size, const size_t) \ |
900 | op (hello, const char) \ | 989 | op (hello, const char) \ |
901 | op (application_handle, const struct GNUNET_TRANSPORT_ApplicationHandle) \ | 990 | op (application_handle, const struct GNUNET_TRANSPORT_ApplicationHandle) \ |
902 | op (connect_peer_state, const struct ConnectPeersState) \ | 991 | op (connect_peer_state, const struct GNUNET_TESTING_ConnectPeersState) \ |
903 | op (state, const struct GNUNET_TESTING_StartPeerState) \ | 992 | op (state, const struct GNUNET_TESTING_StartPeerState) \ |
904 | op (broadcast, const enum GNUNET_GenericReturnValue) | 993 | op (broadcast, const enum GNUNET_GenericReturnValue) |
905 | 994 | ||