Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
gross hack needed by the conjonction of the buffered transport and MSG weird notion...
[simgrid.git] / src / gras / Transport / transport_interface.h
index d24e43a..4540a5e 100644 (file)
  ***/
 gras_error_t gras_trp_chunk_send(gras_socket_t *sd,
                                 char *data,
-                                size_t size);
+                                long int size);
 gras_error_t gras_trp_chunk_recv(gras_socket_t *sd,
                                 char *data,
-                                size_t size);
+                                long int size);
 
 /* Find which socket needs to be read next */
 gras_error_t 
@@ -42,18 +42,6 @@ void         gras_trp_exit(void);
 /* A plugin type */
 typedef struct gras_trp_plugin_ gras_trp_plugin_t;
 
-
-/**
- * e_gras_trp_plugin:
- * 
- * Caracterize each possible transport plugin
- */
-typedef enum e_gras_trp_plugin {
-   e_gras_trp_plugin_undefined = 0,
-     
-     e_gras_trp_plugin_tcp
-} gras_trp_plugin_type_t;
-
 /* A plugin type */
 struct gras_trp_plugin_ {
   char          *name;
@@ -78,13 +66,16 @@ struct gras_trp_plugin_ {
     
   gras_error_t (*chunk_send)(gras_socket_t *sd,
                             char *data,
-                            size_t size);
+                            long int size);
   gras_error_t (*chunk_recv)(gras_socket_t *sd,
                             char *Data,
-                            size_t size);
+                            long int size);
 
-  void          *specific;
-  void         (*free_specific)(void *);
+  void          *data;
+   /* exit is responsible for freeing data and telling the OS this plugin goes */
+   /* if it's NULL, data gets freed. (ie exit needed only when data contains pointers) */
+  void         (*exit)(gras_trp_plugin_t *);
 };
 
 gras_error_t