A Discrete-Event Network Simulator
API
aodv-dpd.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 IITP RAS
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  *
18  * Authors: Elena Buchatskaia <borovkovaes@iitp.ru>
19  * Pavel Boyko <boyko@iitp.ru>
20  */
21 
22 #ifndef AODV_DPD_H
23 #define AODV_DPD_H
24 
25 #include "aodv-id-cache.h"
26 
27 #include "ns3/ipv4-header.h"
28 #include "ns3/nstime.h"
29 #include "ns3/packet.h"
30 
31 namespace ns3
32 {
33 namespace aodv
34 {
45 {
46  public:
52  : m_idCache(lifetime)
53  {
54  }
55 
62  bool IsDuplicate(Ptr<const Packet> p, const Ipv4Header& header);
67  void SetLifetime(Time lifetime);
72  Time GetLifetime() const;
73 
74  private:
77 };
78 
79 } // namespace aodv
80 } // namespace ns3
81 
82 #endif /* AODV_DPD_H */
Packet header for IPv4.
Definition: ipv4-header.h:34
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
Helper class used to remember already seen packets and detect duplicates.
Definition: aodv-dpd.h:45
DuplicatePacketDetection(Time lifetime)
Constructor.
Definition: aodv-dpd.h:51
Time GetLifetime() const
Get duplicate record lifetime.
Definition: aodv-dpd.cc:42
bool IsDuplicate(Ptr< const Packet > p, const Ipv4Header &header)
Check if the packet is a duplicate.
Definition: aodv-dpd.cc:30
void SetLifetime(Time lifetime)
Set duplicate record lifetime.
Definition: aodv-dpd.cc:36
Unique packets identification cache used for simple duplicate detection.
Definition: aodv-id-cache.h:46
Every class exported by the ns3 library is enclosed in the ns3 namespace.