2 #Experimental BASH script to compile DHCP options
5 echo 'obase=16; '"$1" |
bc
9 echo -n $
(while true
; do echo -n 0; done |
head -c "$2")$
(dec_to_hex
"$1") |
tail -c "$2"
14 [ -n "$i" ] && echo -n '\x'"$i";
19 sed -e 's/^\\x//g' |
sed -e 's/\\x/:/g'
27 len
=$
(echo -n "$option_data" |
wc -c)
28 dec_to_hex_right
$option_id 2 | escape
29 dec_to_hex_right
$len 2 | escape
30 printf "$option_data" | xxd
-ps -c 256 | escape
35 iaid
='\x00\x00\x00\x00'
39 dhcp_option
$option_id "$iaid$t1$t2$id_pd_opts"
This page took 0.474577 seconds and 4 git commands to generate.