summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorbt <bt@rctt.net>2026-04-18 23:12:11 +0200
committerbt <bt@rctt.net>2026-04-18 23:12:33 +0200
commitd63176e22d21e347cf1c197084afe8eb1d5376b4 (patch)
tree501b77a9094dfa09acccaebd7698aee256309925 /tools
parente9aebac1a2a4732763c2f7e4428a23983d4eb6a3 (diff)
downloadsolec-0.2.0.tar.gz
solec-0.2.0.zip
[docs] Update protocol docsv0.2.0
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build_spec.sh11
-rwxr-xr-xtools/run-many.sh1
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" \; \