1 /* Copyright (c) 2007-2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
11 #include "gtnets_topology.h"
17 //GTNetS include files
18 #include "simulator.h" // Definitions for the Simulator Object
19 #include "node.h" // Definitions for the Node Object
20 #include "linkp2p.h" // Definitions for point-to-point link objects
21 #include "ratetimeparse.h" // Definitions for Rate and Time objects
22 #include "application-tcpserver.h" // Definitions for TCPServer application
23 #include "application-tcpsend.h" // Definitions for TCP Sending application
24 #include "tcp-tahoe.h" // Definitions for TCP Tahoe
26 #include "tcp-newreno.h"
28 #include "routing-manual.h"
38 GTSim(int WindowSize);
41 int add_link(int id, double bandwidth, double latency);
42 int add_onehop_route(int src, int dst, int link);
43 int add_route(int src, int dst, int *links, int nlink);
44 int add_router(int id);
45 int create_flow(int src, int dst, long datasize, void *metadata);
46 double get_time_to_next_flow_completion();
47 int run_until_next_flow_completion(void ***metadata,
48 int *number_of_flows);
49 int run(double deltat);
50 // returns the total received by the TCPServer peer of the given action
51 double gtnets_get_flow_rx(void *metadata);
52 void create_gtnets_topology();
53 void print_topology();
54 void set_jitter(double);
55 void set_jitter_seed(int);
60 bool node_include(int);
61 bool link_include(int);
63 GTNETS_Topology *topo_;
71 map < int, Uniform * >uniform_jitter_generator_;
73 map < int, TCPServer * >gtnets_servers_;
74 map < int, TCPSend * >gtnets_clients_;
75 map < int, Linkp2p * >gtnets_links_;
76 map < int, Node * >gtnets_nodes_;
77 map < void *, int >gtnets_action_to_flow_;
79 map < int, void *>gtnets_metadata_;
82 #endif /* __cplusplus */