GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb907e0
)
Moar comments
author
Tomas Mudrunka
<tomas@mudrunka.cz>
Sat, 2 Nov 2013 13:53:44 +0000
(14:53 +0100)
committer
Tomas Mudrunka
<tomas@mudrunka.cz>
Sat, 2 Nov 2013 13:53:44 +0000
(14:53 +0100)
bash/dhcp-option.sh
patch
|
blob
|
blame
|
history
diff --git
a/bash/dhcp-option.sh
b/bash/dhcp-option.sh
index 0a1ec6c8a3bc76441fdd50205189c752c777979b..e5f825dda637900a6dcff57b076f4921b6e10a07 100755
(executable)
--- a/
bash/dhcp-option.sh
+++ b/
bash/dhcp-option.sh
@@
-10,16
+10,23
@@
dec_to_hex_right() {
}
escape() {
+ #Adds \x escapes to hexdump string
+
while read -n 2 i; do
[ -n "$i" ] && echo -n '\x'"$i";
done
}
dnsmasq() {
+ #Converts \x00\x00 notation to 00:00 notation
+
sed -e 's/^\\x//g' | sed -e 's/\\x/:/g'
}
dhcp_option() {
+ #Compile DHCP option using option number and data.
+ #Generates hex string including header with option number and data length.
+
separator='\x'
option_id="$1"
option_data="$2"
This page took
0.170572 seconds
and
4
git commands to generate.