1 /* transport - low level communication (send/receive bunches of bytes) */
3 /* module's public interface exported within GRAS, but not to end user. */
5 /* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
6 * All rights reserved. */
8 /* This program is free software; you can redistribute it and/or modify it
9 * under the terms of the license (GNU LGPL) which comes with this package. */
11 #ifndef GRAS_TRP_INTERFACE_H
12 #define GRAS_TRP_INTERFACE_H
14 #include "portable.h" /* sometimes needed for fd_set */
15 #include "simgrid/simix.h"
16 #include "xbt/queue.h"
18 /* Data of this module specific to each process
19 * (used by sg_process.c to cleanup the SG channel cruft)
25 unsigned int name_len;
27 int myport; /* Port on which I listen myself */
29 xbt_dynar_t sockets; /* all sockets known to this process */
31 /* SG only elements. In RL, they are part of the OS ;) */
33 /* List of sockets ready to be select()ed */
34 xbt_queue_t msg_selectable_sockets; /* regular sockets */
35 xbt_queue_t meas_selectable_sockets; /* measurement ones */
37 } s_gras_trp_procdata_t, *gras_trp_procdata_t;
39 /* Display the content of our socket set (debugging purpose) */
40 XBT_PUBLIC(void) gras_trp_socketset_dump(const char *name);
42 XBT_PUBLIC(xbt_socket_t) gras_trp_select(double timeout);
44 #endif /* GRAS_TRP_INTERFACE_H */