Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[NS3] unused variable removed
[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 bufferedBytes;
25   uint32_t sentBytes;
26   uint32_t remaining;
27   uint32_t totalBytes;
28   char finished;
29   void* action;
30 };
31
32 //Simulator s;
33 class NS3Sim {
34
35 private:
36
37 public:
38         NS3Sim();
39         ~NS3Sim();
40         void create_flow_NS3(Ptr<Node> src,
41                                                 Ptr<Node> dst,
42                                                 uint16_t port_number,
43                                                 double start,
44                                                 const char *addr,
45                                                 uint32_t TotalBytes,
46                                                 void * action);
47         void simulator_stop(double min);
48         void simulator_start(void);
49         void* get_action_from_socket(void *socket);
50         double get_remains_from_socket(void *socket);
51         double get_sent_from_socket(void *socket);
52         char get_finished(void *socket);
53 };
54
55 #endif                          /* __cplusplus */
56
57 #endif