Kea  1.9.9-git
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
Pkt6Ptr getPkt6() const
Returns encapsulating DHCPv6 message.
Definition: pkt4o6.h:47
Pkt4o6(const OptionBuffer &pkt4, const Pkt6Ptr &pkt6)
Constructor, used in message reception.
Definition: pkt4o6.cc:23
std::vector< uint8_t > OptionBuffer
buffer types used in DHCP code.
Definition: option.h:24
boost::shared_ptr< Pkt6 > Pkt6Ptr
A pointer to Pkt6 packet.
Definition: pkt6.h:28
ElementPtr copy(ConstElementPtr from, int level)
Copy the data up to a nesting level.
Definition: data.cc:1097
virtual void pack()
Prepares on-wire format of DHCPv4-over-DHCPv6 packet.
Definition: pkt4o6.cc:36
boost::shared_ptr< Pkt4 > Pkt4Ptr
A pointer to Pkt4 object.
Definition: pkt4.h:544
Defines the logger used by the top-level component of kea-dhcp-ddns.
Represents DHCPv4 packet.
Definition: pkt4.h:37
virtual bool isDhcp4o6() const
Checks if a DHCPv4 message has been transported over DHCPv6.
Definition: pkt4o6.h:60
boost::shared_ptr< Pkt4o6 > Pkt4o6Ptr
A pointer to Pkt4o6 object.
Definition: pkt4o6.h:82
virtual void setCopyRetrievedOptions(const bool copy)
Overrides the Pkt::setCopyRetrievedOptions to also set the flag for encapsulated Pkt6 instance...
Definition: pkt4o6.cc:51
Represents DHCPv4-over-DHCPv6 packet.
Definition: pkt4o6.h:30