Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
c2676dba9a479e0d0082bc57aedf31ca289fa4ea
[simgrid.git] / src / gras / Virtu / virtu_sg.h
1 /* $Id$ */
2
3 /* virtu_sg - specific GRAS implementation for simulator                    */
4
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9
10 #ifndef VIRTU_SG_H
11 #define VIRTU_SG_H
12
13 #include "gras/Virtu/virtu_private.h"
14 #include "xbt/dynar.h"
15 #include "msg/msg.h" /* SimGrid header */
16
17 #define XBT_MAX_CHANNEL 10
18
19 typedef struct {
20   int port;  /* list of ports used by a server socket */
21   int tochan; /* the channel it points to */
22   int meas;   /* (boolean) the channel is for measurements or for messages */
23 } gras_sg_portrec_t;
24
25 /* Data for each host */
26 typedef struct {
27   int refcount;
28   int proc[XBT_MAX_CHANNEL]; /* PID of who's connected to each channel */
29                               /* If =0, then free */
30
31   xbt_dynar_t ports;
32
33 } gras_hostdata_t;
34
35 /* data for each socket (FIXME: find a better location for that)*/
36 typedef struct {
37   int from_PID;    /* process which sent this message */
38   int to_PID;      /* process to which this message is destinated */
39
40   m_host_t to_host;   /* Who's on other side */
41   m_channel_t to_chan;/* Channel on which the other side is earing */
42 } gras_trp_sg_sock_data_t;
43
44
45 #endif /* VIRTU_SG_H */