139 lines
5.4 KiB
C
139 lines
5.4 KiB
C
/* Generated by the protocol buffer compiler. DO NOT EDIT! */
|
|
/* Generated from: config.proto */
|
|
|
|
#ifndef PROTOBUF_C_config_2eproto__INCLUDED
|
|
#define PROTOBUF_C_config_2eproto__INCLUDED
|
|
|
|
#include <protobuf-c/protobuf-c.h>
|
|
|
|
PROTOBUF_C__BEGIN_DECLS
|
|
#if PROTOBUF_C_VERSION_NUMBER < 1000000
|
|
#error This file was generated by a newer version of protoc-c which is incompatible with your libprotobuf-c headers. Please update your headers.
|
|
#elif 1002001 < PROTOBUF_C_MIN_COMPILER_VERSION
|
|
#error This file was generated by an older version of protoc-c which is incompatible with your libprotobuf-c headers. Please regenerate this file with a newer version of protoc-c.
|
|
#endif
|
|
typedef struct _Nsjail__IdMap Nsjail__IdMap;
|
|
typedef struct _Nsjail__NsJailConfig Nsjail__NsJailConfig;
|
|
|
|
/* --- enums --- */
|
|
|
|
typedef enum _Nsjail__Mode {
|
|
NSJAIL__MODE__LISTEN = 0,
|
|
NSJAIL__MODE__ONCE = 1,
|
|
NSJAIL__MODE__RERUN = 2,
|
|
NSJAIL__MODE__EXECVE = 3 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(NSJAIL__MODE)
|
|
} Nsjail__Mode;
|
|
typedef enum _Nsjail__LogLevel {
|
|
NSJAIL__LOG_LEVEL__DEBUG = 0,
|
|
NSJAIL__LOG_LEVEL__INFO = 1,
|
|
NSJAIL__LOG_LEVEL__WARNING = 2,
|
|
NSJAIL__LOG_LEVEL__ERROR = 3,
|
|
NSJAIL__LOG_LEVEL__FATAL = 4 PROTOBUF_C__FORCE_ENUM_TO_BE_INT_SIZE(NSJAIL__LOG_LEVEL)
|
|
} Nsjail__LogLevel;
|
|
|
|
/* --- messages --- */
|
|
|
|
struct _Nsjail__IdMap {
|
|
ProtobufCMessage base;
|
|
uint32_t inside_id;
|
|
int32_t global_id;
|
|
uint32_t count;
|
|
};
|
|
#define NSJAIL__ID_MAP__INIT \
|
|
{ PROTOBUF_C_MESSAGE_INIT (&nsjail__id_map__descriptor) \
|
|
, 0, -1, 1u }
|
|
|
|
struct _Nsjail__NsJailConfig {
|
|
ProtobufCMessage base;
|
|
Nsjail__Mode mode;
|
|
protobuf_c_boolean has_chroot_dir;
|
|
ProtobufCBinaryData chroot_dir;
|
|
protobuf_c_boolean is_root_rw;
|
|
ProtobufCBinaryData hostname;
|
|
ProtobufCBinaryData cwd;
|
|
uint32_t port;
|
|
ProtobufCBinaryData bindhost;
|
|
uint32_t max_conns_per_ip;
|
|
uint32_t time_limit;
|
|
protobuf_c_boolean daemon;
|
|
protobuf_c_boolean has_log_file;
|
|
ProtobufCBinaryData log_file;
|
|
protobuf_c_boolean has_log_level;
|
|
Nsjail__LogLevel log_level;
|
|
protobuf_c_boolean keep_env;
|
|
protobuf_c_boolean silent;
|
|
protobuf_c_boolean skip_setsid;
|
|
size_t n_pass_fd;
|
|
int32_t *pass_fd;
|
|
protobuf_c_boolean pivot_root_only;
|
|
protobuf_c_boolean disable_no_new_privs;
|
|
uint64_t rlimit_as;
|
|
uint64_t rlimit_core;
|
|
uint64_t rlimit_cpu;
|
|
uint64_t rlimit_fsize;
|
|
uint64_t rlimit_nofile;
|
|
protobuf_c_boolean has_rlimit_nproc;
|
|
uint64_t rlimit_nproc;
|
|
protobuf_c_boolean has_rlimit_stack;
|
|
uint64_t rlimit_stack;
|
|
protobuf_c_boolean persona_addr_compat_layout;
|
|
protobuf_c_boolean persona_mmap_page_zero;
|
|
protobuf_c_boolean persona_read_implies_exec;
|
|
protobuf_c_boolean persona_addr_limit_3gb;
|
|
protobuf_c_boolean persona_addr_no_randomize;
|
|
protobuf_c_boolean clone_newnet;
|
|
protobuf_c_boolean clone_newuser;
|
|
protobuf_c_boolean clone_newns;
|
|
protobuf_c_boolean clone_newpid;
|
|
protobuf_c_boolean clone_newipc;
|
|
protobuf_c_boolean clone_newuts;
|
|
protobuf_c_boolean clone_newcgroup;
|
|
size_t n_newuidmap;
|
|
Nsjail__IdMap **newuidmap;
|
|
size_t n_newgidmap;
|
|
Nsjail__IdMap **newgidmap;
|
|
};
|
|
extern uint8_t nsjail__ns_jail_config__hostname__default_value_data[];
|
|
extern uint8_t nsjail__ns_jail_config__cwd__default_value_data[];
|
|
extern uint8_t nsjail__ns_jail_config__bindhost__default_value_data[];
|
|
#define NSJAIL__NS_JAIL_CONFIG__INIT \
|
|
{ PROTOBUF_C_MESSAGE_INIT (&nsjail__ns_jail_config__descriptor) \
|
|
, NSJAIL__MODE__ONCE, 0,{0,NULL}, 0, { 6, nsjail__ns_jail_config__hostname__default_value_data }, { 1, nsjail__ns_jail_config__cwd__default_value_data }, 0u, { 2, nsjail__ns_jail_config__bindhost__default_value_data }, 0u, 600u, 0, 0,{0,NULL}, 0,0, 0, 0, 0, 0,NULL, 0, 0, 512ull, 0ull, 600ull, 1ull, 32ull, 0,0, 0,0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0,NULL, 0,NULL }
|
|
|
|
/* Nsjail__IdMap methods */
|
|
void nsjail__id_map__init(Nsjail__IdMap * message);
|
|
size_t nsjail__id_map__get_packed_size(const Nsjail__IdMap * message);
|
|
size_t nsjail__id_map__pack(const Nsjail__IdMap * message, uint8_t * out);
|
|
size_t nsjail__id_map__pack_to_buffer(const Nsjail__IdMap * message, ProtobufCBuffer * buffer);
|
|
Nsjail__IdMap *nsjail__id_map__unpack
|
|
(ProtobufCAllocator * allocator, size_t len, const uint8_t * data);
|
|
void nsjail__id_map__free_unpacked(Nsjail__IdMap * message, ProtobufCAllocator * allocator);
|
|
/* Nsjail__NsJailConfig methods */
|
|
void nsjail__ns_jail_config__init(Nsjail__NsJailConfig * message);
|
|
size_t nsjail__ns_jail_config__get_packed_size(const Nsjail__NsJailConfig * message);
|
|
size_t nsjail__ns_jail_config__pack(const Nsjail__NsJailConfig * message, uint8_t * out);
|
|
size_t nsjail__ns_jail_config__pack_to_buffer
|
|
(const Nsjail__NsJailConfig * message, ProtobufCBuffer * buffer);
|
|
Nsjail__NsJailConfig *nsjail__ns_jail_config__unpack
|
|
(ProtobufCAllocator * allocator, size_t len, const uint8_t * data);
|
|
void nsjail__ns_jail_config__free_unpacked
|
|
(Nsjail__NsJailConfig * message, ProtobufCAllocator * allocator);
|
|
/* --- per-message closures --- */
|
|
|
|
typedef void (*Nsjail__IdMap_Closure)
|
|
(const Nsjail__IdMap * message, void *closure_data);
|
|
typedef void (*Nsjail__NsJailConfig_Closure)
|
|
(const Nsjail__NsJailConfig * message, void *closure_data);
|
|
|
|
/* --- services --- */
|
|
|
|
/* --- descriptors --- */
|
|
|
|
extern const ProtobufCEnumDescriptor nsjail__mode__descriptor;
|
|
extern const ProtobufCEnumDescriptor nsjail__log_level__descriptor;
|
|
extern const ProtobufCMessageDescriptor nsjail__id_map__descriptor;
|
|
extern const ProtobufCMessageDescriptor nsjail__ns_jail_config__descriptor;
|
|
|
|
PROTOBUF_C__END_DECLS
|
|
#endif /* PROTOBUF_C_config_2eproto__INCLUDED */
|