CLEANUP: stconn: rename cs_conn() to sc_conn()

It's mostly used from upper layers. Both the checked and unchecked
functions were updated, or ~150 entries.
diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h
index cad043a..30ef61b 100644
--- a/include/haproxy/conn_stream.h
+++ b/include/haproxy/conn_stream.h
@@ -33,7 +33,7 @@
 struct stream;
 struct check;
 
-#define IS_HTX_CS(cs)     (cs_conn(cs) && IS_HTX_CONN(__cs_conn(cs)))
+#define IS_HTX_CS(cs)     (sc_conn(cs) && IS_HTX_CONN(__sc_conn(cs)))
 
 struct sedesc *sedesc_new();
 void sedesc_free(struct sedesc *sedesc);
@@ -131,17 +131,17 @@
 }
 
 /* Returns the connection from a cs if the endpoint is a mux stream. Otherwise
- * NULL is returned. __cs_conn() returns the connection without any control
- * while cs_conn() check the endpoint type.
+ * NULL is returned. __sc_conn() returns the connection without any control
+ * while sc_conn() check the endpoint type.
  */
-static inline struct connection *__cs_conn(const struct stconn *cs)
+static inline struct connection *__sc_conn(const struct stconn *cs)
 {
 	return cs->sedesc->conn;
 }
-static inline struct connection *cs_conn(const struct stconn *cs)
+static inline struct connection *sc_conn(const struct stconn *cs)
 {
 	if (sc_ep_test(cs, SE_FL_T_MUX))
-		return __cs_conn(cs);
+		return __sc_conn(cs);
 	return NULL;
 }
 
@@ -150,7 +150,7 @@
  */
 static inline const struct mux_ops *cs_conn_mux(const struct stconn *cs)
 {
-	const struct connection *conn = cs_conn(cs);
+	const struct connection *conn = sc_conn(cs);
 
 	return (conn ? conn->mux : NULL);
 }
