Logo AND Algorithmique Numérique Distribuée

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