aboutsummaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/protocol-tests/.gitignore1
-rw-r--r--shared/protocol-tests/makefile15
-rw-r--r--shared/protocol-tests/ping-response.binbin10 -> 0 bytes
-rw-r--r--shared/protocol-tests/ping-response.src10
-rw-r--r--shared/protocol-tests/ping.binbin4 -> 0 bytes
-rw-r--r--shared/protocol-tests/ping.src4
6 files changed, 30 insertions, 0 deletions
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
--- a/shared/protocol-tests/ping-response.bin
+++ /dev/null
Binary files 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
--- a/shared/protocol-tests/ping.bin
+++ /dev/null
Binary files 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 ; ^