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) 2011 Yufei Cheng | 3 * Copyright (c) 2011 Yufei Cheng |
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 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1065 NS_LOG_LOGIC ("Ack id for " << nextHop << " found in the cache has value "
<< ackId); | 1065 NS_LOG_LOGIC ("Ack id for " << nextHop << " found in the cache has value "
<< ackId); |
1066 ackId++; | 1066 ackId++; |
1067 m_ackIdCache[nextHop] = ackId; | 1067 m_ackIdCache[nextHop] = ackId; |
1068 return ackId; | 1068 return ackId; |
1069 } | 1069 } |
1070 } | 1070 } |
1071 | 1071 |
1072 uint16_t | 1072 uint16_t |
1073 DsrRouteCache::GetAckSize () | 1073 DsrRouteCache::GetAckSize () |
1074 { | 1074 { |
1075 return static_cast<uint16_t>(m_ackIdCache.size ()); | 1075 return static_cast<uint16_t> (m_ackIdCache.size ()); |
1076 } | 1076 } |
1077 | 1077 |
1078 // -----------------------------------------------------------------------------
----------------------------- | 1078 // -----------------------------------------------------------------------------
----------------------------- |
1079 /** | 1079 /** |
1080 * This part maintains a neighbor list to handle unidirectional links and link-l
ayer acks | 1080 * This part maintains a neighbor list to handle unidirectional links and link-l
ayer acks |
1081 */ | 1081 */ |
1082 bool | 1082 bool |
1083 DsrRouteCache::IsNeighbor (Ipv4Address addr) | 1083 DsrRouteCache::IsNeighbor (Ipv4Address addr) |
1084 { | 1084 { |
1085 NS_LOG_FUNCTION (this); | 1085 NS_LOG_FUNCTION (this); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1247 { | 1247 { |
1248 if (i->m_hardwareAddress == addr) | 1248 if (i->m_hardwareAddress == addr) |
1249 { | 1249 { |
1250 i->close = true; | 1250 i->close = true; |
1251 } | 1251 } |
1252 } | 1252 } |
1253 PurgeMac (); | 1253 PurgeMac (); |
1254 } | 1254 } |
1255 } // namespace dsr | 1255 } // namespace dsr |
1256 } // namespace ns3 | 1256 } // namespace ns3 |
LEFT | RIGHT |