Kea 3.2.0-git
pkt4o6.h
Go to the documentation of this file.
1// Copyright (C) 2015-2026 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 {
16namespace dhcp {
17
29class Pkt4o6 : public Pkt4 {
30public:
31
37 Pkt4o6(const OptionBuffer& pkt4, const Pkt6Ptr& pkt6);
38
43 Pkt4o6(const Pkt4Ptr& pkt4, const Pkt6Ptr& pkt6);
44
46 Pkt6Ptr getPkt6() const {
47 return (pkt6_);
48 }
49
55 virtual void pack();
56
61 virtual bool isDhcp4o6() const {
62 return (true);
63 }
64
74 virtual void setCopyRetrievedOptions(const bool copy);
75
76private:
78 Pkt6Ptr pkt6_;
79
80}; // Pkt4o6 class
81
83typedef boost::shared_ptr<Pkt4o6> Pkt4o6Ptr;
84
85} // isc::dhcp namespace
86} // isc namespace
87
88#endif
Pkt4(uint8_t msg_type, uint32_t transid)
Constructor, used in replying to a message.
Definition pkt4.cc:34
Pkt4o6(const OptionBuffer &pkt4, const Pkt6Ptr &pkt6)
Constructor, used in message reception.
Definition pkt4o6.cc:23
virtual void pack()
Prepares on-wire format of DHCPv4-over-DHCPv6 packet.
Definition pkt4o6.cc:35
virtual void setCopyRetrievedOptions(const bool copy)
Overrides the Pkt::setCopyRetrievedOptions to also set the flag for encapsulated Pkt6 instance.
Definition pkt4o6.cc:48
virtual bool isDhcp4o6() const
Checks if a DHCPv4 message has been transported over DHCPv6.
Definition pkt4o6.h:61
Pkt6Ptr getPkt6() const
Returns encapsulating DHCPv6 message.
Definition pkt4o6.h:46
ElementPtr copy(ConstElementPtr from, unsigned level)
Copy the data up to a nesting level.
Definition data.cc:1522
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
Definition pkt4.h:556
boost::shared_ptr< Pkt4o6 > Pkt4o6Ptr
A pointer to Pkt4o6 object.
Definition pkt4o6.h:83
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
Definition pkt6.h:31
std::vector< uint8_t > OptionBuffer
buffer types used in DHCP code.
Definition option.h:24
Defines the logger used by the top-level component of kea-lfc.