@@ -227,7 +227,7 @@
 {
 	const struct mux_ops *mux;
 
-	BUG_ON(!cs_conn(cs));
+	BUG_ON(!sc_conn(cs));
 
 	if (sc_ep_test(cs, SE_FL_SHR))
 		return;
@@ -244,7 +244,7 @@
 {
 	const struct mux_ops *mux;
 
-	BUG_ON(!cs_conn(cs));
+	BUG_ON(!sc_conn(cs));
 
 	if (sc_ep_test(cs, SE_FL_SHW))
 		return;
diff --git a/include/haproxy/cs_utils.h b/include/haproxy/cs_utils.h
index db6cde6..b263985 100644
--- a/include/haproxy/cs_utils.h
+++ b/include/haproxy/cs_utils.h
@@ -122,7 +122,7 @@
  */
 static inline int cs_conn_ready(struct stconn *cs)
 {
-	struct connection *conn = cs_conn(cs);
+	struct connection *conn = sc_conn(cs);
 
 	return conn && conn_ctrl_ready(conn) && conn_xprt_ready(conn);
 }
@@ -141,7 +141,7 @@
 	if (cs->state >= SC_ST_EST)
 		return 0;
 
-	conn = __cs_conn(cs);
+	conn = __sc_conn(cs);
 	BUG_ON(!conn);
 	return !!(conn->flags & CO_FL_ERROR);
 }
@@ -176,7 +176,7 @@
 	if (!(cs->flags & SC_FL_ISBACK))
 		return sess_src(strm_sess(__sc_strm(cs)));
 	else {
-		struct connection *conn = cs_conn(cs);
+		struct connection *conn = sc_conn(cs);
 
 		if (conn)
 			return conn_src(conn);
@@ -196,7 +196,7 @@
 	if (!(cs->flags & SC_FL_ISBACK))
 		return sess_dst(strm_sess(__sc_strm(cs)));
 	else {
-		struct connection *conn = cs_conn(cs);
+		struct connection *conn = sc_conn(cs);
 
 		if (conn)
 			return conn_dst(conn);
@@ -220,7 +220,7 @@
 	if (!(cs->flags & SC_FL_ISBACK))
 		src = sess_src(strm_sess(__sc_strm(cs)));
 	else {
-		struct connection *conn = cs_conn(cs);
+		struct connection *conn = sc_conn(cs);
 
 		if (conn)
 			src = conn_src(conn);
@@ -250,7 +250,7 @@
 	if (!(cs->flags & SC_FL_ISBACK))
 		dst = sess_dst(strm_sess(__sc_strm(cs)));
 	else {
-		struct connection *conn = cs_conn(cs);
+		struct connection *conn = sc_conn(cs);
 
 		if (conn)
 			dst = conn_dst(conn);
diff --git a/src/backend.c b/src/backend.c
index 83b3bf1..131e5a4 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -2301,7 +2301,7 @@
 
 	/* we probably have to release last stream from the server */
 	if (objt_server(s->target)) {
-		struct connection *conn = cs_conn(cs);
+		struct connection *conn = sc_conn(cs);
 
 		health_adjust(__objt_server(s->target), HANA_STATUS_L4_ERR);
 
diff --git a/src/check.c b/src/check.c
index 7aafb79..20ed5b4 100644
--- a/src/check.c
+++ b/src/check.c
@@ -224,7 +224,7 @@
 
 
 	if (check->cs) {
-		struct connection *conn = cs_conn(check->cs);
+		struct connection *conn = sc_conn(check->cs);
 
 		chunk_appendf(&trace_buf, " - conn=%p(0x%08x)", conn, conn ? conn->flags : 0);
 		chunk_appendf(&trace_buf, " cs=%p(0x%08x)", check->cs, check->cs->flags);
@@ -772,7 +772,7 @@
 void chk_report_conn_err(struct check *check, int errno_bck, int expired)
 {
 	struct stconn *cs = check->cs;
-	struct connection *conn = cs_conn(cs);
+	struct connection *conn = sc_conn(cs);
 	const char *err_msg;
 	struct buffer *chk;
 	int step;
@@ -1029,7 +1029,7 @@
 	ret = tcpcheck_main(check);
 
 	cs = check->cs;
-	conn = cs_conn(cs);
+	conn = sc_conn(cs);
 
 	if (unlikely(!conn || !cs || conn->flags & CO_FL_ERROR || sc_ep_test(cs, SE_FL_ERROR))) {
 		/* We may get error reports bypassing the I/O handlers, typically
@@ -1134,7 +1134,7 @@
 	 */
 	if (check->result == CHK_RES_UNKNOWN && likely(!(check->state & CHK_ST_PURGE))) {
 		cs = check->cs;
-		conn = (cs ? cs_conn(cs) : NULL);
+		conn = (cs ? sc_conn(cs) : NULL);
 
 		/* Here the connection must be defined. Otherwise the
 		 * error would have already been detected
@@ -1168,7 +1168,7 @@
 
 	check->current_step = NULL;
 	cs = check->cs;
-	conn = (cs ? cs_conn(cs) : NULL);
+	conn = (cs ? sc_conn(cs) : NULL);
 
 	if (conn && conn->xprt) {
 		/* The check was aborted and the connection was not yet closed.
diff --git a/src/cli.c b/src/cli.c
index e388d82..b91b392 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1971,7 +1971,7 @@
 	struct cmsghdr *cmsg;
 	struct stconn *cs = appctx_cs(appctx);
 	struct stream *s = __sc_strm(cs);
-	struct connection *remote = cs_conn(cs_opposite(cs));
+	struct connection *remote = sc_conn(cs_opposite(cs));
 	struct msghdr msghdr;
 	struct iovec iov;
 	struct timeval tv = { .tv_sec = 1, .tv_usec = 0 };
diff --git a/src/conn_stream.c b/src/conn_stream.c
index 98137b8..06b1473 100644
--- a/src/conn_stream.c
+++ b/src/conn_stream.c
@@ -345,7 +345,7 @@
 		goto reset_cs;
 
 	if (sc_ep_test(cs, SE_FL_T_MUX)) {
-		struct connection *conn = __cs_conn(cs);
+		struct connection *conn = __sc_conn(cs);
 		struct sedesc *sedesc = cs->sedesc;
 
 		if (conn->mux) {
@@ -649,7 +649,7 @@
 {
 	struct channel *ic = sc_ic(cs);
 
-	BUG_ON(!cs_conn(cs));
+	BUG_ON(!sc_conn(cs));
 
 	cs_rx_shut_blk(cs);
 	if (ic->flags & CF_SHUTR)
@@ -684,7 +684,7 @@
 	struct channel *ic = sc_ic(cs);
 	struct channel *oc = sc_oc(cs);
 
-	BUG_ON(!cs_conn(cs));
+	BUG_ON(!sc_conn(cs));
 
 	oc->flags &= ~CF_SHUTW_NOW;
 	if (oc->flags & CF_SHUTW)
@@ -761,7 +761,7 @@
  */
 static void sc_app_chk_rcv_conn(struct stconn *cs)
 {
-	BUG_ON(!cs_conn(cs));
+	BUG_ON(!sc_conn(cs));
 
 	/* (re)start reading */
 	if (cs_state_in(cs->state, SC_SB_CON|SC_SB_RDY|SC_SB_EST))
@@ -778,7 +778,7 @@
 {
 	struct channel *oc = sc_oc(cs);
 
-	BUG_ON(!cs_conn(cs));
+	BUG_ON(!sc_conn(cs));
 
 	if (unlikely(!cs_state_in(cs->state, SC_SB_RDY|SC_SB_EST) ||
 	    (oc->flags & CF_SHUTW)))
@@ -1117,7 +1117,7 @@
 
 	/* process consumer side */
 	if (channel_is_empty(oc)) {
-		struct connection *conn = cs_conn(cs);
+		struct connection *conn = sc_conn(cs);
 
 		if (((oc->flags & (CF_SHUTW|CF_SHUTW_NOW)) == CF_SHUTW_NOW) &&
 		    (cs->state == SC_ST_EST) && (!conn || !(conn->flags & (CO_FL_WAIT_XPRT | CO_FL_EARLY_SSL_HS))))
@@ -1242,7 +1242,7 @@
 	struct channel *ic = sc_ic(cs);
 	struct channel *oc = sc_oc(cs);
 
-	BUG_ON(!cs_conn(cs));
+	BUG_ON(!sc_conn(cs));
 
 	cs_rx_shut_blk(cs);
 	if (ic->flags & CF_SHUTR)
@@ -1288,7 +1288,7 @@
  */
 static int cs_conn_recv(struct stconn *cs)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct channel *ic = sc_ic(cs);
 	int ret, max, cur_read = 0;
 	int read_poll = MAX_READ_POLL_LOOPS;
@@ -1642,7 +1642,7 @@
  */
 static int cs_conn_send(struct stconn *cs)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct stream *s = __sc_strm(cs);
 	struct channel *oc = sc_oc(cs);
 	int ret;
@@ -1814,7 +1814,7 @@
  */
 static int cs_conn_process(struct stconn *cs)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct channel *ic = sc_ic(cs);
 	struct channel *oc = sc_oc(cs);
 
@@ -1905,7 +1905,7 @@
 	struct stconn *cs = ctx;
 	int ret = 0;
 
-	if (!cs_conn(cs))
+	if (!sc_conn(cs))
 		return t;
 
 	if (!(cs->wait_event.events & SUB_RETRY_SEND) && !channel_is_empty(sc_oc(cs)))
diff --git a/src/connection.c b/src/connection.c
index 53ac9a6..f3775e8 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1191,7 +1191,7 @@
 		if (cs && sc_strm(cs)) {
 			ret = make_proxy_line(trash.area, trash.size,
 					      objt_server(conn->target),
-					      cs_conn(cs_opposite(cs)),
+					      sc_conn(cs_opposite(cs)),
 					      __sc_strm(cs));
 		}
 		else {
@@ -2103,10 +2103,10 @@
 	struct connection *conn = NULL;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-                conn = (kw[0] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+                conn = (kw[0] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
         else
                 conn = (kw[0] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	/* No connection or a connection with a RAW muxx */
 	if (!conn || (conn->mux && !(conn->mux->flags & MX_FL_HTX)))
@@ -2200,10 +2200,10 @@
 	struct connection *conn;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-                conn = (kw[0] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+                conn = (kw[0] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
         else
                 conn = (kw[0] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	if (!conn)
 		return 0;
@@ -2227,10 +2227,10 @@
 	const char *err_code_str;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-                conn = (kw[0] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+                conn = (kw[0] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
         else
                 conn = (kw[0] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	if (!conn)
 		return 0;
diff --git a/src/frontend.c b/src/frontend.c
index d2e949d..48c654b 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -105,7 +105,7 @@
 		int alpn_len;
 
 		/* try to report the ALPN value when available (also works for NPN) */
-		if (conn == cs_conn(s->scf)) {
+		if (conn == sc_conn(s->scf)) {
 			if (conn_get_alpn(conn, &alpn_str, &alpn_len) && alpn_str) {
 				int len = MIN(alpn_len, sizeof(alpn) - 1);
 				memcpy(alpn, alpn_str, len);
diff --git a/src/hlua.c b/src/hlua.c
index 64b0527..1fdfcf3 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2678,7 +2678,7 @@
 	appctx = container_of(peer, struct hlua_csk_ctx, xref)->appctx;
 	s = appctx_strm(appctx);
 
-	conn = cs_conn(s->scb);
+	conn = sc_conn(s->scb);
 	if (!conn || !conn_get_src(conn)) {
 		xref_unlock(&socket->xref, peer);
 		lua_pushnil(L);
diff --git a/src/http_ana.c b/src/http_ana.c
index 308b7d6..55c0a34 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -1335,7 +1335,7 @@
 	if (unlikely(htx_is_empty(htx) || htx->first == -1)) {
 		/* 1: have we encountered a read error ? */
 		if (rep->flags & CF_READ_ERROR) {
-			struct connection *conn = cs_conn(s->scb);
+			struct connection *conn = sc_conn(s->scb);
 
 			/* Perform a L7 retry because server refuses the early data. */
 			if ((txn->flags & TX_L7_RETRY) &&
@@ -1666,7 +1666,7 @@
 	/* check for NTML authentication headers in 401 (WWW-Authenticate) and
 	 * 407 (Proxy-Authenticate) responses and set the connection to private
 	 */
-	srv_conn = cs_conn(s->scb);
+	srv_conn = sc_conn(s->scb);
 	if (srv_conn) {
 		struct ist hdr;
 		struct http_hdr_ctx ctx;
@@ -5098,7 +5098,7 @@
         chunk_printf(&trash, "%08x:%s.%s[%04x:%04x]: ", s->uniq_id, s->be->id,
                      dir,
                      objt_conn(sess->origin) ? (unsigned short)__objt_conn(sess->origin)->handle.fd : -1,
-                     cs_conn(s->scb) ? (unsigned short)(__cs_conn(s->scb))->handle.fd : -1);
+                     sc_conn(s->scb) ? (unsigned short)(__sc_conn(s->scb))->handle.fd : -1);
 
         max = HTX_SL_P1_LEN(sl);
         UBOUND(max, trash.size - trash.data - 3);
@@ -5129,7 +5129,7 @@
         chunk_printf(&trash, "%08x:%s.%s[%04x:%04x]: ", s->uniq_id, s->be->id,
                      dir,
                      objt_conn(sess->origin) ? (unsigned short)__objt_conn(sess->origin)->handle.fd : -1,
-                     cs_conn(s->scb) ? (unsigned short)(__cs_conn(s->scb))->handle.fd : -1);
+                     sc_conn(s->scb) ? (unsigned short)(__sc_conn(s->scb))->handle.fd : -1);
 
         max = n.len;
         UBOUND(max, trash.size - trash.data - 3);
diff --git a/src/log.c b/src/log.c
index 6eade9a..a868a7e 100644
--- a/src/log.c
+++ b/src/log.c
@@ -1982,7 +1982,7 @@
 	if (likely(s)) {
 		be = s->be;
 		txn = s->txn;
-		be_conn = cs_conn(s->scb);
+		be_conn = sc_conn(s->scb);
 		status = (txn ? txn->status : 0);
 		s_flags = s->flags;
 		uniq_id = s->uniq_id;
@@ -1998,7 +1998,7 @@
 		be = ((obj_type(sess->origin) == OBJ_TYPE_CHECK) ? __objt_check(sess->origin)->proxy : fe);
 		txn = NULL;
 		fe_conn = objt_conn(sess->origin);
-		be_conn = ((obj_type(sess->origin) == OBJ_TYPE_CHECK) ? cs_conn(__objt_check(sess->origin)->cs) : NULL);
+		be_conn = ((obj_type(sess->origin) == OBJ_TYPE_CHECK) ? sc_conn(__objt_check(sess->origin)->cs) : NULL);
 		status = 0;
 		s_flags = SF_ERR_PRXCOND | SF_FINST_R;
 		uniq_id = _HA_ATOMIC_FETCH_ADD(&global.req_count, 1);
diff --git a/src/mux_pt.c b/src/mux_pt.c
index cbfc789..b8a375e 100644
--- a/src/mux_pt.c
+++ b/src/mux_pt.c
@@ -461,7 +461,7 @@
 
 static void mux_pt_shutr(struct stconn *cs, enum co_shr_mode mode)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct mux_pt_ctx *ctx = conn->ctx;
 
 	TRACE_ENTER(PT_EV_STRM_SHUT, conn, cs);
@@ -482,7 +482,7 @@
 
 static void mux_pt_shutw(struct stconn *cs, enum co_shw_mode mode)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct mux_pt_ctx *ctx = conn->ctx;
 
 	TRACE_ENTER(PT_EV_STRM_SHUT, conn, cs);
@@ -515,7 +515,7 @@
  */
 static size_t mux_pt_rcv_buf(struct stconn *cs, struct buffer *buf, size_t count, int flags)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct mux_pt_ctx *ctx = conn->ctx;
 	size_t ret = 0;
 
@@ -545,7 +545,7 @@
 /* Called from the upper layer, to send data */
 static size_t mux_pt_snd_buf(struct stconn *cs, struct buffer *buf, size_t count, int flags)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct mux_pt_ctx *ctx = conn->ctx;
 	size_t ret;
 
@@ -572,7 +572,7 @@
  */
 static int mux_pt_subscribe(struct stconn *cs, int event_type, struct wait_event *es)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 
 	TRACE_POINT(PT_EV_RX_DATA|PT_EV_TX_DATA, conn, cs, 0, (size_t[]){event_type});
 	return conn->xprt->subscribe(conn, conn->xprt_ctx, event_type, es);
@@ -584,7 +584,7 @@
  */
 static int mux_pt_unsubscribe(struct stconn *cs, int event_type, struct wait_event *es)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 
 	TRACE_POINT(PT_EV_RX_DATA|PT_EV_TX_DATA, conn, cs, 0, (size_t[]){event_type});
 	return conn->xprt->unsubscribe(conn, conn->xprt_ctx, event_type, es);
@@ -594,7 +594,7 @@
 /* Send and get, using splicing */
 static int mux_pt_rcv_pipe(struct stconn *cs, struct pipe *pipe, unsigned int count)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct mux_pt_ctx *ctx = conn->ctx;
 	int ret;
 
@@ -616,7 +616,7 @@
 
 static int mux_pt_snd_pipe(struct stconn *cs, struct pipe *pipe)
 {
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct mux_pt_ctx *ctx = conn->ctx;
 	int ret;
 
diff --git a/src/ssl_sample.c b/src/ssl_sample.c
index ea5677c..9031dc4 100644
--- a/src/ssl_sample.c
+++ b/src/ssl_sample.c
@@ -526,7 +526,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 
@@ -581,7 +581,7 @@
 	int i;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 
@@ -644,7 +644,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 	ssl = ssl_sock_get_ssl_object(conn);
@@ -697,7 +697,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 
@@ -748,7 +748,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 
@@ -800,7 +800,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 
@@ -868,7 +868,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 
@@ -920,7 +920,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 
@@ -1017,7 +1017,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 	ssl = ssl_sock_get_ssl_object(conn);
@@ -1062,7 +1062,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 
@@ -1119,7 +1119,7 @@
 	SSL *ssl;
 
 	if (conn_server)
-		conn = smp->strm ? cs_conn(smp->strm->scb) : NULL;
+		conn = smp->strm ? sc_conn(smp->strm->scb) : NULL;
 	else
 		conn = objt_conn(smp->sess->origin);
 	ssl = ssl_sock_get_ssl_object(conn);
@@ -1168,10 +1168,10 @@
 	struct connection *conn;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	smp->data.type = SMP_T_BOOL;
 	smp->data.u.sint = conn_is_ssl(conn);
@@ -1205,10 +1205,10 @@
 	SSL *ssl;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	ssl = ssl_sock_get_ssl_object(conn);
 
@@ -1228,10 +1228,10 @@
 	SSL *ssl;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	smp->flags = 0;
 	ssl = ssl_sock_get_ssl_object(conn);
@@ -1262,10 +1262,10 @@
 	int sint;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	smp->flags = 0;
 	ssl = ssl_sock_get_ssl_object(conn);
@@ -1293,10 +1293,10 @@
 	SSL *ssl;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	smp->flags = 0;
 	ssl = ssl_sock_get_ssl_object(conn);
@@ -1325,10 +1325,10 @@
 	smp->data.type = SMP_T_STR;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	ssl = ssl_sock_get_ssl_object(conn);
 	if (!ssl)
@@ -1360,10 +1360,10 @@
 	smp->data.type = SMP_T_STR;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	ssl = ssl_sock_get_ssl_object(conn);
 	if (!ssl)
@@ -1393,10 +1393,10 @@
 	SSL *ssl;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	smp->flags = 0;
 	ssl = ssl_sock_get_ssl_object(conn);
@@ -1431,10 +1431,10 @@
 	smp->data.type = SMP_T_BIN;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	ssl = ssl_sock_get_ssl_object(conn);
 	if (!ssl)
@@ -1463,10 +1463,10 @@
 	SSL *ssl;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	ssl = ssl_sock_get_ssl_object(conn);
 	if (!ssl)
@@ -1500,10 +1500,10 @@
 	SSL *ssl;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	ssl = ssl_sock_get_ssl_object(conn);
 	if (!ssl)
@@ -1649,10 +1649,10 @@
 	struct ssl_sock_ctx *ctx;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	if (!conn)
 		return 0;
@@ -1702,10 +1702,10 @@
 	const char *err_code_str;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	if (!conn)
 		return 0;
@@ -1838,7 +1838,7 @@
 	const char *sfx;
 
 	conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-	       smp->strm ? cs_conn(smp->strm->scb) : NULL;
+	       smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	if (!conn)
 		return 0;
@@ -1932,10 +1932,10 @@
 	SSL *ssl;
 
 	if (obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-		conn = (kw[4] == 'b') ? cs_conn(__objt_check(smp->sess->origin)->cs) : NULL;
+		conn = (kw[4] == 'b') ? sc_conn(__objt_check(smp->sess->origin)->cs) : NULL;
 	else
 		conn = (kw[4] != 'b') ? objt_conn(smp->sess->origin) :
-			smp->strm ? cs_conn(smp->strm->scb) : NULL;
+			smp->strm ? sc_conn(smp->strm->scb) : NULL;
 
 	smp->flags = 0;
 	ssl = ssl_sock_get_ssl_object(conn);
diff --git a/src/stream.c b/src/stream.c
index 1c7c0d66..51e18d3 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -465,7 +465,7 @@
 
 	if (sc_ep_test(cs, SE_FL_WEBSOCKET))
 		s->flags |= SF_WEBSOCKET;
-	if (cs_conn(cs)) {
+	if (sc_conn(cs)) {
 		const struct mux_ops *mux = cs_conn_mux(cs);
 
 		if (mux && mux->flags & MX_FL_HTX)
@@ -873,7 +873,7 @@
  */
 static void back_establish(struct stream *s)
 {
-	struct connection *conn = cs_conn(s->scb);
+	struct connection *conn = sc_conn(s->scb);
 	struct channel *req = &s->req;
 	struct channel *rep = &s->res;
 
@@ -1474,7 +1474,7 @@
 	if (unlikely(!s->txn && !http_create_txn(s)))
 		return 0;
 
-	conn = cs_conn(cs);
+	conn = sc_conn(cs);
 	if (conn) {
 		cs_rx_endp_more(s->scf);
 		/* Make sure we're unsubscribed, the the new
@@ -1838,8 +1838,8 @@
 			      (global.mode & MODE_VERBOSE)))) {
 			chunk_printf(&trash, "%08x:%s.clicls[%04x:%04x]\n",
 				     s->uniq_id, s->be->id,
-				     (unsigned short)conn_fd(cs_conn(scf)),
-				     (unsigned short)conn_fd(cs_conn(scb)));
+				     (unsigned short)conn_fd(sc_conn(scf)),
+				     (unsigned short)conn_fd(sc_conn(scb)));
 			DISGUISE(write(1, trash.area, trash.data));
 		}
 	}
@@ -1869,8 +1869,8 @@
 			if (s->prev_conn_state == SC_ST_EST) {
 				chunk_printf(&trash, "%08x:%s.srvcls[%04x:%04x]\n",
 					     s->uniq_id, s->be->id,
-					     (unsigned short)conn_fd(cs_conn(scf)),
-					     (unsigned short)conn_fd(cs_conn(scb)));
+					     (unsigned short)conn_fd(sc_conn(scf)),
+					     (unsigned short)conn_fd(sc_conn(scb)));
 				DISGUISE(write(1, trash.area, trash.data));
 			}
 		}
@@ -2207,10 +2207,10 @@
 	if (!(req->flags & (CF_KERN_SPLICING|CF_SHUTR)) &&
 	    req->to_forward &&
 	    (global.tune.options & GTUNE_USE_SPLICE) &&
-	    (cs_conn(scf) && __cs_conn(scf)->xprt && __cs_conn(scf)->xprt->rcv_pipe &&
-	     __cs_conn(scf)->mux && __cs_conn(scf)->mux->rcv_pipe) &&
-	    (cs_conn(scb) && __cs_conn(scb)->xprt && __cs_conn(scb)->xprt->snd_pipe &&
-	     __cs_conn(scb)->mux && __cs_conn(scb)->mux->snd_pipe) &&
+	    (sc_conn(scf) && __sc_conn(scf)->xprt && __sc_conn(scf)->xprt->rcv_pipe &&
+	     __sc_conn(scf)->mux && __sc_conn(scf)->mux->rcv_pipe) &&
+	    (sc_conn(scb) && __sc_conn(scb)->xprt && __sc_conn(scb)->xprt->snd_pipe &&
+	     __sc_conn(scb)->mux && __sc_conn(scb)->mux->snd_pipe) &&
 	    (pipes_used < global.maxpipes) &&
 	    (((sess->fe->options2|s->be->options2) & PR_O2_SPLIC_REQ) ||
 	     (((sess->fe->options2|s->be->options2) & PR_O2_SPLIC_AUT) &&
@@ -2401,10 +2401,10 @@
 	if (!(res->flags & (CF_KERN_SPLICING|CF_SHUTR)) &&
 	    res->to_forward &&
 	    (global.tune.options & GTUNE_USE_SPLICE) &&
-	    (cs_conn(scf) && __cs_conn(scf)->xprt && __cs_conn(scf)->xprt->snd_pipe &&
-	     __cs_conn(scf)->mux && __cs_conn(scf)->mux->snd_pipe) &&
-	    (cs_conn(scb) && __cs_conn(scb)->xprt && __cs_conn(scb)->xprt->rcv_pipe &&
-	     __cs_conn(scb)->mux && __cs_conn(scb)->mux->rcv_pipe) &&
+	    (sc_conn(scf) && __sc_conn(scf)->xprt && __sc_conn(scf)->xprt->snd_pipe &&
+	     __sc_conn(scf)->mux && __sc_conn(scf)->mux->snd_pipe) &&
+	    (sc_conn(scb) && __sc_conn(scb)->xprt && __sc_conn(scb)->xprt->rcv_pipe &&
+	     __sc_conn(scb)->mux && __sc_conn(scb)->mux->rcv_pipe) &&
 	    (pipes_used < global.maxpipes) &&
 	    (((sess->fe->options2|s->be->options2) & PR_O2_SPLIC_RTR) ||
 	     (((sess->fe->options2|s->be->options2) & PR_O2_SPLIC_AUT) &&
@@ -2527,8 +2527,8 @@
 		     (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)))) {
 		chunk_printf(&trash, "%08x:%s.closed[%04x:%04x]\n",
 			     s->uniq_id, s->be->id,
-			     (unsigned short)conn_fd(cs_conn(scf)),
-			     (unsigned short)conn_fd(cs_conn(scb)));
+			     (unsigned short)conn_fd(sc_conn(scf)),
+			     (unsigned short)conn_fd(sc_conn(scb)));
 		DISGUISE(write(1, trash.area, trash.data));
 	}
 
@@ -2754,7 +2754,7 @@
 	res = &s->res;
 
 	scf = s->scf;
-	cof = cs_conn(scf);
+	cof = sc_conn(scf);
 	acf = cs_appctx(scf);
 	if (cof && cof->src && addr_to_str(cof->src, pn, sizeof(pn)) >= 0)
 		src = pn;
@@ -2762,7 +2762,7 @@
 		src = acf->applet->name;
 
 	scb = s->scb;
-	cob = cs_conn(scb);
+	cob = sc_conn(scb);
 	acb = cs_appctx(scb);
 	srv = objt_server(s->target);
 	if (srv)
@@ -3242,7 +3242,7 @@
 		else
 			chunk_appendf(&trash, "  backend=<NONE> (id=-1 mode=-)");
 
-		conn = cs_conn(strm->scb);
+		conn = sc_conn(strm->scb);
 		switch (conn && conn_get_src(conn) ? addr_to_str(conn->src, pn, sizeof(pn)) : AF_UNSPEC) {
 		case AF_INET:
 		case AF_INET6:
@@ -3310,7 +3310,7 @@
 			      (sc_ep_test(scf, SE_FL_T_MUX) ? "CONN" : (sc_ep_test(scf, SE_FL_T_APPLET) ? "APPCTX" : "NONE")),
 			      scf->sedesc->se, sc_ep_get(scf), scf->wait_event.events);
 
-		if ((conn = cs_conn(scf)) != NULL) {
+		if ((conn = sc_conn(scf)) != NULL) {
 			chunk_appendf(&trash,
 			              "      co0=%p ctrl=%s xprt=%s mux=%s data=%s target=%s:%p\n",
 				      conn,
@@ -3349,7 +3349,7 @@
 			      (sc_ep_test(scb, SE_FL_T_MUX) ? "CONN" : (sc_ep_test(scb, SE_FL_T_APPLET) ? "APPCTX" : "NONE")),
 			      scb->sedesc->se, sc_ep_get(scb), scb->wait_event.events);
 
-		if ((conn = cs_conn(scb)) != NULL) {
+		if ((conn = sc_conn(scb)) != NULL) {
 			chunk_appendf(&trash,
 			              "      co1=%p ctrl=%s xprt=%s mux=%s data=%s target=%s:%p\n",
 				      conn,
@@ -3679,14 +3679,14 @@
 			     human_time(TICKS_TO_MS(curr_strm->res.analyse_exp - now_ms),
 					TICKS_TO_MS(1000)) : "");
 
-		conn = cs_conn(curr_strm->scf);
+		conn = sc_conn(curr_strm->scf);
 		chunk_appendf(&trash,
 			     " scf=[%d,%1xh,fd=%d]",
 			      curr_strm->scf->state,
 			     curr_strm->scf->flags,
 			     conn_fd(conn));
 
-		conn = cs_conn(curr_strm->scb);
+		conn = sc_conn(curr_strm->scb);
 		chunk_appendf(&trash,
 			     " scb=[%d,%1xh,fd=%d]",
 			      curr_strm->scb->state,
diff --git a/src/tcp_sample.c b/src/tcp_sample.c
index d313d5d..272159e 100644
--- a/src/tcp_sample.c
+++ b/src/tcp_sample.c
@@ -52,8 +52,8 @@
 
 	if (kw[0] == 'b') { /* bc_src */
 		struct connection *conn = ((obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-					   ? cs_conn(__objt_check(smp->sess->origin)->cs)
-					   : (smp->strm ? cs_conn(smp->strm->scb): NULL));
+					   ? sc_conn(__objt_check(smp->sess->origin)->cs)
+					   : (smp->strm ? sc_conn(smp->strm->scb): NULL));
 		if (conn && conn_get_src(conn))
 			src = conn_src(conn);
 	}
@@ -96,8 +96,8 @@
 
 	if (kw[0] == 'b') { /* bc_src_port */
 		struct connection *conn = ((obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-					   ? cs_conn(__objt_check(smp->sess->origin)->cs)
-					   : (smp->strm ? cs_conn(smp->strm->scb): NULL));
+					   ? sc_conn(__objt_check(smp->sess->origin)->cs)
+					   : (smp->strm ? sc_conn(smp->strm->scb): NULL));
 		if (conn && conn_get_src(conn))
 			src = conn_src(conn);
 	}
@@ -131,8 +131,8 @@
 
 	if (kw[0] == 'b') { /* bc_dst */
 		struct connection *conn = ((obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-					   ? cs_conn(__objt_check(smp->sess->origin)->cs)
-					   : (smp->strm ? cs_conn(smp->strm->scb): NULL));
+					   ? sc_conn(__objt_check(smp->sess->origin)->cs)
+					   : (smp->strm ? sc_conn(smp->strm->scb): NULL));
 		if (conn && conn_get_dst(conn))
 			dst = conn_dst(conn);
 	}
@@ -227,8 +227,8 @@
 
 	if (kw[0] == 'b') { /* bc_dst_port */
 		struct connection *conn = ((obj_type(smp->sess->origin) == OBJ_TYPE_CHECK)
-					   ? cs_conn(__objt_check(smp->sess->origin)->cs)
-					   : (smp->strm ? cs_conn(smp->strm->scb): NULL));
+					   ? sc_conn(__objt_check(smp->sess->origin)->cs)
+					   : (smp->strm ? sc_conn(smp->strm->scb): NULL));
 		if (conn && conn_get_dst(conn))
 			dst = conn_dst(conn);
 	}
@@ -325,7 +325,7 @@
 	 * object can be other thing than a connection. For example,
 	 * it be a appctx.
 	 */
-	conn = (dir == 0 ? cs_conn(smp->strm->scf) : cs_conn(smp->strm->scb));
+	conn = (dir == 0 ? sc_conn(smp->strm->scf) : sc_conn(smp->strm->scb));
 	if (!conn)
 		return 0;
 
diff --git a/src/tcpcheck.c b/src/tcpcheck.c
index df420b5..d0d0525 100644
--- a/src/tcpcheck.c
+++ b/src/tcpcheck.c
@@ -1056,7 +1056,7 @@
 	struct proxy *proxy = check->proxy;
 	struct server *s = check->server;
 	struct task *t = check->task;
-	struct connection *conn = cs_conn(check->cs);
+	struct connection *conn = sc_conn(check->cs);
 	struct protocol *proto;
 	struct xprt_ops *xprt;
 	struct tcpcheck_rule *next;
@@ -1325,7 +1325,7 @@
 	enum tcpcheck_eval_ret ret = TCPCHK_EVAL_CONTINUE;
 	struct tcpcheck_send *send = &rule->send;
 	struct stconn *cs = check->cs;
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	struct buffer *tmp = NULL;
 	struct htx *htx = NULL;
 	int connection_hdr = 0;
@@ -1535,7 +1535,7 @@
 enum tcpcheck_eval_ret tcpcheck_eval_recv(struct check *check, struct tcpcheck_rule *rule)
 {
 	struct stconn *cs = check->cs;
-	struct connection *conn = __cs_conn(cs);
+	struct connection *conn = __sc_conn(cs);
 	enum tcpcheck_eval_ret ret = TCPCHK_EVAL_CONTINUE;
 	size_t max, read, cur_read = 0;
 	int is_empty;
@@ -2126,7 +2126,7 @@
 {
 	struct tcpcheck_rule *rule;
 	struct stconn *cs = check->cs;
-	struct connection *conn = cs_conn(cs);
+	struct connection *conn = sc_conn(cs);
 	int must_read = 1, last_read = 0;
 	int retcode = 0;
 	enum tcpcheck_eval_ret eval_ret;
@@ -2188,7 +2188,7 @@
 		switch (rule->action) {
 		case TCPCHK_ACT_CONNECT:
 			/* Not the first connection, release it first */
-			if (cs_conn(cs) && check->current_step != rule) {
+			if (sc_conn(cs) && check->current_step != rule) {
 				check->state |= CHK_ST_CLOSE_CONN;
 				retcode = -1;
 			}
@@ -2206,7 +2206,7 @@
 			eval_ret = tcpcheck_eval_connect(check, rule);
 
 			/* Refresh connection */
-			conn = cs_conn(cs);
+			conn = sc_conn(cs);
 			last_read = 0;
 			must_read = (IS_HTX_CS(cs) ? htx_is_empty(htxbuf(&check->bi)) : !b_data(&check->bi));
 			break;