]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: protocol: sockpair protocol
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 11 Sep 2018 14:51:29 +0000 (16:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Sep 2018 05:20:17 +0000 (07:20 +0200)
commit2fe7dd0b2ee00d43c8fc0e1a5b3ebaf5b4d2543a
tree530d13ec37d7ae6108e8292b6d9366a7df651b9e
parent2d3f8a411f764ec3cfca5e2a31ef682e8144056d
MEDIUM: protocol: sockpair protocol

This protocol is based on the uxst one, but it uses socketpair and FD
passing insteads of a connect()/accept().

The "sockpair@" prefix has been implemented for both bind and server
keywords.

When HAProxy wants to connect through a sockpair@, it creates 2 new
sockets using the socketpair() syscall and pass one of the socket
through the FD specified on the server line.

On the bind side, haproxy will receive the FD, and will use it like it
was the FD of an accept() syscall.

This protocol was designed for internal communication within HAProxy
between the master and the workers, but it's possible to use it
externaly with a wrapper and pass the FD through environment variabls.
Makefile
doc/configuration.txt
include/common/standard.h
include/proto/proto_sockpair.h [new file with mode: 0644]
src/cfgparse.c
src/listener.c
src/proto_sockpair.c [new file with mode: 0644]
src/standard.c