A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
header.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@cutebugs.net>
7 */
8
9#include "header.h"
10
11#include "ns3/log.h"
12
13namespace ns3
14{
15
17
19
21{
22 NS_LOG_FUNCTION(this);
23}
24
27{
28 static TypeId tid = TypeId("ns3::Header").SetParent<Chunk>().SetGroupName("Network");
29 return tid;
30}
31
32std::ostream&
33operator<<(std::ostream& os, const Header& header)
34{
35 header.Print(os);
36 return os;
37}
38
39} // namespace ns3
abstract base class for ns3::Header and ns3::Trailer
Definition chunk.h:25
Protocol header serialization and deserialization.
Definition header.h:33
static TypeId GetTypeId()
Get the type ID.
Definition header.cc:26
~Header() override
Definition header.cc:20
void Print(std::ostream &os) const override=0
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#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:35
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition angles.cc:148