A Discrete-Event Network Simulator
API
ipv6-flow-probe.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 //
3 // Copyright (c) 2009 INESC Porto
4 //
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
7 // published by the Free Software Foundation;
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 //
18 // Author: Gustavo J. A. M. Carneiro <gjc@inescporto.pt> <gjcarneiro@gmail.com>
19 // Modifications: Tommaso Pecorella <tommaso.pecorella@unifi.it>
20 //
21 
22 #ifndef IPV6_FLOW_PROBE_H
23 #define IPV6_FLOW_PROBE_H
24 
25 #include "ns3/flow-probe.h"
26 #include "ns3/ipv6-flow-classifier.h"
27 #include "ns3/ipv6-l3-protocol.h"
28 #include "ns3/queue-item.h"
29 
30 namespace ns3 {
31 
32 class FlowMonitor;
33 class Node;
34 
42 class Ipv6FlowProbe : public FlowProbe
43 {
44 
45 public:
51  virtual ~Ipv6FlowProbe ();
52 
55  static TypeId GetTypeId (void);
56 
58  enum DropReason
59  {
62 
65 
68 
74 
77 
88  };
89 
90 protected:
91 
92  virtual void DoDispose (void);
93 
94 private:
99  void SendOutgoingLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
104  void ForwardLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
109  void ForwardUpLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface);
116  void DropLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPayload,
117  Ipv6L3Protocol::DropReason reason, Ptr<Ipv6> ipv6, uint32_t ifIndex);
120  void QueueDropLogger (Ptr<const Packet> ipPayload);
124 
126 };
127 
128 
129 } // namespace ns3
130 
131 #endif /* IPV6_FLOW_PROBE_H */
Class that monitors flows at the IPv6 layer of a Node.
Packet header for IPv6.
Definition: ipv6-header.h:34
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
Packet dropped by the queue disc.
void SendOutgoingLogger(const Ipv6Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t interface)
Log a packet being sent.
void DropLogger(const Ipv6Header &ipHeader, Ptr< const Packet > ipPayload, Ipv6L3Protocol::DropReason reason, Ptr< Ipv6 > ipv6, uint32_t ifIndex)
Log a packet being dropped.
void QueueDiscDropLogger(Ptr< const QueueDiscItem > item)
Log a packet being dropped by a queue disc.
Packet dropped due to queue overflow.
Interface is down so can not send packet.
DropReason
enumeration of possible reasons why a packet may be dropped
Packet dropped due to missing route to the destination.
void ForwardUpLogger(const Ipv6Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t interface)
Log a packet being received by the destination.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void DoDispose(void)
Destructor implementation.
The FlowProbe class is responsible for listening for packet events in a specific point of the simulat...
Definition: flow-probe.h:39
Packet dropped due to invalid checksum in the IPv4 header.
Packet dropped due to TTL decremented to zero during IPv4 forwarding.
Ipv6FlowProbe(Ptr< FlowMonitor > monitor, Ptr< Ipv6FlowClassifier > classifier, Ptr< Node > node)
Constructor.
Fallback reason (no known reason)
void ForwardLogger(const Ipv6Header &ipHeader, Ptr< const Packet > ipPayload, uint32_t interface)
Log a packet being forwarded.
static TypeId GetTypeId(void)
Register this type.
Ptr< Ipv6FlowClassifier > m_classifier
the Ipv6FlowClassifier this probe is associated with
a unique identifier for an interface.
Definition: type-id.h:58
void QueueDropLogger(Ptr< const Packet > ipPayload)
Log a packet being dropped by a queue.
DropReason
Reason why a packet has been dropped.