A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ipv6-option-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_OPTION_DEMUX_H
10#define IPV6_OPTION_DEMUX_H
11
12#include "ns3/object.h"
13#include "ns3/ptr.h"
14
15#include <list>
16
17namespace ns3
18{
19
20class Ipv6Option;
21class Node;
22
23/**
24 * \ingroup ipv6HeaderExt
25 *
26 * \brief IPv6 Option Demux.
27 */
28class Ipv6OptionDemux : public Object
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 ~Ipv6OptionDemux() 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 Option.
55 * \param option the option to insert
56 */
57 void Insert(Ptr<Ipv6Option> option);
58
59 /**
60 * \brief Get the option corresponding to optionNumber.
61 * \param optionNumber the option number of the option to retrieve
62 * \return a matching IPv6 option
63 */
64 Ptr<Ipv6Option> GetOption(int optionNumber);
65
66 /**
67 * \brief Remove an option from this demux.
68 * \param option pointer on the option to remove
69 */
70 void Remove(Ptr<Ipv6Option> option);
71
72 protected:
73 /**
74 * \brief Dispose this object.
75 */
76 void DoDispose() override;
77
78 private:
79 /**
80 * \brief Container of the IPv6 Options types.
81 */
82 typedef std::list<Ptr<Ipv6Option>> Ipv6OptionList_t;
83
84 /**
85 * \brief List of IPv6 Options supported.
86 */
88
89 /**
90 * \brief The node.
91 */
93};
94
95} /* namespace ns3 */
96
97#endif /* IPV6_OPTION_DEMUX_H */
IPv6 Option Demux.
Ipv6OptionDemux()
Constructor.
void Insert(Ptr< Ipv6Option > option)
Insert a new IPv6 Option.
Ptr< Node > m_node
The node.
void SetNode(Ptr< Node > node)
Set the node.
static TypeId GetTypeId()
The interface ID.
~Ipv6OptionDemux() override
Destructor.
std::list< Ptr< Ipv6Option > > Ipv6OptionList_t
Container of the IPv6 Options types.
void Remove(Ptr< Ipv6Option > option)
Remove an option from this demux.
Ipv6OptionList_t m_options
List of IPv6 Options supported.
void DoDispose() override
Dispose this object.
Ptr< Ipv6Option > GetOption(int optionNumber)
Get the option corresponding to optionNumber.
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.