]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/uuid.h
tree-wide: use lxc_drop_groups() instead of lxc_setgroups(0, NULL)
[mirror_lxc.git] / src / lxc / uuid.h
CommitLineData
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
14typedef union lxc_id128 lxc_id128_t;
15
16union 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 */