A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
net-device.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2005,2006 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8
9#include "net-device.h"
10
11#include "ns3/log.h"
12
13namespace ns3
14{
15
16NS_LOG_COMPONENT_DEFINE("NetDevice");
17
19
22{
23 static TypeId tid = TypeId("ns3::NetDevice").SetParent<Object>().SetGroupName("Network");
24 return tid;
25}
26
31
33NetDevice::GetAddressFor(const Address& /*remoteAddr*/) const
34{
35 return GetAddress();
36}
37
38} // namespace ns3
a polymophic address class
Definition address.h:114
Network layer to device interface.
Definition net-device.h:87
static TypeId GetTypeId()
Get the type ID.
Definition net-device.cc:21
virtual Address GetAddress() const =0
~NetDevice() override
Definition net-device.cc:27
virtual Address GetAddressFor(const Address &remoteAddr) const
Get the current address used to communicate with a remote.
Definition net-device.cc:33
Object()
Caller graph was not generated because of its size.
Definition object.cc:93
a unique identifier for an interface.
Definition type-id.h:50
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:999
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:194
#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.