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) 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 10 matching lines...) Expand all Loading... |
21 */ | 21 */ |
22 | 22 |
23 #include "aodv-dpd.h" | 23 #include "aodv-dpd.h" |
24 | 24 |
25 namespace ns3 { | 25 namespace ns3 { |
26 namespace aodv { | 26 namespace aodv { |
27 | 27 |
28 bool | 28 bool |
29 DuplicatePacketDetection::IsDuplicate (Ptr<const Packet> p, const Ipv4Header &
header) | 29 DuplicatePacketDetection::IsDuplicate (Ptr<const Packet> p, const Ipv4Header &
header) |
30 { | 30 { |
31 return m_idCache.IsDuplicate (header.GetSource (), static_cast<uint32_t>(p->Ge
tUid ()) ); | 31 return m_idCache.IsDuplicate (header.GetSource (), static_cast<uint32_t> (p->G
etUid ()) ); |
32 } | 32 } |
33 void | 33 void |
34 DuplicatePacketDetection::SetLifetime (Time lifetime) | 34 DuplicatePacketDetection::SetLifetime (Time lifetime) |
35 { | 35 { |
36 m_idCache.SetLifetime (lifetime); | 36 m_idCache.SetLifetime (lifetime); |
37 } | 37 } |
38 | 38 |
39 Time | 39 Time |
40 DuplicatePacketDetection::GetLifetime () const | 40 DuplicatePacketDetection::GetLifetime () const |
41 { | 41 { |
42 return m_idCache.GetLifeTime (); | 42 return m_idCache.GetLifeTime (); |
43 } | 43 } |
44 | 44 |
45 | 45 |
46 } | 46 } |
47 } | 47 } |
48 | 48 |
LEFT | RIGHT |