blob: 657f4db9c09248784fcd4ea187a63cb9e88c23d9 [file] [log] [blame]
William Lallemand9ed62032016-11-21 17:49:11 +01001/*
2 * include/proto/cli.h
3 * This file contains definitions of some primitives to dedicated to
4 * statistics output.
5 *
6 * Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation, version 2.1
11 * exclusively.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef _PROTO_CLI_H
24#define _PROTO_CLI_H
25
Willy Tarreau17306b92018-11-22 11:45:04 +010026#include <types/applet.h>
27#include <types/channel.h>
28#include <types/cli.h>
29#include <types/global.h>
30#include <types/stream.h>
31
William Lallemand9ed62032016-11-21 17:49:11 +010032
William Lallemand9ed62032016-11-21 17:49:11 +010033void cli_register_kw(struct cli_kw_list *kw_list);
Thierry Fournier5622e162020-11-28 20:10:08 +010034struct cli_kw* cli_find_kw_exact(char **args);
William Lallemand9ed62032016-11-21 17:49:11 +010035
Willy Tarreaude57a572016-11-23 17:01:39 +010036int cli_has_level(struct appctx *appctx, int level);
37
William Lallemand7175e682019-04-01 11:30:00 +020038int cli_parse_default(char **args, char *payload, struct appctx *appctx, void *private);
39
William Lallemand309dc9a2018-10-26 14:47:45 +020040/* mworker proxy functions */
41
William Lallemand8a022572018-10-26 14:47:35 +020042int mworker_cli_proxy_create();
William Lallemande7361152018-10-26 14:47:36 +020043int mworker_cli_proxy_new_listener(char *line);
William Lallemandce83b4a2018-10-26 14:47:30 +020044int mworker_cli_sockpair_new(struct mworker_proc *mworker_proc, int proc);
William Lallemand309dc9a2018-10-26 14:47:45 +020045void mworker_cli_proxy_stop();
William Lallemandce83b4a2018-10-26 14:47:30 +020046
William Lallemandcf62f7e2018-10-26 14:47:40 +020047/* proxy mode cli functions */
48
49/* analyzers */
50int pcli_wait_for_request(struct stream *s, struct channel *req, int an_bit);
51int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit);
52
53
William Lallemand9ed62032016-11-21 17:49:11 +010054#endif /* _PROTO_CLI_H */
55