Add an internal uuid formatting utility
[lttng-tools.git] / src / common / compat / uuid.h
index 35faf538875053ccc240ceb2253230d39cdf695e..dcc4ed5609b2785945f54f00dd7d575e0c8ad82f 100644 (file)
@@ -23,7 +23,8 @@
 #ifndef LTTNG_UUID_H
 #define LTTNG_UUID_H
 
-#include <config.h>
+#include <common/macros.h>
+
 /*
  * Includes final \0.
  */
@@ -66,4 +67,13 @@ int lttng_uuid_generate(unsigned char *uuid_out)
 #error "LTTng-Tools needs to have a UUID generator configured."
 #endif
 
+/*
+ * Convert a UUID to a human-readable, NULL-terminated, string of the form
+ * xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
+ *
+ * Assumes uuid_str is at least UUID_STR_LEN byte long.
+ */
+LTTNG_HIDDEN
+void lttng_uuid_to_str(const unsigned char *uuid, char *uuid_str);
+
 #endif /* LTTNG_UUID_H */
This page took 0.023812 seconds and 4 git commands to generate.