mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
MINOR: samples: extract the anonymous union and create the union sample_value
This extract is not really required, but it maybe will be usefull later. A comming soonpatch about simplification of stick table values will use this union
This commit is contained in:
parent
8c542cac07
commit
654398a937
@ -242,16 +242,18 @@ struct meth {
|
|||||||
struct chunk str;
|
struct chunk str;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Used to store sample constant */
|
union sample_value {
|
||||||
struct sample_data {
|
|
||||||
int type; /* SMP_T_* */
|
|
||||||
union {
|
|
||||||
long long int sint; /* used for signed 64bits integers */
|
long long int sint; /* used for signed 64bits integers */
|
||||||
struct in_addr ipv4; /* used for ipv4 addresses */
|
struct in_addr ipv4; /* used for ipv4 addresses */
|
||||||
struct in6_addr ipv6; /* used for ipv6 addresses */
|
struct in6_addr ipv6; /* used for ipv6 addresses */
|
||||||
struct chunk str; /* used for char strings or buffers */
|
struct chunk str; /* used for char strings or buffers */
|
||||||
struct meth meth; /* used for http method */
|
struct meth meth; /* used for http method */
|
||||||
} data; /* sample data */
|
};
|
||||||
|
|
||||||
|
/* Used to store sample constant */
|
||||||
|
struct sample_data {
|
||||||
|
int type; /* SMP_T_* */
|
||||||
|
union sample_value data; /* sample data */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* a sample is a typed data extracted from a stream. It has a type, contents,
|
/* a sample is a typed data extracted from a stream. It has a type, contents,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user