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) 2009 IITP RAS | 3 * Copyright (c) 2009 IITP RAS |
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 * \param addr the IP address | 55 * \param addr the IP address |
56 * \param id the cache entry ID | 56 * \param id the cache entry ID |
57 * \returns true if the pair exists | 57 * \returns true if the pair exists |
58 */· | 58 */· |
59 bool IsDuplicate (Ipv4Address addr, uint32_t id); | 59 bool IsDuplicate (Ipv4Address addr, uint32_t id); |
60 /// Remove all expired entries | 60 /// Remove all expired entries |
61 void Purge (); | 61 void Purge (); |
62 /** | 62 /** |
63 * \returns number of entries in cache | 63 * \returns number of entries in cache |
64 */ | 64 */ |
65 uint32_t GetSize (); | 65 std::size_t GetSize (); |
66 /** | 66 /** |
67 * Set lifetime for future added entries. | 67 * Set lifetime for future added entries. |
68 * \param lifetime the lifetime for entries | 68 * \param lifetime the lifetime for entries |
69 */ | 69 */ |
70 void SetLifetime (Time lifetime) | 70 void SetLifetime (Time lifetime) |
71 { | 71 { |
72 m_lifetime = lifetime; | 72 m_lifetime = lifetime; |
73 } | 73 } |
74 /** | 74 /** |
75 * Return lifetime for existing entries in cache | 75 * Return lifetime for existing entries in cache |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 /// Already seen IDs | 109 /// Already seen IDs |
110 std::vector<UniqueId> m_idCache; | 110 std::vector<UniqueId> m_idCache; |
111 /// Default lifetime for ID records | 111 /// Default lifetime for ID records |
112 Time m_lifetime; | 112 Time m_lifetime; |
113 }; | 113 }; |
114 | 114 |
115 } // namespace aodv | 115 } // namespace aodv |
116 } // namespace ns3 | 116 } // namespace ns3 |
117 | 117 |
118 #endif /* AODV_ID_CACHE_H */ | 118 #endif /* AODV_ID_CACHE_H */ |
LEFT | RIGHT |