path: root/src/tagr.h
Side-by-side diff
Diffstat (limited to 'src/tagr.h') (more/less context) (ignore whitespace changes)
1 files changed, 36 insertions, 5 deletions
diff --git a/src/tagr.h b/src/tagr.h
index f95a249..f32b014 100644
--- a/src/tagr.h
+++ b/src/tagr.h
@@ -20,6 +20,15 @@
#include <sysexits.h>
#include <grecs.h>
+# define TAGR_ARG_UNUSED __attribute__ ((__unused__))
+# define TAGR_PRINTFLIKE(fmt,narg) \
+ __attribute__ ((__format__ (__printf__, fmt, narg)))
#define TAGR_TEMPLATE SYSCONFDIR "/tagr.tmpl"
#define TAGR_PIDFILE "/var/run/"
@@ -51,6 +60,13 @@ extern unsigned update_interval;
extern int single_process_option;
extern double cut_out_fraction;
+extern unsigned lock_retry_count_option;
+extern unsigned lock_retry_timeout_option;
+extern unsigned stream_idle_timeout;
+extern char *hostname;
extern char *user;
extern char *basedir;
extern char *configfile;
@@ -143,9 +159,9 @@ extern int log_print_severity;
#define L_CRIT 5
void init_syslog (char *tag);
-void logmsg (int level, const char *fmt, ...);
-void die (int code, const char *fmt, ...);
-void verbose (int level, const char *fmt, ...);
+void logmsg (int level, const char *fmt, ...) TAGR_PRINTFLIKE(2,3);
+void die (int code, const char *fmt, ...) TAGR_PRINTFLIKE(2,3);
+void verbose (int level, const char *fmt, ...) TAGR_PRINTFLIKE(2,3);
@@ -218,9 +234,13 @@ void close_db ();
void read_db (struct monitor *mon, struct traffic_record **tr);
void write_db (struct monitor *mon, struct traffic_record *tr);
void list_db (void);
-void rebuild (int force);
void tr_init (struct traffic_record *tr);
+#define TAGR_UPD_FORCE 0x0001
+#define TAGR_UPD_LASTTIME 0x0002
+void rebuild (int flags);
/* stat.c */
void update_stats (struct monitor *mon, struct traffic_sample *sample,
struct traffic_record *tr);
@@ -242,7 +262,7 @@ void scale_sample (struct monitor *mon,
const struct traffic_history *in,
struct traffic_history *out);
int update_output (struct monitor *mon, struct traffic_record *tr,
- time_t timestamp, int force);
+ time_t timestamp, int flags);
/* graph.c */
@@ -288,7 +308,18 @@ void open_servers (void);
void close_servers (void);
void server_loop (void);
+void trim_crlf (char *buf);
int tagr_idle (void);
+char *tagr_local_hostname (void);
+const char *tagr_auth_init (void);
+int tagr_auth (const char *username, const char *authstr);
+/* udb.c */
+extern char *tagr_udb_name;
+int udb_get_password (const char *username, char **password);
+void udb_free_password (char *pass);

Return to:

Send suggestions and report system problems to the System administrator.