OLD | NEW |
(Empty) | |
| 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) 2016 NITK Surathkal |
| 4 * |
| 5 * This program is free software; you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 2 as |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 * Authors: Ankit Deepak <adadeepak8@gmail.com> |
| 19 * Shravya Ks <shravya.ks0@gmail.com>, |
| 20 * Mohit P. Tahiliani <tahiliani@nitk.edu.in> |
| 21 */ |
| 22 |
| 23 /* |
| 24 * PORT NOTE: This code was ported from ns-3 IPv4 implementation (src/olsr). A
lmost all |
| 25 * comments have also been ported from the same |
| 26 */ |
| 27 |
| 28 |
| 29 #ifndef TC_REGRESSION_TEST_H |
| 30 #define TC_REGRESSION_TEST_H |
| 31 |
| 32 #include "ns3/test.h" |
| 33 #include "ns3/nstime.h" |
| 34 #include "ns3/socket.h" |
| 35 #include "ns3/ipv6-raw-socket-impl.h" |
| 36 #include "ns3/node-container.h" |
| 37 |
| 38 namespace ns3 { |
| 39 namespace olsr6 { |
| 40 /** |
| 41 * \ingroup olsr6 |
| 42 * \brief Less trivial test of OLSR6 Topology Control message generation |
| 43 * |
| 44 * This test simulates 3 Wi-Fi stations with chain topology and runs OLSR6 witho
ut any extra traffic. |
| 45 * It is expected that only second station will send TC messages. |
| 46 * |
| 47 */ |
| 48 class TcRegressionTest : public TestCase |
| 49 { |
| 50 public: |
| 51 TcRegressionTest (); |
| 52 ~TcRegressionTest (); |
| 53 private: |
| 54 /// Total simulation time |
| 55 const Time m_time; |
| 56 /// Create & configure test network |
| 57 void CreateNodes (); |
| 58 /// Go |
| 59 void DoRun (); |
| 60 |
| 61 /// Receive raw data on node A |
| 62 void ReceivePktProbeA (Ptr<Socket> socket); |
| 63 /// Packet counter on node A |
| 64 uint8_t m_countA; |
| 65 /// Receiving socket on node A |
| 66 Ptr<Ipv6RawSocketImpl> m_rxSocketA; |
| 67 |
| 68 /// Receive raw data on node B |
| 69 void ReceivePktProbeB (Ptr<Socket> socket); |
| 70 /// Packet counter on node B |
| 71 uint8_t m_countB; |
| 72 /// Receiving socket on node B |
| 73 Ptr<Ipv6RawSocketImpl> m_rxSocketB; |
| 74 |
| 75 /// Receive raw data on node C |
| 76 void ReceivePktProbeC (Ptr<Socket> socket); |
| 77 /// Packet counter on node C |
| 78 uint8_t m_countC; |
| 79 /// Receiving socket on node C |
| 80 Ptr<Ipv6RawSocketImpl> m_rxSocketC; |
| 81 |
| 82 }; |
| 83 |
| 84 } |
| 85 } |
| 86 |
| 87 #endif /* TC_REGRESSION_TEST_H */ |
OLD | NEW |