]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[CLEANUP] rename client -> frontend
authorWilly Tarreau <w@1wt.eu>
Mon, 24 May 2010 19:02:37 +0000 (21:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Jun 2010 08:53:10 +0000 (10:53 +0200)
The 'client.c' file now only contained frontend-specific functions,
so it has naturally be renamed 'frontend.c'. Same for client.h. This
has also been an opportunity to remove some cross references from
files that should not have depended on it.

In the end, this file should contain a protocol-agnostic accept()
code, which would initialize a session, task, etc... based on an
accept() from a lower layer. Right now there are still references
to TCP.

13 files changed:
Makefile
Makefile.bsd
Makefile.osx
include/proto/client.h [deleted file]
include/proto/frontend.h [new file with mode: 0644]
src/backend.c
src/frontend.c [moved from src/client.c with 99% similarity]
src/haproxy.c
src/proto_http.c
src/proto_tcp.c
src/proxy.c
src/stream_interface.c
src/stream_sock.c

index 58bec2c2ddcc02026d4becc50212b88de9af9b10..f306a81dc6359c4e342f1600c5cfd91445355e6c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -480,7 +480,7 @@ endif
 OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
        src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o \
        src/time.o src/fd.o src/pipe.o src/regex.o src/cfgparse.o src/server.o \
-       src/checks.o src/queue.o src/client.o src/proxy.o src/stick_table.o src/proto_uxst.o \
+       src/checks.o src/queue.o src/frontend.o src/proxy.o src/stick_table.o src/proto_uxst.o \
        src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \
        src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o \
        src/stream_interface.o src/dumpstats.o src/proto_tcp.o \
index 191be4d2582686a318c2df46293c6147db7c516f..8800c1b4148f01091a077b896bdb55ddfc6f77ce 100644 (file)
@@ -104,7 +104,7 @@ LDFLAGS = -g
 OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
        src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o \
        src/time.o src/fd.o src/pipe.o src/regex.o src/cfgparse.o src/server.o \
-       src/checks.o src/queue.o src/client.o src/proxy.o src/proto_uxst.o \
+       src/checks.o src/queue.o src/frontend.o src/proxy.o src/proto_uxst.o \
        src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \
        src/stream_interface.o src/dumpstats.o src/proto_tcp.o \
        src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \
index 678a7fb8f5f45798ef81fab3e1bee52b7788d2d9..a554c077626956d8bcf8fa571227fa319fcba47c 100644 (file)
@@ -101,7 +101,7 @@ LDFLAGS = -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -mma
 OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
        src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o \
        src/time.o src/fd.o src/pipe.o src/regex.o src/cfgparse.o src/server.o \
-       src/checks.o src/queue.o src/client.o src/proxy.o src/proto_uxst.o \
+       src/checks.o src/queue.o src/frontend.o src/proxy.o src/proto_uxst.o \
        src/proto_http.o src/stream_sock.o src/appsession.o src/backend.o \
        src/stream_interface.o src/dumpstats.o src/proto_tcp.o \
        src/session.o src/hdr_idx.o src/ev_select.o src/signal.o \
diff --git a/include/proto/client.h b/include/proto/client.h
deleted file mode 100644 (file)
index 1d368a4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  include/proto/client.h
-  This file contains client-side definitions.
-
-  Copyright (C) 2000-2008 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 _PROTO_CLIENT_H
-#define _PROTO_CLIENT_H
-
-#include <common/config.h>
-#include <types/session.h>
-
-void get_frt_addr(struct session *s);
-int event_accept(int fd);
-
-
-#endif /* _PROTO_CLIENT_H */
-
-/*
- * Local variables:
- *  c-indent-level: 8
- *  c-basic-offset: 8
- * End:
- */
diff --git a/include/proto/frontend.h b/include/proto/frontend.h
new file mode 100644 (file)
index 0000000..504acfa
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * include/proto/frontend.h
+ * This file declares frontend-specific functions.
+ *
+ * Copyright (C) 2000-2010 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 _PROTO_FRONTEND_H
+#define _PROTO_FRONTEND_H
+
+#include <common/config.h>
+#include <types/session.h>
+
+void get_frt_addr(struct session *s);
+int event_accept(int fd);
+
+
+#endif /* _PROTO_FRONTEND_H */
+
+/*
+ * Local variables:
+ *  c-indent-level: 8
+ *  c-basic-offset: 8
+ * End:
+ */
index a1d9c37df5e70a99fab73d7162e382418ffa0d54..0e99879627eb54bd18a42e4eff06222e779a4e3f 100644 (file)
@@ -29,7 +29,7 @@
 
 #include <proto/acl.h>
 #include <proto/backend.h>
-#include <proto/client.h>
+#include <proto/frontend.h>
 #include <proto/lb_chash.h>
 #include <proto/lb_fwlc.h>
 #include <proto/lb_fwrr.h>
similarity index 99%
rename from src/client.c
rename to src/frontend.c
index a9bf7692269dba88fac4d9ed1d02fc8ebf84952d..bc354b92222368333c6a4c41459792e9305bd2aa 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Client-side variables and functions.
+ * Frontend variables and functions.
  *
- * Copyright 2000-2009 Willy Tarreau <w@1wt.eu>
+ * Copyright 2000-2010 Willy Tarreau <w@1wt.eu>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -28,8 +28,8 @@
 
 #include <proto/acl.h>
 #include <proto/buffers.h>
-#include <proto/client.h>
 #include <proto/fd.h>
+#include <proto/frontend.h>
 #include <proto/log.h>
 #include <proto/hdr_idx.h>
 #include <proto/proto_tcp.h>
@@ -572,7 +572,7 @@ static struct acl_kw_list acl_kws = {{ },{
 
 
 __attribute__((constructor))
-static void __client_init(void)
+static void __frontend_init(void)
 {
        acl_register_keywords(&acl_kws);
 }
index a2843da1c1548e15168363489fb4180ae8e5c259..85c2e3a017acd3384d9b4755ada200780d5f17b7 100644 (file)
@@ -72,7 +72,6 @@
 #include <proto/backend.h>
 #include <proto/buffers.h>
 #include <proto/checks.h>
-#include <proto/client.h>
 #include <proto/fd.h>
 #include <proto/log.h>
 #include <proto/protocols.h>
index 5471ab5c243ede259a0340df67e69bb9c8b40c0c..5d8e229d31221597f0cc7c49c616f14e7780ea2e 100644 (file)
@@ -44,9 +44,9 @@
 #include <proto/backend.h>
 #include <proto/buffers.h>
 #include <proto/checks.h>
-#include <proto/client.h>
 #include <proto/dumpstats.h>
 #include <proto/fd.h>
+#include <proto/frontend.h>
 #include <proto/log.h>
 #include <proto/hdr_idx.h>
 #include <proto/pattern.h>
index d336ed1cc27ba1f67b9b2ec07679ba95e00805a1..1662e906550474857f9122cb91768c6b3942e7a1 100644 (file)
@@ -39,7 +39,7 @@
 
 #include <proto/acl.h>
 #include <proto/buffers.h>
-#include <proto/client.h>
+#include <proto/frontend.h>
 #include <proto/log.h>
 #include <proto/pattern.h>
 #include <proto/port_range.h>
index 7971a7ca9e70a90f9952c9ee6ab0b1df4c532bfd..155d089e6337e1a9d2cee5d891cf579704bc77d2 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <types/global.h>
 
-#include <proto/client.h>
 #include <proto/backend.h>
 #include <proto/fd.h>
 #include <proto/hdr_idx.h>
index 871333afabbe441adb9e6e2cb9677b29b26aabc5..c45abdbe829b98d640ff0b2e70d3b886f6e3bf6f 100644 (file)
@@ -27,7 +27,6 @@
 #include <common/time.h>
 
 #include <proto/buffers.h>
-#include <proto/client.h>
 #include <proto/fd.h>
 #include <proto/stream_interface.h>
 #include <proto/stream_sock.h>
index 8937c2a56ddb18abda66feeb66df5363fe3c27d6..d5887627791ab1218a516390bb4d45337b6f0ac7 100644 (file)
@@ -30,7 +30,6 @@
 #include <common/time.h>
 
 #include <proto/buffers.h>
-#include <proto/client.h>
 #include <proto/fd.h>
 #include <proto/pipe.h>
 #include <proto/stream_sock.h>