A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ipv6-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 "ipv6-packet-filter.h"
13
15
16#include "ns3/enum.h"
17#include "ns3/log.h"
18#include "ns3/uinteger.h"
19
20namespace ns3
21{
22
23NS_LOG_COMPONENT_DEFINE("Ipv6PacketFilter");
24
25NS_OBJECT_ENSURE_REGISTERED(Ipv6PacketFilter);
26
27TypeId
29{
30 static TypeId tid =
31 TypeId("ns3::Ipv6PacketFilter").SetParent<PacketFilter>().SetGroupName("Internet");
32 return tid;
33}
34
39
44
45bool
47{
48 NS_LOG_FUNCTION(this << item);
49 return bool(DynamicCast<Ipv6QueueDiscItem>(item));
50}
51
52// ------------------------------------------------------------------------- //
53
54} // namespace ns3
static TypeId GetTypeId()
Get the type ID.
bool CheckProtocol(Ptr< QueueDiscItem > item) const override
Checks if the filter is able to classify a kind of items.
PacketFilter is the abstract base class for filters used by queue discs to classify packets.
Smart pointer class similar to boost::intrusive_ptr.
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.
Ptr< T1 > DynamicCast(const Ptr< T2 > &p)
Cast a Ptr.
Definition ptr.h:580