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.
This commit is contained in:
David Carlier 2015-06-01 13:53:01 +02:00 committed by Willy Tarreau
parent 8167f30661
commit 88d13cbf4d

View File

@ -31,6 +31,10 @@
#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;