mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 17:14:28 +00:00
criu_run_id will be used in upcoming changes to create and remove network rules for network locking. Instead of trying to come up with a way to create unique IDs, just use an existing library. libuuid should be installed on most systems as it is indirectly required by systemd (via libmount). Signed-off-by: Adrian Reber <areber@redhat.com>
24 lines
745 B
C
24 lines
745 B
C
#ifndef __COMPEL_INFECT_UTIL_H__
|
|
#define __COMPEL_INFECT_UTIL_H__
|
|
|
|
#include "common/compiler.h"
|
|
|
|
/**
|
|
* The length of the hash is based on what libuuid provides.
|
|
* According to the manpage this is:
|
|
*
|
|
* The uuid_unparse() function converts the supplied UUID uu from the binary
|
|
* representation into a 36-byte string (plus trailing '\0')
|
|
*/
|
|
#define RUN_ID_HASH_LENGTH 37
|
|
|
|
/*
|
|
* compel_run_id is a unique value of the current run. It can be used to
|
|
* generate resource ID-s to avoid conflicts with other processes.
|
|
*/
|
|
extern char compel_run_id[RUN_ID_HASH_LENGTH];
|
|
|
|
struct parasite_ctl;
|
|
extern int __must_check compel_util_send_fd(struct parasite_ctl *ctl, int fd);
|
|
extern int compel_util_recv_fd(struct parasite_ctl *ctl, int *pfd);
|
|
#endif
|