2024-08-29 05:53:47 +00:00
|
|
|
#define _GNU_SOURCE
|
|
|
|
|
|
|
|
#ifndef INCLUDE_FLOCK_H
|
|
|
|
#define INCLUDE_FLOCK_H
|
|
|
|
#include "lib/birdlib.h"
|
2024-09-10 09:16:49 +00:00
|
|
|
#include "lib/event.h"
|
|
|
|
#include "lib/obstacle.h"
|
2024-09-09 12:14:49 +00:00
|
|
|
#include "lib/resource.h"
|
2024-09-10 10:04:44 +00:00
|
|
|
#include "lib/socket.h"
|
2024-08-29 05:53:47 +00:00
|
|
|
|
|
|
|
void hypervisor_exposed_fork(void);
|
2024-09-04 19:33:43 +00:00
|
|
|
void hypervisor_control_socket(void);
|
2024-08-29 05:53:47 +00:00
|
|
|
|
|
|
|
struct flock_config {
|
|
|
|
const char *hypervisor_name;
|
|
|
|
const char *exec_name;
|
2024-09-04 19:33:43 +00:00
|
|
|
const char *control_socket_path;
|
2024-08-29 05:53:47 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct flock_config flock_config;
|
|
|
|
|
2024-09-10 10:04:44 +00:00
|
|
|
struct cbor_parser_context *hcs_parser_init(sock *s);
|
2024-09-09 12:14:49 +00:00
|
|
|
s64 hcs_parse(struct cbor_parser_context *ctx, const byte *buf, s64 size);
|
|
|
|
void hcs_parser_cleanup(struct cbor_parser_context *ctx);
|
|
|
|
const char *hcs_error(struct cbor_parser_context *ctx);
|
|
|
|
bool hcs_complete(struct cbor_parser_context *ctx);
|
|
|
|
|
2024-09-10 18:43:55 +00:00
|
|
|
void hexp_get_telnet(sock *, const char *name);
|
|
|
|
|
2024-09-10 09:16:49 +00:00
|
|
|
extern event reboot_event, poweroff_event;
|
|
|
|
extern event_list shutdown_event_list;
|
|
|
|
|
|
|
|
extern struct shutdown_placeholder {
|
|
|
|
struct obstacle_target obstacles;
|
|
|
|
} shutdown_placeholder;
|
2024-08-29 05:53:47 +00:00
|
|
|
#endif
|