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 14 matching lines...) Expand all Loading... |
25 using namespace ns3; | 25 using namespace ns3; |
26 | 26 |
27 /** | 27 /** |
28 * \ingroup internet-test | 28 * \ingroup internet-test |
29 * \ingroup tests | 29 * \ingroup tests |
30 * | 30 * |
31 * \brief IPv6 dummy routing class (A) | 31 * \brief IPv6 dummy routing class (A) |
32 */ | 32 */ |
33 class Ipv6ARouting : public Ipv6RoutingProtocol { | 33 class Ipv6ARouting : public Ipv6RoutingProtocol { |
34 public: | 34 public: |
35 Ptr<Ipv6Route> RouteOutput (Ptr<Packet> p, const Ipv6Header &header, Ptr<NetDe
vice> oif, Socket::SocketErrno &sockerr) { NS_UNUSED(header); NS_UNUSED(sockerr)
; return 0; } | 35 Ptr<Ipv6Route> RouteOutput (Ptr<Packet> p, const Ipv6Header &header, Ptr<NetDe
vice> oif, Socket::SocketErrno &sockerr) { NS_UNUSED (header); NS_UNUSED (socker
r); return 0; } |
36 bool RouteInput (Ptr<const Packet> p, const Ipv6Header &header, Ptr<const Net
Device> idev, | 36 bool RouteInput (Ptr<const Packet> p, const Ipv6Header &header, Ptr<const Net
Device> idev, |
37 UnicastForwardCallback ucb, MulticastForwardCallback mcb, | 37 UnicastForwardCallback ucb, MulticastForwardCallback mcb, |
38 LocalDeliverCallback lcb, ErrorCallback ecb) { NS_UNUSED(hea
der); return false; } | 38 LocalDeliverCallback lcb, ErrorCallback ecb) { NS_UNUSED (he
ader); return false; } |
39 void NotifyInterfaceUp (uint32_t interface) {NS_UNUSED(interface);} | 39 void NotifyInterfaceUp (uint32_t interface) {NS_UNUSED (interface);} |
40 void NotifyInterfaceDown (uint32_t interface) {NS_UNUSED(interface);} | 40 void NotifyInterfaceDown (uint32_t interface) {NS_UNUSED (interface);} |
41 void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {NS_U
NUSED(interface);} | 41 void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {NS_U
NUSED (interface);} |
42 void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {N
S_UNUSED(interface);} | 42 void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {N
S_UNUSED (interface);} |
43 void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, ui
nt32_t interface, Ipv6Address prefixToUse = Ipv6Address:: | 43 void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, ui
nt32_t interface, Ipv6Address prefixToUse = Ipv6Address:: |
44 GetZero ()) {NS_UNUSED(interface);} | 44 GetZero ()) {NS_UNUSED (interface);} |
45 void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop,
uint32_t interface, Ipv6Address prefixToUse) {NS_UNUSED(interface);} | 45 void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop,
uint32_t interface, Ipv6Address prefixToUse) {NS_UNUSED (interface);} |
46 void SetIpv6 (Ptr<Ipv6> ipv6) {} | 46 void SetIpv6 (Ptr<Ipv6> ipv6) {} |
47 virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit un
it) const {NS_UNUSED(unit);}; | 47 virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit un
it) const {NS_UNUSED (unit);}; |
48 }; | 48 }; |
49 | 49 |
50 /** | 50 /** |
51 * \ingroup internet-test | 51 * \ingroup internet-test |
52 * \ingroup tests | 52 * \ingroup tests |
53 * | 53 * |
54 * \brief IPv6 dummy routing class (B) | 54 * \brief IPv6 dummy routing class (B) |
55 */ | 55 */ |
56 class Ipv6BRouting : public Ipv6RoutingProtocol { | 56 class Ipv6BRouting : public Ipv6RoutingProtocol { |
57 public: | 57 public: |
58 Ptr<Ipv6Route> RouteOutput (Ptr<Packet> p, const Ipv6Header &header, Ptr<NetDe
vice> oif, Socket::SocketErrno &sockerr) { NS_UNUSED(header); NS_UNUSED(sockerr)
; return 0; } | 58 Ptr<Ipv6Route> RouteOutput (Ptr<Packet> p, const Ipv6Header &header, Ptr<NetDe
vice> oif, Socket::SocketErrno &sockerr) { NS_UNUSED (header); NS_UNUSED (socker
r); return 0; } |
59 bool RouteInput (Ptr<const Packet> p, const Ipv6Header &header, Ptr<const Net
Device> idev, | 59 bool RouteInput (Ptr<const Packet> p, const Ipv6Header &header, Ptr<const Net
Device> idev, |
60 UnicastForwardCallback ucb, MulticastForwardCallback mcb, | 60 UnicastForwardCallback ucb, MulticastForwardCallback mcb, |
61 LocalDeliverCallback lcb, ErrorCallback ecb) { NS_UNUSED(hea
der); return false; } | 61 LocalDeliverCallback lcb, ErrorCallback ecb) { NS_UNUSED (he
ader); return false; } |
62 void NotifyInterfaceUp (uint32_t interface) {NS_UNUSED(interface);} | 62 void NotifyInterfaceUp (uint32_t interface) {NS_UNUSED (interface);} |
63 void NotifyInterfaceDown (uint32_t interface) {NS_UNUSED(interface);} | 63 void NotifyInterfaceDown (uint32_t interface) {NS_UNUSED (interface);} |
64 void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {NS_U
NUSED(interface);} | 64 void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address) {NS_U
NUSED (interface);} |
65 void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {N
S_UNUSED(interface);} | 65 void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address) {N
S_UNUSED (interface);} |
66 void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, ui
nt32_t interface, Ipv6Address prefixToUse = Ipv6Address:: | 66 void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, ui
nt32_t interface, Ipv6Address prefixToUse = Ipv6Address:: |
67 GetZero ()) {NS_UNUSED(interface);} | 67 GetZero ()) {NS_UNUSED (interface);} |
68 void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop,
uint32_t interface, Ipv6Address prefixToUse) {NS_UNUSED(interface);} | 68 void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop,
uint32_t interface, Ipv6Address prefixToUse) {NS_UNUSED (interface);} |
69 void SetIpv6 (Ptr<Ipv6> ipv6) {} | 69 void SetIpv6 (Ptr<Ipv6> ipv6) {} |
70 virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit un
it) const {NS_UNUSED(unit);}; | 70 virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream, Time::Unit un
it) const {NS_UNUSED (unit);}; |
71 }; | 71 }; |
72 | 72 |
73 /** | 73 /** |
74 * \ingroup internet-test | 74 * \ingroup internet-test |
75 * \ingroup tests | 75 * \ingroup tests |
76 * | 76 * |
77 * \brief IPv6 ListRouting negative test. | 77 * \brief IPv6 ListRouting negative test. |
78 */ | 78 */ |
79 class Ipv6ListRoutingNegativeTestCase : public TestCase | 79 class Ipv6ListRoutingNegativeTestCase : public TestCase |
80 { | 80 { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 Ipv6ListRoutingTestSuite() | 155 Ipv6ListRoutingTestSuite() |
156 : TestSuite ("ipv6-list-routing", UNIT) | 156 : TestSuite ("ipv6-list-routing", UNIT) |
157 { | 157 { |
158 AddTestCase (new Ipv6ListRoutingPositiveTestCase (), TestCase::QUICK); | 158 AddTestCase (new Ipv6ListRoutingPositiveTestCase (), TestCase::QUICK); |
159 AddTestCase (new Ipv6ListRoutingNegativeTestCase (), TestCase::QUICK); | 159 AddTestCase (new Ipv6ListRoutingNegativeTestCase (), TestCase::QUICK); |
160 } | 160 } |
161 | 161 |
162 }; | 162 }; |
163 | 163 |
164 static Ipv6ListRoutingTestSuite g_ipv6ListRoutingTestSuite; //!< Static variable
for test initialization | 164 static Ipv6ListRoutingTestSuite g_ipv6ListRoutingTestSuite; //!< Static variable
for test initialization |
LEFT | RIGHT |