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) 2006 Georgia Tech Research Corporation | 3 // Copyright (c) 2006 Georgia Tech Research Corporation |
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, | 143 *route = Ipv4RoutingTableEntry::CreateNetworkRouteTo (network, |
144 networkMask, | 144 networkMask, |
145 outputInterface); | 145 outputInterface); |
146 m_networkRoutes.push_back (make_pair (route,0)); | 146 m_networkRoutes.push_back (make_pair (route,0)); |
147 } | 147 } |
148 | 148 |
149 uint32_t· | 149 uint32_t· |
150 Ipv4StaticRouting::GetNMulticastRoutes (void) const | 150 Ipv4StaticRouting::GetNMulticastRoutes (void) const |
151 { | 151 { |
152 NS_LOG_FUNCTION (this); | 152 NS_LOG_FUNCTION (this); |
153 return m_multicastRoutes.size (); | 153 return static_cast<uint32_t> (m_multicastRoutes.size ()); |
154 } | 154 } |
155 | 155 |
156 Ipv4MulticastRoutingTableEntry | 156 Ipv4MulticastRoutingTableEntry |
157 Ipv4StaticRouting::GetMulticastRoute (uint32_t index) const | 157 Ipv4StaticRouting::GetMulticastRoute (uint32_t index) const |
158 { | 158 { |
159 NS_LOG_FUNCTION (this << index); | 159 NS_LOG_FUNCTION (this << index); |
160 NS_ASSERT_MSG (index < m_multicastRoutes.size (), | 160 NS_ASSERT_MSG (index < m_multicastRoutes.size (), |
161 "Ipv4StaticRouting::GetMulticastRoute (): Index out of range")
; | 161 "Ipv4StaticRouting::GetMulticastRoute (): Index out of range")
; |
162 | 162 |
163 if (index < m_multicastRoutes.size ()) | 163 if (index < m_multicastRoutes.size ()) |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 } | 350 } |
351 } | 351 } |
352 } | 352 } |
353 return mrtentry; | 353 return mrtentry; |
354 } | 354 } |
355 | 355 |
356 uint32_t· | 356 uint32_t· |
357 Ipv4StaticRouting::GetNRoutes (void) const | 357 Ipv4StaticRouting::GetNRoutes (void) const |
358 { | 358 { |
359 NS_LOG_FUNCTION (this); | 359 NS_LOG_FUNCTION (this); |
360 return m_networkRoutes.size ();; | 360 return static_cast<uint32_t> (m_networkRoutes.size ()); |
361 } | 361 } |
362 | 362 |
363 Ipv4RoutingTableEntry | 363 Ipv4RoutingTableEntry |
364 Ipv4StaticRouting::GetDefaultRoute () | 364 Ipv4StaticRouting::GetDefaultRoute () |
365 { | 365 { |
366 NS_LOG_FUNCTION (this); | 366 NS_LOG_FUNCTION (this); |
367 // Basically a repeat of LookupStatic, retained for backward compatibility | 367 // Basically a repeat of LookupStatic, retained for backward compatibility |
368 Ipv4Address dest ("0.0.0.0"); | 368 Ipv4Address dest ("0.0.0.0"); |
369 uint32_t shortest_metric = 0xffffffff; | 369 uint32_t shortest_metric = 0xffffffff; |
370 Ipv4RoutingTableEntry *result = 0; | 370 Ipv4RoutingTableEntry *result = 0; |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 { | 736 { |
737 *os << route.GetInterface (); | 737 *os << route.GetInterface (); |
738 } | 738 } |
739 *os << std::endl; | 739 *os << std::endl; |
740 } | 740 } |
741 } | 741 } |
742 *os << std::endl; | 742 *os << std::endl; |
743 } | 743 } |
744 | 744 |
745 } // namespace ns3 | 745 } // namespace ns3 |
LEFT | RIGHT |