in reply to dhcp vendor encapsulated options in perl

d0, d2 and d3 are the option numbers 208, 210 and 211 (in hex). Next byte in hex is the length of the option string. To convert "http://raidtest.anvin.org/tftpboot/" into that hex representation, you could e.g.

print join ":", map { sprintf "%x", ord $_ } split //, "http://raidtes +t.anvin.org/tftpboot/";

See ord, hex, split, join, sprintf and map. Counting bytes with len and putting together the whole thing is left as an exercise to the reader. See also Net::DHCP::Options.

Replies are listed 'Best First'.
Re^2: dhcp vendor encapsulated options in perl
by Anonymous Monk on Nov 17, 2008 at 12:39 UTC
    Excellent, got it working now. Thanks :)