A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
ipv4-packet-filter.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Universita' degli Studi di Napoli Federico II
3
* 2016 University of Washington
4
*
5
* SPDX-License-Identifier: GPL-2.0-only
6
*
7
* Authors: Stefano Avallone <stavallo@unina.it>
8
* Tom Henderson <tomhend@u.washington.edu>
9
* Pasquale Imputato <p.imputato@gmail.com>
10
*/
11
12
#include "
ipv4-packet-filter.h
"
13
14
#include "
ipv4-queue-disc-item.h
"
15
16
#include "ns3/enum.h"
17
#include "ns3/log.h"
18
#include "ns3/uinteger.h"
19
20
namespace
ns3
21
{
22
23
NS_LOG_COMPONENT_DEFINE
(
"Ipv4PacketFilter"
);
24
25
NS_OBJECT_ENSURE_REGISTERED
(Ipv4PacketFilter);
26
27
TypeId
28
Ipv4PacketFilter::GetTypeId
()
29
{
30
static
TypeId
tid =
31
TypeId
(
"ns3::Ipv4PacketFilter"
).
SetParent
<
PacketFilter
>().SetGroupName(
"Internet"
);
32
return
tid;
33
}
34
35
Ipv4PacketFilter::Ipv4PacketFilter
()
36
{
37
NS_LOG_FUNCTION
(
this
);
38
}
39
40
Ipv4PacketFilter::~Ipv4PacketFilter
()
41
{
42
NS_LOG_FUNCTION
(
this
);
43
}
44
45
bool
46
Ipv4PacketFilter::CheckProtocol
(
Ptr<QueueDiscItem>
item)
const
47
{
48
NS_LOG_FUNCTION
(
this
<< item);
49
return
bool(
DynamicCast<Ipv4QueueDiscItem>
(item));
50
}
51
52
// ------------------------------------------------------------------------- //
53
54
}
// namespace ns3
ns3::Ipv4PacketFilter::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
ipv4-packet-filter.cc:28
ns3::Ipv4PacketFilter::CheckProtocol
bool CheckProtocol(Ptr< QueueDiscItem > item) const override
Checks if the filter is able to classify a kind of items.
Definition
ipv4-packet-filter.cc:46
ns3::Ipv4PacketFilter::~Ipv4PacketFilter
~Ipv4PacketFilter() override
Definition
ipv4-packet-filter.cc:40
ns3::Ipv4PacketFilter::Ipv4PacketFilter
Ipv4PacketFilter()
Definition
ipv4-packet-filter.cc:35
ns3::PacketFilter
PacketFilter is the abstract base class for filters used by queue discs to classify packets.
Definition
packet-filter.h:24
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition
log-macros-enabled.h:229
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ipv4-packet-filter.h
ipv4-queue-disc-item.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::DynamicCast
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
Definition
ptr.h:580
src
internet
model
ipv4-packet-filter.cc
Generated on Fri Nov 8 2024 13:59:01 for ns-3 by
1.11.0