A Discrete-Event Network Simulator
API
header.cc
Go to the documentation of this file.
1 #include "header.h"
2 #include "ns3/log.h"
3 
4 namespace ns3 {
5 
6 NS_LOG_COMPONENT_DEFINE ("Header");
7 
9 
11 {
12  NS_LOG_FUNCTION (this);
13 }
14 
15 TypeId
17 {
18  static TypeId tid = TypeId ("ns3::Header")
19  .SetParent<Chunk> ()
20  .SetGroupName("Network")
21  ;
22  return tid;
23 }
24 
25 std::ostream & operator << (std::ostream &os, const Header &header)
26 {
27  header.Print (os);
28  return os;
29 }
30 
31 } // namespace ns3
Protocol header serialization and deserialization.
Definition: header.h:42
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:44
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:201
static TypeId GetTypeId(void)
Get the type ID.
Definition: header.cc:16
virtual void Print(std::ostream &os) const =0
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Definition: angles.cc:42
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual ~Header()
Definition: header.cc:10
a unique identifier for an interface.
Definition: type-id.h:57
TypeId SetParent(TypeId tid)
Definition: type-id.cc:638
abstract base class for ns3::Header and ns3::Trailer
Definition: chunk.h:14