Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge remote-tracking branch 'origin/master'
[simgrid.git] / src / surf / ns3 / ns3_simulator.h
1 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #ifndef _NS3_SIM_H
8 #define _NS3_SIM_H
9
10 #ifdef __cplusplus
11
12 #include "ns3/core-module.h"
13 #include "ns3/helper-module.h"
14 #include "ns3/simulator-module.h"
15 #include "ns3/node-module.h"
16 #include "ns3/helper-module.h"
17 #include "ns3/global-routing-module.h"
18 #include "ns3/tcp-socket-factory.h"
19
20 using namespace ns3;
21 using namespace std;
22
23 struct MySocket{
24         uint32_t sentBytes;
25         uint32_t remaining;
26         uint32_t TotalBytes;
27         char finished;
28         void* action;
29 };
30
31 //Simulator s;
32 class NS3Sim {
33
34 private:
35
36 public:
37         NS3Sim();
38         ~NS3Sim();
39         void create_flow_NS3(Ptr<Node> src,
40                                                 Ptr<Node> dst,
41                                                 uint16_t port_number,
42                                                 double start,
43                                                 const char *addr,
44                                                 uint32_t TotalBytes,
45                                                 void * action);
46         void simulator_stop(double min);
47         void simulator_start(void);
48         void* get_action_from_socket(void *socket);
49         double get_remains_from_socket(void *socket);
50         char get_finished(void *socket);
51 };
52
53 #endif                          /* __cplusplus */
54
55 #endif