Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove gras from the main documentation
[simgrid.git] / src / gras / Transport / transport_private.h
1 /* transport - low level communication (send/receive bunches of bytes)      */
2
3 /* module's private interface masked even to other parts of GRAS.           */
4
5 /* Copyright (c) 2004, 2005, 2006, 2007, 2009, 2010. The SimGrid Team.
6  * All rights reserved.                                                     */
7
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. */
10
11 #ifndef GRAS_TRP_PRIVATE_H
12 #define GRAS_TRP_PRIVATE_H
13
14 #include "xbt/sysdep.h"
15 #include "xbt/log.h"
16 #include "xbt/dynar.h"
17 #include "xbt/dict.h"
18
19 #include "gras/emul.h"          /* gras_if_RL() */
20
21 #include "gras_modinter.h"      /* module init/exit */
22 #include "gras/transport.h"     /* rest of module interface */
23
24 #include "gras/Transport/transport_interface.h" /* semi-public API */
25 #include "gras/Virtu/virtu_interface.h" /* libdata management */
26
27 extern int gras_trp_libdata_id; /* our libdata identifier */
28
29 /* The function that select returned the last time we asked. We need this
30    because the TCP read are greedy and try to get as much data in their 
31    buffer as possible (to avoid subsequent syscalls).
32    (measurement sockets are not buffered and thus not concerned).
33   
34    So, we can get more than one message in one shoot. And when this happens,
35    we have to handle the same socket again afterward without select()ing at
36    all. 
37  
38    Then, this data is not a static of the TCP driver because we want to
39    zero it when it gets closed by the user. If not, we use an already freed 
40    pointer, which is bad.
41  
42    It gets tricky since gras_socket_close is part of the common API, not 
43    only the RL one. */
44 extern xbt_socket_t _gras_lastly_selected_socket;
45
46 #endif                          /* GRAS_TRP_PRIVATE_H */