Initial commit. It's far from finished.

This commit is contained in:
2016-08-08 11:12:06 +03:00
commit e9f3673bfd
30 changed files with 1948 additions and 0 deletions

30
agent/job.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef JOB_H
#define JOB_H
#include "agent_ssl.h"
#include "../protocol.h"
enum pthread_state { WAIT, WORK };
enum job_slot_state { FREE, FULL };
struct job_args {
struct msg buf;
unsigned short slot;
SSL *ssl;
};
void* exec_unix(void *args);
void* install_pkg(void *args);
void* query_pkg(void *args);
void* delete_pkg(void *args);
void* list_pkgs(void *args);
void* update_pkg(void *args);
void* update_pkgs(void *args);
void* get_os(void *args);
void* get_kernel(void *args);
void* get_uptime(void *args);
void* get_memory(void *args);
#define MAX_AGENT_JOBS 10
#endif /* JOB_H */