]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: global: add the DeviceAtlas required elements to struct global
authorDavid Carlier <dcarlier@afilias.info>
Mon, 1 Jun 2015 11:53:01 +0000 (13:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Jun 2015 11:24:49 +0000 (13:24 +0200)
This diff is the raw C struct definition of all DeviceAtlas module
data needed added to the main global struct haproxy configuration.
The three first members are needed for both init and deinit phases
as some dynamic memory allocations are done.
The useragentid serves to hold during the whole lifecycle of the
module the User-Agent HTTP Header identifier from the DeviceAtlas
data during the init process.

include/types/global.h

index ec6679d7d0bb1d4cc159f1044628f5f3ae325e5d..edc79e13f0cbdad520f178879d78d54407aa949b 100644 (file)
 #include <types/proxy.h>
 #include <types/task.h>
 
+#ifdef USE_DEVICEATLAS
+#include <dac.h>
+#endif
+
 #ifndef UNIX_MAX_PATH
 #define UNIX_MAX_PATH 108
 #endif
@@ -169,6 +173,16 @@ struct global {
        unsigned long cpu_map[LONGBITS];  /* list of CPU masks for the 32/64 first processes */
 #endif
        struct proxy *stats_fe;     /* the frontend holding the stats settings */
+#ifdef USE_DEVICEATLAS
+       struct {
+               void *atlasimgptr;
+               char *jsonpath;
+               da_atlas_t atlas;
+               da_evidence_id_t useragentid;
+               da_severity_t loglevel;
+               char separator;
+       } deviceatlas;
+#endif
 };
 
 extern struct global global;