specifies the option code and the hexstring is a hexadecimal string that
defines the content of the option. Care should be taken as ``perfdhcp``
does not offer any kind of logic behind those options; they are simply
- inserted into packets and sent as is. Be careful not to duplicate
- options that are already inserted. Please notice that ``encapsulation-level:``
+ inserted into packets and sent as is. Please notice that ``encapsulation-level:``
is optional and if omitted, default encapsulation-level value 1 is used.
For example, to insert client class identifier (option code 60) with a
string "docsis" at first level of encapsulation, use "--or 60,646f63736973"
EXPECT_THROW(process(opt, "perfdhcp -6 -A1 --or 2:32,00000E10 -l ethx all"), isc::InvalidParameter);
}
+TEST_F(CommandOptionsTest, UseRelayV6OptionsDuplicated) {
+ CommandOptions opt;
+
+ // multiple relayed options with the same option code are supported.
+ EXPECT_NO_THROW(process(opt, "perfdhcp -6 -A1 --or 1:32,00000E10 --or 32,00000E11 -l ethx all"));
+ EXPECT_TRUE(opt.isUseRelayedV6());
+ EXPECT_EQ(2, opt.getRelayOpts().size());
+}
+
+