From: Sami Kerola Date: Sat, 21 Nov 2020 16:38:58 +0000 (+0000) Subject: uuidd: document uuidd protocol X-Git-Tag: v2.37-rc1~268^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2049075a791d8c2760957c805da9bb005101e437;p=thirdparty%2Futil-linux.git 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 --- 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