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>
* 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>