A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ipv6-extension-demux.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007-2009 Strasbourg University
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: David Gross <gdavid.devel@gmail.com>
7 */
8
9#ifndef IPV6_EXTENSION_DEMUX_H
10#define IPV6_EXTENSION_DEMUX_H
11
12#include "ns3/object.h"
13#include "ns3/ptr.h"
14
15#include <list>
16
17namespace ns3
18{
19
20class Ipv6Extension;
21class Node;
22
23/**
24 * \ingroup ipv6HeaderExt
25 *
26 * \brief Demultiplexes IPv6 extensions.
27 */
29{
30 public:
31 /**
32 * \brief The interface ID.
33 * \return type ID
34 */
35 static TypeId GetTypeId();
36
37 /**
38 * \brief Constructor.
39 */
41
42 /**
43 * \brief Destructor.
44 */
45 ~Ipv6ExtensionDemux() override;
46
47 /**
48 * \brief Set the node.
49 * \param node the node to set
50 */
51 void SetNode(Ptr<Node> node);
52
53 /**
54 * \brief Insert a new IPv6 Extension.
55 * \param extension the extension to insert
56 */
57 void Insert(Ptr<Ipv6Extension> extension);
58
59 /**
60 * \brief Get the extension corresponding to extensionNumber.
61 * \param extensionNumber extension number of the extension to retrieve
62 * \return a matching IPv6 extension
63 */
64 Ptr<Ipv6Extension> GetExtension(uint8_t extensionNumber);
65
66 /**
67 * \brief Remove an extension from this demux.
68 * \param extension pointer on the extension to remove
69 */
70 void Remove(Ptr<Ipv6Extension> extension);
71
72 protected:
73 /**
74 * \brief Dispose object.
75 */
76 void DoDispose() override;
77
78 private:
79 /**
80 * \brief Container of the IPv6 Extensions.
81 */
82 typedef std::list<Ptr<Ipv6Extension>> Ipv6ExtensionList_t;
83
84 /**
85 * \brief List of IPv6 Extensions supported.
86 */
88
89 /**
90 * \brief The node.
91 */
93};
94
95} /* namespace ns3 */
96
97#endif /* IPV6_EXTENSION_DEMUX_H */
Demultiplexes IPv6 extensions.
Ipv6ExtensionList_t m_extensions
List of IPv6 Extensions supported.
void SetNode(Ptr< Node > node)
Set the node.
void DoDispose() override
Dispose object.
std::list< Ptr< Ipv6Extension > > Ipv6ExtensionList_t
Container of the IPv6 Extensions.
static TypeId GetTypeId()
The interface ID.
~Ipv6ExtensionDemux() override
Destructor.
Ptr< Node > m_node
The node.
void Remove(Ptr< Ipv6Extension > extension)
Remove an extension from this demux.
Ptr< Ipv6Extension > GetExtension(uint8_t extensionNumber)
Get the extension corresponding to extensionNumber.
void Insert(Ptr< Ipv6Extension > extension)
Insert a new IPv6 Extension.
A base class which provides memory management and object aggregation.
Definition object.h:78
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.