LEFT | RIGHT |
(no file at all) | |
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) 2007-2009 Strasbourg University | 3 * Copyright (c) 2007-2009 Strasbourg University |
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 Ipv6RoutingTableEntry *route = new Ipv6RoutingTableEntry (); | 195 Ipv6RoutingTableEntry *route = new Ipv6RoutingTableEntry (); |
196 Ipv6Address network = Ipv6Address ("ff00::"); /* RFC 3513 */ | 196 Ipv6Address network = Ipv6Address ("ff00::"); /* RFC 3513 */ |
197 Ipv6Prefix networkMask = Ipv6Prefix (8); | 197 Ipv6Prefix networkMask = Ipv6Prefix (8); |
198 *route = Ipv6RoutingTableEntry::CreateNetworkRouteTo (network, networkMask, ou
tputInterface); | 198 *route = Ipv6RoutingTableEntry::CreateNetworkRouteTo (network, networkMask, ou
tputInterface); |
199 m_networkRoutes.push_back (std::make_pair (route, 0)); | 199 m_networkRoutes.push_back (std::make_pair (route, 0)); |
200 } | 200 } |
201 | 201 |
202 uint32_t Ipv6StaticRouting::GetNMulticastRoutes () const | 202 uint32_t Ipv6StaticRouting::GetNMulticastRoutes () const |
203 { | 203 { |
204 NS_LOG_FUNCTION_NOARGS (); | 204 NS_LOG_FUNCTION_NOARGS (); |
205 return m_multicastRoutes.size (); | 205 return static_cast<uint32_t> (m_multicastRoutes.size ()); |
206 } | 206 } |
207 | 207 |
208 Ipv6MulticastRoutingTableEntry Ipv6StaticRouting::GetMulticastRoute (uint32_t in
dex) const | 208 Ipv6MulticastRoutingTableEntry Ipv6StaticRouting::GetMulticastRoute (uint32_t in
dex) const |
209 { | 209 { |
210 NS_LOG_FUNCTION (this << index); | 210 NS_LOG_FUNCTION (this << index); |
211 NS_ASSERT_MSG (index < m_multicastRoutes.size (), "Ipv6StaticRouting::GetMulti
castRoute () : Index out of range"); | 211 NS_ASSERT_MSG (index < m_multicastRoutes.size (), "Ipv6StaticRouting::GetMulti
castRoute () : Index out of range"); |
212 | 212 |
213 if (index < m_multicastRoutes.size ()) | 213 if (index < m_multicastRoutes.size ()) |
214 { | 214 { |
215 uint32_t tmp = 0; | 215 uint32_t tmp = 0; |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 } | 435 } |
436 return mrtentry; | 436 return mrtentry; |
437 } | 437 } |
438 } | 438 } |
439 } | 439 } |
440 return mrtentry; | 440 return mrtentry; |
441 } | 441 } |
442 | 442 |
443 uint32_t Ipv6StaticRouting::GetNRoutes () const | 443 uint32_t Ipv6StaticRouting::GetNRoutes () const |
444 { | 444 { |
445 return m_networkRoutes.size (); | 445 return static_cast<uint32_t> (m_networkRoutes.size ()); |
446 } | 446 } |
447 | 447 |
448 Ipv6RoutingTableEntry Ipv6StaticRouting::GetDefaultRoute () | 448 Ipv6RoutingTableEntry Ipv6StaticRouting::GetDefaultRoute () |
449 { | 449 { |
450 NS_LOG_FUNCTION_NOARGS (); | 450 NS_LOG_FUNCTION_NOARGS (); |
451 Ipv6Address dst ("::"); | 451 Ipv6Address dst ("::"); |
452 uint32_t shortestMetric = 0xffffffff; | 452 uint32_t shortestMetric = 0xffffffff; |
453 Ipv6RoutingTableEntry* result = 0; | 453 Ipv6RoutingTableEntry* result = 0; |
454 | 454 |
455 for (NetworkRoutesI it = m_networkRoutes.begin (); it != m_networkRoutes.end (
); it++) | 455 for (NetworkRoutesI it = m_networkRoutes.begin (); it != m_networkRoutes.end (
); it++) |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 } | 772 } |
773 else | 773 else |
774 { | 774 { |
775 /* default route case */ | 775 /* default route case */ |
776 RemoveRoute (dst, mask, interface, prefixToUse); | 776 RemoveRoute (dst, mask, interface, prefixToUse); |
777 } | 777 } |
778 } | 778 } |
779 | 779 |
780 } /* namespace ns3 */ | 780 } /* namespace ns3 */ |
781 | 781 |
LEFT | RIGHT |