]> git.tuebingen.mpg.de Git - paraslash.git/commit
server: Add --http-listen-address and --dccp-listen-address.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 17 Mar 2018 01:11:01 +0000 (02:11 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 17 Apr 2018 07:29:57 +0000 (09:29 +0200)
commit4fbe16430b4776814128d7110682c69d1b047c57
treea0efd3a5fca2635a98d3646736b478781156911f
parent631fb4db2cea7bc44e91631957db8cd852fe75ee
server: Add --http-listen-address and --dccp-listen-address.

Currently the http and the dccp sender accept connections on all IP
addresses. This commit makes it possible to configure the senders to
listen only on the specified subset of addresses.

To make this work, the sender_status structure has to be extended to
store an array of file descriptors rather than just a single one.
Several places need to iterate over all listening sockets of the
sender. The new FOR_EACH_LISTEN_FD macro helps to avoid duplicating
the corresponding loop.

The status part of the sender command now prints the listening
addresses instead of just on/off. This is why we also maintain the
ascii representation of the listening addresses in the sender_status
structure and introduce the format_url() helper to format host/port
pairs.
dccp_send.c
http_send.c
m4/lls/server.suite.m4
net.c
net.h
send.h
send_common.c