* If not, it should be between between the receiver and host (3-tiers).
*/
typedef struct {
- xbt_host_t host; /* host+raw socket to use */
+ 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;
/* Description of a saturation experiment (payload asking some host to collaborate for that)
*/
typedef struct {
- xbt_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;
} s_sat_request_t,*sat_request_t;
free(*(void**)d);
}
static void xbt_cfg_host_free(void *d){
- xbt_host_t *h=(xbt_host_t*) *(void**)d;
+ xbt_host_t h=(xbt_host_t) *(void**)d;
if (h) {
if (h->name) free(h->name);
free(h);
int ival;
char *sval;
double dval;
- xbt_host_t *hval;
+ xbt_host_t hval;
if (name)
printf("%s>> Dumping of the config set '%s':\n",indent,name);
case xbt_cfgelm_host:
for (i=0; i<size; i++) {
- hval = xbt_dynar_get_as(variable->content,i,xbt_host_t*);
+ hval = xbt_dynar_get_as(variable->content,i,xbt_host_t);
printf ("%s %s:%d\n",indent,hval->name,hval->port);
}
break;
break;
case xbt_cfgelm_host:
- res->content = xbt_dynar_new(sizeof(xbt_host_t*),&xbt_cfg_host_free);
+ res->content = xbt_dynar_new(sizeof(xbt_host_t),&xbt_cfg_host_free);
break;
default:
xbt_cfg_set_host(xbt_cfg_t cfg,const char*name,
const char *host,int port) {
xbt_cfgelm_t variable;
- xbt_host_t *val=xbt_new(xbt_host_t,1);
+ xbt_host_t val=xbt_new(s_xbt_host_t,1);
VERB3("Configuration setting: %s=%s:%d",name,host,port);
xbt_cfg_rm_host(xbt_cfg_t cfg,const char*name, const char *host,int port) {
xbt_cfgelm_t variable;
int cpt;
- xbt_host_t *seen;
+ xbt_host_t seen;
variable = xbt_cfgelm_get(cfg,name,xbt_cfgelm_host);
void xbt_cfg_get_host (xbt_cfg_t cfg, const char *name,
char **host, int *port) {
xbt_cfgelm_t variable;
- xbt_host_t *val;
+ xbt_host_t val;
variable = xbt_cfgelm_get(cfg,name,xbt_cfgelm_host);
name, xbt_dynar_length(variable->content));
}
- val = xbt_dynar_get_as(variable->content, 0, xbt_host_t*);
+ val = xbt_dynar_get_as(variable->content, 0, xbt_host_t);
*host=val->name;
*port=val->port;
}
char **host, int *port) {
xbt_cfgelm_t variable = xbt_cfgelm_get(cfg,name,xbt_cfgelm_int);
- xbt_host_t *val = xbt_dynar_get_ptr(variable->content, pos);
+ xbt_host_t val = xbt_dynar_get_ptr(variable->content, pos);
*port = val->port;
*host = val->name;