From 88d13cbf4db9247ea96aef7fb1c29d5bd4f15043 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Mon, 1 Jun 2015 13:53:01 +0200 Subject: [PATCH] MEDIUM: global: add the DeviceAtlas required elements to struct global 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/types/global.h b/include/types/global.h index ec6679d7d..edc79e13f 100644 --- a/include/types/global.h +++ b/include/types/global.h @@ -31,6 +31,10 @@ #include #include +#ifdef USE_DEVICEATLAS +#include +#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;