]> git.proxmox.com Git - mirror_lxc.git/blob - src/lxc/uuid.h
Merge pull request #3956 from brauner/2021-08-27.list
[mirror_lxc.git] / src / lxc / uuid.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
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
12 #include "compiler.h"
13
14 typedef union lxc_id128 lxc_id128_t;
15
16 union lxc_id128 {
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]);
25
26 #endif /* __LXC_UUID_H */