]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: sock_raw: rename the files raw_sock*
authorWilly Tarreau <wtarreau@exceliance.fr>
Mon, 20 Aug 2012 15:01:35 +0000 (17:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Sep 2012 19:54:56 +0000 (21:54 +0200)
The "raw_sock" prefix will be more convenient for naming functions as
it will be prefixed with the data layer and suffixed with the data
direction. So let's rename the files now to avoid any further confusion.

The #include directive was also removed from a number of files which do
not need it anymore.

17 files changed:
Makefile
Makefile.bsd
Makefile.osx
include/proto/raw_sock.h [moved from include/proto/sock_raw.h with 86% similarity]
src/backend.c
src/cfgparse.c
src/dumpstats.c
src/frontend.c
src/haproxy.c
src/log.c
src/peers.c
src/proto_http.c
src/proto_tcp.c
src/proto_uxst.c
src/raw_sock.c [moved from src/sock_raw.c with 99% similarity]
src/session.c
src/stream_interface.c

index f73c8da2389ee59d4a8d3d246b5b004ed81d45ec..72b8888b0a9a91c62e07a78a88f4432fc77ad485 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -544,7 +544,7 @@ OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.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/frontend.o src/proxy.o src/peers.o \
        src/arg.o src/stick_table.o src/proto_uxst.o src/connection.o \
-       src/proto_http.o src/sock_raw.o src/appsession.o src/backend.o \
+       src/proto_http.o src/raw_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/lb_fas.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 acfdd2a0a935e9578973b2ef4d47dcbe606a5338..9fc9b616579efdd2baa8cf48094f0c9971d26403 100644 (file)
@@ -109,7 +109,7 @@ 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/frontend.o src/proxy.o src/proto_uxst.o \
-       src/proto_http.o src/sock_raw.o src/appsession.o src/backend.o \
+       src/proto_http.o src/raw_sock.o src/appsession.o src/backend.o \
        src/peers.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 \
        src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o src/lb_fas.o \
index 31a7f99d7206e9357909ca9d77c910808eb51a14..9469be965073b553202ca11c3b4318fcb3a5a8da 100644 (file)
@@ -106,7 +106,7 @@ 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/frontend.o src/proxy.o src/proto_uxst.o \
-       src/proto_http.o src/sock_raw.o src/appsession.o src/backend.o \
+       src/proto_http.o src/raw_sock.o src/appsession.o src/backend.o \
        src/peers.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 \
        src/lb_chash.o src/lb_fwlc.o src/lb_fwrr.o src/lb_map.o src/lb_fas.o \
similarity index 86%
rename from include/proto/sock_raw.h
rename to include/proto/raw_sock.h
index 0d8b8780b56f219db0bd1efdb03bfd671d7df11a..36d4dec23f454662b6dcc4a511be1d4e1136a36f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/proto/sock_raw.h
+ * include/proto/raw_sock.h
  * This file contains definition for raw stream socket operations
  *
  * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _PROTO_SOCK_RAW_H
-#define _PROTO_SOCK_RAW_H
+#ifndef _PROTO_RAW_SOCK_H
+#define _PROTO_RAW_SOCK_H
 
 #include <types/stream_interface.h>
 
-extern struct sock_ops sock_raw;
+extern struct sock_ops raw_sock;
 
-#endif /* _PROTO_SOCK_RAW_H */
+#endif /* _PROTO_RAW_SOCK_H */
 
 /*
  * Local variables:
index f9cbaf29e533da38cdfe3b46ddce567b1298aa0c..d5c4a99bcaabe6185e694a86ae08cb98f5200f98 100644 (file)
@@ -43,7 +43,7 @@
 #include <proto/queue.h>
 #include <proto/server.h>
 #include <proto/session.h>
-#include <proto/sock_raw.h>
+#include <proto/raw_sock.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
@@ -988,9 +988,9 @@ int connect_server(struct session *s)
                stream_interface_prepare(s->req->cons, target_srv(&s->target)->sock);
        }
        else if (s->target.type == TARG_TYPE_PROXY) {
-               /* proxies exclusively run on sock_raw right now */
+               /* proxies exclusively run on raw_sock right now */
                s->req->cons->conn.ctrl = protocol_by_family(s->req->cons->addr.to.ss_family);
-               stream_interface_prepare(s->req->cons, &sock_raw);
+               stream_interface_prepare(s->req->cons, &raw_sock);
                if (!si_ctrl(s->req->cons))
                        return SN_ERR_INTERNAL;
        }
index c623927b336bf9bff0d11860b597d6d4e89ac545..ea3b6cf77b4f3a094ebdc09509392cdb7323a360 100644 (file)
@@ -61,7 +61,7 @@
 #include <proto/sample.h>
 #include <proto/server.h>
 #include <proto/session.h>
-#include <proto/sock_raw.h>
+#include <proto/raw_sock.h>
 #include <proto/task.h>
 #include <proto/stick_table.h>
 
