本文整理汇总了C++中DHCPv6类的典型用法代码示例。如果您正苦于以下问题:C++ DHCPv6类的具体用法?C++ DHCPv6怎么用?C++ DHCPv6使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了DHCPv6类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TEST_F
TEST_F(DHCPv6Test, StatusCode) {
DHCPv6 dhcp;
DHCPv6::status_code_type data(0x72, "libtins, mah frend"), output;
dhcp.status_code(data);
output = dhcp.status_code();
EXPECT_EQ(data.code, output.code);
EXPECT_EQ(data.message, output.message);
}
示例2: TEST_F
TEST_F(DHCPv6Test, RemoveOption) {
DHCPv6 dhcp;
PDU::serialization_type old_buffer = dhcp.serialize();
dhcp.server_unicast("fe00:0a9d:dd23::1");
dhcp.preference(12);
EXPECT_TRUE(dhcp.remove_option(DHCPv6::UNICAST));
EXPECT_TRUE(dhcp.remove_option(DHCPv6::PREFERENCE));
PDU::serialization_type new_buffer = dhcp.serialize();
EXPECT_EQ(old_buffer, new_buffer);
}