From: David Carlier Date: Mon, 1 Jun 2015 11:53:01 +0000 (+0200) Subject: MEDIUM: global: add the DeviceAtlas required elements to struct global X-Git-Tag: v1.6-dev2~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=88d13cbf4db9247ea96aef7fb1c29d5bd4f15043;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/types/global.h b/include/types/global.h index ec6679d7d0..edc79e13f0 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;