File: infect-util.h

package info (click to toggle)
criu 4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,584 kB
  • sloc: ansic: 139,280; python: 7,484; sh: 3,824; java: 2,799; makefile: 2,659; asm: 1,137; perl: 206; xml: 117; exp: 45
file content (24 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#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