Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
56e2f165afb5d92c7b98958c28d9ea16e3282663
[simgrid.git] / src / gras / Transport / transport_private.h
1 /* $Id$ */
2
3 /* transport - low level communication (send/receive bunches of bytes)      */
4
5 /* module's private interface masked even to other parts of GRAS.           */
6
7 /* Authors: Martin Quinson                                                  */
8 /* Copyright (C) 2004 Martin Quinson.                                       */
9
10 /* This program is free software; you can redistribute it and/or modify it
11    under the terms of the license (GNU LGPL) which comes with this package. */
12
13 #ifndef GRAS_TRP_PRIVATE_H
14 #define GRAS_TRP_PRIVATE_H
15
16 #include "gras_private.h"
17 #include "Transport/transport_interface.h"
18
19 extern gras_dynar_t *_gras_trp_sockets; /* all existing sockets */
20
21
22 /**
23  * s_gras_socket:
24  * 
25  * Description of a socket.
26  */
27
28 struct s_gras_socket  {
29    gras_trp_plugin_t *plugin;
30    
31    int incoming; /* true if incoming (server) sock, false if client sock */
32    int accepting; /* true if master incoming sock in tcp */
33    
34    int  sd;
35    int  port; /* port on this side */
36    int  peer_port; /* port on the other side */
37    char *peer_name; /* hostname of the other side */
38
39    void *specific; /* plugin specific data */
40 };
41         
42
43 /* TCP driver */
44 gras_error_t gras_trp_tcp_init(gras_trp_plugin_t **dst);
45
46 /* SG driver */
47 gras_error_t gras_trp_sg_init (gras_trp_plugin_t **dst);
48
49
50
51 #endif /* GRAS_TRP_PRIVATE_H */