Kea 2.7.6
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
30class 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
82typedef boost::shared_ptr<Pkt4o6> Pkt4o6Ptr;
83
84} // isc::dhcp namespace
85
86} // isc namespace
87
88#endif
Represents DHCPv4 packet.
Definition pkt4.h:37
Represents DHCPv4-over-DHCPv6 packet.
Definition pkt4o6.h:30
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:36
virtual void setCopyRetrievedOptions(const bool copy)
Overrides the Pkt::setCopyRetrievedOptions to also set the flag for encapsulated Pkt6 instance.
Definition pkt4o6.cc:49
virtual bool isDhcp4o6() const
Checks if a DHCPv4 message has been transported over DHCPv6.
Definition pkt4o6.h:60
Pkt6Ptr getPkt6() const
Returns encapsulating DHCPv6 message.
Definition pkt4o6.h:47
ElementPtr copy(ConstElementPtr from, int level)
Copy the data up to a nesting level.
Definition data.cc:1420
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
Definition pkt4.h:555
boost::shared_ptr< Pkt4o6 > Pkt4o6Ptr
A pointer to Pkt4o6 object.
Definition pkt4o6.h:82
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.