*/
#include <haproxy/action-t.h>
+#include <haproxy/applet.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <haproxy/frontend.h>
#include <haproxy/pool.h>
#include <haproxy/list.h>
-#include <proto/applet.h>
#include <proto/backend.h>
#include <haproxy/compression.h>
#include <haproxy/pipe.h>
#include <haproxy/regex-t.h>
-#include <types/applet.h>
+#include <haproxy/applet-t.h>
#include <haproxy/stick_table-t.h>
enum act_from {
/*
- * include/types/applet.h
+ * include/haproxy/applet-t.h
* This file describes the applet struct and associated constants.
*
- * Copyright (C) 2000-2015 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _TYPES_APPLET_H
-#define _TYPES_APPLET_H
+#ifndef _HAPROXY_APPLET_T_H
+#define _HAPROXY_APPLET_T_H
-#include <haproxy/api-t.h>
-#include <haproxy/buf.h>
+#include <haproxy/buf-t.h>
#include <haproxy/dynbuf-t.h>
#include <haproxy/freq_ctr-t.h>
#include <haproxy/hlua-t.h>
#include <haproxy/obj_type-t.h>
+#include <haproxy/api-t.h>
#include <haproxy/xref-t.h>
+
#include <types/proxy.h>
#include <types/stream.h>
+/* flags for appctx->state */
+#define APPLET_WANT_DIE 0x01 /* applet was running and requested to die */
+
struct appctx;
/* Applet descriptor */
unsigned int timeout; /* execution timeout. */
};
-#define APPLET_WANT_DIE 0x01 /* applet was running and requested to die */
-
-#define APPCTX_CLI_ST1_PROMPT (1 << 0)
-#define APPCTX_CLI_ST1_PAYLOAD (1 << 1)
-#define APPCTX_CLI_ST1_NOLF (1 << 2)
-
/* Context of a running applet. */
struct appctx {
enum obj_type obj_type; /* OBJ_TYPE_APPCTX */
} ctx; /* context-specific variables used by any applet */
};
-#endif /* _TYPES_APPLET_H */
+#endif /* _HAPROXY_APPLET_T_H */
/*
* Local variables:
/*
- * include/proto/applet.h
+ * include/haproxy/applet.h
* This file contains applet function prototypes
*
* Copyright (C) 2000-2015 Willy Tarreau - w@1wt.eu
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _PROTO_APPLET_H
-#define _PROTO_APPLET_H
+#ifndef _HAPROXY_APPLET_H
+#define _HAPROXY_APPLET_H
#include <stdlib.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
-#include <haproxy/pool.h>
#include <haproxy/list.h>
-#include <types/applet.h>
+#include <haproxy/pool.h>
#include <haproxy/task.h>
extern unsigned int nb_applets;
extern struct pool_head *pool_head_appctx;
struct task *task_run_applet(struct task *t, void *context, unsigned short state);
-
int appctx_buf_available(void *arg);
task_wakeup(appctx->t, TASK_WOKEN_OTHER);
}
-#endif /* _PROTO_APPLET_H */
+#endif /* _HAPROXY_APPLET_H */
/*
* Local variables:
#ifndef _HAPROXY_OBJ_TYPE_H
#define _HAPROXY_OBJ_TYPE_H
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <haproxy/check-t.h>
#include <haproxy/connection-t.h>
#include <haproxy/listener-t.h>
#include <haproxy/obj_type-t.h>
#include <haproxy/pool.h>
-#include <types/applet.h>
#include <types/proxy.h>
#include <types/server.h>
#include <types/stream.h>
#ifndef _PROTO_CLI_H
#define _PROTO_CLI_H
+#include <haproxy/applet-t.h>
#include <haproxy/global.h>
-#include <types/applet.h>
#include <types/channel.h>
#include <types/cli.h>
#include <types/stream.h>
#ifndef _PROTO_PROXY_H
#define _PROTO_PROXY_H
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <haproxy/listener-t.h>
#include <haproxy/ticks.h>
#include <haproxy/time.h>
-#include <types/applet.h>
#include <haproxy/global-t.h>
#include <types/proxy.h>
#include <haproxy/freq_ctr.h>
#include <unistd.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <haproxy/dns-t.h>
#include <haproxy/time.h>
-#include <types/applet.h>
#include <types/proxy.h>
#include <types/queue.h>
#include <types/server.h>
#ifndef _PROTO_STATS_H
#define _PROTO_STATS_H
+#include <haproxy/applet-t.h>
#include <haproxy/tools.h>
#include <haproxy/api.h>
-#include <types/applet.h>
#include <types/stream_interface.h>
#include <types/stats.h>
#include <stdlib.h>
+#include <haproxy/applet.h>
#include <haproxy/api.h>
#include <haproxy/connection.h>
#include <types/stream.h>
#include <types/stream_interface.h>
-#include <proto/applet.h>
#include <proto/channel.h>
#ifndef _TYPES_CLI_H
#define _TYPES_CLI_H
+#include <haproxy/applet-t.h>
#include <haproxy/list-t.h>
-#include <types/applet.h>
/* Access level for a stats socket */
#define ACCESS_LVL_NONE 0
#define ACCESS_EXPERT 0x20 /* access to dangerous commands reserved to experts */
+/* flags for appctx->st1 */
+#define APPCTX_CLI_ST1_PROMPT (1 << 0)
+#define APPCTX_CLI_ST1_PAYLOAD (1 << 1)
+#define APPCTX_CLI_ST1_NOLF (1 << 2)
+
struct cli_kw {
const char *str_kw[5]; /* keywords ended by NULL, limited to 5
separated keywords combination */
#include <stdio.h>
#include <stdlib.h>
+#include <haproxy/applet.h>
#include <haproxy/api.h>
#include <haproxy/list.h>
#include <haproxy/task.h>
-#include <proto/applet.h>
#include <proto/channel.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
#include <net/if.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <haproxy/check.h>
#include <haproxy/version.h>
#include <haproxy/base64.h>
-#include <types/applet.h>
#include <haproxy/global.h>
#include <types/stats.h>
#include <haproxy/net_helper.h>
#include <haproxy/vars.h>
-#include <types/applet.h>
#include <types/cli.h>
#include <haproxy/global.h>
#include <types/stats.h>
#error "Requires Lua 5.3 or later."
#endif
+#include <haproxy/applet.h>
#include <haproxy/api.h>
#include <import/ebpttree.h>
#include <types/stats.h>
#include <haproxy/arg.h>
-#include <proto/applet.h>
#include <proto/channel.h>
#include <proto/cli.h>
#include <proto/stats.h>
#include <sys/time.h>
#include <sys/uio.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <haproxy/frontend.h>
#include <haproxy/http.h>
#include <haproxy/global.h>
#include <types/log.h>
-#include <proto/applet.h>
#include <proto/cli.h>
#include <haproxy/fd.h>
#include <proto/log.h>
#include <stdio.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <haproxy/map.h>
#include <haproxy/pattern.h>
#include <haproxy/regex.h>
#include <haproxy/tools.h>
-#include <types/applet.h>
#include <types/cli.h>
#include <types/stats.h>
-#include <proto/applet.h>
#include <haproxy/arg.h>
#include <proto/cli.h>
#include <proto/log.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <haproxy/applet.h>
#include <haproxy/api.h>
#include <haproxy/dict.h>
#include <haproxy/frontend.h>
#include <types/stats.h>
-#include <proto/applet.h>
#include <proto/channel.h>
#include <proto/cli.h>
#include <haproxy/fd.h>
*/
#include <errno.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
-#include <types/applet.h>
#include <types/cli.h>
#include <haproxy/global.h>
#include <types/stats.h>
#include <haproxy/activity-t.h>
-#include <proto/applet.h>
#include <proto/cli.h>
#include <proto/channel.h>
#include <proto/log.h>
#include <sys/socket.h>
#include <sys/stat.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <haproxy/errors.h>
#include <types/cli.h>
#include <types/stats.h>
-#include <proto/applet.h>
#include <proto/cli.h>
#include <proto/backend.h>
#include <haproxy/fd.h>
*/
#include <stdlib.h>
+#include <haproxy/applet.h>
#include <haproxy/api.h>
#include <haproxy/buf.h>
#include <haproxy/thread.h>
-#include <types/applet.h>
#include <proto/cli.h>
#include <haproxy/ring.h>
#include <proto/stream_interface.h>
#include <ctype.h>
#include <errno.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <import/xxhash.h>
#include <haproxy/task.h>
#include <haproxy/time.h>
-#include <types/applet.h>
#include <types/cli.h>
#include <types/cli.h>
#include <types/stats.h>
-#include <proto/applet.h>
#include <proto/cli.h>
#include <haproxy/port_range.h>
#include <haproxy/protocol.h>
#include <import/ebpttree.h>
#include <import/ebsttree.h>
-#include <types/applet.h>
#include <types/cli.h>
#include <types/ssl_sock.h>
#include <types/stats.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <haproxy/applet-t.h>
#include <haproxy/api.h>
#include <common/cfgparse.h>
#include <haproxy/check.h>
#include <haproxy/version.h>
#include <haproxy/base64.h>
-#include <types/applet.h>
#include <types/cli.h>
#include <types/stats.h>
#include <haproxy/acl.h>
#include <haproxy/action.h>
+#include <haproxy/applet.h>
#include <haproxy/api.h>
#include <haproxy/capture.h>
#include <common/cfgparse.h>
#include <haproxy/tcp_rules.h>
#include <haproxy/vars.h>
-#include <types/applet.h>
#include <types/cli.h>
#include <types/filters.h>
#include <types/stats.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <haproxy/applet.h>
#include <haproxy/api.h>
#include <haproxy/connection.h>
#include <haproxy/dynbuf.h>
#include <haproxy/time.h>
#include <haproxy/task.h>
-#include <proto/applet.h>
#include <proto/channel.h>
#include <haproxy/pipe.h>
#include <proto/proxy.h>
#include <haproxy/namespace.h>
#include <haproxy/task.h>
#include <haproxy/tools.h>
-#include <proto/applet.h>
#include <haproxy/proto_udp.h>
#include <proto/ssl_sock.h>
#include <proto/stream_interface.h>