A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ipv4-packet-filter.h
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#ifndef IPV4_PACKET_FILTER_H
13#define IPV4_PACKET_FILTER_H
14
15#include "ns3/object.h"
16#include "ns3/packet-filter.h"
17
18namespace ns3
19{
20
21/**
22 * \ingroup ipv4
23 * \ingroup traffic-control
24 *
25 * Ipv4PacketFilter is the abstract base class for filters defined for IPv4 packets.
26 */
28{
29 public:
30 /**
31 * \brief Get the type ID.
32 * \return the object TypeId
33 */
34 static TypeId GetTypeId();
35
37 ~Ipv4PacketFilter() override;
38
39 private:
40 bool CheckProtocol(Ptr<QueueDiscItem> item) const override;
41 int32_t DoClassify(Ptr<QueueDiscItem> item) const override = 0;
42};
43
44} // namespace ns3
45
46#endif /* IPV4_PACKET_FILTER */
Ipv4PacketFilter is the abstract base class for filters defined for IPv4 packets.
int32_t DoClassify(Ptr< QueueDiscItem > item) const override=0
Classify a packet.
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
Every class exported by the ns3 library is enclosed in the ns3 namespace.