Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d9423456ec9fbf0831c81b7915de9f03f784aa80
[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 /* Request for a BW experiment.
20  * If host==NULL, it should be between the sender and the receiver.
21  * If not, it should be between between the receiver and host (3-tiers).
22  */
23 typedef struct {
24   xbt_host_t host; /* host+raw socket to use */
25   unsigned long int buf_size;
26   unsigned long int exp_size;
27   unsigned long int msg_size;
28 } s_bw_request_t,*bw_request_t;
29
30 /* Result of a BW experiment (payload when answering).
31  * if err.msg != NULL, it wasn't sucessful. Check err.msg and err.code to see why.
32  */
33 typedef struct {
34   s_amok_remoterr_t err;
35   unsigned int timestamp;
36   double sec;
37   double bw;
38 } s_bw_res,*bw_res_t;
39
40
41 /* Description of a saturation experiment (payload asking some host to collaborate for that)
42  */
43 typedef struct {
44   xbt_host_t host; /* host+raw socket to use */
45   unsigned int msg_size;
46   unsigned int timeout;
47 } s_sat_request_t,*sat_request_t;
48
49 /* Prototypes of local callbacks */
50 int amok_bw_cb_bw_handshake(gras_socket_t  expeditor,
51                             void          *payload);
52 int amok_bw_cb_bw_request(gras_socket_t    expeditor,
53                           void            *payload);
54
55 int amok_bw_cb_sat_start(gras_socket_t     expeditor,
56                          void             *payload);
57 int amok_bw_cb_sat_begin(gras_socket_t     expeditor,
58                          void             *payload);
59
60 #endif /* AMOK_BANDWIDTH_PRIVATE_H */