Kea: pkt4o6.h Source File

| Kea 3.0.0

pkt4o6.h
Go to the documentation of this file.
1// Copyright (C) 2015-2018 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef PKT4O6_H
8#define PKT4O6_H
9
10#include <dhcp/pkt4.h>
11#include <dhcp/pkt6.h>
12
13#include <boost/shared_ptr.hpp>
14
15namespace isc {
16
17namespace dhcp {
18
30 class Pkt4o6 : public Pkt4 {
31public:
32
38 Pkt4o6(const OptionBuffer& pkt4, const Pkt6Ptr& pkt6);
39
44 Pkt4o6(const Pkt4Ptr& pkt4, const Pkt6Ptr& pkt6);
45
47 Pkt6Ptr getPkt6() const { return (pkt6_); }
48
54 virtual void pack();
55
60 virtual bool isDhcp4o6() const {
61 return (true);
62 }
63
73 virtual void setCopyRetrievedOptions(const bool copy);
74
75private:
77 Pkt6Ptr pkt6_;
78
79}; // Pkt4o6 class
80
82 typedef boost::shared_ptr<Pkt4o6> Pkt4o6Ptr;
83
84} // isc::dhcp namespace
85
86} // isc namespace
87
88#endif
isc::dhcp::Pkt4::Pkt4
Pkt4(uint8_t msg_type, uint32_t transid)
Constructor, used in replying to a message.
Definition pkt4.cc:32
isc::dhcp::Pkt4o6::Pkt4o6
Pkt4o6(const OptionBuffer &pkt4, const Pkt6Ptr &pkt6)
Constructor, used in message reception.
Definition pkt4o6.cc:23
isc::dhcp::Pkt4o6::pack
virtual void pack()
Prepares on-wire format of DHCPv4-over-DHCPv6 packet.
Definition pkt4o6.cc:36
isc::dhcp::Pkt4o6::setCopyRetrievedOptions
virtual void setCopyRetrievedOptions(const bool copy)
Overrides the Pkt::setCopyRetrievedOptions to also set the flag for encapsulated Pkt6 instance.
Definition pkt4o6.cc:49
isc::dhcp::Pkt4o6::isDhcp4o6
virtual bool isDhcp4o6() const
Checks if a DHCPv4 message has been transported over DHCPv6.
Definition pkt4o6.h:60
isc::dhcp::Pkt4o6::getPkt6
Pkt6Ptr getPkt6() const
Returns encapsulating DHCPv6 message.
Definition pkt4o6.h:47
isc::data::copy
ElementPtr copy(ConstElementPtr from, int level)
Copy the data up to a nesting level.
Definition data.cc:1420
isc::dhcp
Definition dhcp4/client_handler.cc:20
isc::dhcp::Pkt4Ptr
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
Definition pkt4.h:555
isc::dhcp::Pkt4o6Ptr
boost::shared_ptr< Pkt4o6 > Pkt4o6Ptr
A pointer to Pkt4o6 object.
Definition pkt4o6.h:82
isc::dhcp::Pkt6Ptr
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
Definition pkt6.h:31
isc::dhcp::OptionBuffer
std::vector< uint8_t > OptionBuffer
buffer types used in DHCP code.
Definition option.h:24
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
pkt4.h
pkt6.h