From b7716ed57704b2b2bcc665a590aecc8f02de631d Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 13 Jul 2018 10:28:28 +0100 Subject: Initial support for listening on UNIX socket endpoints. --- include/inspircd.h | 7 +++++++ include/socket.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'include') diff --git a/include/inspircd.h b/include/inspircd.h index 447fb8441..b028280f7 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -344,6 +344,13 @@ class CoreExport InspIRCd */ static void DefaultGenRandom(char* output, size_t max); + /** Bind to a specific port from a config tag. + * @param Tag the tag that contains bind information. + * @param sa The endpoint to listen on. + * @params old_ports Previously listening ports that may be on the same endpoint. + */ + bool BindPort(ConfigTag* tag, const irc::sockets::sockaddrs& sa, std::vector& old_ports); + /** Bind all ports specified in the configuration file. * @return The number of ports bound without error */ diff --git a/include/socket.h b/include/socket.h index 6e9a20518..47e89070f 100644 --- a/include/socket.h +++ b/include/socket.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,7 @@ namespace irc struct sockaddr sa; struct sockaddr_in in4; struct sockaddr_in6 in6; + struct sockaddr_un un; /** Return the family of the socket (e.g. AF_INET). */ int family() const; /** Return the size of the structure for syscall passing */ -- cgit v1.3.1-10-gc9f91