Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Propagate the s/network_link/link/ from the XML to the C code (hope I didn't break...
[simgrid.git] / src / surf / network_private.h
1 /*      $Id$     */
2
3 /* Copyright (c) 2004 Arnaud Legrand. All rights reserved.                  */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #ifndef _SURF_NETWORK_PRIVATE_H
9 #define _SURF_NETWORK_PRIVATE_H
10
11 #include "surf_private.h"
12 #include "xbt/dict.h"
13
14 typedef struct network_link_CM02 {
15   surf_model_t model;   /* Any such object, added in a trace
16                                    should start by this field!!! */
17   /* Using this object with the public part of
18      model does not make sense */
19   char *name;
20   double bw_current;
21   tmgr_trace_event_t bw_event;
22   double lat_current;
23   tmgr_trace_event_t lat_event;
24   e_surf_link_state_t state_current;
25   tmgr_trace_event_t state_event;
26   lmm_constraint_t constraint;
27   /*holds the properties associated with a link*/
28   xbt_dict_t properties;
29 } s_link_CM02_t, *link_CM02_t;
30
31
32 typedef struct network_card_CM02 {
33   char *name;
34   int id;
35 } s_network_card_CM02_t, *network_card_CM02_t;
36
37 typedef struct surf_action_network_CM02 {
38   s_surf_action_t generic_action;
39   double latency;
40   double lat_current;
41   lmm_variable_t variable;
42   double rate;
43   int suspended;
44   network_card_CM02_t src;
45   network_card_CM02_t dst;
46 } s_surf_action_network_CM02_t, *surf_action_network_CM02_t;
47
48 extern xbt_dict_t network_card_set;
49
50
51 extern int card_number;
52 extern link_CM02_t **routing_table;
53 extern int *routing_table_size;
54
55 #define ROUTE(i,j) routing_table[(i)+(j)*card_number]
56 #define ROUTE_SIZE(i,j) routing_table_size[(i)+(j)*card_number]
57
58 #endif                          /* _SURF_NETWORK_PRIVATE_H */