blob: a9bfcc674fbb1fd52210b37f2a866d1bfab4af07 [file] [log] [blame]
Miroslav Zagorac70230c62020-12-09 16:54:31 +01001/***
2 * Copyright 2020 HAProxy Technologies
3 *
4 * This file is part of the HAProxy OpenTracing filter.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20#ifndef _OPENTRACING_GROUP_H_
21#define _OPENTRACING_GROUP_H_
22
23#define FLT_OT_ACTION_GROUP "ot-group"
24
25enum FLT_OT_ARG_enum {
26 FLT_OT_ARG_FILTER_ID = 0,
27 FLT_OT_ARG_GROUP_ID,
28
29 FLT_OT_ARG_FLT_CONF = 0,
30 FLT_OT_ARG_CONF,
31 FLT_OT_ARG_GROUP,
32};
33
34/*
35 * A description of the macro arguments can be found in the structure
36 * flt_ot_group_data definition
37 */
38#define FLT_OT_GROUP_DEFINES \
39 FLT_OT_GROUP_DEF(ACT_F_TCP_REQ_CON, SMP_VAL_FE_CON_ACC, SMP_OPT_DIR_REQ) \
40 FLT_OT_GROUP_DEF(ACT_F_TCP_REQ_SES, SMP_VAL_FE_SES_ACC, SMP_OPT_DIR_REQ) \
41 FLT_OT_GROUP_DEF(ACT_F_TCP_REQ_CNT, SMP_VAL_FE_REQ_CNT, SMP_OPT_DIR_REQ) \
42 FLT_OT_GROUP_DEF(ACT_F_TCP_RES_CNT, SMP_VAL_BE_RES_CNT, SMP_OPT_DIR_RES) \
43 FLT_OT_GROUP_DEF(ACT_F_HTTP_REQ, SMP_VAL_FE_HRQ_HDR, SMP_OPT_DIR_REQ) \
44 FLT_OT_GROUP_DEF(ACT_F_HTTP_RES, SMP_VAL_BE_HRS_HDR, SMP_OPT_DIR_RES)
45
46struct flt_ot_group_data {
47 enum act_from act_from; /* ACT_F_* */
48 uint smp_val; /* Valid FE/BE fetch location. */
49 uint smp_opt_dir; /* Fetch direction (request/response). */
50};
51
52#endif /* _OPENTRACING_GROUP_H_ */
53
54/*
55 * Local variables:
56 * c-indent-level: 8
57 * c-basic-offset: 8
58 * End:
59 *
60 * vi: noexpandtab shiftwidth=8 tabstop=8
61 */