From 154d13fcb10205edf5fb56c12ac47e65abfec5a6 Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Sat, 13 Nov 2021 09:36:00 +0100 Subject: - Added broadcast test case. changed transport_api_cmd_start_peer.c to be configure to use broadcast or not. Changed transport_api_cmd_send_simple.c to use map of connected peers. Fixed bugs in service and udp communicator. --- src/transport/transport-testing-cmds.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/transport/transport-testing-cmds.h') diff --git a/src/transport/transport-testing-cmds.h b/src/transport/transport-testing-cmds.h index 10729990d..5d0b902f6 100644 --- a/src/transport/transport-testing-cmds.h +++ b/src/transport/transport-testing-cmds.h @@ -165,6 +165,10 @@ struct StartPeerState GNUNET_TRANSPORT_NotifyConnect notify_connect; + /** + * Flag indicating, if udp broadcast should be switched on. + */ + unsigned int broadcast; }; @@ -188,6 +192,20 @@ GNUNET_TRANSPORT_get_trait_state (const struct struct StartPeerState **sps); +/** + * Create command. + * + * @param label name for command. + * @param system_label Label of the cmd to setup a test environment. + * @param m The number of the local node of the actual network namespace. + * @param n The number of the actual namespace. + * @param local_m Number of local nodes in each namespace. + * @param handlers Handler for messages received by this peer. + * @param cfgname Configuration file name for this peer. + * @param notify_connect Method which will be called, when a peer connects. + * @param broadcast Flag indicating, if broadcast should be switched on. + * @return command. + */ struct GNUNET_TESTING_Command GNUNET_TRANSPORT_cmd_start_peer (const char *label, const char *system_label, @@ -195,7 +213,8 @@ GNUNET_TRANSPORT_cmd_start_peer (const char *label, char *node_ip, struct GNUNET_MQ_MessageHandler *handlers, const char *cfgname, - GNUNET_TRANSPORT_NotifyConnect notify_connect); + GNUNET_TRANSPORT_NotifyConnect notify_connect, + unsigned int broadcast); struct GNUNET_TESTING_Command -- cgit v1.2.3