src/aodv/model/aodv-routing-protocol.h
author Tom Henderson <tomh@tomh.org>
Thu, 19 Mar 2015 20:03:57 -0700
changeset 11250 06390d19e6f9
parent 11003 30d3254bd18a
permissions -rw-r--r--
bug 1982: AODV uses random variables before seeds can be set
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     2
/*
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     3
 * Copyright (c) 2009 IITP RAS
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     4
 *
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     8
 *
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    12
 * GNU General Public License for more details.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    13
 *
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    17
 *
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    18
 * Based on 
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    19
 *      NS-2 AODV model developed by the CMU/MONARCH group and optimized and
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    20
 *      tuned by Samir Das and Mahesh Marina, University of Cincinnati;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    21
 * 
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    22
 *      AODV-UU implementation by Erik Nordström of Uppsala University
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    23
 *      http://core.it.uu.se/core/index.php/AODV-UU
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    24
 *
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    25
 * Authors: Elena Buchatskaia <borovkovaes@iitp.ru>
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    26
 *          Pavel Boyko <boyko@iitp.ru>
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    27
 */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    28
#ifndef AODVROUTINGPROTOCOL_H
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    29
#define AODVROUTINGPROTOCOL_H
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    30
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    31
#include "aodv-rtable.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    32
#include "aodv-rqueue.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    33
#include "aodv-packet.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    34
#include "aodv-neighbor.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    35
#include "aodv-dpd.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    36
#include "ns3/node.h"
8965
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    37
#include "ns3/random-variable-stream.h"
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    38
#include "ns3/output-stream-wrapper.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    39
#include "ns3/ipv4-routing-protocol.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    40
#include "ns3/ipv4-interface.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    41
#include "ns3/ipv4-l3-protocol.h"
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    42
#include <map>
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    43
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    44
namespace ns3
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    45
{
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    46
namespace aodv
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    47
{
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    48
/**
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    49
 * \ingroup aodv
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    50
 * 
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    51
 * \brief AODV routing protocol
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    52
 */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    53
class RoutingProtocol : public Ipv4RoutingProtocol
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    54
{
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    55
public:
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    56
  static TypeId GetTypeId (void);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    57
  static const uint32_t AODV_PORT;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    58
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    59
  /// c-tor
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    60
  RoutingProtocol ();
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    61
  virtual ~RoutingProtocol();
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    62
  virtual void DoDispose ();
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    63
11003
30d3254bd18a [Doxygen] Remove more trivial and/or misused groupings
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10949
diff changeset
    64
  // Inherited from Ipv4RoutingProtocol
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    65
  Ptr<Ipv4Route> RouteOutput (Ptr<Packet> p, const Ipv4Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    66
  bool RouteInput (Ptr<const Packet> p, const Ipv4Header &header, Ptr<const NetDevice> idev,
7165
7f8040a1d8bc aodv coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7159
diff changeset
    67
                   UnicastForwardCallback ucb, MulticastForwardCallback mcb,
7f8040a1d8bc aodv coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7159
diff changeset
    68
                   LocalDeliverCallback lcb, ErrorCallback ecb);
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    69
  virtual void NotifyInterfaceUp (uint32_t interface);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    70
  virtual void NotifyInterfaceDown (uint32_t interface);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    71
  virtual void NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    72
  virtual void NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    73
  virtual void SetIpv4 (Ptr<Ipv4> ipv4);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    74
  virtual void PrintRoutingTable (Ptr<OutputStreamWrapper> stream) const;
7165
7f8040a1d8bc aodv coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7159
diff changeset
    75
11003
30d3254bd18a [Doxygen] Remove more trivial and/or misused groupings
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10949
diff changeset
    76
  // Handle protocol parameters
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    77
  Time GetMaxQueueTime () const { return MaxQueueTime; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    78
  void SetMaxQueueTime (Time t);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    79
  uint32_t GetMaxQueueLen () const { return MaxQueueLen; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    80
  void SetMaxQueueLen (uint32_t len);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    81
  bool GetDesinationOnlyFlag () const { return DestinationOnly; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    82
  void SetDesinationOnlyFlag (bool f) { DestinationOnly = f; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    83
  bool GetGratuitousReplyFlag () const { return GratuitousReply; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    84
  void SetGratuitousReplyFlag (bool f) { GratuitousReply = f; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    85
  void SetHelloEnable (bool f) { EnableHello = f; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    86
  bool GetHelloEnable () const { return EnableHello; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    87
  void SetBroadcastEnable (bool f) { EnableBroadcast = f; }
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
    88
  bool GetBroadcastEnable () const { return EnableBroadcast; }
8965
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    89
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    90
 /**
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    91
  * Assign a fixed random variable stream number to the random variables
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    92
  * used by this model.  Return the number of streams (possibly zero) that
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    93
  * have been assigned.
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    94
  *
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    95
  * \param stream first stream index to use
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    96
  * \return the number of stream indices assigned by this model
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    97
  */
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    98
  int64_t AssignStreams (int64_t stream);
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
    99
11250
06390d19e6f9 bug 1982: AODV uses random variables before seeds can be set
Tom Henderson <tomh@tomh.org>
parents: 11003
diff changeset
   100
protected:
06390d19e6f9 bug 1982: AODV uses random variables before seeds can be set
Tom Henderson <tomh@tomh.org>
parents: 11003
diff changeset
   101
  virtual void DoInitialize (void);
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   102
private:
11003
30d3254bd18a [Doxygen] Remove more trivial and/or misused groupings
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10949
diff changeset
   103
  
30d3254bd18a [Doxygen] Remove more trivial and/or misused groupings
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10949
diff changeset
   104
  // Protocol parameters.
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   105
  uint32_t RreqRetries;             ///< Maximum number of retransmissions of RREQ with TTL = NetDiameter to discover a route
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   106
  uint16_t RreqRateLimit;           ///< Maximum number of RREQ per second.
7159
009cd4e1b486 bug 1042: AODV RERR implosion (missing RERR_RATELIMIT)
Elena Buchatskaya <sunnmy@iitp.ru>
parents: 6852
diff changeset
   107
  uint16_t RerrRateLimit;           ///< Maximum number of REER per second.
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   108
  Time ActiveRouteTimeout;          ///< Period of time during which the route is considered to be valid.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   109
  uint32_t NetDiameter;             ///< Net diameter measures the maximum possible number of hops between two nodes in the network
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   110
  /**
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   111
   *  NodeTraversalTime is a conservative estimate of the average one hop traversal time for packets
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   112
   *  and should include queuing delays, interrupt processing times and transfer times.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   113
   */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   114
  Time NodeTraversalTime;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   115
  Time NetTraversalTime;             ///< Estimate of the average net traversal time.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   116
  Time PathDiscoveryTime;            ///< Estimate of maximum time needed to find route in network.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   117
  Time MyRouteTimeout;               ///< Value of lifetime field in RREP generating by this node.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   118
  /**
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   119
   * Every HelloInterval the node checks whether it has sent a broadcast  within the last HelloInterval.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   120
   * If it has not, it MAY broadcast a  Hello message
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   121
   */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   122
  Time HelloInterval;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   123
  uint32_t AllowedHelloLoss;         ///< Number of hello messages which may be loss for valid link
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   124
  /**
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   125
   * DeletePeriod is intended to provide an upper bound on the time for which an upstream node A
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   126
   * can have a neighbor B as an active next hop for destination D, while B has invalidated the route to D.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   127
   */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   128
  Time DeletePeriod;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   129
  Time NextHopWait;                  ///< Period of our waiting for the neighbour's RREP_ACK
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   130
  Time BlackListTimeout;             ///< Time for which the node is put into the blacklist
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   131
  uint32_t MaxQueueLen;              ///< The maximum number of packets that we allow a routing protocol to buffer.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   132
  Time MaxQueueTime;                 ///< The maximum period of time that a routing protocol is allowed to buffer a packet for.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   133
  bool DestinationOnly;              ///< Indicates only the destination may respond to this RREQ.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   134
  bool GratuitousReply;              ///< Indicates whether a gratuitous RREP should be unicast to the node originated route discovery.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   135
  bool EnableHello;                  ///< Indicates whether a hello messages enable
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   136
  bool EnableBroadcast;              ///< Indicates whether a a broadcast data packets forwarding enable
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   137
  //\}
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   138
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   139
  /// IP protocol
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   140
  Ptr<Ipv4> m_ipv4;
10949
751e327b3632 Bug 1911 - AODV can not work on nodes with more than one NetDevice
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10218
diff changeset
   141
  /// Raw unicast socket per each IP interface, map socket -> iface address (IP + mask)
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   142
  std::map< Ptr<Socket>, Ipv4InterfaceAddress > m_socketAddresses;
10949
751e327b3632 Bug 1911 - AODV can not work on nodes with more than one NetDevice
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10218
diff changeset
   143
  /// Raw subnet directed broadcast socket per each IP interface, map socket -> iface address (IP + mask)
751e327b3632 Bug 1911 - AODV can not work on nodes with more than one NetDevice
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10218
diff changeset
   144
  std::map< Ptr<Socket>, Ipv4InterfaceAddress > m_socketSubnetBroadcastAddresses;
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   145
  /// Loopback device used to defer RREQ until packet will be fully formed
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   146
  Ptr<NetDevice> m_lo; 
7165
7f8040a1d8bc aodv coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7159
diff changeset
   147
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   148
  /// Routing table
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   149
  RoutingTable m_routingTable;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   150
  /// A "drop-front" queue used by the routing layer to buffer packets to which it does not have a route.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   151
  RequestQueue m_queue;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   152
  /// Broadcast ID
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   153
  uint32_t m_requestId;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   154
  /// Request sequence number
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   155
  uint32_t m_seqNo;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   156
  /// Handle duplicated RREQ
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   157
  IdCache m_rreqIdCache;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   158
  /// Handle duplicated broadcast/multicast packets
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   159
  DuplicatePacketDetection m_dpd;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   160
  /// Handle neighbors
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   161
  Neighbors m_nb;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   162
  /// Number of RREQs used for RREQ rate control
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   163
  uint16_t m_rreqCount;
7159
009cd4e1b486 bug 1042: AODV RERR implosion (missing RERR_RATELIMIT)
Elena Buchatskaya <sunnmy@iitp.ru>
parents: 6852
diff changeset
   164
  /// Number of RERRs used for RERR rate control
009cd4e1b486 bug 1042: AODV RERR implosion (missing RERR_RATELIMIT)
Elena Buchatskaya <sunnmy@iitp.ru>
parents: 6852
diff changeset
   165
  uint16_t m_rerrCount;
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   166
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   167
private:
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   168
  /// Start protocol operation
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   169
  void Start ();
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   170
  /// Queue packet and send route request
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   171
  void DeferredRouteOutput (Ptr<const Packet> p, const Ipv4Header & header, UnicastForwardCallback ucb, ErrorCallback ecb);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   172
  /// If route exists and valid, forward packet.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   173
  bool Forwarding (Ptr<const Packet> p, const Ipv4Header & header, UnicastForwardCallback ucb, ErrorCallback ecb);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   174
  /**
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   175
  * To reduce congestion in a network, repeated attempts by a source node at route discovery
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   176
  * for a single destination MUST utilize a binary exponential backoff.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   177
  */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   178
  void ScheduleRreqRetry (Ipv4Address dst);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   179
  /**
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   180
   * Set lifetime field in routing table entry to the maximum of existing lifetime and lt, if the entry exists
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   181
   * \param addr - destination address
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   182
   * \param lt - proposed time for lifetime field in routing table entry for destination with address addr.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   183
   * \return true if route to destination address addr exist
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   184
   */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   185
  bool UpdateRouteLifeTime (Ipv4Address addr, Time lt);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   186
  /**
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   187
   * Update neighbor record.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   188
   * \param receiver is supposed to be my interface
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   189
   * \param sender is supposed to be IP address of my neighbor.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   190
   */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   191
  void UpdateRouteToNeighbor (Ipv4Address sender, Ipv4Address receiver);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   192
  /// Check that packet is send from own interface
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   193
  bool IsMyOwnAddress (Ipv4Address src);
10949
751e327b3632 Bug 1911 - AODV can not work on nodes with more than one NetDevice
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10218
diff changeset
   194
  /// Find unicast socket with local interface address iface
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   195
  Ptr<Socket> FindSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const;
10949
751e327b3632 Bug 1911 - AODV can not work on nodes with more than one NetDevice
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10218
diff changeset
   196
  /// Find subnet directed broadcast socket with local interface address iface
751e327b3632 Bug 1911 - AODV can not work on nodes with more than one NetDevice
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10218
diff changeset
   197
  Ptr<Socket> FindSubnetBroadcastSocketWithInterfaceAddress (Ipv4InterfaceAddress iface) const;
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   198
  /// Process hello message
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   199
  void ProcessHello (RrepHeader const & rrepHeader, Ipv4Address receiverIfaceAddr);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   200
  /// Create loopback route for given header
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   201
  Ptr<Ipv4Route> LoopbackRoute (const Ipv4Header & header, Ptr<NetDevice> oif) const;
7165
7f8040a1d8bc aodv coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7159
diff changeset
   202
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   203
  ///\name Receive control packets
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   204
  //\{
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   205
  /// Receive and process control packet
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   206
  void RecvAodv (Ptr<Socket> socket);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   207
  /// Receive RREQ
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   208
  void RecvRequest (Ptr<Packet> p, Ipv4Address receiver, Ipv4Address src);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   209
  /// Receive RREP
7165
7f8040a1d8bc aodv coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7159
diff changeset
   210
  void RecvReply (Ptr<Packet> p, Ipv4Address my,Ipv4Address src);
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   211
  /// Receive RREP_ACK
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   212
  void RecvReplyAck (Ipv4Address neighbor);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   213
  /// Receive RERR from node with address src
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   214
  void RecvError (Ptr<Packet> p, Ipv4Address src);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   215
  //\}
7165
7f8040a1d8bc aodv coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7159
diff changeset
   216
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   217
  ///\name Send
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   218
  //\{
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   219
  /// Forward packet from route request queue
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   220
  void SendPacketFromQueue (Ipv4Address dst, Ptr<Ipv4Route> route);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   221
  /// Send hello
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   222
  void SendHello ();
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   223
  /// Send RREQ
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   224
  void SendRequest (Ipv4Address dst);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   225
  /// Send RREP
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   226
  void SendReply (RreqHeader const & rreqHeader, RoutingTableEntry const & toOrigin);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   227
  /** Send RREP by intermediate node
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   228
   * \param toDst routing table entry to destination
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   229
   * \param toOrigin routing table entry to originator
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   230
   * \param gratRep indicates whether a gratuitous RREP should be unicast to destination
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   231
   */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   232
  void SendReplyByIntermediateNode (RoutingTableEntry & toDst, RoutingTableEntry & toOrigin, bool gratRep);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   233
  /// Send RREP_ACK
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   234
  void SendReplyAck (Ipv4Address neighbor);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   235
  /// Initiate RERR
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   236
  void SendRerrWhenBreaksLinkToNextHop (Ipv4Address nextHop);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   237
  /// Forward RERR
7256
b04ba6772f8c rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents: 7165
diff changeset
   238
  void SendRerrMessage (Ptr<Packet> packet,  std::vector<Ipv4Address> precursors);
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   239
  /**
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   240
   * Send RERR message when no route to forward input packet. Unicast if there is reverse route to originating node, broadcast otherwise.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   241
   * \param dst - destination node IP address
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   242
   * \param dstSeqNo - destination node sequence number
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   243
   * \param origin - originating node IP address
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   244
   */
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   245
  void SendRerrWhenNoRouteToForward (Ipv4Address dst, uint32_t dstSeqNo, Ipv4Address origin);
11003
30d3254bd18a [Doxygen] Remove more trivial and/or misused groupings
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents: 10949
diff changeset
   246
  /// @}
7165
7f8040a1d8bc aodv coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 7159
diff changeset
   247
10149
03e018548f7a Bug 1190 - Suppress hello if bcast was sent within the last hello interval
John Abraham <john.abraham.in@gmail.com>
parents: 8965
diff changeset
   248
  void SendTo (Ptr<Socket> socket, Ptr<Packet> packet, Ipv4Address destination);
03e018548f7a Bug 1190 - Suppress hello if bcast was sent within the last hello interval
John Abraham <john.abraham.in@gmail.com>
parents: 8965
diff changeset
   249
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   250
  /// Hello timer
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   251
  Timer m_htimer;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   252
  /// Schedule next send of hello message
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   253
  void HelloTimerExpire ();
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   254
  /// RREQ rate limit timer
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   255
  Timer m_rreqRateLimitTimer;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   256
  /// Reset RREQ count and schedule RREQ rate limit timer with delay 1 sec.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   257
  void RreqRateLimitTimerExpire ();
7159
009cd4e1b486 bug 1042: AODV RERR implosion (missing RERR_RATELIMIT)
Elena Buchatskaya <sunnmy@iitp.ru>
parents: 6852
diff changeset
   258
  /// RERR rate limit timer
009cd4e1b486 bug 1042: AODV RERR implosion (missing RERR_RATELIMIT)
Elena Buchatskaya <sunnmy@iitp.ru>
parents: 6852
diff changeset
   259
  Timer m_rerrRateLimitTimer;
009cd4e1b486 bug 1042: AODV RERR implosion (missing RERR_RATELIMIT)
Elena Buchatskaya <sunnmy@iitp.ru>
parents: 6852
diff changeset
   260
  /// Reset RERR count and schedule RERR rate limit timer with delay 1 sec.
009cd4e1b486 bug 1042: AODV RERR implosion (missing RERR_RATELIMIT)
Elena Buchatskaya <sunnmy@iitp.ru>
parents: 6852
diff changeset
   261
  void RerrRateLimitTimerExpire ();
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   262
  /// Map IP address + RREQ timer.
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   263
  std::map<Ipv4Address, Timer> m_addressReqTimer;
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   264
  /// Handle route discovery process
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   265
  void RouteRequestTimerExpire (Ipv4Address dst);
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   266
  /// Mark link to neighbor node as unidirectional for blacklistTimeout
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   267
  void AckTimerExpire (Ipv4Address neighbor,  Time blacklistTimeout);
8965
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
   268
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
   269
  /// Provides uniform random variables.
cfed4f87e003 eplace src/application usage of RandomVariable with RandomVariableStream
Mitch Watrous
parents: 7256
diff changeset
   270
  Ptr<UniformRandomVariable> m_uniformRandomVariable;  
10149
03e018548f7a Bug 1190 - Suppress hello if bcast was sent within the last hello interval
John Abraham <john.abraham.in@gmail.com>
parents: 8965
diff changeset
   271
  /// Keep track of the last bcast time
03e018548f7a Bug 1190 - Suppress hello if bcast was sent within the last hello interval
John Abraham <john.abraham.in@gmail.com>
parents: 8965
diff changeset
   272
  Time m_lastBcastTime;
6841
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   273
};
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   274
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   275
}
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   276
}
174e599d1003 modularize nix and aodv, thanks lalith
Josh Pelkey <jpelkey@gatech.edu>
parents:
diff changeset
   277
#endif /* AODVROUTINGPROTOCOL_H */