Kea  1.5.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 
15 namespace isc {
16 
17 namespace dhcp {
18 
30 class Pkt4o6 : public Pkt4 {
31 public:
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 
75 private:
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::OptionBuffer
std::vector< uint8_t > OptionBuffer
buffer types used in DHCP code.
Definition: option.h:25
isc::data::copy
ElementPtr copy(ConstElementPtr from, int level)
Copy the data up to a nesting level.
Definition: data.cc:1114
pkt4.h
pkt6.h
isc::dhcp::Pkt4o6Ptr
boost::shared_ptr< Pkt4o6 > Pkt4o6Ptr
A pointer to Pkt4o6 object.
Definition: pkt4o6.h:82
isc::dhcp::Pkt4o6::getPkt6
Pkt6Ptr getPkt6() const
Returns encapsulating DHCPv6 message.
Definition: pkt4o6.h:47
isc
Defines the logger used by the top-level component of kea-dhcp-ddns.
Definition: agent_parser.cc:144
isc::dhcp::Pkt4Ptr
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
Definition: pkt4.h:546
isc::dhcp::Pkt4o6::isDhcp4o6
virtual bool isDhcp4o6() const
Checks if a DHCPv4 message has been transported over DHCPv6.
Definition: pkt4o6.h:60
isc::dhcp::Pkt4
Represents DHCPv4 packet.
Definition: pkt4.h:38
isc::dhcp::Pkt4o6::pack
virtual void pack()
Prepares on-wire format of DHCPv4-over-DHCPv6 packet.
Definition: pkt4o6.cc:36
isc::dhcp::Pkt4o6::Pkt4o6
Pkt4o6(const OptionBuffer &pkt4, const Pkt6Ptr &pkt6)
Constructor, used in message reception.
Definition: pkt4o6.cc:23
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:51
isc::dhcp::Pkt4o6
Represents DHCPv4-over-DHCPv6 packet.
Definition: pkt4o6.h:30
isc::dhcp::Pkt6Ptr
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
Definition: pkt6.h:28