LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2009 University of Washington | 3 * Copyright (c) 2009 University of Washington |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 13 matching lines...) Expand all Loading... |
24 using namespace ns3; | 24 using namespace ns3; |
25 | 25 |
26 /** | 26 /** |
27 * \ingroup internet-test | 27 * \ingroup internet-test |
28 * \ingroup tests | 28 * \ingroup tests |
29 * | 29 * |
30 * \brief IPv4 dummy routing class (A) | 30 * \brief IPv4 dummy routing class (A) |
31 */ | 31 */ |
32 class Ipv4ARouting : public Ipv4RoutingProtocol { | 32 class Ipv4ARouting : public Ipv4RoutingProtocol { |
33 public: | 33 public: |
34 Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDe
vice> oif, Socket::SocketErrno &sockerr) { NS_UNUSED(header); NS_UNUSED(sockerr)
; return 0; } | 34 Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDe
vice> oif, Socket::SocketErrno &sockerr) { NS_UNUSED (header); NS_UNUSED (socker
r); return 0; } |
35 bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const Net
Device> idev, | 35 bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const Net
Device> idev, |
36 UnicastForwardCallback ucb, MulticastForwardCallback mcb, | 36 UnicastForwardCallback ucb, MulticastForwardCallback mcb, |
37 LocalDeliverCallback lcb, ErrorCallback ecb) { NS_UNUSED(hea
der); return false; } | 37 LocalDeliverCallback lcb, ErrorCallback ecb) { NS_UNUSED (he
ader); return false; } |
38 void NotifyInterfaceUp (uint32_t interface) {NS_UNUSED(interface);} | 38 void NotifyInterfaceUp (uint32_t interface) {NS_UNUSED (interface);} |
39 void NotifyInterfaceDown (uint32_t interface) {NS_UNUSED(interface);} | 39 void NotifyInterfaceDown (uint32_t interface) {NS_UNUSED (interface);} |
40 void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) {NS_U
NUSED(interface); NS_UNUSED(address);} | 40 void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) {NS_U
NUSED (interface); NS_UNUSED (address);} |
41 void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) {N
S_UNUSED(interface); NS_UNUSED(address);} | 41 void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) {N
S_UNUSED (interface); NS_UNUSED (address);} |
42 void SetIpv4 (Ptr<Ipv4> ipv4) {} | 42 void SetIpv4 (Ptr<Ipv4> ipv4) {} |
43 void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit unit) cons
t {NS_UNUSED(unit);} | 43 void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit unit) cons
t {NS_UNUSED (unit);} |
44 }; | 44 }; |
45 | 45 |
46 /** | 46 /** |
47 * \ingroup internet-test | 47 * \ingroup internet-test |
48 * \ingroup tests | 48 * \ingroup tests |
49 * | 49 * |
50 * \brief IPv4 dummy routing class (B) | 50 * \brief IPv4 dummy routing class (B) |
51 */ | 51 */ |
52 class Ipv4BRouting : public Ipv4RoutingProtocol { | 52 class Ipv4BRouting : public Ipv4RoutingProtocol { |
53 public: | 53 public: |
54 Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDe
vice> oif, Socket::SocketErrno &sockerr) { NS_UNUSED(header); NS_UNUSED(sockerr)
; return 0; } | 54 Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDe
vice> oif, Socket::SocketErrno &sockerr) { NS_UNUSED (header); NS_UNUSED (socker
r); return 0; } |
55 bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const Net
Device> idev, | 55 bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const Net
Device> idev, |
56 UnicastForwardCallback ucb, MulticastForwardCallback mcb, | 56 UnicastForwardCallback ucb, MulticastForwardCallback mcb, |
57 LocalDeliverCallback lcb, ErrorCallback ecb) { NS_UNUSED(hea
der); return false; } | 57 LocalDeliverCallback lcb, ErrorCallback ecb) { NS_UNUSED (he
ader); return false; } |
58 void NotifyInterfaceUp (uint32_t interface) {NS_UNUSED(interface);} | 58 void NotifyInterfaceUp (uint32_t interface) {NS_UNUSED (interface);} |
59 void NotifyInterfaceDown (uint32_t interface) {NS_UNUSED(interface);} | 59 void NotifyInterfaceDown (uint32_t interface) {NS_UNUSED (interface);} |
60 void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) {NS_U
NUSED(interface); NS_UNUSED(address);} | 60 void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) {NS_U
NUSED (interface); NS_UNUSED (address);} |
61 void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) {N
S_UNUSED(interface); NS_UNUSED(address);} | 61 void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) {N
S_UNUSED (interface); NS_UNUSED (address);} |
62 void SetIpv4 (Ptr<Ipv4> ipv4) {} | 62 void SetIpv4 (Ptr<Ipv4> ipv4) {} |
63 void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit unit) cons
t {NS_UNUSED(unit);} | 63 void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit unit) cons
t {NS_UNUSED (unit);} |
64 }; | 64 }; |
65 | 65 |
66 /** | 66 /** |
67 * \ingroup internet-test | 67 * \ingroup internet-test |
68 * \ingroup tests | 68 * \ingroup tests |
69 * | 69 * |
70 * \brief IPv4 ListRouting negative test. | 70 * \brief IPv4 ListRouting negative test. |
71 */ | 71 */ |
72 class Ipv4ListRoutingNegativeTestCase : public TestCase | 72 class Ipv4ListRoutingNegativeTestCase : public TestCase |
73 { | 73 { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 public: | 147 public: |
148 Ipv4ListRoutingTestSuite() | 148 Ipv4ListRoutingTestSuite() |
149 : TestSuite ("ipv4-list-routing", UNIT) | 149 : TestSuite ("ipv4-list-routing", UNIT) |
150 { | 150 { |
151 AddTestCase (new Ipv4ListRoutingPositiveTestCase (), TestCase::QUICK); | 151 AddTestCase (new Ipv4ListRoutingPositiveTestCase (), TestCase::QUICK); |
152 AddTestCase (new Ipv4ListRoutingNegativeTestCase (), TestCase::QUICK); | 152 AddTestCase (new Ipv4ListRoutingNegativeTestCase (), TestCase::QUICK); |
153 } | 153 } |
154 }; | 154 }; |
155 | 155 |
156 static Ipv4ListRoutingTestSuite g_ipv4ListRoutingTestSuite; //!< Static variable
for test initialization | 156 static Ipv4ListRoutingTestSuite g_ipv4ListRoutingTestSuite; //!< Static variable
for test initialization |
LEFT | RIGHT |