]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: connection: rename the data layer the "transport layer"
authorWilly Tarreau <w@1wt.eu>
Tue, 2 Oct 2012 22:19:48 +0000 (00:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 4 Oct 2012 20:26:09 +0000 (22:26 +0200)
commitf7bc57ca6ed6cc855042f3cac4773ff3c0c63209
tree3a67d78db7c0f0ee8ea2488d8825618f900e5539
parent6f5d141149e632f3bdcd09f4ba80dd9a09d1f22c
REORG: connection: rename the data layer the "transport layer"

While working on the changes required to make the health checks use the
new connections, it started to become obvious that some naming was not
logical at all in the connections. Specifically, it is not logical to
call the "data layer" the layer which is in charge for all the handshake
and which does not yet provide a data layer once established until a
session has allocated all the required buffers.

In fact, it's more a transport layer, which makes much more sense. The
transport layer offers a medium on which data can transit, and it offers
the functions to move these data when the upper layer requests this. And
it is the upper layer which iterates over the transport layer's functions
to move data which should be called the data layer.

The use case where it's obvious is with embryonic sessions : an incoming
SSL connection is accepted. Only the connection is allocated, not the
buffers nor stream interface, etc... The connection handles the SSL
handshake by itself. Once this handshake is complete, we can't use the
data functions because the buffers and stream interface are not there
yet. Hence we have to first call a specific function to complete the
session initialization, after which we'll be able to use the data
functions. This clearly proves that SSL here is only a transport layer
and that the stream interface constitutes the data layer.

A similar change will be performed to rename app_cb => data, but the
two could not be in the same commit for obvious reasons.
19 files changed:
doc/configuration.txt
include/proto/connection.h
include/proto/raw_sock.h
include/proto/ssl_sock.h
include/proto/stream_interface.h
include/types/connection.h
include/types/listener.h
include/types/peers.h
include/types/server.h
src/backend.c
src/cfgparse.c
src/dumpstats.c
src/peers.c
src/proto_http.c
src/proto_tcp.c
src/raw_sock.c
src/session.c
src/ssl_sock.c
src/stream_interface.c