]>
Commit | Line | Data |
---|---|---|
cc73685d | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
20502652 CB |
2 | |
3 | #ifndef __LXC_UUID_H | |
4 | #define __LXC_UUID_H | |
5 | ||
6 | #ifndef _GNU_SOURCE | |
7 | #define _GNU_SOURCE 1 | |
8 | #endif | |
9 | #define __STDC_FORMAT_MACROS | |
10 | #include <inttypes.h> | |
11 | ||
78ad1eb0 CB |
12 | #include "compiler.h" |
13 | ||
20502652 CB |
14 | typedef union lxc_id128 lxc_id128_t; |
15 | ||
16 | union lxc_id128 { | |
78ad1eb0 CB |
17 | uint8_t bytes[16]; |
18 | uint64_t qwords[2]; | |
19 | }; | |
20 | ||
21 | __hidden extern int lxc_id128_randomize(lxc_id128_t *ret); | |
22 | __hidden extern int lxc_id128_write(const char *p, lxc_id128_t id); | |
23 | __hidden extern int lxc_id128_write_fd(int fd, lxc_id128_t id); | |
24 | __hidden extern char *id128_to_uuid_string(lxc_id128_t id, char s[37]); | |
20502652 CB |
25 | |
26 | #endif /* __LXC_UUID_H */ |