1 /* Copyright (c) 2012-2015. 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 "xbt/dynar.h"
15 /* Connection parameters */
16 #define MAX_PENDING_SENDS 10
18 /* Default values for the ``file'' details */
19 #define PIECE_SIZE 65536
20 #define PIECE_COUNT 16384
22 /* Broadcaster struct */
23 typedef struct s_broadcaster {
27 xbt_dynar_t host_list;
28 xbt_dynar_iterator_t it;
29 int max_pending_sends;
30 xbt_dynar_t pending_sends;
31 } s_broadcaster_t, *broadcaster_t;
33 xbt_dynar_t build_hostlist_from_hostcount(int hostcount);
35 /* Broadcaster: helper functions */
36 broadcaster_t broadcaster_init(xbt_dynar_t host_list, unsigned int piece_count);
37 int broadcaster_build_chain(broadcaster_t bc);
38 int broadcaster_send_file(broadcaster_t bc);
41 int broadcaster(int argc, char *argv[]);
43 #endif /* BROADCASTER_H */