From 2049075a791d8c2760957c805da9bb005101e437 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 21 Nov 2020 16:38:58 +0000 Subject: [PATCH] uuidd: document uuidd protocol 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 --- misc-utils/uuidd.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index 6bd51f3bd3..d0e476e8b1 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -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 #include #include -- 2.47.3