@@ -266,7 +266,7 @@ static int str2listener(char *str, struct proxy *curproxy, const char *file, int
 
                        l->fd = -1;
                        l->addr = ss;
-                       l->sock = &sock_raw;
+                       l->sock = &raw_sock;
                        l->state = LI_INIT;
 
                        if (ss.ss_family == AF_INET) {
@@ -1275,7 +1275,7 @@ int cfg_parse_peers(const char *file, int linenum, char **args, int kwm)
                }
                newpeer->addr = *sk;
                newpeer->proto = protocol_by_family(newpeer->addr.ss_family);
-               newpeer->sock  = &sock_raw;
+               newpeer->sock  = &raw_sock;
                newpeer->sock_init_arg = NULL;
 
                if (!sk) {
@@ -4093,7 +4093,7 @@ stats_error_parsing:
                        }
                        newsrv->addr = *sk;
                        newsrv->proto = protocol_by_family(newsrv->addr.ss_family);
-                       newsrv->sock  = &sock_raw;
+                       newsrv->sock  = &raw_sock;
                        newsrv->sock_init_arg = NULL;
 
                        if (!sk) {
index 4d7b90c4eac078631caef8688434ef38271f77ba..9112d2d46afd06480bc576fc40578d096a885eb8 100644 (file)
@@ -52,7 +52,7 @@
 #include <proto/proxy.h>
 #include <proto/session.h>
 #include <proto/server.h>
-#include <proto/sock_raw.h>
+#include <proto/raw_sock.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
@@ -277,7 +277,7 @@ static int stats_parse_global(char **args, int section_type, struct proxy *curpx
                        }
                }
 
-               global.stats_sock.sock = &sock_raw;
+               global.stats_sock.sock = &raw_sock;
                uxst_add_listener(&global.stats_sock);
                global.maxsock++;
        }
index a4f094016e745379fc8bfc0ada0d4ca5c7c1887c..b07d3d1f8437b8d328143f1e76dbe93888197f24 100644 (file)
@@ -41,7 +41,6 @@
 #include <proto/proto_http.h>
 #include <proto/proxy.h>
 #include <proto/session.h>
-#include <proto/sock_raw.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
index 499d3985de4d59eccebe64f954e20ece421a771b..f1047405b352911a37cec76b03c1821c9f1e2374 100644 (file)
@@ -85,7 +85,6 @@
 #include <proto/server.h>
 #include <proto/session.h>
 #include <proto/signal.h>
-#include <proto/sock_raw.h>
 #include <proto/task.h>
 
 #ifdef CONFIG_HAP_CTTPROXY
index b1f532a67253707b314f21787108825cad508637..bdb0060d548405f4cf1b257076800e91641b7b2c 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -32,7 +32,6 @@
 
 #include <proto/frontend.h>
 #include <proto/log.h>
-#include <proto/sock_raw.h>
 #include <proto/stream_interface.h>
 
 const char *log_facilities[NB_LOG_FACILITIES] = {
index c168ec495f8ca5704b8e45131e1387fd0c6a557f..4be52a24219f4065dfee239663651b9fbe5b8324 100644 (file)
@@ -37,7 +37,6 @@
 #include <proto/proto_http.h>
 #include <proto/proxy.h>
 #include <proto/session.h>
-#include <proto/sock_raw.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 #include <proto/stick_table.h>
index c9383b41eabb36a2ed7120a0b47e0308b468d408..de1cec680705b2d25623b74128cde91a7ad17fe7 100644 (file)
@@ -59,7 +59,6 @@
 #include <proto/sample.h>
 #include <proto/server.h>
 #include <proto/session.h>
-#include <proto/sock_raw.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
index be246e19214ac6816a68bcc4cf778c0ac830e235..86fd6bd512da5a8a5fd53cb362f270a9d94c9752 100644 (file)
@@ -49,7 +49,6 @@
 #include <proto/proxy.h>
 #include <proto/sample.h>
 #include <proto/session.h>
-#include <proto/sock_raw.h>
 #include <proto/stick_table.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
index bd0d7886c49d6cbd4e4a5c8666a66405e2671f0b..e4aaeedfeb4f814d78415e32893a08b92c4eb671 100644 (file)
@@ -39,7 +39,6 @@
 #include <proto/log.h>
 #include <proto/protocols.h>
 #include <proto/proto_uxst.h>
-#include <proto/sock_raw.h>
 #include <proto/task.h>
 
 static int uxst_bind_listener(struct listener *listener, char *errmsg, int errlen);
similarity index 99%
rename from src/sock_raw.c
rename to src/raw_sock.c
index 96debe9f3cd091dc9be30d9127b3113271d8b4c9..28ee222358cd3ada8fb0efab63bff60ffda3c415 100644 (file)
@@ -36,7 +36,7 @@
 #include <proto/log.h>
 #include <proto/pipe.h>
 #include <proto/protocols.h>
-#include <proto/sock_raw.h>
+#include <proto/raw_sock.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
@@ -591,7 +591,7 @@ static int sock_raw_write_loop(struct connection *conn)
 
 
 /* stream sock operations */
-struct sock_ops sock_raw = {
+struct sock_ops raw_sock = {
        .update  = stream_int_update_conn,
        .shutr   = NULL,
        .shutw   = NULL,
index fa5efae1aa94657da0a63e8405bb509b175f1042..fa3c4dcb52def4e5179142ae154f6d10f79269d6 100644 (file)
@@ -41,7 +41,6 @@
 #include <proto/queue.h>
 #include <proto/server.h>
 #include <proto/sample.h>
-#include <proto/sock_raw.h>
 #include <proto/stick_table.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
index bdbf2e7fa418a3c15a84d0b179754379186c337f..ca06949fd5c9a7912cf8932e4469dc429a54b22c 100644 (file)
@@ -30,7 +30,6 @@
 #include <proto/connection.h>
 #include <proto/fd.h>
 #include <proto/frontend.h>
-#include <proto/sock_raw.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>