1 /* Copyright (c) 2012-2020. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
10 #include "simgrid/actor.h"
11 #include "simgrid/comm.h"
12 #include "simgrid/engine.h"
13 #include "simgrid/host.h"
14 #include "simgrid/instr.h"
15 #include "simgrid/mailbox.h"
22 /* Connection parameters */
23 #define MAX_PENDING_COMMS 256
24 #define PIECE_SIZE 65536
25 #define MESSAGE_BUILD_CHAIN_SIZE 40
26 #define MESSAGE_SEND_DATA_HEADER_SIZE 1
28 /* Broadcaster struct */
29 typedef struct s_broadcaster {
30 unsigned int host_count;
33 sg_mailbox_t* mailboxes;
34 sg_comm_t* pending_sends;
37 typedef s_broadcaster_t* broadcaster_t;
38 typedef const s_broadcaster_t* const_broadcaster_t;
39 void broadcaster(int argc, char* argv[]);
42 typedef struct s_chain_message {
45 unsigned int num_pieces;
48 typedef s_chain_message_t* chain_message_t;
51 typedef struct s_peer {
55 unsigned long long received_bytes;
56 unsigned int received_pieces;
57 unsigned int total_pieces;
58 sg_comm_t* pending_recvs;
59 sg_comm_t* pending_sends;
62 typedef s_peer_t* peer_t;
63 void peer(int argc, char* argv[]);
65 #endif /* CHAINSEND_H */