From f24da35b75c46df8af41514aa4c11e0b9b7ed162 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 13 Dec 2022 21:50:03 +0100 Subject: add binary files as text with comments and makefile --- shared/protocol-tests/.gitignore | 1 + shared/protocol-tests/makefile | 15 +++++++++++++++ shared/protocol-tests/ping-response.bin | Bin 10 -> 0 bytes shared/protocol-tests/ping-response.src | 10 ++++++++++ shared/protocol-tests/ping.bin | Bin 4 -> 0 bytes shared/protocol-tests/ping.src | 4 ++++ 6 files changed, 30 insertions(+) create mode 100644 shared/protocol-tests/.gitignore create mode 100644 shared/protocol-tests/makefile delete mode 100644 shared/protocol-tests/ping-response.bin create mode 100644 shared/protocol-tests/ping-response.src delete mode 100644 shared/protocol-tests/ping.bin create mode 100644 shared/protocol-tests/ping.src diff --git a/shared/protocol-tests/.gitignore b/shared/protocol-tests/.gitignore new file mode 100644 index 0000000..a8a0dce --- /dev/null +++ b/shared/protocol-tests/.gitignore @@ -0,0 +1 @@ +*.bin diff --git a/shared/protocol-tests/makefile b/shared/protocol-tests/makefile new file mode 100644 index 0000000..f8ac490 --- /dev/null +++ b/shared/protocol-tests/makefile @@ -0,0 +1,15 @@ +XXD := xxd +RM := rm -f + +SRCS := $(wildcard *.src) +TARGET := $(SRCS:.src=.bin) + +.PHONY: all clean + +all: $(TARGET) + +%.bin: %.src + $(XXD) -r -c1 $< $@ + +clean: + $(RM) $(TARGET) diff --git a/shared/protocol-tests/ping-response.bin b/shared/protocol-tests/ping-response.bin deleted file mode 100644 index 6067349..0000000 Binary files a/shared/protocol-tests/ping-response.bin and /dev/null differ diff --git a/shared/protocol-tests/ping-response.src b/shared/protocol-tests/ping-response.src new file mode 100644 index 0000000..57418d5 --- /dev/null +++ b/shared/protocol-tests/ping-response.src @@ -0,0 +1,10 @@ +00: ff ; start byte +01: 05 ; response opcode +02: 00 ; message id (0x0001) +03: 01 ; ^ +04: 01 ; error (true) +05: 00 ; response type (0x00 = ping) +06: 00 ; original message id (0x0000) +07: 00 ; ^ +08: 00 ; remainder size (0x0000) +09: 00 ; ^ diff --git a/shared/protocol-tests/ping.bin b/shared/protocol-tests/ping.bin deleted file mode 100644 index 2b8491c..0000000 Binary files a/shared/protocol-tests/ping.bin and /dev/null differ diff --git a/shared/protocol-tests/ping.src b/shared/protocol-tests/ping.src new file mode 100644 index 0000000..beec10a --- /dev/null +++ b/shared/protocol-tests/ping.src @@ -0,0 +1,4 @@ +00: ff ; start byte +01: 00 ; ping opcode +02: f8 ; message id (used as ping identifier) +03: 8f ; ^ -- cgit v1.2.3