Commit 7709b153 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[4027] added some explanatory comments for Pkt4o6::pack().

parent 0fe570f5
......@@ -48,10 +48,14 @@ Pkt4o6::Pkt4o6(const Pkt4Ptr& pkt4, const Pkt6Ptr& pkt6)
}
void Pkt4o6::pack() {
// Convert wire-format Pkt4 data in the form of OptionBuffer.
Pkt4::pack();
OutputBuffer& buf = getBuffer();
const uint8_t* ptr = static_cast<const uint8_t*>(buf.getData());
OptionBuffer msg(ptr, ptr + buf.getLength());
// Build the DHCPv4 Message option for the DHCPv6 message, and pack the
// entire stuff.
OptionPtr dhcp4_msg(new Option(Option::V6, D6O_DHCPV4_MSG, msg));
pkt6_->addOption(dhcp4_msg);
pkt6_->pack();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment