blob: cd1620cb7217fcc2e16b953a5cea77c6946bbfa0 [file] [log] [blame]
Thierry FOURNIER4834bc72015-06-06 19:29:07 +02001#ifndef _TYPES_VARS_H
2#define _TYPES_VARS_H
3
4#include <common/mini-clist.h>
5
6#include <types/sample.h>
7
8enum vars_scope {
9 SCOPE_SESS = 0,
10 SCOPE_TXN,
11 SCOPE_REQ,
12 SCOPE_RES,
Christopher Fauletff2613e2016-11-09 11:36:17 +010013 SCOPE_PROC,
Thierry FOURNIER4834bc72015-06-06 19:29:07 +020014};
15
16struct vars {
17 struct list head;
18 enum vars_scope scope;
19 unsigned int size;
20};
21
22/* This struct describes a variable. */
23struct var_desc {
24 const char *name; /* Contains the normalized variable name. */
25 enum vars_scope scope;
26};
27
28struct var {
29 struct list l; /* Used for chaining vars. */
30 const char *name; /* Contains the variable name. */
Thierry FOURNIER12ba0c22015-08-14 00:02:11 +020031 struct sample_data data; /* data storage. */
Thierry FOURNIER4834bc72015-06-06 19:29:07 +020032};
33
34#endif