diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/build_spec.sh | 11 | ||||
| -rwxr-xr-x | tools/run-many.sh | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tools/build_spec.sh b/tools/build_spec.sh index f5272b4..52a32da 100755 --- a/tools/build_spec.sh +++ b/tools/build_spec.sh @@ -6,16 +6,17 @@ else SED=sed fi -kaitai-struct-compiler -t graphviz solec.ksy +kaitai-struct-compiler -t graphviz docs/protocol.ksy dot -Tsvg solec.dot > docs/protocol.svg rm solec.dot -~/bin/kaitai-struct-compiler-ws/bin/kaitai-struct-compiler -t wireshark --read-pos solec.ksy +~/bin/kaitai-struct-compiler-ws/bin/kaitai-struct-compiler -t wireshark --read-pos docs/protocol.ksy +mv solec.lua solec-wireshark.lua -${SED} -i -e '5s/.*/package.path = "kaitai_struct_lua_runtime\/?.lua" .. package.path/' solec.lua -${SED} -i -e 's/, self.type_payload//' solec.lua +${SED} -i -e '5s/.*/package.path = "kaitai_struct_lua_runtime\/?.lua" .. package.path/' solec-wireshark.lua +${SED} -i -e 's/, self.type_payload//' solec-wireshark.lua -cat <<EOT >> solec.lua +cat <<EOT >> solec-wireshark.lua local tcp_port = DissectorTable.get("tcp.port") tcp_port:add(9999, proto) EOT diff --git a/tools/run-many.sh b/tools/run-many.sh index 9c84e0d..4d4bf1e 100755 --- a/tools/run-many.sh +++ b/tools/run-many.sh @@ -4,6 +4,7 @@ # following lines to hosts file # 127.0.0.1 localhost s1 # 127.0.0.2 s2 +# for mac: ifconfig lo0 alias 127.0.0.2 tmux \ new-session "go run cmd/daemon/main.go -a 127.0.0.1:9999 -n s1; read" \; \ |
