X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a4488cf61cb9b235eb6a370dbd0ab63ff936e72a..df1574af1592689f73d940fd6803b55d5eca7156:/src/amok/Bandwidth/bandwidth_private.h diff --git a/src/amok/Bandwidth/bandwidth_private.h b/src/amok/Bandwidth/bandwidth_private.h index 79dbf6e916..0fa86f0ffe 100644 --- a/src/amok/Bandwidth/bandwidth_private.h +++ b/src/amok/Bandwidth/bandwidth_private.h @@ -4,11 +4,11 @@ /* module's private interface masked even to other parts of AMOK. */ -/* Authors: Martin Quinson */ -/* Copyright (C) 2003, 2004 the OURAGAN project. */ +/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it - under the terms of the license (GNU LGPL) which comes with this package. */ + * under the terms of the license (GNU LGPL) which comes with this package. */ + #ifndef AMOK_BANDWIDTH_PRIVATE_H #define AMOK_BANDWIDTH_PRIVATE_H @@ -16,55 +16,51 @@ #include "gras.h" #include "amok/bandwidth.h" -/** - * bw_request_t: - * - * Request for a BW experiment. +void amok_bw_bw_init(void); /* Must be called only once per node */ +void amok_bw_bw_join(void); /* Each process must run it */ +void amok_bw_bw_leave(void);/* Each process must run it */ + +void amok_bw_sat_init(void); /* Must be called only once per node */ +void amok_bw_sat_join(void); /* Each process must run it */ +void amok_bw_sat_leave(void);/* Each process must run it */ + +/*** + * Plain bandwidth measurement stuff + ***/ + +/* Request for a BW experiment. * If host==NULL, it should be between the sender and the receiver. - * If not, it should be between between the receiver and @host (3-tiers). + * If not, it should be between between the receiver and host (3-tiers). */ typedef struct { - gras_host_t host; /* host+raw socket to use */ - unsigned int buf_size; - unsigned int exp_size; - unsigned int msg_size; + s_xbt_host_t host; /* host+raw socket to use */ + unsigned long int buf_size; + unsigned long int exp_size; + unsigned long int msg_size; } s_bw_request_t,*bw_request_t; -/** - * bw_res_t: - * - * Result of a BW experiment (payload when answering). - * if err.msg != NULL, it wasn't sucessful. Check err.msg and err.code to see why. - * else - */ +/* Result of a BW experiment (payload when answering). */ typedef struct { - s_amok_remoterr_t err; unsigned int timestamp; - double seconds; + double sec; double bw; -} s_bw_res,*bw_res_t; +} s_bw_res_t,*bw_res_t; -/** - * sat_request_t: - * - * Description of a saturation experiment (payload asking some host to collaborate for that) +/*** + * Saturation stuff + ***/ + +/* Description of a saturation experiment (payload asking some host to collaborate for that) */ typedef struct { - gras_host_t host; /* host+raw socket to use */ + s_xbt_host_t host; /* host+raw socket to use */ unsigned int msg_size; - unsigned int timeout; + unsigned int duration; } s_sat_request_t,*sat_request_t; -/* Prototypes of local callbacks */ -int amok_bw_cb_bw_handshake(gras_socket_t expeditor, - void *payload); -int amok_bw_cb_bw_request(gras_socket_t expeditor, - void *payload); - -int amok_bw_cb_sat_start(gras_socket_t expeditor, - void *payload); -int amok_bw_cb_sat_begin(gras_socket_t expeditor, - void *payload); +void amok_bw_sat_start(const char* from_name,unsigned int from_port, + const char* to_name,unsigned int to_port, + unsigned int msg_size, unsigned int duration); #endif /* AMOK_BANDWIDTH_PRIVATE_H */