OLD | NEW |
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 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 if (it->second > fragmentOffset) | 1321 if (it->second > fragmentOffset) |
1322 { | 1322 { |
1323 break; | 1323 break; |
1324 } | 1324 } |
1325 } | 1325 } |
1326 | 1326 |
1327 if (it == m_fragments.end ()) | 1327 if (it == m_fragments.end ()) |
1328 { | 1328 { |
1329 m_moreFragment = moreFragment; | 1329 m_moreFragment = moreFragment; |
1330 } | 1330 } |
1331 | 1331 #ifndef WIN32 |
1332 m_fragments.insert (it, std::make_pair<Ptr<Packet>, uint16_t> (fragment, fragm
entOffset)); | 1332 m_fragments.insert (it, std::make_pair<Ptr<Packet>, uint16_t> (fragment, fragm
entOffset)); |
| 1333 #else |
| 1334 m_fragments.insert (it, std::make_pair (fragment, fragmentOffset)); |
| 1335 #endif |
1333 } | 1336 } |
1334 | 1337 |
1335 bool | 1338 bool |
1336 Ipv4L3Protocol::Fragments::IsEntire () const | 1339 Ipv4L3Protocol::Fragments::IsEntire () const |
1337 { | 1340 { |
1338 NS_LOG_FUNCTION (this); | 1341 NS_LOG_FUNCTION (this); |
1339 | 1342 |
1340 bool ret = !m_moreFragment && m_fragments.size () > 0; | 1343 bool ret = !m_moreFragment && m_fragments.size () > 0; |
1341 | 1344 |
1342 if (ret) | 1345 if (ret) |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1451 m_dropTrace (ipHeader, packet, DROP_FRAGMENT_TIMEOUT, m_node->GetObject<Ipv4>
(), iif); | 1454 m_dropTrace (ipHeader, packet, DROP_FRAGMENT_TIMEOUT, m_node->GetObject<Ipv4>
(), iif); |
1452 | 1455 |
1453 // clear the buffers | 1456 // clear the buffers |
1454 it->second = 0; | 1457 it->second = 0; |
1455 | 1458 |
1456 m_fragments.erase (key); | 1459 m_fragments.erase (key); |
1457 m_fragmentsTimers.erase (key); | 1460 m_fragmentsTimers.erase (key); |
1458 } | 1461 } |
1459 | 1462 |
1460 } // namespace ns3 | 1463 } // namespace ns3 |
OLD | NEW |