Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix make dist.
[simgrid.git] / src / amok / Bandwidth / bandwidth_private.h
1 /* bandwidth - network bandwidth tests facilities                           */
2
3 /* module's private interface masked even to other parts of AMOK.           */
4
5 /* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
6  * All rights reserved.                                                     */
7
8 /* This program is free software; you can redistribute it and/or modify it
9  * under the terms of the license (GNU LGPL) which comes with this package. */
10
11
12 #ifndef AMOK_BANDWIDTH_PRIVATE_H
13 #define AMOK_BANDWIDTH_PRIVATE_H
14
15 #include "gras.h"
16 #include "amok/bandwidth.h"
17
18 void amok_bw_bw_init(void);     /* Must be called only once per node */
19 void amok_bw_bw_join(void);     /* Each process must run it */
20 void amok_bw_bw_leave(void);    /* Each process must run it */
21
22 void amok_bw_sat_init(void);    /* Must be called only once per node */
23 void amok_bw_sat_join(void);    /* Each process must run it */
24 void amok_bw_sat_leave(void);   /* Each process must run it */
25
26 /***
27  * Plain bandwidth measurement stuff
28  ***/
29
30 /* Request for a BW experiment.
31  * If peer==NULL, it should be between the sender and the receiver.
32  * If not, it should be between between the receiver and peer (3-tiers).
33  */
34 typedef struct {
35   s_xbt_peer_t peer;            /* peer+raw socket to use */
36   unsigned long int buf_size;
37   unsigned long int msg_size;
38   unsigned long int msg_amount;
39   double min_duration;
40 } s_bw_request_t, *bw_request_t;
41
42 /* Result of a BW experiment (payload when answering). */
43 typedef struct {
44   unsigned int timestamp;
45   double sec;
46   double bw;
47 } s_bw_res_t, *bw_res_t;
48
49
50 /***
51  * Saturation stuff
52  ***/
53
54 /* Description of a saturation experiment (payload asking some peer to collaborate for that)
55  */
56 typedef struct {
57   s_xbt_peer_t peer;            /* peer+raw socket to use */
58   unsigned int msg_size;
59   unsigned int duration;
60 } s_sat_request_t, *sat_request_t;
61
62 void amok_bw_sat_start(const char *from_name, unsigned int from_port,
63                        const char *to_name, unsigned int to_port,
64                        unsigned int msg_size, unsigned int duration);
65
66 #endif                          /* AMOK_BANDWIDTH_PRIVATE_H */