On Friday 02 April 2010 17:01, Krebs, Steven wrote:
> On Friday 2 April 2010 3:42 AM, Denys Vlasenko wrote:
> > I know what config files are in general.
> >
> > I implemented -x "optname:optval".
> > 
> > Feel free to submit a patch which adds "vendorinfo" option.
> > All the other needed machinery is in place.
> > -- 
> > vda
> 
> I just want to be clear on design for expected command line usage.
> I do not see how vendorspecific can easily be specified as a single
> string on the command line as each sub-option has to have two bytes
> of option # and size specified before the sub-option string,
> and those bytes would be non-ascii characters.
> So you are expecting useage to look like:     
> 
> udhcpc -x "vendorspecific:sub2=ETSB"  -x "vendorspecific:sub3=ECM:ESTB"
> -x "vendorspecific:sub4=$SERIAL_NO" -x "vendorspecific:sub5=HW-VER-403"
> -x "vendorspecific:sub6=FW-VER-1.0.0.1" -x 
> "vendorspecific:sub7=BOOT-ROM-25.008"
> -x "vendorspecific:sub8=OUI-#" -x "vendorspecific:sub9=VENDOR_MODEL_NUMBER01"
> -x "vendorspecific:sub10=VENDOR_NAME_HERE"
> -x "vendorspecific:sub54=40-bit-HOST_ID-X.509-Cert."     

Since you seem to need only strings, this should be ok -
you will be able to deduce lengths.

I think that instead of "subNN" simply "NN" can be used:

-x "vendorspecific:10=VENDOR_NAME_HERE"

Also, please take care to allow hex numbers too
(this basically means "use bb_strtou(str, &endptr, 0)
instead of bb_strtou(str, &endptr, 10) in the relevant code fragment").

-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to