Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Renamed any gras stuff that was in xbt and should therefore be called
[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 /* Authors: Martin Quinson                                                  */
8 /* Copyright (C) 2003, 2004 the OURAGAN project.                            */
9
10 /* This program is free software; you can redistribute it and/or modify it
11    under the terms of the license (GNU LGPL) which comes with this package. */
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 /**
20  * bw_request_t:
21  *
22  * Request for a BW experiment.
23  * If host==NULL, it should be between the sender and the receiver.
24  * If not, it should be between between the receiver and @host (3-tiers).
25  */
26 typedef struct {
27   xbt_host_t host; /* host+raw socket to use */
28   unsigned int buf_size;
29   unsigned int exp_size;
30   unsigned int msg_size;
31 } s_bw_request_t,*bw_request_t;
32
33 /**
34  * bw_res_t:
35  *
36  * Result of a BW experiment (payload when answering).
37  * if err.msg != NULL, it wasn't sucessful. Check err.msg and err.code to see why.
38  * else
39  */
40 typedef struct {
41   s_amok_remoterr_t err;
42   unsigned int timestamp;
43   double seconds;
44   double bw;
45 } s_bw_res,*bw_res_t;
46
47
48 /**
49  * sat_request_t:
50  *
51  * Description of a saturation experiment (payload asking some host to collaborate for that)
52  */
53 typedef struct {
54   xbt_host_t host; /* host+raw socket to use */
55   unsigned int msg_size;
56   unsigned int timeout;
57 } s_sat_request_t,*sat_request_t;
58
59 /* Prototypes of local callbacks */
60 int amok_bw_cb_bw_handshake(gras_socket_t  expeditor,
61                             void          *payload);
62 int amok_bw_cb_bw_request(gras_socket_t    expeditor,
63                           void            *payload);
64
65 int amok_bw_cb_sat_start(gras_socket_t     expeditor,
66                          void             *payload);
67 int amok_bw_cb_sat_begin(gras_socket_t     expeditor,
68                          void             *payload);
69
70 #endif /* AMOK_BANDWIDTH_PRIVATE_H */