diff options
| author | bt <bt@rctt.net> | 2026-03-10 14:11:01 +0100 |
|---|---|---|
| committer | bt <bt@rctt.net> | 2026-03-10 14:11:01 +0100 |
| commit | e5644d24c51634c0e263a758bd57b797d5949c9c (patch) | |
| tree | 5f6f33ebb064df45693fc75e0d454f0f11ce4654 /solec.ksy | |
| parent | 6dcbb66fcafce3da6d7c00d9679946b77f6f6186 (diff) | |
| download | solec-e5644d24c51634c0e263a758bd57b797d5949c9c.tar.gz solec-e5644d24c51634c0e263a758bd57b797d5949c9c.zip | |
Use Kaitai to describe protocol spec, autogenerate Wireshark plugin and diagram
Diffstat (limited to 'solec.ksy')
| -rw-r--r-- | solec.ksy | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/solec.ksy b/solec.ksy new file mode 100644 index 0000000..01c7481 --- /dev/null +++ b/solec.ksy @@ -0,0 +1,59 @@ +meta: + id: solec + file-extension: hex + endian: be + +enums: + type: + 0x01: handshake + 0x02: ping + 0x03: pong + 0x04: message + 0xFF: test + +seq: + - id: payload_type + type: u1 + enum: type + - id: payload_length + type: u2 + - id: payload + type: + switch-on: payload_type + cases: + 'type::test': test + +types: + string: + seq: + - id: len_payload + type: u2 + - id: payload + type: str + size: len_payload + encoding: UTF-8 + binary: + seq: + - id: len_payload + type: u2 + - id: payload + size: len_payload + test: + seq: + - id: num1 + type: u1 + - id: time1 + type: u8 + - id: str1 + type: string + - id: num2 + type: u2 + - id: bin1 + type: binary + - id: num3 + type: u4 + - id: str2 + type: string + - id: num4 + type: u8 + |
