odhcp6c: add -x opt:val support
Add -x opt:val command support which allows to add options in sent packets.
The opt argument can be either specified as a string for well known options,
a decimal or a base-16 encoded value.
For some well-known options val will be parsed according to the data format
specified in the corresponding RFCs.
Supported well-know options are :
authentication (option 11) : stream of base-16 encoded bytes
userclass (option 15) : array of strings
vendorclass (option 16) : stream of base-16 encoded bytes
dns (option 23) : array of IPv6 addresses
search (option 24) : Domain name
sntpservers (option 31) : array of IPv6 addresses
ntpserver (option 56) : stream of base-16 encoded bytes
sipserver_d (option 21) : Domain name
sipserver_a (option 22) : array of IPv6 addresses
The val array elements can be separated by either a white space, comma or tab.
The val for non well-known options is a stream of base-16 encoded bytes.
Config examples :
-x sntpservers:3001:3001::1,3001:3001::2
-x 11:
00000000000000000000006674692F
-x 0x3e8:ABCDEF
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>