]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move session.h to haproxy/session{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 16:58:52 +0000 (18:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:58 +0000 (10:18 +0200)
Almost no change was needed beyond a little bit of reordering of the
types file and adjustments to use session-t instead of session at a
few places.

20 files changed:
include/haproxy/connection.h
include/haproxy/session-t.h [moved from include/types/session.h with 86% similarity]
include/haproxy/session.h [moved from include/proto/session.h with 93% similarity]
include/haproxy/tcp_rules.h
include/haproxy/vars.h
include/types/stream.h
src/backend.c
src/cfgparse.c
src/cli.c
src/fcgi-app.c
src/flt_spoe.c
src/haproxy.c
src/hlua.c
src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/peers.c
src/session.c
src/stats.c
src/stream.c

index d90724f1456a5d505b1ac11b9da9bd0ed4c25562..0c0404313b475d1bdd3d06371a37e8a4493ab8a6 100644 (file)
@@ -30,9 +30,9 @@
 #include <haproxy/listener-t.h>
 #include <haproxy/obj_type.h>
 #include <haproxy/pool.h>
+#include <haproxy/session.h>
 #include <haproxy/task-t.h>
 
-#include <proto/session.h>
 
 extern struct pool_head *pool_head_connection;
 extern struct pool_head *pool_head_connstream;
similarity index 86%
rename from include/types/session.h
rename to include/haproxy/session-t.h
index 3942d62b562c6fc05b5b6a9ea33eb4b536f68793..b47760c6c8112d0fccfef0fe074bfec5be1a51ff 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * include/types/session.h
+ * include/haproxy/session-t.h
  * This file defines everything related to sessions.
  *
- * 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
@@ -19,8 +19,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_SESSION_H
-#define _TYPES_SESSION_H
+#ifndef _HAPROXY_SESSION_T_H
+#define _HAPROXY_SESSION_T_H
 
 
 #include <sys/time.h>
 #include <haproxy/api-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/obj_type-t.h>
-#include <haproxy/vars-t.h>
-
 #include <haproxy/stick_table-t.h>
 #include <haproxy/task-t.h>
+#include <haproxy/vars-t.h>
 
-struct sess_srv_list {
-       void *target;
-       struct list conn_list; /* Head of the connections list */
-       struct list srv_list; /* Next element of the server list */
-};
-
-#define MAX_SRV_LIST   5
 
 /* session flags */
 enum {
@@ -50,7 +42,9 @@ enum {
        SESS_FL_PREFER_LAST   = 0x00000001, /* NTML authent, we should reuse last conn */
 };
 
-struct proxy;
+/* max number of idle server connections kept attached to a session */
+#define MAX_SRV_LIST   5
+
 struct session {
        struct proxy *fe;               /* the proxy this session depends on for the client side */
        struct listener *listener;      /* the listener by which the request arrived */
@@ -66,7 +60,13 @@ struct session {
        unsigned int flags;             /* session flags, SESS_FL_* */
 };
 
-#endif /* _TYPES_SESSION_H */
+struct sess_srv_list {
+       void *target;
+       struct list conn_list;          /* Head of the connections list */
+       struct list srv_list;           /* Next element of the server list */
+};
+
+#endif /* _HAPROXY_SESSION_T_H */
 
 /*
  * Local variables:
similarity index 93%
rename from include/proto/session.h
rename to include/haproxy/session.h
index 45bfedb137ac187d24321add47f51be1a1862b8d..6b5bfffcbf39b1c937d1db8108ffa59311c023dd 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * include/proto/session.h
- * This file defines everything related to sessions.
+ * include/haproxy/session.h
+ * This file contains functions used to manage sessions.
  *
- * 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 _PROTO_SESSION_H
-#define _PROTO_SESSION_H
+#ifndef _HAPROXY_SESSION_H
+#define _HAPROXY_SESSION_H
 
 #include <haproxy/api.h>
-#include <haproxy/obj_type.h>
-#include <haproxy/pool.h>
-
 #include <haproxy/global-t.h>
-#include <types/session.h>
-
+#include <haproxy/obj_type-t.h>
+#include <haproxy/pool.h>
+#include <haproxy/session-t.h>
 #include <haproxy/stick_table.h>
 #include <proto/server.h>
 
@@ -133,7 +131,7 @@ static inline int session_check_idle_conn(struct session *sess, struct connectio
        return 0;
 }
 
-#endif /* _PROTO_SESSION_H */
+#endif /* _HAPROXY_SESSION_H */
 
 /*
  * Local variables:
index 33eb69bd5814f7dc82fe0e97491e7e9a2447af51..d808062ca2a1709aa417e05a58a69598b2d59c86 100644 (file)
@@ -24,8 +24,8 @@
 
 #include <haproxy/action-t.h>
 #include <haproxy/api.h>
+#include <haproxy/session-t.h>
 #include <types/stream.h>
-#include <types/session.h>
 
 int tcp_inspect_request(struct stream *s, struct channel *req, int an_bit);
 int tcp_inspect_response(struct stream *s, struct channel *rep, int an_bit);
index 32172a8da753d3fcdd172cdfeb561614fecb967e..b13e82d2ce93f0b5e208ce76a9db70e233ce8a6a 100644 (file)
@@ -22,8 +22,8 @@
 #ifndef _HAPROXY_VARS_H
 #define _HAPROXY_VARS_H
 
-#include <types/session.h>
 #include <types/stream.h>
+#include <haproxy/session-t.h>
 #include <haproxy/api-t.h>
 #include <haproxy/vars-t.h>
 
index 1a99429ec81edc95b0c61b9354d3700abdb7e307..0c1475f0c14d77b05113dda749ba034fe6ff7bf6 100644 (file)
@@ -33,6 +33,7 @@
 #include <haproxy/hlua-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/session-t.h>
 #include <haproxy/vars-t.h>
 
 #include <types/channel.h>
@@ -41,7 +42,6 @@
 #include <types/proxy.h>
 #include <types/queue.h>
 #include <types/server.h>
-#include <types/session.h>
 #include <types/stream_interface.h>
 #include <haproxy/task-t.h>
 #include <haproxy/stick_table-t.h>
index 8e8618a503f1bf3bb9b55375901805a06f2bb5c8..b7c47ccf848a44a2c36da35d0b211afb37b5a591 100644 (file)
@@ -32,6 +32,7 @@
 #include <haproxy/lb_fwrr.h>
 #include <haproxy/obj_type.h>
 #include <haproxy/payload.h>
+#include <haproxy/session.h>
 #include <haproxy/task.h>
 #include <haproxy/ticks.h>
 #include <haproxy/time.h>
@@ -52,7 +53,6 @@
 #include <proto/queue.h>
 #include <haproxy/sample.h>
 #include <proto/server.h>
-#include <proto/session.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 #include <proto/ssl_sock.h>
index 0fc9bfea278e4f37b96d9eb5da1f360a6df83221..3de138f71bac15b25820c93ea30f385ba0be129e 100644 (file)
@@ -54,6 +54,7 @@
 #include <haproxy/obj_type-t.h>
 #include <haproxy/peers-t.h>
 #include <haproxy/pool.h>
+#include <haproxy/session.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <common/uri_auth.h>
@@ -77,7 +78,6 @@
 #include <proto/proxy.h>
 #include <haproxy/peers.h>
 #include <haproxy/sample.h>
-#include <proto/session.h>
 #include <proto/server.h>
 #include <proto/stream.h>
 #include <haproxy/stick_table.h>
index 48539fd4aa337e5acc487838566ffca68bf455d9..a520787916af663a400442b59668944dd00fca41 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -37,6 +37,7 @@
 #include <haproxy/pattern-t.h>
 #include <haproxy/peers.h>
 #include <haproxy/sample-t.h>
+#include <haproxy/session.h>
 #include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
@@ -61,7 +62,6 @@
 #include <haproxy/pipe.h>
 #include <haproxy/protocol.h>
 #include <proto/proxy.h>
-#include <proto/session.h>
 #include <proto/stream.h>
 #include <proto/server.h>
 #include <proto/stream_interface.h>
index 68d0efe2ea6b661fe8534d74cb4b3d084b8b061d..0db8e795a99fe110667999b83a5fdace3e3a91a7 100644 (file)
@@ -18,6 +18,7 @@
 #include <haproxy/http_htx.h>
 #include <haproxy/regex.h>
 #include <haproxy/sample.h>
+#include <haproxy/session.h>
 #include <haproxy/tools.h>
 
 #include <haproxy/global.h>
@@ -28,7 +29,6 @@
 #include <proto/log.h>
 #include <proto/proxy.h>
 #include <proto/server.h>
-#include <proto/session.h>
 
 /* Global list of all FCGI applications */
 static struct fcgi_app *fcgi_apps = NULL;
index c0371abba0330873a2652d431b4bb8a7a058b193..1ffa4a7806a6906386c7bc6f5e1e5e2a9739631a 100644 (file)
@@ -21,6 +21,7 @@
 #include <haproxy/signal.h>
 #include <haproxy/thread.h>
 #include <haproxy/pool.h>
+#include <haproxy/session.h>
 #include <haproxy/task.h>
 #include <haproxy/tcp_rules.h>
 #include <haproxy/time.h>
@@ -38,7 +39,6 @@
 #include <proto/log.h>
 #include <proto/http_ana.h>
 #include <proto/proxy.h>
-#include <proto/session.h>
 #include <proto/spoe.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
index bfbfa0580f6ceb74cb9930b78bd8abd8992917cc..504add9769f6642c5f736297518747403b2fd14b 100644 (file)
 #include <haproxy/peers.h>
 #include <haproxy/sample.h>
 #include <haproxy/regex.h>
+#include <haproxy/session.h>
 #include <haproxy/signal.h>
 #include <haproxy/tools.h>
 #include <haproxy/time.h>
 #include <proto/proxy.h>
 #include <proto/queue.h>
 #include <proto/server.h>
-#include <proto/session.h>
 #include <proto/stream.h>
 #include <proto/ssl_sock.h>
 
index b9339d421491aebc81dbc5c975cdc0b0a50197d7..bed059ca8be8cad630b7205879daefac70680581 100644 (file)
@@ -40,6 +40,7 @@
 #include <haproxy/pattern.h>
 #include <haproxy/payload.h>
 #include <haproxy/sample.h>
+#include <haproxy/session.h>
 #include <haproxy/task.h>
 #include <haproxy/tcp_rules.h>
 #include <haproxy/tools.h>
@@ -57,7 +58,6 @@
 #include <proto/queue.h>
 #include <proto/http_ana.h>
 #include <proto/server.h>
-#include <proto/session.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 
index 05e67a67b4048d0633407e1f02260fe62c67fb50..ed97d6b3505e22d4a92ae6f0fd2959e953429617 100644 (file)
 #include <haproxy/list.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/regex.h>
+#include <haproxy/session-t.h>
 
 #include <types/proxy.h>
-#include <types/session.h>
 
 #include <proto/fcgi-app.h>
 #include <proto/log.h>
-#include <proto/session.h>
 #include <proto/ssl_sock.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
index 36478c3f1ad31d0edd9f53c2f329e611aec1f623..a5c5009336c7f6b804737bbe4a26be1a124267e9 100644 (file)
 
 #include <haproxy/pipe-t.h>
 #include <types/proxy.h>
-#include <types/session.h>
 
 #include <haproxy/http_htx.h>
 #include <proto/log.h>
-#include <proto/session.h>
+#include <haproxy/session-t.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
 #include <proto/trace.h>
index b8c4741a8fdcf5031e9bc54130d42bfaf6f61edf..ac4098132781bffebc47e9f540d0adc1c21cec06 100644 (file)
 #include <haproxy/http_htx.h>
 #include <haproxy/htx.h>
 #include <haproxy/net_helper.h>
+#include <haproxy/session-t.h>
 #include <proto/trace.h>
-#include <proto/session.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
-#include <types/session.h>
 #include <import/eb32tree.h>
 
 
index 45e438d8755ea76dc507e32861a5a513498e5d35..f576eaae2b0d347f89c79ef4c6fd6fd16e093844 100644 (file)
@@ -27,6 +27,7 @@
 #include <haproxy/obj_type-t.h>
 #include <haproxy/peers.h>
 #include <haproxy/task.h>
+#include <haproxy/session-t.h>
 #include <haproxy/signal.h>
 #include <haproxy/time.h>
 #include <haproxy/tools.h>
@@ -41,7 +42,6 @@
 #include <haproxy/fd.h>
 #include <proto/log.h>
 #include <proto/proxy.h>
-#include <proto/session.h>
 #include <proto/stream.h>
 #include <haproxy/stick_table.h>
 #include <proto/stream_interface.h>
index 2b52ec87c883cebc34f67de09f5ccf9c4d817ce9..58e55ee6d5e0076518c65a07e89e8723204e126f 100644 (file)
 #include <haproxy/http.h>
 #include <haproxy/listener.h>
 #include <haproxy/pool.h>
+#include <haproxy/session.h>
 #include <haproxy/tcp_rules.h>
 #include <haproxy/vars.h>
 
-#include <types/session.h>
-
 #include <proto/log.h>
 #include <proto/proxy.h>
-#include <proto/session.h>
 #include <proto/stream.h>
 
 DECLARE_POOL(pool_head_session, "session", sizeof(struct session));
index 1f1e5cd7141a5dbb2987cfdb3bcdb6ea59934237..bc9aaee8b272bf04871e7150672f5eeb3d5270ba 100644 (file)
@@ -40,6 +40,7 @@
 #include <haproxy/listener.h>
 #include <haproxy/map-t.h>
 #include <haproxy/pattern-t.h>
+#include <haproxy/session.h>
 #include <haproxy/task.h>
 #include <haproxy/tools.h>
 #include <haproxy/ticks.h>
@@ -61,7 +62,6 @@
 #include <proto/log.h>
 #include <haproxy/pipe.h>
 #include <proto/proxy.h>
-#include <proto/session.h>
 #include <proto/ssl_sock.h>
 #include <proto/stream.h>
 #include <proto/server.h>
index 8a3ed6f8698ffb043e998ccfc901ff14d2f3549d..5a70ccadc76598a804ab72a5c981a4680b214119 100644 (file)
@@ -31,6 +31,7 @@
 #include <haproxy/thread.h>
 #include <haproxy/htx.h>
 #include <haproxy/pool.h>
+#include <haproxy/session.h>
 #include <haproxy/task.h>
 #include <haproxy/tcp_rules.h>
 #include <haproxy/vars.h>
@@ -51,7 +52,6 @@
 #include <proto/filters.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/log.h>
-#include <proto/session.h>
 #include <proto/stream.h>
 #include <haproxy/pipe.h>
 #include <proto/http_ana.h>