From 6b0a0fb2f98cfee39ee983e7e12b9dead42b7d7d Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Mon, 4 Apr 2022 11:29:28 +0200 Subject: [PATCH] CLEANUP: tree-wide: Remove any ref to stream-interfaces Stream-interfaces are gone. Corresponding files can be safely be removed. In addition, comments are updated accordingly. --- Makefile | 2 +- addons/promex/service-prometheus.c | 1 - include/haproxy/channel-t.h | 6 +-- include/haproxy/channel.h | 4 +- include/haproxy/conn_stream.h | 2 +- include/haproxy/cs_utils.h | 8 +-- include/haproxy/obj_type.h | 1 - include/haproxy/stats.h | 2 - include/haproxy/stream-t.h | 1 - include/haproxy/stream_interface-t.h | 63 ------------------------ include/haproxy/stream_interface.h | 52 -------------------- src/activity.c | 1 - src/applet.c | 3 +- src/backend.c | 16 +++--- src/cache.c | 1 - src/channel.c | 8 +-- src/check.c | 5 +- src/cli.c | 11 ++--- src/conn_stream.c | 40 +++++++-------- src/connection.c | 7 ++- src/debug.c | 1 + src/dns.c | 2 +- src/filters.c | 1 - src/flt_spoe.c | 2 +- src/frontend.c | 1 - src/hlua.c | 3 +- src/http_act.c | 1 - src/http_ana.c | 1 - src/http_client.c | 1 - src/http_fetch.c | 1 - src/log.c | 3 +- src/map.c | 1 - src/mux_fcgi.c | 2 +- src/mux_h1.c | 2 +- src/mux_h2.c | 2 +- src/mworker.c | 1 - src/peers.c | 1 - src/pool.c | 3 +- src/proxy.c | 3 +- src/queue.c | 1 - src/raw_sock.c | 1 - src/resolvers.c | 1 - src/ring.c | 1 - src/server.c | 1 - src/sink.c | 2 +- src/ssl_ckch.c | 1 - src/ssl_crtlist.c | 1 - src/ssl_sock.c | 1 - src/stats.c | 7 ++- src/stick_table.c | 5 +- src/stream.c | 24 +++++---- src/stream_interface.c | 73 ---------------------------- src/tcp_act.c | 1 - src/tcp_rules.c | 5 +- src/tcp_sample.c | 3 +- src/tools.c | 1 + src/xprt_quic.c | 1 - 57 files changed, 84 insertions(+), 312 deletions(-) delete mode 100644 include/haproxy/stream_interface-t.h delete mode 100644 include/haproxy/stream_interface.h delete mode 100644 src/stream_interface.c diff --git a/Makefile b/Makefile index 026e334c6..fd1caa287 100644 --- a/Makefile +++ b/Makefile @@ -929,7 +929,7 @@ OBJS += src/mux_h2.o src/mux_fcgi.o src/http_ana.o src/mux_h1.o \ src/resolvers.o src/backend.o src/cfgparse.o src/http_htx.o src/cli.o \ src/proxy.o src/pattern.o src/connection.o src/check.o \ src/cfgparse-listen.o src/cache.o src/haproxy.o src/http_act.o \ - src/http_fetch.o src/stream_interface.o src/dns.o src/listener.o \ + src/http_fetch.o src/dns.o src/listener.o \ src/http_client.o src/vars.o src/tcp_rules.o src/debug.o src/sink.o \ src/server_state.o src/filters.o src/h2.o src/fcgi-app.o src/task.o \ src/payload.o src/h1_htx.o src/mjson.o src/h1.o src/map.o \ diff --git a/addons/promex/service-prometheus.c b/addons/promex/service-prometheus.c index 078b4420a..99c3ca70f 100644 --- a/addons/promex/service-prometheus.c +++ b/addons/promex/service-prometheus.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/include/haproxy/channel-t.h b/include/haproxy/channel-t.h index 01a0a2488..2bb68a226 100644 --- a/include/haproxy/channel-t.h +++ b/include/haproxy/channel-t.h @@ -32,14 +32,14 @@ * before doing further I/O : * CF_*_NULL, CF_*_PARTIAL * - * - pure status flags, reported by stream-interface layer, which must also + * - pure status flags, reported by conn-stream layer, which must also * be cleared before doing further I/O : * CF_*_TIMEOUT, CF_*_ERROR * * - read-only indicators reported by lower data levels : * CF_STREAMER, CF_STREAMER_FAST * - * - write-once status flags reported by the stream-interface layer : + * - write-once status flags reported by the conn-stream layer : * CF_SHUTR, CF_SHUTW * * - persistent control flags managed only by application level : @@ -48,7 +48,7 @@ * The flags have been arranged for readability, so that the read and write * bits have the same position in a byte (read being the lower byte and write * the second one). All flag names are relative to the channel. For instance, - * 'write' indicates the direction from the channel to the stream interface. + * 'write' indicates the direction from the channel to the conn-stream. */ #define CF_READ_NULL 0x00000001 /* last read detected on producer side */ diff --git a/include/haproxy/channel.h b/include/haproxy/channel.h index 76323cf0e..52db59f25 100644 --- a/include/haproxy/channel.h +++ b/include/haproxy/channel.h @@ -28,11 +28,11 @@ #include #include #include -#include #include #include #include +struct conn_stream; /* perform minimal intializations, report 0 in case of error, 1 if OK. */ int init_channel(); @@ -477,7 +477,7 @@ static inline int channel_htx_may_recv(const struct channel *chn, const struct h * are considered as available since they're supposed to leave the buffer. The * test is optimized to avoid as many operations as possible for the fast case * and to be used as an "if" condition. Just like channel_recv_limit(), we - * never allow to overwrite the reserve until the output stream interface is + * never allow to overwrite the reserve until the output conn-stream is * connected, otherwise we could spin on a POST with http-send-name-header. */ static inline int channel_may_recv(const struct channel *chn) diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index ec8823584..7cf44ada4 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -236,7 +236,7 @@ static inline struct conn_stream *cs_conn_get_first(const struct connection *con } -/* Returns non-zero if the stream interface's Rx path is blocked */ +/* Returns non-zero if the conn-stream's Rx path is blocked */ static inline int cs_rx_blocked(const struct conn_stream *cs) { return !!(cs->endp->flags & CS_EP_RXBLK_ANY); diff --git a/include/haproxy/cs_utils.h b/include/haproxy/cs_utils.h index 3f574479e..684cb589c 100644 --- a/include/haproxy/cs_utils.h +++ b/include/haproxy/cs_utils.h @@ -29,9 +29,9 @@ #include #include #include +#include #include #include -#include void cs_update_rx(struct conn_stream *cs); void cs_update_tx(struct conn_stream *cs); @@ -151,7 +151,7 @@ static inline int cs_is_conn_error(const struct conn_stream *cs) * failure, non-zero otherwise. If no buffer is available, the requester, * represented by the pointer, will be added in the list of objects * waiting for an available buffer, and CS_EP_RXBLK_BUFF will be set on the - * stream-int and CS_EP_RX_WAIT_EP cleared. The requester will be responsible + * conn-stream and CS_EP_RX_WAIT_EP cleared. The requester will be responsible * for calling this function to try again once woken up. */ static inline int cs_alloc_ibuf(struct conn_stream *cs, struct buffer_wait *wait) @@ -288,7 +288,7 @@ static inline void cs_shutw(struct conn_stream *cs) /* This is to be used after making some room available in a channel. It will * return without doing anything if the conn-stream's RX path is blocked. - * It will automatically mark the stream interface as busy processing the end + * It will automatically mark the conn-stream as busy processing the end * point in order to avoid useless repeated wakeups. * It will then call ->chk_rcv() to enable receipt of new data. */ @@ -320,7 +320,7 @@ static inline void cs_update(struct conn_stream *cs) cs_update_tx(cs); } -/* for debugging, reports the stream interface state name */ +/* for debugging, reports the conn-stream state name */ static inline const char *cs_state_str(int state) { switch (state) { diff --git a/include/haproxy/obj_type.h b/include/haproxy/obj_type.h index 4f6fe74f8..a0406e72b 100644 --- a/include/haproxy/obj_type.h +++ b/include/haproxy/obj_type.h @@ -32,7 +32,6 @@ #include #include #include -#include static inline enum obj_type obj_type(const enum obj_type *t) { diff --git a/include/haproxy/stats.h b/include/haproxy/stats.h index 8c3aa8d8a..2d52f6fa8 100644 --- a/include/haproxy/stats.h +++ b/include/haproxy/stats.h @@ -26,7 +26,6 @@ #include #include -struct stream_interface; struct channel; struct buffer; struct proxy; @@ -58,7 +57,6 @@ int stats_fill_sv_stats(struct proxy *px, struct server *sv, int flags, int stats_fill_be_stats(struct proxy *px, int flags, struct field *stats, int len, enum stat_field *selected_field); -void stats_io_handler(struct stream_interface *si); int stats_emit_raw_data_field(struct buffer *out, const struct field *f); int stats_emit_typed_data_field(struct buffer *out, const struct field *f); int stats_emit_field_tags(struct buffer *out, const struct field *f, diff --git a/include/haproxy/stream-t.h b/include/haproxy/stream-t.h index 592fe0b93..5e3541faf 100644 --- a/include/haproxy/stream-t.h +++ b/include/haproxy/stream-t.h @@ -31,7 +31,6 @@ #include #include #include -#include #include diff --git a/include/haproxy/stream_interface-t.h b/include/haproxy/stream_interface-t.h deleted file mode 100644 index fc1a93ddc..000000000 --- a/include/haproxy/stream_interface-t.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * include/haproxy/stream_interface-t.h - * This file describes the stream_interface struct and associated constants. - * - * Copyright (C) 2000-2014 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 - * License as published by the Free Software Foundation, version 2.1 - * exclusively. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef _HAPROXY_STREAM_INTERFACE_T_H -#define _HAPROXY_STREAM_INTERFACE_T_H - -#include -#include -#include - -struct conn_stream; - -/* flags set after I/O (32 bit) */ -enum { - SI_FL_NONE = 0x00000000, /* nothing */ - /* unused: 0x00000001, 0x00000002 */ - SI_FL_ISBACK = 0x00000010, /* 0 for front-side SI, 1 for back-side */ -}; - -/* A stream interface has 3 parts : - * - the buffer side, which interfaces to the buffers. - * - the remote side, which describes the state and address of the other side. - * - the functions, which are used by the buffer side to communicate with the - * remote side from the buffer side. - */ - -/* Note that if an applet is registered, the update function will not be called - * by the session handler, so it may be used to resync flags at the end of the - * applet handler. - */ -struct stream_interface { - /* struct members used by the "buffer" side */ - /* 16-bit hole here */ - unsigned int flags; /* SI_FL_* */ - struct conn_stream *cs; /* points to the conn-streams that owns the endpoint (connection or applet) */ -}; - -#endif /* _HAPROXY_STREAM_INTERFACE_T_H */ - -/* - * Local variables: - * c-indent-level: 8 - * c-basic-offset: 8 - * End: - */ diff --git a/include/haproxy/stream_interface.h b/include/haproxy/stream_interface.h deleted file mode 100644 index cf3febc0b..000000000 --- a/include/haproxy/stream_interface.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * include/haproxy/stream_interface.h - * This file contains stream_interface function prototypes - * - * Copyright (C) 2000-2014 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 - * License as published by the Free Software Foundation, version 2.1 - * exclusively. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef _HAPROXY_STREAM_INTERFACE_H -#define _HAPROXY_STREAM_INTERFACE_H - -#include -#include -#include -#include -#include -#include - -struct stream_interface *si_new(struct conn_stream *cs); -void si_free(struct stream_interface *si); - -/* initializes a stream interface and create the event - * tasklet. - */ -static inline int si_init(struct stream_interface *si) -{ - si->flags &= SI_FL_ISBACK; - si->cs = NULL; - return 0; -} - -#endif /* _HAPROXY_STREAM_INTERFACE_H */ - -/* - * Local variables: - * c-indent-level: 8 - * c-basic-offset: 8 - * End: - */ diff --git a/src/activity.c b/src/activity.c index a78452b3c..7946e5a38 100644 --- a/src/activity.c +++ b/src/activity.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff --git a/src/applet.c b/src/applet.c index ce46ce3bf..5bb3e91ae 100644 --- a/src/applet.c +++ b/src/applet.c @@ -20,7 +20,6 @@ #include #include #include -#include #include unsigned int nb_applets = 0; @@ -94,7 +93,7 @@ struct appctx *appctx_new(struct applet *applet, struct cs_endpoint *endp) /* Callback used to wake up an applet when a buffer is available. The applet * is woken up if an input buffer was requested for the associated - * stream interface. In this case the buffer is immediately allocated and the + * conn-stream. In this case the buffer is immediately allocated and the * function returns 1. Otherwise it returns 0. Note that this automatically * covers multiple wake-up attempts by ensuring that the same buffer will not * be accounted for multiple times. diff --git a/src/backend.c b/src/backend.c index 3232f0e61..ec45c71a3 100644 --- a/src/backend.c +++ b/src/backend.c @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include @@ -1274,7 +1273,7 @@ static int do_connect_server(struct stream *s, struct connection *conn) /* * This function initiates a connection to the server assigned to this stream - * (s->target, (s->csb->si)->addr.to). It will assign a server if none + * (s->target, (s->csb)->addr.to). It will assign a server if none * is assigned yet. * It can return one of : * - SF_ERR_NONE if everything's OK @@ -1284,8 +1283,7 @@ static int do_connect_server(struct stream *s, struct connection *conn) * - SF_ERR_RESOURCE if a system resource is lacking (eg: fd limits, ports, ...) * - SF_ERR_INTERNAL for any other purely internal errors * Additionally, in the case of SF_ERR_RESOURCE, an emergency log will be emitted. - * The server-facing stream interface is expected to hold a pre-allocated connection - * in s->csb->si->conn. + * The server-facing conn-stream is expected to hold a pre-allocated connection. */ static int connect_server(struct stream *s) { @@ -1590,7 +1588,7 @@ static int connect_server(struct stream *s) srv_conn->proxy_netns = cli_conn ? cli_conn->proxy_netns : NULL; if (!srv_conn->xprt) { - /* set the correct protocol on the output stream interface */ + /* set the correct protocol on the output conn-stream */ if (srv) { if (conn_prepare(srv_conn, protocol_lookup(srv_conn->dst->ss_family, PROTO_TYPE_STREAM, 0), srv->xprt)) { conn_free(srv_conn); @@ -1780,7 +1778,7 @@ static int connect_server(struct stream *s) s->be->lbprm.server_take_conn(srv); } - /* Now handle synchronously connected sockets. We know the stream-int + /* Now handle synchronously connected sockets. We know the conn-stream * is at least in state CS_ST_CON. These ones typically are UNIX * sockets, socket pairs, andoccasionally TCP connections on the * loopback on a heavily loaded system. @@ -1921,7 +1919,7 @@ static int back_may_abort_req(struct channel *req, struct stream *s) (channel_is_empty(req) || (s->be->options & PR_O_ABRT_CLOSE)))); } -/* Update back stream interface status for input states CS_ST_ASS, CS_ST_QUE, +/* Update back conn-stream status for input states CS_ST_ASS, CS_ST_QUE, * CS_ST_TAR. Other input states are simply ignored. * Possible output states are CS_ST_CLO, CS_ST_TAR, CS_ST_ASS, CS_ST_REQ, CS_ST_CON * and CS_ST_EST. Flags must have previously been updated for timeouts and other @@ -2112,7 +2110,7 @@ void back_try_conn_req(struct stream *s) return; } -/* This function initiates a server connection request on a stream interface +/* This function initiates a server connection request on a conn-stream * already in CS_ST_REQ state. Upon success, the state goes to CS_ST_ASS for * a real connection to a server, indicating that a server has been assigned, * or CS_ST_EST for a successful connection to an applet. It may also return @@ -2332,7 +2330,7 @@ void back_handle_st_cer(struct stream *s) * resources as soon as possible and to not catch errors from the lower * layers in an unexpected state (i.e < ST_CONN). * - * Note: the stream-interface will be switched to ST_REQ, ST_ASS or + * Note: the conn-stream will be switched to ST_REQ, ST_ASS or * ST_TAR and CS_EP_ERROR and SF_CONN_EXP flags will be unset. */ if (cs_reset_endp(cs) < 0) { diff --git a/src/cache.c b/src/cache.c index 99f43eefe..347b6eb21 100644 --- a/src/cache.c +++ b/src/cache.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #define CACHE_FLT_F_IMPLICIT_DECL 0x00000001 /* The cache filtre was implicitly declared (ie without diff --git a/src/channel.c b/src/channel.c index 524d104e4..0cdb21dae 100644 --- a/src/channel.c +++ b/src/channel.c @@ -260,7 +260,7 @@ int co_getdelim(const struct channel *chn, char *str, int len, const char *delim return ret; } -/* Gets one text word out of a channel's buffer from a stream interface. +/* Gets one text word out of a channel's buffer from a conn-stream. * Return values : * >0 : number of bytes read. Includes the sep if present before len or end. * =0 : no sep before end found. is left undefined. @@ -311,7 +311,7 @@ int co_getword(const struct channel *chn, char *str, int len, char sep) return ret; } -/* Gets one text line out of a channel's buffer from a stream interface. +/* Gets one text line out of a channel's buffer from a conn-stream. * Return values : * >0 : number of bytes read. Includes the \n if present before len or end. * =0 : no '\n' before end found. is left undefined. @@ -426,7 +426,7 @@ int co_getblk_nc(const struct channel *chn, const char **blk1, size_t *len1, con return b_getblk_nc(&chn->buf, blk1, len1, blk2, len2, 0, co_data(chn)); } -/* Gets one text line out of a channel's output buffer from a stream interface. +/* Gets one text line out of a channel's output buffer from a conn-stream. * Return values : * >0 : number of blocks returned (1 or 2). blk1 is always filled before blk2. * =0 : not enough data available. @@ -502,7 +502,7 @@ int ci_getblk_nc(const struct channel *chn, return 1; } -/* Gets one text line out of a channel's input buffer from a stream interface. +/* Gets one text line out of a channel's input buffer from a conn-stream. * Return values : * >0 : number of blocks returned (1 or 2). blk1 is always filled before blk2. * =0 : not enough data available. diff --git a/src/check.c b/src/check.c index f0793fe49..a8874d6f1 100644 --- a/src/check.c +++ b/src/check.c @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -117,7 +116,7 @@ static const struct name_desc check_trace_decoding[] = { #define CHK_VERB_CLEAN 1 { .name="clean", .desc="only user-friendly stuff, generally suitable for level \"user\"" }, #define CHK_VERB_MINIMAL 2 - { .name="minimal", .desc="report info on stream and stream-interfaces" }, + { .name="minimal", .desc="report info on stream and conn-streams" }, #define CHK_VERB_SIMPLE 3 { .name="simple", .desc="add info on request and response channels" }, #define CHK_VERB_ADVANCED 4 diff --git a/src/cli.c b/src/cli.c index 1832ff75e..081d28ce3 100644 --- a/src/cli.c +++ b/src/cli.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -866,7 +865,7 @@ static int cli_output_msg(struct channel *chn, const char *msg, int severity, in return ci_putblk(chn, tmp->area, strlen(tmp->area)); } -/* This I/O handler runs as an applet embedded in a stream interface. It is +/* This I/O handler runs as an applet embedded in a conn-stream. It is * used to processes I/O from/to the stats unix socket. The system relies on a * state machine handling requests and various responses. We read a request, * then we process it and send the response, and we possibly display a prompt. @@ -1147,7 +1146,7 @@ static void cli_io_handler(struct appctx *appctx) } if ((res->flags & CF_SHUTR) && (cs->state == CS_ST_EST)) { - DPRINTF(stderr, "%s@%d: si to buf closed. req=%08x, res=%08x, st=%d\n", + DPRINTF(stderr, "%s@%d: cs to buf closed. req=%08x, res=%08x, st=%d\n", __FUNCTION__, __LINE__, req->flags, res->flags, cs->state); /* Other side has closed, let's abort if we have no more processing to do * and nothing more to consume. This is comparable to a broken pipe, so @@ -1158,7 +1157,7 @@ static void cli_io_handler(struct appctx *appctx) } if ((req->flags & CF_SHUTW) && (cs->state == CS_ST_EST) && (appctx->st0 < CLI_ST_OUTPUT)) { - DPRINTF(stderr, "%s@%d: buf to si closed. req=%08x, res=%08x, st=%d\n", + DPRINTF(stderr, "%s@%d: buf to cs closed. req=%08x, res=%08x, st=%d\n", __FUNCTION__, __LINE__, req->flags, res->flags, cs->state); /* We have no more processing to do, and nothing more to send, and * the client side has closed. So we'll forward this state downstream @@ -1174,7 +1173,7 @@ static void cli_io_handler(struct appctx *appctx) cs->state, req->flags, res->flags, ci_data(req), co_data(req), ci_data(res), co_data(res)); } -/* This is called when the stream interface is closed. For instance, upon an +/* This is called when the conn-stream is closed. For instance, upon an * external abort, we won't call the i/o handler anymore so we may need to * remove back references to the stream currently being dumped. */ diff --git a/src/conn_stream.c b/src/conn_stream.c index c3621450c..2747e9756 100644 --- a/src/conn_stream.c +++ b/src/conn_stream.c @@ -436,7 +436,7 @@ void cs_applet_release(struct conn_stream *cs) * This function performs a shutdown-read on a detached conn-stream in a * connected or init state (it does nothing for other states). It either shuts * the read side or marks itself as closed. The buffer flags are updated to - * reflect the new state. If the stream interface has CS_FL_NOHALF, we also + * reflect the new state. If the conn-stream has CS_FL_NOHALF, we also * forward the close to the write side. The owner task is woken up if it exists. */ static void cs_app_shutr(struct conn_stream *cs) @@ -470,7 +470,7 @@ static void cs_app_shutr(struct conn_stream *cs) * This function performs a shutdown-write on a detached conn-stream in a * connected or init state (it does nothing for other states). It either shuts * the write side or marks itself as closed. The buffer flags are updated to - * reflect the new state. It does also close everything if the SI was marked as + * reflect the new state. It does also close everything if the CS was marked as * being in error state. The owner task is woken up if it exists. */ static void cs_app_shutw(struct conn_stream *cs) @@ -575,7 +575,7 @@ static void cs_app_chk_snd(struct conn_stream *cs) * This function performs a shutdown-read on a conn-stream attached to * a connection in a connected or init state (it does nothing for other * states). It either shuts the read side or marks itself as closed. The buffer - * flags are updated to reflect the new state. If the stream interface has + * flags are updated to reflect the new state. If the conn-stream has * CS_FL_NOHALF, we also forward the close to the write side. If a control * layer is defined, then it is supposed to be a socket layer and file * descriptors are then shutdown or closed accordingly. The function @@ -612,7 +612,7 @@ static void cs_app_shutr_conn(struct conn_stream *cs) * a connection in a connected or init state (it does nothing for other * states). It either shuts the write side or marks itself as closed. The * buffer flags are updated to reflect the new state. It does also close - * everything if the SI was marked as being in error state. If there is a + * everything if the CS was marked as being in error state. If there is a * data-layer shutdown, it is called. */ static void cs_app_shutw_conn(struct conn_stream *cs) @@ -693,7 +693,7 @@ static void cs_app_shutw_conn(struct conn_stream *cs) * consumer to inform the producer side that it may be interested in checking * for free space in the buffer. Note that it intentionally does not update * timeouts, so that we can still check them later at wake-up. This function is - * dedicated to connection-based stream interfaces. + * dedicated to connection-based conn-streams. */ static void cs_app_chk_rcv_conn(struct conn_stream *cs) { @@ -804,7 +804,7 @@ static void cs_app_chk_snd_conn(struct conn_stream *cs) * This function performs a shutdown-read on a conn-stream attached to an * applet in a connected or init state (it does nothing for other states). It * either shuts the read side or marks itself as closed. The buffer flags are - * updated to reflect the new state. If the stream interface has CS_FL_NOHALF, + * updated to reflect the new state. If the conn-stream has CS_FL_NOHALF, * we also forward the close to the write side. The owner task is woken up if * it exists. */ @@ -1170,7 +1170,7 @@ static void cs_notify(struct conn_stream *cs) /* * This function propagates a null read received on a socket-based connection. - * It updates the stream interface. If the stream interface has CS_FL_NOHALF, + * It updates the conn-stream. If the conn-stream has CS_FL_NOHALF, * the close is also forwarded to the write side as an abort. */ static void cs_conn_read0(struct conn_stream *cs) @@ -1430,7 +1430,7 @@ static int cs_conn_recv(struct conn_stream *cs) ic->total += ret; /* End-of-input reached, we can leave. In this case, it is - * important to break the loop to not block the SI because of + * important to break the loop to not block the CS because of * the channel's policies.This way, we are still able to receive * shutdowns. */ @@ -1546,7 +1546,7 @@ static int cs_conn_recv(struct conn_stream *cs) return ret; } -/* This tries to perform a synchronous receive on the stream interface to +/* This tries to perform a synchronous receive on the conn-stream to * try to collect last arrived data. In practice it's only implemented on * conn_streams. Returns 0 if nothing was done, non-zero if new data or a * shutdown were collected. This may result on some delayed receive calls @@ -1587,7 +1587,7 @@ static int cs_conn_send(struct conn_stream *cs) if (cs->endp->flags & (CS_EP_ERROR|CS_EP_ERR_PENDING) || cs_is_conn_error(cs)) { /* We're probably there because the tasklet was woken up, * but process_stream() ran before, detected there were an - * error and put the si back to CS_ST_TAR. There's still + * error and put the CS back to CS_ST_TAR. There's still * CO_FL_ERROR on the connection but we don't want to add * CS_EP_ERROR back, so give up */ @@ -1717,7 +1717,7 @@ static int cs_conn_send(struct conn_stream *cs) return did_send; } -/* perform a synchronous send() for the stream interface. The CF_WRITE_NULL and +/* perform a synchronous send() for the conn-stream. The CF_WRITE_NULL and * CF_WRITE_PARTIAL flags are cleared prior to the attempt, and will possibly * be updated in case of success. */ @@ -1743,9 +1743,9 @@ void cs_conn_sync_send(struct conn_stream *cs) } /* Called by I/O handlers after completion.. It propagates - * connection flags to the stream interface, updates the stream (which may or + * connection flags to the conn-stream, updates the stream (which may or * may not take this opportunity to try to forward data), then update the - * connection's polling based on the channels and stream interface's final + * connection's polling based on the channels and conn-stream's final * states. The function always returns 0. */ static int cs_conn_process(struct conn_stream *cs) @@ -1822,9 +1822,9 @@ static int cs_conn_process(struct conn_stream *cs) if ((cs->endp->flags & CS_EP_EOI) && !(ic->flags & CF_EOI)) ic->flags |= (CF_EOI|CF_READ_PARTIAL); - /* Second step : update the stream-int and channels, try to forward any + /* Second step : update the conn-stream and channels, try to forward any * pending data, then possibly wake the stream up based on the new - * stream-int status. + * conn-stream status. */ cs_notify(cs); stream_release_buffers(__cs_strm(cs)); @@ -1832,9 +1832,9 @@ static int cs_conn_process(struct conn_stream *cs) } /* This is the ->process() function for any conn-stream's wait_event task. - * It's assigned during the stream-interface's initialization, for any type of - * stream interface. Thus it is always safe to perform a tasklet_wakeup() on a - * stream interface, as the presence of the CS is checked there. + * It's assigned during the conn-stream's initialization, for any type of + * conn-stream. Thus it is always safe to perform a tasklet_wakeup() on a + * conn-stream, as the presence of the CS is checked there. */ struct task *cs_conn_io_cb(struct task *t, void *ctx, unsigned int state) { @@ -1857,7 +1857,7 @@ struct task *cs_conn_io_cb(struct task *t, void *ctx, unsigned int state) /* Callback to be used by applet handlers upon completion. It updates the stream * (which may or may not take this opportunity to try to forward data), then - * may re-enable the applet's based on the channels and stream interface's final + * may re-enable the applet's based on the channels and conn-stream's final * states. */ static int cs_applet_process(struct conn_stream *cs) @@ -1878,7 +1878,7 @@ static int cs_applet_process(struct conn_stream *cs) if (cs_rx_blocked(cs)) cs_rx_endp_more(cs); - /* update the stream-int, channels, and possibly wake the stream up */ + /* update the conn-stream, channels, and possibly wake the stream up */ cs_notify(cs); stream_release_buffers(__cs_strm(cs)); diff --git a/src/connection.c b/src/connection.c index 35549ee80..dbfc0ea3b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -504,7 +503,7 @@ void conn_free(struct connection *conn) /* By convention we always place a NULL where the ctx points to if the * mux is null. It may have been used to store the connection as a - * stream_interface's end point for example. + * conn-stream's end point for example. */ if (conn->ctx != NULL && conn->mux == NULL) *(void **)conn->ctx = NULL; @@ -1169,7 +1168,7 @@ int conn_recv_proxy(struct connection *conn, int flag) * flags (the bit is provided in by the caller). It is designed to be * called by the connection handler and relies on it to commit polling changes. * Note that it can emit a PROXY line by relying on the other end's address - * when the connection is attached to a stream interface, or by resolving the + * when the connection is attached to a conn-stream, or by resolving the * local address otherwise (also called a LOCAL line). */ int conn_send_proxy(struct connection *conn, unsigned int flag) @@ -1196,7 +1195,7 @@ int conn_send_proxy(struct connection *conn, unsigned int flag) * (which is recomputed every time since it's constant). If * it is positive, it means we have to send from the start. * We can only send a "normal" PROXY line when the connection - * is attached to a stream interface. Otherwise we can only + * is attached to a conn-stream. Otherwise we can only * send a LOCAL line (eg: for use with health checks). */ diff --git a/src/debug.c b/src/debug.c index 0075db67f..285def16c 100644 --- a/src/debug.c +++ b/src/debug.c @@ -27,6 +27,7 @@ #endif #include +#include #include #include #include diff --git a/src/dns.c b/src/dns.c index 9c989c582..9785c6e19 100644 --- a/src/dns.c +++ b/src/dns.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include static THREAD_LOCAL char *dns_msg_trash; diff --git a/src/filters.c b/src/filters.c index 12159f2b2..d91f4a7e9 100644 --- a/src/filters.c +++ b/src/filters.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 8c15d3db7..3f264872a 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/src/frontend.c b/src/frontend.c index 3ae24f263..b245d098e 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include diff --git a/src/hlua.c b/src/hlua.c index 6250f4075..a2f5ca7b1 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -2966,7 +2965,7 @@ __LJMP static int hlua_socket_new(lua_State *L) /* Initialise cross reference between stream and Lua socket object. */ xref_create(&socket->xref, &appctx->ctx.hlua_cosocket.xref); - /* Configure "right" stream interface. this "si" is used to connect + /* Configure "right" conn-stream. this "si" is used to connect * and retrieve data from the server. The connection is initialized * with the "struct server". */ diff --git a/src/http_act.c b/src/http_act.c index 74a894ff7..97d0024fe 100644 --- a/src/http_act.c +++ b/src/http_act.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/src/http_ana.c b/src/http_ana.c index c41be654a..888aa12d2 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/src/http_client.c b/src/http_client.c index 6415e3130..23b8dc89a 100644 --- a/src/http_client.c +++ b/src/http_client.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include diff --git a/src/http_fetch.c b/src/http_fetch.c index 5b83c1906..55f34b8b5 100644 --- a/src/http_fetch.c +++ b/src/http_fetch.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/src/log.c b/src/log.c index 5897d2ff4..36d6d36ca 100644 --- a/src/log.c +++ b/src/log.c @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -42,7 +42,6 @@ #include #include #include -#include #include #include diff --git a/src/map.c b/src/map.c index c17905bab..2a313f481 100644 --- a/src/map.c +++ b/src/map.c @@ -24,7 +24,6 @@ #include #include #include -#include #include diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index d87fc9e5b..33b69a2e2 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/src/mux_h1.c b/src/mux_h1.c index eeb9bad0d..6bfb69bc2 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #include /* diff --git a/src/mux_h2.c b/src/mux_h2.c index d9ecf6d0d..e42cd8928 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -28,7 +29,6 @@ #include #include #include -#include #include diff --git a/src/mworker.c b/src/mworker.c index eb4a2be28..2bc3b776f 100644 --- a/src/mworker.c +++ b/src/mworker.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include diff --git a/src/peers.c b/src/peers.c index a366e2ff2..2cb243354 100644 --- a/src/peers.c +++ b/src/peers.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include diff --git a/src/pool.c b/src/pool.c index b1d30f11d..4c39978cf 100644 --- a/src/pool.c +++ b/src/pool.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -1000,7 +999,7 @@ int pool_parse_debugging(const char *str, char **err) return 1; } -/* This function dumps memory usage information onto the stream interface's +/* This function dumps memory usage information onto the conn-stream's * read buffer. It returns 0 as long as it does not complete, non-zero upon * completion. No state is used. */ diff --git a/src/proxy.c b/src/proxy.c index bfad7aca9..63181fa74 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -3074,7 +3073,7 @@ static int cli_parse_show_errors(char **args, char *payload, struct appctx *appc return 0; } -/* This function dumps all captured errors onto the stream interface's +/* This function dumps all captured errors onto the conn-stream's * read buffer. It returns 0 if the output buffer is full and it needs * to be called again, otherwise non-zero. */ diff --git a/src/queue.c b/src/queue.c index 97862f08a..9c34a4719 100644 --- a/src/queue.c +++ b/src/queue.c @@ -78,7 +78,6 @@ s * queue's lock. #include #include #include -#include #include #include #include diff --git a/src/raw_sock.c b/src/raw_sock.c index 553375bb5..a6773e790 100644 --- a/src/raw_sock.c +++ b/src/raw_sock.c @@ -29,7 +29,6 @@ #include #include #include -#include #include diff --git a/src/resolvers.c b/src/resolvers.c index f06618244..ef60bd6f3 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ring.c b/src/ring.c index dc7b11c72..bfbeed998 100644 --- a/src/ring.c +++ b/src/ring.c @@ -26,7 +26,6 @@ #include #include #include -#include #include /* Initialize a pre-allocated ring with the buffer area diff --git a/src/server.c b/src/server.c index bda77cabd..a0da6e65f 100644 --- a/src/server.c +++ b/src/server.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include diff --git a/src/sink.c b/src/sink.c index cb60b9550..b89ebb925 100644 --- a/src/sink.c +++ b/src/sink.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include #include #include diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index 8b709f0e4..94d11e8ea 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -35,7 +35,6 @@ #include #include #include -#include #include /* Uncommitted CKCH transaction */ diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c index c9408294f..1a3867e0c 100644 --- a/src/ssl_crtlist.c +++ b/src/ssl_crtlist.c @@ -28,7 +28,6 @@ #include #include #include -#include #include diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 23d1ca161..4e1ae5801 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -74,7 +74,6 @@ #include #include #include -#include #include #include #include diff --git a/src/stats.c b/src/stats.c index 22e0d8481..2367fb614 100644 --- a/src/stats.c +++ b/src/stats.c @@ -60,7 +60,6 @@ #include #include #include -#include #include #include #include @@ -4260,7 +4259,7 @@ static int stats_send_http_redirect(struct conn_stream *cs, struct htx *htx) } -/* This I/O handler runs as an applet embedded in a stream interface. It is +/* This I/O handler runs as an applet embedded in a conn-stream. It is * used to send HTTP stats over a TCP socket. The mechanism is very simple. * appctx->st0 contains the operation in progress (dump, done). The handler * automatically unregisters itself once transfer is complete. @@ -4556,7 +4555,7 @@ static int stats_dump_info_to_buffer(struct conn_stream *cs) return 1; } -/* This function dumps the schema onto the stream interface's read buffer. +/* This function dumps the schema onto the conn-stream's read buffer. * It returns 0 as long as it does not complete, non-zero upon completion. * No state is used. * @@ -4766,7 +4765,7 @@ static void stats_dump_json_schema(struct buffer *out) } } -/* This function dumps the schema onto the stream interface's read buffer. +/* This function dumps the schema onto the conn-stream's read buffer. * It returns 0 as long as it does not complete, non-zero upon completion. * No state is used. */ diff --git a/src/stick_table.c b/src/stick_table.c index 2ef82ccb7..3aaa6fd50 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -4234,7 +4233,7 @@ enum { STK_CLI_ACT_SHOW, }; -/* Dump the status of a table to a stream interface's +/* Dump the status of a table to a conn-stream's * read buffer. It returns 0 if the output buffer is full * and needs to be called again, otherwise non-zero. */ @@ -4260,7 +4259,7 @@ static int table_dump_head_to_buffer(struct buffer *msg, return 1; } -/* Dump a table entry to a stream interface's +/* Dump a table entry to a conn-stream's * read buffer. It returns 0 if the output buffer is full * and needs to be called again, otherwise non-zero. */ diff --git a/src/stream.c b/src/stream.c index fab8da1e2..67afbfd4f 100644 --- a/src/stream.c +++ b/src/stream.c @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include @@ -81,7 +80,7 @@ static void strm_trace(enum trace_level level, uint64_t mask, /* The event representation is split like this : * strm - stream - * si - stream interface + * cs - conn-stream * http - http analyzis * tcp - tcp analyzis * @@ -118,7 +117,7 @@ static const struct name_desc strm_trace_decoding[] = { #define STRM_VERB_CLEAN 1 { .name="clean", .desc="only user-friendly stuff, generally suitable for level \"user\"" }, #define STRM_VERB_MINIMAL 2 - { .name="minimal", .desc="report info on stream and stream-interfaces" }, + { .name="minimal", .desc="report info on stream and conn-streams" }, #define STRM_VERB_SIMPLE 3 { .name="simple", .desc="add info on request and response channels" }, #define STRM_VERB_ADVANCED 4 @@ -173,7 +172,7 @@ static void strm_trace(enum trace_level level, uint64_t mask, const struct trace b_putist(&trace_buf, s->unique_id); } - /* Front and back stream-int state */ + /* Front and back conn-stream state */ chunk_appendf(&trace_buf, " CS=(%s,%s)", cs_state_str(s->csf->state), cs_state_str(s->csb->state)); @@ -305,7 +304,7 @@ int stream_upgrade_from_cs(struct conn_stream *cs, struct buffer *input) } /* Callback used to wake up a stream when an input buffer is available. The - * stream 's stream interfaces are checked for a failed buffer allocation + * stream 's conn-streams are checked for a failed buffer allocation * as indicated by the presence of the CS_EP_RXBLK_ROOM flag and the lack of a * buffer, and and input buffer is assigned there (at most one). The function * returns 1 and wakes the stream up if a buffer was taken, otherwise zero. @@ -715,7 +714,6 @@ static void stream_free(struct stream *s) /* FIXME: Handle it in appctx_free ??? */ must_free_sess = objt_appctx(sess->origin) && sess->origin == __cs_endp_target(s->csf); - /* FIXME: ATTENTION, si CSF est libere avant, ca plante !!!! */ cs_detach_endp(s->csb); cs_detach_endp(s->csf); cs_detach_app(s->csb); @@ -1555,7 +1553,7 @@ static void stream_update_both_cs(struct stream *s) if (cs_state_in(csb->state, CS_SB_RDY|CS_SB_EST)) cs_update(csb); - /* stream ints are processed outside of process_stream() and must be + /* conn-streams are processed outside of process_stream() and must be * handled at the latest moment. */ if (cs_appctx(csf)) { @@ -1683,12 +1681,12 @@ struct task *process_stream(struct task *t, void *context, unsigned int state) s->pending_events |= (state & TASK_WOKEN_ANY); /* 1a: Check for low level timeouts if needed. We just set a flag on - * stream interfaces when their timeouts have expired. + * conn-streams when their timeouts have expired. */ if (unlikely(s->pending_events & TASK_WOKEN_TIMER)) { stream_check_conn_timeout(s); - /* check channel timeouts, and close the corresponding stream interfaces + /* check channel timeouts, and close the corresponding conn-streams * for future reads or writes. Note: this will also concern upper layers * but we do not touch any other flag. We must be careful and correctly * detect state changes when calling them. @@ -1762,7 +1760,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state) sess_set_term_flags(s); } - /* 1b: check for low-level errors reported at the stream interface. + /* 1b: check for low-level errors reported at the conn-stream. * First we check if it's a retryable error (in which case we don't * want to tell the buffer). Otherwise we report the error one level * upper by setting flags into the buffers. Note that the side towards @@ -2121,7 +2119,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state) sess_set_term_flags(s); /* Abort the request if a client error occurred while - * the backend stream-interface is in the CS_ST_INI + * the backend conn-stream is in the CS_ST_INI * state. It is switched into the CS_ST_CLO state and * the request channel is erased. */ if (csb->state == CS_ST_INI) { @@ -3149,7 +3147,7 @@ void list_services(FILE *out) fprintf(out, " none\n"); } -/* This function dumps a complete stream state onto the stream interface's +/* This function dumps a complete stream state onto the conn-stream's * read buffer. The stream has to be set in strm. It returns 0 if the output * buffer is full and it needs to be called again, otherwise non-zero. It is * designed to be called from stats_dump_strm_to_buffer() below. @@ -3514,7 +3512,7 @@ static int cli_parse_show_sess(char **args, char *payload, struct appctx *appctx return 0; } -/* This function dumps all streams' states onto the stream interface's +/* This function dumps all streams' states onto the conn-stream's * read buffer. It returns 0 if the output buffer is full and it needs * to be called again, otherwise non-zero. It proceeds in an isolated * thread so there is no thread safety issue here. diff --git a/src/stream_interface.c b/src/stream_interface.c deleted file mode 100644 index 3470f7346..000000000 --- a/src/stream_interface.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Functions managing stream_interface structures - * - * Copyright 2000-2012 Willy Tarreau - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - */ - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -DECLARE_POOL(pool_head_streaminterface, "stream_interface", sizeof(struct stream_interface)); - -struct stream_interface *si_new(struct conn_stream *cs) -{ - struct stream_interface *si; - - si = pool_alloc(pool_head_streaminterface); - if (unlikely(!si)) - return NULL; - si->flags = SI_FL_NONE; - if (si_init(si) < 0) { - pool_free(pool_head_streaminterface, si); - return NULL; - } - si->cs = cs; - return si; -} - -void si_free(struct stream_interface *si) -{ - if (!si) - return; - - pool_free(pool_head_streaminterface, si); -} - -/* - * Local variables: - * c-indent-level: 8 - * c-basic-offset: 8 - * End: - */ diff --git a/src/tcp_act.c b/src/tcp_act.c index 19e7eeaf8..663c57e1a 100644 --- a/src/tcp_act.c +++ b/src/tcp_act.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include diff --git a/src/tcp_rules.c b/src/tcp_rules.c index ddae3758c..55d706843 100644 --- a/src/tcp_rules.c +++ b/src/tcp_rules.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -473,7 +472,7 @@ int tcp_inspect_response(struct stream *s, struct channel *rep, int an_bit) /* This function performs the TCP layer4 analysis on the current request. It * returns 0 if a reject rule matches, otherwise 1 if either an accept rule * matches or if no more rule matches. It can only use rules which don't need - * any data. This only works on connection-based client-facing stream interfaces. + * any data. This only works on connection-based client-facing conn-streams. */ int tcp_exec_l4_rules(struct session *sess) { @@ -570,7 +569,7 @@ int tcp_exec_l4_rules(struct session *sess) /* This function performs the TCP layer5 analysis on the current request. It * returns 0 if a reject rule matches, otherwise 1 if either an accept rule * matches or if no more rule matches. It can only use rules which don't need - * any data. This only works on session-based client-facing stream interfaces. + * any data. This only works on session-based client-facing conn-streams. * An example of valid use case is to track a stick-counter on the source * address extracted from the proxy protocol. */ diff --git a/src/tcp_sample.c b/src/tcp_sample.c index fe10fc2cf..572a6a84e 100644 --- a/src/tcp_sample.c +++ b/src/tcp_sample.c @@ -41,7 +41,6 @@ #include #include #include -#include #include /* Fetch the connection's source IPv4/IPv6 address. Depending on the keyword, it @@ -323,7 +322,7 @@ static inline int get_tcp_info(const struct arg *args, struct sample *smp, if (!smp->strm) return 0; - /* get the object associated with the stream interface.The + /* get the object associated with the conn-stream.The * object can be other thing than a connection. For example, * it be a appctx. */ conn = (dir == 0 ? cs_conn(smp->strm->csf) : cs_conn(smp->strm->csb)); diff --git a/src/tools.c b/src/tools.c index 7d2b4ea3d..34d8d022e 100644 --- a/src/tools.c +++ b/src/tools.c @@ -51,6 +51,7 @@ extern void *__elf_aux_vector; #include #include +#include #include #include #include diff --git a/src/xprt_quic.c b/src/xprt_quic.c index abbedfd2a..2726a276f 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include