A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
trailer.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 "trailer.h"
10
11#include "ns3/log.h"
12
13namespace ns3
14{
15
17
19
24
27{
28 static TypeId tid = TypeId("ns3::Trailer").SetParent<Chunk>().SetGroupName("Network");
29 return tid;
30}
31
32// This default implementation is provided for backward compatibility
33// reasons. Subclasses should implement this method themselves.
39
40std::ostream&
41operator<<(std::ostream& os, const Trailer& trailer)
42{
43 trailer.Print(os);
44 return os;
45}
46
47} // namespace ns3
iterator in a Buffer instance
Definition buffer.h:89
abstract base class for ns3::Header and ns3::Trailer
Definition chunk.h:25
Protocol trailer serialization and deserialization.
Definition trailer.h:30
~Trailer() override
Definition trailer.cc:20
static TypeId GetTypeId()
Get the type ID.
Definition trailer.cc:26
void Print(std::ostream &os) const override=0
uint32_t Deserialize(Buffer::Iterator end) 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