]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: document uuidd protocol
authorSami Kerola <kerolasa@iki.fi>
Sat, 21 Nov 2020 16:38:58 +0000 (16:38 +0000)
committerSami Kerola <kerolasa@iki.fi>
Mon, 23 Nov 2020 22:33:33 +0000 (22:33 +0000)
Seeing what can be expected should make it easier to understand what the
code does.

Notice that simply writing down the resposes one can start wondering deeper
questions, such as, why does the time bulk response reply only one uuid
followed by number how many were requested?  Was that a some type of TODO
note?

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/uuidd.c

index 6bd51f3bd361281591e51ffafea63766649cb0ee..d0e476e8b1b2c6df643589d903e44496c100c5c4 100644 (file)
@@ -8,6 +8,23 @@
  * License.
  * %End-Header%
  */
+
+/*
+ * The uuidd protocol.
+ *
+ * Client:
+ * | operation type (1 byte) | number of uuids (if bulk request, 4 bytes) |
+ *
+ * Server:
+ * | reply length (4 bytes) | uuid reply (16 bytes) |
+ *   or
+ * | reply length (4 bytes) | uuid reply (16 bytes) multiply by number when random bulk request |
+ *   or
+ * | reply length (4 bytes) | uuid reply (16 bytes) | number (4 bytes) time bulk |
+ *   or
+ * | reply length (4 bytes) | pid or maxop number string length in ascii (up to 7 bytes) |
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>