1 <!-- ##### SECTION ./tmpl/DataDesc.sgml:Long_Description ##### -->
2 <para>In order to allow GRAS to send data over the network (or simply to
3 dupplicate it in SG), you have to describe the structure of data attached
4 with each message. This mecanism is stolen from NWS message passing
7 <para>For each message, you have to declare a structure representing the
8 data to send as payload with the message.</para>
11 <title>Sending (or receiving) simple structures</title>
12 <para>Let's imagin you want to declare a <command>STORE_STATE</command>
13 message, which will send some data to the memory server for inclusion in
14 the database. Here is the structure we want to send:</para>
18 char id[STATE_NAME_SIZE];
26 <para>And here is the structure description GRAS needs to be able to send
27 this over the network:</para>
30 const static DataDescriptor stateDescriptor[] =
31 {SIMPLE_MEMBER(CHAR_TYPE, STATE_NAME_SIZE, offsetof(struct state, id)),
32 SIMPLE_MEMBER(INT_TYPE, 1, offsetof(struct state, rec_size)),
33 SIMPLE_MEMBER(INT_TYPE, 1, offsetof(struct state, rec_count)),
34 SIMPLE_MEMBER(DOUBLE_TYPE, 1, offsetof(struct state, seq_no)),
35 SIMPLE_MEMBER(DOUBLE_TYPE, 1, offsetof(struct state, time_out))};
38 <para>Contrary to what one could think when you first see it, it's pretty
39 easy. A structure descriptor is a list of descriptions, describing each
40 field of the structure. For example, for the first field, you say that
41 the base type is <command>CHAR_TYPE</command>, that there is
42 <command>STATE_NAME_SIZE</command> element of this type and that it's
43 position in the structure is computed by <command>offsetof(struct state,
44 id)</command>. This leads to two remarks:</para>
48 <para>it's impossible to send dynamic sized strings that way. It's a
49 known limitation, but I think we can live with it.</para>
52 <para>Yes, the <command>offsetof(struct state, id)</command>
53 construction is C ANSI and is portable.</para>
59 <title>Sending (or receiving) complex structure</title>
60 <para>How to send non-flat structures, do you ask? It's not harder. Let's
61 imagin you want to send the following structure:</para>
65 unsigned long address;
70 char name[MAX_CLIQUE_NAME_SIZE];
73 char skill[MAX_SKILL_SIZE];
74 char options[MAX_OPTIONS_SIZE];
77 CliqueMember members[MAX_MEMBERS];
83 <para>As you can see, this structure contains an array of another user
84 defined structure. To be able to send <command>struct Clique</command>,
85 you have to describe each structures that way:</para>
88 static const DataDescriptor cliqueMemberDescriptor[] =
89 {SIMPLE_MEMBER(UNSIGNED_LONG_TYPE, 1, offsetof(CliqueMember, address)),
90 SIMPLE_MEMBER(UNSIGNED_LONG_TYPE, 1, offsetof(CliqueMember, port))};
92 static const DataDescriptor cliqueDescriptor[] =
93 {SIMPLE_MEMBER(CHAR_TYPE, MAX_CLIQUE_NAME_SIZE, offsetof(Clique, name)),
94 SIMPLE_MEMBER(DOUBLE_TYPE, 1, offsetof(Clique, whenGenerated)),
95 SIMPLE_MEMBER(DOUBLE_TYPE, 1, offsetof(Clique, instance)),
96 SIMPLE_MEMBER(CHAR_TYPE, MAX_SKILL_SIZE, offsetof(Clique, skill)),
97 SIMPLE_MEMBER(CHAR_TYPE, MAX_OPTIONS_SIZE, offsetof(Clique, options)),
98 SIMPLE_MEMBER(DOUBLE_TYPE, 1, offsetof(Clique, period)),
99 SIMPLE_MEMBER(DOUBLE_TYPE, 1, offsetof(Clique, timeOut)),
100 {STRUCT_TYPE, MAX_MEMBERS, offsetof(Clique, members),
101 (DataDescriptor *)&cliqueMemberDescriptor, cliqueMemberDescriptorLength,
102 PAD_BYTES(CliqueMember, port, unsigned long, 1)},
103 SIMPLE_MEMBER(UNSIGNED_INT_TYPE, 1, offsetof(Clique, count)),
104 SIMPLE_MEMBER(UNSIGNED_INT_TYPE, 1, offsetof(Clique, leader))};
107 <para>So, even if less natural, it is possible to send structures
108 containing structures with these tools.</para>
110 <para>You can see that it's not only impossible to send dynamic-sized
111 strings, it impossible to send dynamic-sized arrays. Here,
112 <command>MAX_MEMBERS</command> is the maximum of members a clique can
113 contain. In NWS, this value is defined to 100. <warning><para>I'm not
114 sure, but I think that all the 100 values are sent each time, even if
115 there is only 3 non-null members. Yes, that's
116 bad.</para></warning></para>
118 <warning><para>The DataDescriptor_t MUST be const. Malloc'ing them and
119 then casting them on argument passing IS NOT OK. This is because we get
120 the number of elements in the array with the sizeof(dd)/sizeof(dd[0]).
125 <!-- ##### SECTION ./tmpl/DataDesc.sgml:See_Also ##### -->
131 <!-- ##### SECTION ./tmpl/DataDesc.sgml:Short_Description ##### -->
135 <!-- ##### SECTION ./tmpl/DataDesc.sgml:Title ##### -->
139 <!-- ##### SECTION ./tmpl/Dynamic_arrays.sgml:Long_Description ##### -->
145 <!-- ##### SECTION ./tmpl/Dynamic_arrays.sgml:See_Also ##### -->
151 <!-- ##### SECTION ./tmpl/Dynamic_arrays.sgml:Short_Description ##### -->
155 <!-- ##### SECTION ./tmpl/Dynamic_arrays.sgml:Title ##### -->
159 <!-- ##### SECTION ./tmpl/ErrLog.sgml:Long_Description ##### -->
165 <!-- ##### SECTION ./tmpl/ErrLog.sgml:See_Also ##### -->
171 <!-- ##### SECTION ./tmpl/ErrLog.sgml:Short_Description ##### -->
175 <!-- ##### SECTION ./tmpl/ErrLog.sgml:Title ##### -->
179 <!-- ##### SECTION ./tmpl/Socks.sgml:Long_Description ##### -->
185 <!-- ##### SECTION ./tmpl/Socks.sgml:See_Also ##### -->
191 <!-- ##### SECTION ./tmpl/Socks.sgml:Short_Description ##### -->
195 <!-- ##### SECTION ./tmpl/Socks.sgml:Title ##### -->
199 <!-- ##### SECTION ./tmpl/comm_callbacks.sgml:Long_Description ##### -->
205 <!-- ##### SECTION ./tmpl/comm_callbacks.sgml:See_Also ##### -->
211 <!-- ##### SECTION ./tmpl/comm_callbacks.sgml:Short_Description ##### -->
215 <!-- ##### SECTION ./tmpl/comm_callbacks.sgml:Title ##### -->
219 <!-- ##### SECTION ./tmpl/comm_cb.sgml:Long_Description ##### -->
225 <!-- ##### SECTION ./tmpl/comm_cb.sgml:See_Also ##### -->
231 <!-- ##### SECTION ./tmpl/comm_cb.sgml:Short_Description ##### -->
235 <!-- ##### SECTION ./tmpl/comm_cb.sgml:Title ##### -->
239 <!-- ##### SECTION ./tmpl/comm_datadesc_expert.sgml:Long_Description ##### -->
245 <!-- ##### SECTION ./tmpl/comm_datadesc_expert.sgml:See_Also ##### -->
251 <!-- ##### SECTION ./tmpl/comm_datadesc_expert.sgml:Short_Description ##### -->
252 Advanced ways to describe data (for experts)
255 <!-- ##### SECTION ./tmpl/comm_datadesc_expert.sgml:Title ##### -->
256 Advanced Data description
259 <!-- ##### SECTION ./tmpl/comm_dd_cbps.sgml:Long_Description ##### -->
265 <!-- ##### SECTION ./tmpl/comm_dd_cbps.sgml:See_Also ##### -->
271 <!-- ##### SECTION ./tmpl/comm_dd_cbps.sgml:Short_Description ##### -->
275 <!-- ##### SECTION ./tmpl/comm_dd_cbps.sgml:Title ##### -->
276 Data description callbacks persistant state
279 <!-- ##### SECTION ./tmpl/config.sgml:Long_Description ##### -->
285 <!-- ##### SECTION ./tmpl/config.sgml:See_Also ##### -->
291 <!-- ##### SECTION ./tmpl/config.sgml:Short_Description ##### -->
295 <!-- ##### SECTION ./tmpl/config.sgml:Title ##### -->
299 <!-- ##### SECTION ./tmpl/dd_cbps.sgml:Long_Description ##### -->
305 <!-- ##### SECTION ./tmpl/dd_cbps.sgml:See_Also ##### -->
311 <!-- ##### SECTION ./tmpl/dd_cbps.sgml:Short_Description ##### -->
315 <!-- ##### SECTION ./tmpl/dd_cbps.sgml:Title ##### -->
316 Data description callbacks persistant state
319 <!-- ##### SECTION ./tmpl/dd_internal.sgml:Long_Description ##### -->
325 <!-- ##### SECTION ./tmpl/dd_internal.sgml:See_Also ##### -->
331 <!-- ##### SECTION ./tmpl/dd_internal.sgml:Short_Description ##### -->
335 <!-- ##### SECTION ./tmpl/dd_internal.sgml:Title ##### -->
336 Implementation of data description
339 <!-- ##### SECTION ./tmpl/dico.sgml:Long_Description ##### -->
345 <!-- ##### SECTION ./tmpl/dico.sgml:See_Also ##### -->
351 <!-- ##### SECTION ./tmpl/dico.sgml:Short_Description ##### -->
355 <!-- ##### SECTION ./tmpl/dico.sgml:Title ##### -->
359 <!-- ##### SECTION ./tmpl/dynar.sgml:Long_Description ##### -->
361 This module provide the quite usual dynamic array facility.
365 <!-- ##### SECTION ./tmpl/dynar.sgml:See_Also ##### -->
371 <!-- ##### SECTION ./tmpl/dynar.sgml:Short_Description ##### -->
375 <!-- ##### SECTION ./tmpl/dynar.sgml:Title ##### -->
379 <!-- ##### SECTION ./tmpl/gras-overview.sgml:Long_Description ##### -->
380 <para>This document introduce the GRAS library (<emphasis>Grid Reality
381 And Simulation</emphasis>, or according to my english dictionary,
382 <emphasis>Generally Recognized As Safe</emphasis> ;).</para>
385 <title>Overview</title>
386 <para>The purpose of the GRAS is to allow the developpement of
387 distributed programs which will work with as few as possible
388 modification both on the SimGrid simulator (SG), and in the Real Life
391 <para>Here are the problems when you want to do so:
394 <para>Communication in SG is done by passing tasks, while in
395 RL, you have to deal with sockets (or any wrapper to it).</para>
397 <listitem><para>In RL, each process should provide a main()
398 function, and it's obviously not the case in SG.</para>
404 <title>Application class target</title>
405 <para>If you want to run your code both in RL and in SG, you won't be
406 able to use the full set of features offered by any of those two
407 worlds. GRAS tries to provide a suffisent set of features to develop
408 your application, and implement them in both worlds.</para>
410 <para>GRAS uses the paradigm of <emphasis>event-driven
411 programming</emphasis>, which is an extension to the message-passing
412 one. Any process of a typical event-driven application declares
413 callback to incoming events, which can be messages from other
414 processes, timers or others.</para>
416 <para>All messages have an header, specifying its type, and attached
417 data, represented as one or several C structures. In order to send
418 the data over the network in RL, a type-description mecanism is
419 provided, and the RL version of GRAS implements CDR
420 functionnalities. That is to say that the data are sent in the native
421 format of the sender host, and converted on the destination host only
424 <para>In order to not reimplement the wheel, GRAS use existing code,
425 and adapt them to make them work together. The SG version naturally
426 use the SimGrid toolkit, while the RL version is based over the
427 communication library used in NWS (note that this library was somehow
428 modified, since the previous version use XDR, ie both the sender and
429 the receiver convert the data from/to a so called network
430 format). That's why some basic knowledge about how NWS work is
431 supposed in this document. But don't worry, you only have to know the
432 basics about NWS, the internals needed to understand the document
433 will be presented when needed.</para>
437 <!-- ##### SECTION ./tmpl/gras-overview.sgml:See_Also ##### -->
443 <!-- ##### SECTION ./tmpl/gras-overview.sgml:Short_Description ##### -->
444 Overview of the GRAS library
447 <!-- ##### SECTION ./tmpl/gras-overview.sgml:Title ##### -->
451 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
457 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
463 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
467 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
468 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml
471 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
477 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
483 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
487 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
488 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml
491 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
497 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
503 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
507 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
508 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml
511 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
517 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
523 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
527 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
528 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml
531 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
537 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
543 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
547 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
548 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml
551 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
557 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
563 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
567 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
568 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml
571 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
577 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
583 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
587 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
588 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml
591 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
597 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
603 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
607 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
608 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml
611 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
617 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
623 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
627 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
628 ./gras-sections.txt.sgml.sgml.sgml.sgml.sgml
631 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
637 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
643 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
647 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml.sgml:Title ##### -->
648 ./gras-sections.txt.sgml.sgml.sgml.sgml
651 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml:Long_Description ##### -->
657 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml:See_Also ##### -->
663 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml:Short_Description ##### -->
667 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml.sgml:Title ##### -->
668 ./gras-sections.txt.sgml.sgml.sgml
671 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml:Long_Description ##### -->
677 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml:See_Also ##### -->
683 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml:Short_Description ##### -->
687 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml.sgml:Title ##### -->
688 ./gras-sections.txt.sgml.sgml
691 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml:Long_Description ##### -->
697 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml:See_Also ##### -->
703 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml:Short_Description ##### -->
707 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml.sgml:Title ##### -->
708 ./gras-sections.txt.sgml
711 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml:Long_Description ##### -->
717 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml:See_Also ##### -->
723 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml:Short_Description ##### -->
727 <!-- ##### SECTION ./tmpl/gras-sections.txt.sgml:Title ##### -->
731 <!-- ##### SECTION ./tmpl/gras.sgml:Long_Description ##### -->
737 <!-- ##### SECTION ./tmpl/gras.sgml:See_Also ##### -->
743 <!-- ##### SECTION ./tmpl/gras.sgml:Short_Description ##### -->
747 <!-- ##### SECTION ./tmpl/gras.sgml:Title ##### -->
751 <!-- ##### SECTION ./tmpl/gras_private.sgml:Long_Description ##### -->
757 <!-- ##### SECTION ./tmpl/gras_private.sgml:See_Also ##### -->
763 <!-- ##### SECTION ./tmpl/gras_private.sgml:Short_Description ##### -->
767 <!-- ##### SECTION ./tmpl/gras_private.sgml:Title ##### -->
771 <!-- ##### SECTION ./tmpl/gras_rl.sgml:Long_Description ##### -->
777 <!-- ##### SECTION ./tmpl/gras_rl.sgml:See_Also ##### -->
783 <!-- ##### SECTION ./tmpl/gras_rl.sgml:Short_Description ##### -->
784 Implementation of GRAS suited for real life.
787 <!-- ##### SECTION ./tmpl/gras_rl.sgml:Title ##### -->
791 <!-- ##### SECTION ./tmpl/gras_sg.sgml:Long_Description ##### -->
793 SimGrid was designed to ease the comparison of algorithms and
794 heuristics. That way, a lot of complicated notion from the system layer
795 were volontary left off. For example, migrating a process from an host to
796 another is as easy as: MSG_process_change_host(process, new_host).
800 No need to tell that performing this operation on real platform is really
801 harder. This simplification is a very good thing when you want to rapidly
802 prototype code, but makes things somehow more complicated in GRAS since
803 we want to have a realistic API, since it have to be implemented in
808 The best example of complexity in GRAS_SG induced by simplicity in
809 SimGrid is the sockets handling. There is no "socket" in SG, but only
810 m_channel_t. In contrary to sockets from RL, no special treatment is
811 needed for a process before writing or reading on/from a channel. So, a
812 given channel can be pooled by more than one process. Likewise, you can
813 send data to a channel that nobody is actually listening to.
817 The SG implementation of GRAS repport as an error the fact that nobody is
818 listening to the socket when trying to open a socket, or send stuff using
819 a previously openned socket. That way, the SG version can be used to
820 debug all syncronization issues. For that, we store mainly the PID of
821 both the sender and the receiver in the socket structure, and then
822 resolve PID->process at the lastest moment. This search is a bit
823 expensive, but as long as there is no real garbage collection in SG, with
824 the information "dead process" within the structure, it's the only
825 solution to make sure that we won't dereference pointers to an old freed
826 structure when the process on the other side of the structure did finish
827 since the creation of the socket.
831 As said in the overview, the processes can declare to hear on several
832 sockets, but all incoming messages are handled by the same loop. So, we
833 can use only one channel per process, and use a table on each host to
834 determine to which process a message should be delivered depending on the
835 socket number provided by the sender.
839 <!-- ##### SECTION ./tmpl/gras_sg.sgml:See_Also ##### -->
841 RL, the implementation suited for real life.
846 sgml-parent-document:\.\./gras-docs\.sgml
849 sgml-namecase-general:t
850 sgml-general-insert-case:lower
851 sgml-minimize-attributes:nil
852 sgml-always-quote-attributes:t
855 sgml-exposed-tags:nil
856 sgml-local-catalogs:nil
857 sgml-local-ecat-files:nil
862 <!-- ##### SECTION ./tmpl/gras_sg.sgml:Short_Description ##### -->
863 Implementation of GRAS on top of the simulator.
866 <!-- ##### SECTION ./tmpl/gras_sg.sgml:Title ##### -->
870 <!-- ##### SECTION ./tmpl/nws_comm.sgml:Long_Description ##### -->
876 <!-- ##### SECTION ./tmpl/nws_comm.sgml:See_Also ##### -->
882 <!-- ##### SECTION ./tmpl/nws_comm.sgml:Short_Description ##### -->
886 <!-- ##### SECTION ./tmpl/nws_comm.sgml:Title ##### -->
890 <!-- ##### SECTION ./tmpl/tbx_cfg.sgml:Long_Description ##### -->
896 <!-- ##### SECTION ./tmpl/tbx_cfg.sgml:See_Also ##### -->
902 <!-- ##### SECTION ./tmpl/tbx_cfg.sgml:Short_Description ##### -->
903 Configuration facilities.
906 <!-- ##### SECTION ./tmpl/tbx_cfg.sgml:Title ##### -->
910 <!-- ##### SECTION ./tmpl/tbx_dico.sgml:Long_Description ##### -->
916 <!-- ##### SECTION ./tmpl/tbx_dico.sgml:See_Also ##### -->
922 <!-- ##### SECTION ./tmpl/tbx_dico.sgml:Short_Description ##### -->
923 Data container associating data to a string key.
926 <!-- ##### SECTION ./tmpl/tbx_dico.sgml:Title ##### -->
930 <!-- ##### SECTION ./tmpl/tbx_dynar.sgml:Long_Description ##### -->
932 This module provide the quite usual dynamic array facility.
936 <!-- ##### SECTION ./tmpl/tbx_dynar.sgml:See_Also ##### -->
942 <!-- ##### SECTION ./tmpl/tbx_dynar.sgml:Short_Description ##### -->
943 Use arrays, forget about malloc
946 <!-- ##### SECTION ./tmpl/tbx_dynar.sgml:Title ##### -->
950 <!-- ##### SECTION ./tmpl/tbx_err.sgml:Long_Description ##### -->
956 <!-- ##### SECTION ./tmpl/tbx_err.sgml:See_Also ##### -->
962 <!-- ##### SECTION ./tmpl/tbx_err.sgml:Short_Description ##### -->
966 <!-- ##### SECTION ./tmpl/tbx_err.sgml:Title ##### -->
970 <!-- ##### SECTION ./tmpl/tbx_log.sgml:Long_Description ##### -->
972 This is an adaptation of the log4c project, which is dead upstream, and which
973 I was given the permission to fork under the LGPL licence by the authors. log4c
974 itself was loosely based on the Apache project's Log4J, Log4CC,
975 etc. project. Because C is not object oriented, a lot had to change.
979 <title>Overview</title>
982 There is 3 main concepts: category, priority and appender. These three
983 concepts work together to enable developers to log messages according to
984 message type and priority, and to control at runtime how these messages are
985 formatted and where they are reported.
990 <title>Category hierarchy</title>
993 The first and foremost advantage of any logging API over plain printf()
994 resides in its ability to disable certain log statements while allowing
995 others to print unhindered. This capability assumes that the logging space,
996 that is, the space of all possible logging statements, is categorized
997 according to some developer-chosen criteria.
1001 This observation led to choosing category as the central concept of the
1002 system. Every category is declared by providing a name and an optional
1003 parent. If no parent is explicitly named, the root category, LOG_ROOT_CAT
1004 is the category's parent.
1008 A category is created by a macro call at the top level of a file. A
1009 category can be created with any one of the following macros:
1014 <para>@GRAS_LOG_NEW_CATEGORY(MyCat);</para>
1015 <para>create a new root</para>
1019 <para>@GRAS_LOG_NEW_SUBCATEGORY(MyCat, ParentCat);</para>
1020 <para>Create a new category being child of the category ParentCat</para>
1024 <para>@GRAS_LOG_NEW_DEFAULT_CATEGORY(MyCat);</para>
1025 <para>Like GRAS_LOG_NEW_CATEGORY, but the new category is the default one
1030 <para>@GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(MyCat, ParentCat);</para>
1031 <para>Like GRAS_LOG_NEW_SUBCATEGORY, but the new category is the default one
1037 The parent cat can be defined in the same file or in another file, but each
1038 category may have only one definition.
1042 Typically, there will be a Category for each module and sub-module, so you
1043 can independently control logging for each module.
1048 <title>Priority</title>
1051 A category may be assigned a threshold priorty. The set of priorites are
1052 defined by the @gras_log_priority_t enum. Their values are DEBUG, VERBOSE,
1053 INFO, WARNING, ERROR and CRITICAL.
1057 If a given category is not assigned a threshold priority, then it inherits
1058 one from its closest ancestor with an assigned threshold.
1062 To ensure that all categories can eventually inherit a threshold, the root
1063 category always has an assigned threshold priority.
1067 Logging requests are made by invoking a logging macro on a category. All
1068 of the macros have a printf-style format string followed by arguments.
1069 Because most C compilers do not support vararg macros, there is a version
1070 of the macro for any number of arguments from 0 to 6. The macro name ends
1071 with the total number of arguments.
1075 Here is an example of the most basic type of macro:
1078 <programlisting>CLOG5(MyCat, gras_log_priority_warning, "Values are: %d and '%s'", 5, "oops");</programlisting>
1080 <para>This is a logging request with priority WARN.</para>
1083 A logging request is said to be enabled if its priority is higher than or
1084 equal to the threshold priority of its category. Otherwise, the request is
1085 said to be disabled. A category without an assigned priority will inherit
1086 one from the hierarchy.
1090 It is possible to use any non-negative integer as a priority. If, as in the
1091 example, one of the standard priorites is used, then there is a convenience
1092 macro that is typically used instead. For example, the above example is
1093 equivalent to the shorter:
1096 <programlisting>CWARN4(MyCat, "Values are: %d and '%s'", 5, "oops");</programlisting>
1100 <title>Default category</title>
1103 If @GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(MyCat, Parent) or
1104 @GRAS_LOG_NEW_DEFAULT_CATEGORY(MyCat) is used to create the category, then
1105 the even shorter form can be used:
1108 <programlisting>WARN3("Values are: %d and '%s'", 5, "oops");</programlisting>
1111 Only one default category can be created per file, though multiple
1112 non-defaults can be created and used.
1117 <title>Example</title>
1119 <para>Here is a more complete example:</para>
1124 /* create a category and a default subcategory */
1125 GRAS_LOG_NEW_CATEGORY(VSS);
1126 GRAS_LOG_NEW_DEFAULT_SUBCATEGORY(SA, VSS);
1129 /* Now set the parent's priority.
1130 (the string would typcially be a runtime option) */
1131 gras_log_control_set("SA.thresh=3");
1133 /* This request is enabled, because WARNING >= INFO. */
1134 CWARN2(VSS, "Low fuel level.");
1136 /* This request is disabled, because DEBUG < INFO. */
1137 CDEBUG2(VSS, "Starting search for nearest gas station.");
1139 /* The default category SA inherits its priority from VSS. Thus,
1140 the following request is enabled because INFO >= INFO. */
1141 INFO1("Located nearest gas station.");
1143 /* This request is disabled, because DEBUG < INFO. */
1144 DEBUG1("Exiting gas station search");
1149 <title>Configuration</title>
1152 Configuration is typically done during program initialization by invoking
1153 the gras_log_control_set() method. The control string passed to it
1154 typically comes from the command line. Look at the doucmentation for that
1155 function for the format of the control string.
1160 <title>Performance</title>
1163 Clever design insures efficiency. Except for the first invocation, a
1164 disabled logging request requires an a single comparison of a static
1165 variable to a constant.
1169 There is also compile time constant, @GRAS_LOG_STATIC_THRESHOLD, which
1170 causes all logging requests with a lower priority to be optimized to 0 cost
1171 by the compiler. By setting it to gras_log_priority_infinite, all logging
1172 requests are statically disabled and cost nothing. Released executables
1173 might typically be compiled with
1174 "-DGRAS_LOG_STATIC_THRESHOLD=gras_log_priority_infinite".
1179 <title>Appenders</title>
1182 Each category has an optional appender. An appender is a pointer to a
1183 structure whcih starts with a pointer to a doAppend() function. DoAppend()
1184 prints a message to a log.
1188 WHen a category is passed a message by one of the logging macros, the
1189 category performs the following actions:
1195 if the category has an appender, the message is passed to the
1196 appender's doAppend() function,
1202 if 'willLogToParent' is true for the category, the message is passed
1203 to the category's parent.
1207 By default, all categories except root have no appender and
1208 'willLogToParent' is true. This situation causes all messages to be
1209 logged by the root category's appender.
1213 Typically, you would only change the root category's appender when you
1214 wanted, say, a different output format. Copying defaultLogAppender.c
1215 would be a good start.
1219 The default appender function currently prints to stderr, but more
1220 would be needed, like the one able to send the logs to a remote
1228 <title>Misc and Caveats</title>
1231 Do not use any of the macros that start with '_'.
1235 The current set of macros force each file to use categories declared in
1236 that file. This is intentional. Make the category a child of the file's
1241 Log4J has a 'rolling file appender' which you can select with a run-time
1242 option and specify the max file size. This would be a nice default for
1243 non-kernel applications.
1247 Careful, category names are global variables.
1252 <!-- ##### SECTION ./tmpl/tbx_log.sgml:See_Also ##### -->
1258 <!-- ##### SECTION ./tmpl/tbx_log.sgml:Short_Description ##### -->
1259 An easy-to-use, fast and flexible message logging architecture.
1262 <!-- ##### SECTION ./tmpl/tbx_log.sgml:Title ##### -->
1266 <!-- ##### SECTION ./tmpl/tbx_set.sgml:Long_Description ##### -->
1272 <!-- ##### SECTION ./tmpl/tbx_set.sgml:See_Also ##### -->
1278 <!-- ##### SECTION ./tmpl/tbx_set.sgml:Short_Description ##### -->
1279 Data storage for very quick retrieve
1282 <!-- ##### SECTION ./tmpl/tbx_set.sgml:Title ##### -->
1286 <!-- ##### SECTION ./tmpl/trp_socks.sgml:Long_Description ##### -->
1292 <!-- ##### SECTION ./tmpl/trp_socks.sgml:See_Also ##### -->
1298 <!-- ##### SECTION ./tmpl/trp_socks.sgml:Short_Description ##### -->
1302 <!-- ##### SECTION ./tmpl/trp_socks.sgml:Title ##### -->
1306 <!-- ##### SECTION ./tmpl/xbt_cfg.sgml:Long_Description ##### -->
1312 <!-- ##### SECTION ./tmpl/xbt_cfg.sgml:See_Also ##### -->
1318 <!-- ##### SECTION ./tmpl/xbt_cfg.sgml:Short_Description ##### -->
1322 <!-- ##### SECTION ./tmpl/xbt_cfg.sgml:Title ##### -->
1326 <!-- ##### SECTION ./tmpl/xbt_dico.sgml:Long_Description ##### -->
1332 <!-- ##### SECTION ./tmpl/xbt_dico.sgml:See_Also ##### -->
1338 <!-- ##### SECTION ./tmpl/xbt_dico.sgml:Short_Description ##### -->
1342 <!-- ##### SECTION ./tmpl/xbt_dico.sgml:Title ##### -->
1346 <!-- ##### SECTION ./tmpl/xbt_err.sgml:Long_Description ##### -->
1352 <!-- ##### SECTION ./tmpl/xbt_err.sgml:See_Also ##### -->
1358 <!-- ##### SECTION ./tmpl/xbt_err.sgml:Short_Description ##### -->
1362 <!-- ##### SECTION ./tmpl/xbt_err.sgml:Title ##### -->
1366 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
1372 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
1378 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
1382 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
1383 xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml
1386 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
1392 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
1398 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
1402 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
1403 xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml
1406 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
1412 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
1418 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
1422 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
1423 xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml
1426 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
1432 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
1438 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
1442 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml.sgml:Title ##### -->
1443 xbt_swag.sgml.sgml.sgml.sgml.sgml
1446 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml:Long_Description ##### -->
1452 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml:See_Also ##### -->
1458 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml:Short_Description ##### -->
1462 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml.sgml:Title ##### -->
1463 xbt_swag.sgml.sgml.sgml.sgml
1466 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml:Long_Description ##### -->
1472 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml:See_Also ##### -->
1478 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml:Short_Description ##### -->
1482 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml.sgml:Title ##### -->
1483 xbt_swag.sgml.sgml.sgml
1486 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml:Long_Description ##### -->
1492 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml:See_Also ##### -->
1498 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml:Short_Description ##### -->
1502 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml.sgml:Title ##### -->
1506 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml:Long_Description ##### -->
1512 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml:See_Also ##### -->
1518 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml:Short_Description ##### -->
1522 <!-- ##### SECTION ./tmpl/xbt_swag.sgml.sgml:Title ##### -->
1526 <!-- ##### MACRO BEGIN_DECL ##### -->
1532 <!-- ##### MACRO CCRITICAL0 ##### -->
1540 <!-- ##### MACRO CCRITICAL1 ##### -->
1549 <!-- ##### MACRO CCRITICAL2 ##### -->
1559 <!-- ##### MACRO CCRITICAL3 ##### -->
1570 <!-- ##### MACRO CCRITICAL4 ##### -->
1582 <!-- ##### MACRO CCRITICAL5 ##### -->
1595 <!-- ##### MACRO CDEBUG0 ##### -->
1603 <!-- ##### MACRO CDEBUG1 ##### -->
1612 <!-- ##### MACRO CDEBUG2 ##### -->
1622 <!-- ##### MACRO CDEBUG3 ##### -->
1633 <!-- ##### MACRO CDEBUG4 ##### -->
1645 <!-- ##### MACRO CDEBUG5 ##### -->
1658 <!-- ##### MACRO CERROR0 ##### -->
1666 <!-- ##### MACRO CERROR1 ##### -->
1675 <!-- ##### MACRO CERROR2 ##### -->
1685 <!-- ##### MACRO CERROR3 ##### -->
1696 <!-- ##### MACRO CERROR4 ##### -->
1708 <!-- ##### MACRO CERROR5 ##### -->
1721 <!-- ##### MACRO CINFO0 ##### -->
1729 <!-- ##### MACRO CINFO1 ##### -->
1738 <!-- ##### MACRO CINFO2 ##### -->
1748 <!-- ##### MACRO CINFO3 ##### -->
1759 <!-- ##### MACRO CINFO4 ##### -->
1771 <!-- ##### MACRO CINFO5 ##### -->
1784 <!-- ##### MACRO CLOG0 ##### -->
1793 <!-- ##### MACRO CLOG1 ##### -->
1803 <!-- ##### MACRO CLOG2 ##### -->
1814 <!-- ##### MACRO CLOG3 ##### -->
1826 <!-- ##### MACRO CLOG4 ##### -->
1839 <!-- ##### MACRO CLOG5 ##### -->
1853 <!-- ##### MACRO CLOG6 ##### -->
1868 <!-- ##### MACRO CRITICAL0 ##### -->
1875 <!-- ##### MACRO CRITICAL1 ##### -->
1883 <!-- ##### MACRO CRITICAL2 ##### -->
1892 <!-- ##### MACRO CRITICAL3 ##### -->
1902 <!-- ##### MACRO CRITICAL4 ##### -->
1913 <!-- ##### MACRO CRITICAL5 ##### -->
1925 <!-- ##### MACRO CWARNING6 ##### -->
1939 <!-- ##### FUNCTION CallAddr ##### -->
1950 <!-- ##### FUNCTION CloseSocket ##### -->
1959 <!-- ##### FUNCTION ConvertData ##### -->
1970 <!-- ##### FUNCTION CreateLocalChild ##### -->
1980 <!-- ##### FUNCTION DROP_SOCKET ##### -->
1988 <!-- ##### FUNCTION DataSize ##### -->
1998 <!-- ##### ENUM DataTypes ##### -->
2010 @UNSIGNED_LONG_TYPE:
2011 @UNSIGNED_SHORT_TYPE:
2015 <!-- ##### FUNCTION DifferentFormat ##### -->
2023 <!-- ##### FUNCTION DifferentOrder ##### -->
2030 <!-- ##### FUNCTION DifferentSize ##### -->
2038 <!-- ##### MACRO END_DECL ##### -->
2044 <!-- ##### MACRO EODD ##### -->
2050 <!-- ##### FUNCTION EstablishAnEar ##### -->
2061 <!-- ##### ENUM FormatTypes ##### -->
2069 <!-- ##### MACRO GRAS_LOG_DEFAULT_CATEGORY ##### -->
2076 <!-- ##### MACRO GRAS_LOG_EXTERNAL_CATEGORY ##### -->
2083 <!-- ##### MACRO GRAS_LOG_ISENABLED ##### -->
2091 <!-- ##### MACRO GRAS_LOG_MAYDAY ##### -->
2097 <!-- ##### MACRO GRAS_LOG_NEW_CATEGORY ##### -->
2105 <!-- ##### MACRO GRAS_LOG_NEW_DEFAULT_CATEGORY ##### -->
2113 <!-- ##### MACRO GRAS_LOG_NEW_DEFAULT_SUBCATEGORY ##### -->
2122 <!-- ##### MACRO GRAS_LOG_NEW_SUBCATEGORY ##### -->
2131 <!-- ##### MACRO GRAS_LOG_ROOT_CAT ##### -->
2137 <!-- ##### MACRO GRAS_LOG_STATIC_THRESHOLD ##### -->
2143 <!-- ##### MACRO HAVE_DLFCN_H ##### -->
2149 <!-- ##### MACRO HAVE_INTTYPES_H ##### -->
2155 <!-- ##### MACRO HAVE_LIBPTHREAD ##### -->
2161 <!-- ##### MACRO HAVE_MEMORY_H ##### -->
2167 <!-- ##### MACRO HAVE_STDINT_H ##### -->
2173 <!-- ##### MACRO HAVE_STDLIB_H ##### -->
2179 <!-- ##### MACRO HAVE_STRINGS_H ##### -->
2185 <!-- ##### MACRO HAVE_STRING_H ##### -->
2191 <!-- ##### MACRO HAVE_SYS_STAT_H ##### -->
2197 <!-- ##### MACRO HAVE_SYS_TYPES_H ##### -->
2203 <!-- ##### MACRO HAVE_UNISTD_H ##### -->
2209 <!-- ##### FUNCTION HomogenousConvertData ##### -->
2220 <!-- ##### FUNCTION HomogenousDataSize ##### -->
2230 <!-- ##### TYPEDEF IPAddress ##### -->
2236 <!-- ##### FUNCTION IPAddressImage ##### -->
2244 <!-- ##### FUNCTION IPAddressImage_r ##### -->
2252 <!-- ##### FUNCTION IPAddressMachine ##### -->
2260 <!-- ##### FUNCTION IPAddressMachine_r ##### -->
2268 <!-- ##### MACRO IPAddressValue ##### -->
2276 <!-- ##### FUNCTION IPAddressValues ##### -->
2286 <!-- ##### FUNCTION IncomingRequest ##### -->
2296 <!-- ##### FUNCTION IsOkay ##### -->
2304 <!-- ##### FUNCTION IsPipe ##### -->
2312 <!-- ##### MACRO IsValidIP ##### -->
2319 <!-- ##### MACRO LOG6 ##### -->
2333 <!-- ##### FUNCTION MyMachineName ##### -->
2340 <!-- ##### MACRO NO_SOCKET ##### -->
2346 <!-- ##### FUNCTION NotifyOnDisconnection ##### -->
2353 <!-- ##### FUNCTION OpenClientSocket ##### -->
2363 <!-- ##### FUNCTION OpenServerSocket ##### -->
2374 <!-- ##### MACRO PACKAGE ##### -->
2380 <!-- ##### MACRO PACKAGE_BUGREPORT ##### -->
2386 <!-- ##### MACRO PACKAGE_NAME ##### -->
2392 <!-- ##### MACRO PACKAGE_STRING ##### -->
2398 <!-- ##### MACRO PACKAGE_TARNAME ##### -->
2404 <!-- ##### MACRO PACKAGE_VERSION ##### -->
2410 <!-- ##### MACRO PAD_BYTES ##### -->
2420 <!-- ##### FUNCTION PassSocket ##### -->
2429 <!-- ##### FUNCTION Peer ##### -->
2437 <!-- ##### FUNCTION PeerName ##### -->
2445 <!-- ##### FUNCTION PeerName_r ##### -->
2453 <!-- ##### FUNCTION ReverseData ##### -->
2464 <!-- ##### MACRO SIMPLE_DATA ##### -->
2472 <!-- ##### MACRO SIMPLE_MEMBER ##### -->
2481 <!-- ##### MACRO SIMPLE_TYPE_COUNT ##### -->
2487 <!-- ##### MACRO STDC_HEADERS ##### -->
2493 <!-- ##### TYPEDEF Socket ##### -->
2499 <!-- ##### FUNCTION SocketFailure ##### -->
2506 <!-- ##### USER_FUNCTION SocketFunction ##### -->
2513 <!-- ##### FUNCTION SocketInUse ##### -->
2521 <!-- ##### FUNCTION SocketIsAvailable ##### -->
2529 <!-- ##### MACRO VERSION ##### -->
2535 <!-- ##### MACRO WARNING6 ##### -->
2548 <!-- ##### USER_FUNCTION grasCallbackFunction ##### -->
2557 <!-- ##### FUNCTION grasCloseSocket ##### -->
2565 <!-- ##### FUNCTION grasDataDescCmp ##### -->
2577 <!-- ##### FUNCTION grasDataDescCount ##### -->
2585 <!-- ##### FUNCTION grasDataRecv ##### -->
2593 @description_length:
2597 <!-- ##### FUNCTION grasDataSend ##### -->
2605 @description_length:
2609 <!-- ##### FUNCTION grasDataSize ##### -->
2618 <!-- ##### ENUM grasError_t ##### -->
2633 <!-- ##### FUNCTION grasLock ##### -->
2640 <!-- ##### TYPEDEF grasMessageType_t ##### -->
2646 <!-- ##### FUNCTION grasMsgDiscard ##### -->
2654 <!-- ##### FUNCTION grasMsgEntryGet ##### -->
2662 <!-- ##### TYPEDEF grasMsgEntry_t ##### -->
2668 <!-- ##### FUNCTION grasMsgFree ##### -->
2675 <!-- ##### FUNCTION grasMsgHandle ##### -->
2682 <!-- ##### FUNCTION grasMsgHeaderNew ##### -->
2692 <!-- ##### FUNCTION grasMsgNew ##### -->
2703 <!-- ##### FUNCTION grasMsgRecv ##### -->
2713 <!-- ##### FUNCTION grasMsgRegister ##### -->
2724 <!-- ##### FUNCTION grasMsgSend ##### -->
2735 <!-- ##### FUNCTION grasMsgWait ##### -->
2747 <!-- ##### FUNCTION grasMyMachineName ##### -->
2754 <!-- ##### FUNCTION grasOpenClientSocket ##### -->
2764 <!-- ##### FUNCTION grasOpenServerSocket ##### -->
2774 <!-- ##### MACRO grasPROTOCOL ##### -->
2780 <!-- ##### FUNCTION grasPeerGetAddress ##### -->
2788 <!-- ##### FUNCTION grasPeerGetName ##### -->
2796 <!-- ##### FUNCTION grasRecvData ##### -->
2806 <!-- ##### FUNCTION grasRegisterCallback ##### -->
2815 <!-- ##### FUNCTION grasSendData ##### -->
2825 <!-- ##### FUNCTION grasUnlock ##### -->
2832 <!-- ##### FUNCTION grasUserdataGet ##### -->
2838 <!-- ##### MACRO grasUserdataNew ##### -->
2845 <!-- ##### FUNCTION grasUserdataSet ##### -->
2852 <!-- ##### FUNCTION gras_cfg_check ##### -->
2860 <!-- ##### FUNCTION gras_cfg_cpy ##### -->
2869 <!-- ##### FUNCTION gras_cfg_dump ##### -->
2878 <!-- ##### FUNCTION gras_cfg_empty ##### -->
2887 <!-- ##### FUNCTION gras_cfg_free ##### -->
2894 <!-- ##### FUNCTION gras_cfg_get_double ##### -->
2904 <!-- ##### FUNCTION gras_cfg_get_dynar ##### -->
2914 <!-- ##### FUNCTION gras_cfg_get_host ##### -->
2925 <!-- ##### FUNCTION gras_cfg_get_int ##### -->
2935 <!-- ##### FUNCTION gras_cfg_get_string ##### -->
2945 <!-- ##### FUNCTION gras_cfg_new ##### -->
2953 <!-- ##### FUNCTION gras_cfg_register ##### -->
2965 <!-- ##### FUNCTION gras_cfg_register_str ##### -->
2974 <!-- ##### FUNCTION gras_cfg_rm_double ##### -->
2984 <!-- ##### FUNCTION gras_cfg_rm_host ##### -->
2995 <!-- ##### FUNCTION gras_cfg_rm_int ##### -->
3005 <!-- ##### FUNCTION gras_cfg_rm_string ##### -->
3015 <!-- ##### FUNCTION gras_cfg_set ##### -->
3024 <!-- ##### FUNCTION gras_cfg_set_double ##### -->
3034 <!-- ##### FUNCTION gras_cfg_set_host ##### -->
3045 <!-- ##### FUNCTION gras_cfg_set_int ##### -->
3055 <!-- ##### FUNCTION gras_cfg_set_parse ##### -->
3064 <!-- ##### FUNCTION gras_cfg_set_string ##### -->
3074 <!-- ##### FUNCTION gras_cfg_set_vargs ##### -->
3083 <!-- ##### FUNCTION gras_datadesc_cb_set_post ##### -->
3091 <!-- ##### FUNCTION gras_datadesc_cb_set_pre ##### -->
3099 <!-- ##### FUNCTION gras_datadesc_cmp ##### -->
3112 <!-- ##### FUNCTION gras_datadesc_copy_data ##### -->
3121 <!-- ##### MACRO gras_datadesc_declare_array ##### -->
3131 <!-- ##### FUNCTION gras_datadesc_declare_array_cb ##### -->
3144 <!-- ##### FUNCTION gras_datadesc_declare_array_dyn ##### -->
3157 <!-- ##### FUNCTION gras_datadesc_declare_array_fixed ##### -->
3168 <!-- ##### FUNCTION gras_datadesc_declare_ref ##### -->
3180 <!-- ##### FUNCTION gras_datadesc_declare_ref_cb ##### -->
3192 <!-- ##### MACRO gras_datadesc_declare_ref_disc ##### -->
3201 <!-- ##### FUNCTION gras_datadesc_declare_ref_generic ##### -->
3211 <!-- ##### FUNCTION gras_datadesc_declare_struct ##### -->
3221 <!-- ##### MACRO gras_datadesc_declare_struct_add_code ##### -->
3230 <!-- ##### FUNCTION gras_datadesc_declare_struct_add_code_cb ##### -->
3242 <!-- ##### MACRO gras_datadesc_declare_struct_add_name ##### -->
3251 <!-- ##### FUNCTION gras_datadesc_declare_struct_add_name_cb ##### -->
3263 <!-- ##### FUNCTION gras_datadesc_declare_struct_append ##### -->
3273 <!-- ##### FUNCTION gras_datadesc_declare_struct_append_name ##### -->
3283 <!-- ##### FUNCTION gras_datadesc_declare_struct_cb ##### -->
3294 <!-- ##### FUNCTION gras_datadesc_declare_struct_close ##### -->
3301 <!-- ##### FUNCTION gras_datadesc_declare_union ##### -->
3312 <!-- ##### MACRO gras_datadesc_declare_union_add_code ##### -->
3321 <!-- ##### FUNCTION gras_datadesc_declare_union_add_code_cb ##### -->
3333 <!-- ##### MACRO gras_datadesc_declare_union_add_name ##### -->
3342 <!-- ##### FUNCTION gras_datadesc_declare_union_add_name_cb ##### -->
3354 <!-- ##### FUNCTION gras_datadesc_declare_union_append ##### -->
3364 <!-- ##### FUNCTION gras_datadesc_declare_union_append_name ##### -->
3374 <!-- ##### FUNCTION gras_datadesc_declare_union_cb ##### -->
3385 <!-- ##### FUNCTION gras_datadesc_declare_union_close ##### -->
3392 <!-- ##### FUNCTION gras_datadesc_from_nws ##### -->
3404 <!-- ##### FUNCTION gras_datadesc_import_nws ##### -->
3415 <!-- ##### FUNCTION gras_datadesc_parse ##### -->
3427 <!-- ##### FUNCTION gras_dd_cbps_block_begin ##### -->
3434 <!-- ##### FUNCTION gras_dd_cbps_block_end ##### -->
3441 <!-- ##### FUNCTION gras_dd_cbps_get ##### -->
3450 <!-- ##### FUNCTION gras_dd_cbps_pop ##### -->
3459 <!-- ##### FUNCTION gras_dd_cbps_push ##### -->
3469 <!-- ##### FUNCTION gras_dd_cbps_set ##### -->
3479 <!-- ##### FUNCTION gras_ddt_free ##### -->
3486 <!-- ##### FUNCTION gras_ddt_get_by_code ##### -->
3495 <!-- ##### FUNCTION gras_ddt_get_by_name ##### -->
3504 <!-- ##### FUNCTION gras_ddt_new_array ##### -->
3517 <!-- ##### FUNCTION gras_ddt_new_from_nws ##### -->
3528 <!-- ##### FUNCTION gras_ddt_new_ignored ##### -->
3542 <!-- ##### FUNCTION gras_ddt_new_parse ##### -->
3552 <!-- ##### FUNCTION gras_ddt_new_ref ##### -->
3564 <!-- ##### FUNCTION gras_ddt_new_scalar ##### -->
3573 <!-- ##### FUNCTION gras_ddt_new_struct ##### -->
3584 <!-- ##### FUNCTION gras_ddt_new_struct_append ##### -->
3596 <!-- ##### FUNCTION gras_ddt_new_union ##### -->
3607 <!-- ##### FUNCTION gras_ddt_new_union_append ##### -->
3619 <!-- ##### FUNCTION gras_ddt_register ##### -->
3627 <!-- ##### FUNCTION gras_dict_cursor_free ##### -->
3635 <!-- ##### FUNCTION gras_dict_cursor_get_data ##### -->
3644 <!-- ##### FUNCTION gras_dict_cursor_get_key ##### -->
3653 <!-- ##### FUNCTION gras_dict_cursor_new ##### -->
3662 <!-- ##### FUNCTION gras_dict_cursor_next ##### -->
3670 <!-- ##### FUNCTION gras_dict_cursor_rewind ##### -->
3678 <!-- ##### FUNCTION gras_dict_dump ##### -->
3687 <!-- ##### MACRO gras_dict_foreach ##### -->
3697 <!-- ##### FUNCTION gras_dict_free ##### -->
3705 <!-- ##### FUNCTION gras_dict_get ##### -->
3715 <!-- ##### FUNCTION gras_dict_get_ext ##### -->
3726 <!-- ##### FUNCTION gras_dict_insert ##### -->
3737 <!-- ##### FUNCTION gras_dict_insert_ext ##### -->
3749 <!-- ##### FUNCTION gras_dict_new ##### -->
3757 <!-- ##### FUNCTION gras_dict_print ##### -->
3764 <!-- ##### FUNCTION gras_dict_prints ##### -->
3771 <!-- ##### FUNCTION gras_dict_remove ##### -->
3780 <!-- ##### FUNCTION gras_dict_remove_ext ##### -->
3790 <!-- ##### FUNCTION gras_dict_retrieve ##### -->
3800 <!-- ##### FUNCTION gras_dict_retrieve_ext ##### -->
3811 <!-- ##### FUNCTION gras_dict_set ##### -->
3822 <!-- ##### FUNCTION gras_dict_set_ext ##### -->
3834 <!-- ##### FUNCTION gras_dynar_cursor_first ##### -->
3842 <!-- ##### FUNCTION gras_dynar_cursor_get ##### -->
3852 <!-- ##### FUNCTION gras_dynar_cursor_rm ##### -->
3860 <!-- ##### FUNCTION gras_dynar_cursor_step ##### -->
3868 <!-- ##### FUNCTION gras_dynar_first ##### -->
3877 <!-- ##### MACRO gras_dynar_foreach ##### -->
3887 <!-- ##### FUNCTION gras_dynar_free ##### -->
3895 <!-- ##### FUNCTION gras_dynar_free_container ##### -->
3903 <!-- ##### FUNCTION gras_dynar_get ##### -->
3914 <!-- ##### FUNCTION gras_dynar_insert_at ##### -->
3925 <!-- ##### FUNCTION gras_dynar_length ##### -->
3933 <!-- ##### FUNCTION gras_dynar_map ##### -->
3942 <!-- ##### FUNCTION gras_dynar_new ##### -->
3953 <!-- ##### FUNCTION gras_dynar_next ##### -->
3963 <!-- ##### FUNCTION gras_dynar_pop ##### -->
3972 <!-- ##### FUNCTION gras_dynar_push ##### -->
3982 <!-- ##### FUNCTION gras_dynar_remove_at ##### -->
3992 <!-- ##### FUNCTION gras_dynar_remplace ##### -->
4002 <!-- ##### FUNCTION gras_dynar_reset ##### -->
4010 <!-- ##### FUNCTION gras_dynar_set ##### -->
4021 <!-- ##### FUNCTION gras_dynar_shift ##### -->
4031 <!-- ##### FUNCTION gras_dynar_unshift ##### -->
4041 <!-- ##### ENUM gras_error_t ##### -->
4047 @mismatch_error: Not found
4048 @system_error: a syscall did fail
4049 @network_error: error while sending/receiving data
4050 @timeout_error: not quick enough, dude
4051 @thread_error: error while [un]locking
4052 @unknown_error: no idea
4054 <!-- ##### FUNCTION gras_lock ##### -->
4061 <!-- ##### FUNCTION gras_log_appender_set ##### -->
4069 <!-- ##### FUNCTION gras_log_control_set ##### -->
4077 <!-- ##### VARIABLE gras_log_default_appender ##### -->
4083 <!-- ##### FUNCTION gras_log_parent_set ##### -->
4091 <!-- ##### ENUM gras_log_priority_t ##### -->
4096 @gras_log_priority_none:
4097 @gras_log_priority_trace:
4098 @gras_log_priority_debug:
4099 @gras_log_priority_verbose:
4100 @gras_log_priority_info:
4101 @gras_log_priority_warning:
4102 @gras_log_priority_error:
4103 @gras_log_priority_critical:
4104 @gras_log_priority_infinite:
4105 @gras_log_priority_uninitialized:
4107 <!-- ##### FUNCTION gras_log_threshold_set ##### -->
4115 <!-- ##### FUNCTION gras_msg_discard ##### -->
4123 <!-- ##### FUNCTION gras_msg_free ##### -->
4130 <!-- ##### FUNCTION gras_msg_new ##### -->
4141 <!-- ##### FUNCTION gras_msgtype_register ##### -->
4152 <!-- ##### FUNCTION gras_set_add ##### -->
4162 <!-- ##### MACRO gras_set_foreach ##### -->
4171 <!-- ##### FUNCTION gras_set_free ##### -->
4178 <!-- ##### FUNCTION gras_set_get_by_id ##### -->
4188 <!-- ##### FUNCTION gras_set_get_by_name ##### -->
4198 <!-- ##### FUNCTION gras_set_get_by_name_ext ##### -->
4209 <!-- ##### FUNCTION gras_set_new ##### -->
4217 <!-- ##### FUNCTION gras_sleep ##### -->
4225 <!-- ##### FUNCTION gras_sock_client_open ##### -->
4235 <!-- ##### FUNCTION gras_sock_close ##### -->
4243 <!-- ##### FUNCTION gras_sock_get_peer_addr ##### -->
4251 <!-- ##### FUNCTION gras_sock_get_peer_name ##### -->
4259 <!-- ##### FUNCTION gras_sock_server_open ##### -->
4269 <!-- ##### FUNCTION gras_time ##### -->
4276 <!-- ##### FUNCTION gras_unlock ##### -->
4283 <!-- ##### ENUM xbt_error_t ##### -->
4295 @remote_mismatch_error:
4296 @remote_system_error:
4297 @remote_network_error:
4298 @remote_timeout_error:
4299 @remote_thread_error:
4300 @remote_unknown_error: