REORG: sock_raw: rename the files raw_sock*
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.
This commit is contained in:
parent
3af56a9359
commit
75bf2c925f
2
Makefile
2
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 \
|
||||
|
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
@ -19,14 +19,14 @@
|
||||
* 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:
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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++;
|
||||
}
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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] = {
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
|
@ -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,
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user