Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
73e230567052a527668d6c4b4d56d58918e2c2dc
[simgrid.git] / src / surf / ns3 / ns3_simulator.h
1 /* Copyright (c) 2007-2015. 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 <cstdint>
13
14 #include "ns3/core-module.h"
15 #include "my-point-to-point-helper.h"
16
17 #include "ns3/node.h"
18 #include "ns3/global-route-manager.h"
19 #include "ns3/csma-helper.h"
20 #include "ns3/internet-stack-helper.h"
21 #include "ns3/ipv4-address-helper.h"
22 #include "ns3/point-to-point-helper.h"
23 #include "ns3/packet-sink-helper.h"
24 #include "ns3/inet-socket-address.h"
25 #include "ns3/tcp-socket-factory.h"
26
27 struct MySocket{
28   std::uint32_t bufferedBytes;
29   std::uint32_t sentBytes;
30   std::uint32_t remaining;
31   std::uint32_t totalBytes;
32   char finished;
33   void* action;
34 };
35
36 //Simulator s;
37 class NS3Sim {
38
39 private:
40
41 public:
42   NS3Sim();
43   ~NS3Sim();
44   void create_flow_NS3(ns3::Ptr<ns3::Node> src,
45             ns3::Ptr<ns3::Node> dst,
46             std::uint16_t port_number,
47             double start,
48             const char *addr,
49             std::uint32_t TotalBytes,
50             void * action);
51   void simulator_start(double min);
52 };
53
54 #endif                          /* __cplusplus */
55
56 #endif