Initial release MARS_NWE-PCAP 0.4 - Native Administration, Print and Login Edition
This commit is contained in:
30
native/core.h
Normal file
30
native/core.h
Normal file
@@ -0,0 +1,30 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
#ifndef MARS_CORE_H
|
||||
#define MARS_CORE_H
|
||||
#include <json-c/json.h>
|
||||
#include <stddef.h>
|
||||
#include <sys/types.h>
|
||||
#include <limits.h>
|
||||
#define MAX_CONF (1024*1024)
|
||||
#define ROUNDS 600000
|
||||
extern const char *managed[];
|
||||
extern char config_path[PATH_MAX], auth_path[PATH_MAX], backup_dir[PATH_MAX];
|
||||
char *read_file(const char *,size_t,int);
|
||||
int atomic_write(const char *,const char *,size_t,mode_t);
|
||||
void sha(const char *,char out[65]);
|
||||
int random_hex(char *,size_t);
|
||||
const char *js(json_object *,const char *);
|
||||
json_object *get(json_object *,const char *);
|
||||
void addstr(json_object *,const char *,const char *);
|
||||
json_object *groups(const char *);
|
||||
char *merge(const char *,json_object *);
|
||||
json_object *validate(const char *);
|
||||
json_object *devices(void);
|
||||
json_object *backups(void);
|
||||
char *backup_read(const char *);
|
||||
int save_conf(const char *,const char *,const char *,char name[64]);
|
||||
int auth_init(void);
|
||||
int auth_verify(const char *);
|
||||
int auth_default(void);
|
||||
int auth_set(const char *,int);
|
||||
#endif
|
||||
Reference in New Issue
Block a user