Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Propagate the interface cleanup from last week in datadesc, ie remove a
[simgrid.git] / src / gras / Msg / msg_private.h
1 /* $Id$ */
2
3 /* messaging - high level communication (send/receive messages)             */
4
5 /* module's private interface masked even to other parts of GRAS.           */
6
7 /* Authors: Martin Quinson                                                  */
8 /* Copyright (C) 2003, 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_MESSAGE_PRIVATE_H
14 #define GRAS_MESSAGE_PRIVATE_H
15
16 #include "gras_private.h"
17 #include "Msg/msg_interface.h"
18
19 /**
20  * gras_msgtype_t:
21  *
22  * Message type descriptor. There one of these for each registered version.
23  */
24 struct s_gras_msgtype {
25   /* headers for the data set */
26   unsigned int   code;
27   char          *name;
28   unsigned int   name_len;
29         
30   /* payload */
31   short int version;
32   gras_datadesc_type_t *ctn_type;
33 };
34
35 extern gras_set_t *_gras_msgtype_set; /* of gras_msgtype_t */
36 void gras_msgtype_free(void *msgtype);
37
38
39 gras_error_t gras_msg_recv(gras_socket_t   *sock,
40                            gras_msgtype_t **msgtype,
41                            void           **payload,
42                            int             *payload_size);
43
44 /**
45  * gras_cblist_t:
46  *
47  * association between msg ID and cb list for a given process
48  */
49 struct s_gras_cblist {
50   long int id;
51   gras_dynar_t *cbs; /* of gras_msg_cb_t */
52 };
53
54 void gras_cblist_free(void *cbl);
55
56 #endif  /* GRAS_MESSAGE_PRIVATE_H */