NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ipv4-seqs-app-tracer.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2 /*
3  * Copyright (c) 2011 UCLA
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: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
19  */
20 
21 #ifndef IPV4_SEQS_APP_TRACER_H
22 #define IPV4_SEQS_APP_TRACER_H
23 
24 #include "ipv4-app-tracer.h"
25 #include <boost/shared_ptr.hpp>
26 #include <boost/tuple/tuple.hpp>
27 
28 namespace ns3 {
29 
35 {
36 public:
37  Ipv4SeqsAppTracer (boost::shared_ptr<std::ostream> os, Ptr<Node> node);
38  virtual ~Ipv4SeqsAppTracer () { };
39 
49  static boost::tuple< boost::shared_ptr<std::ostream>, std::list<Ptr<Ipv4SeqsAppTracer> > >
50  InstallAll (const std::string &file);
51 
52 
53  virtual void
54  PrintHeader (std::ostream &os) const;
55 
56  virtual void
57  Print (std::ostream &os) const;
58 
59  virtual void
60  Rx (std::string context,
61  const Ipv4Header &, Ptr<const Packet>, uint32_t);
62 
63  virtual void
64  Tx (std::string context,
65  const Ipv4Header &, Ptr<const Packet>, uint32_t);
66 
67 protected:
68  void
69  Reset ();
70 
71 protected:
72  boost::shared_ptr<std::ostream> m_os;
73 };
74 
75 } // namespace ns3
76 
77 #endif // IPV4_AGGREGATE_APP_TRACER_H
Base class for IPv4/TCP based applications.
static boost::tuple< boost::shared_ptr< std::ostream >, std::list< Ptr< Ipv4SeqsAppTracer > > > InstallAll(const std::string &file)
Helper method to install tracers on all simulation nodes.
Helper to track application-level sequence numbers (approximated from TCP ACKs)