First commit

This commit is contained in:
2024-09-16 20:38:18 +02:00
parent f7b5f773b1
commit f09be2ba12
15 changed files with 759 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
#ifndef DAEMON_H
#define DAEMON_H
int create_daemon();
void daemon_work();
#endif

View File

@@ -0,0 +1,8 @@
#ifndef DB_SQLITE_H
#define DB_SQLITE_H
int db_connect();
int db_disconnect();
int insert_hourly_report(double mean,double max,double min,int high,int loss,int reached);
#endif

View File

@@ -0,0 +1,4 @@
#ifndef PING_REPORT_H
#define PING_REPORT_H
#endif

View File

@@ -0,0 +1,8 @@
#ifndef STATS_H
#define STATS_H
/*@null@*/char* get_ping_from_temp_log();
void write_ping_log(char* new_ping);
void set_stats_ping();
#endif

View File

@@ -0,0 +1,9 @@
#ifndef UTILS_H
#define UTILS_H
#define STATUS_LOG "/var/log/ping-report/status.log"
void write_pid_file();
void remove_file(char* filename);
#endif