diff options
| author | 2018-07-13 10:28:28 +0100 | |
|---|---|---|
| committer | 2018-07-18 19:22:17 +0100 | |
| commit | b7716ed57704b2b2bcc665a590aecc8f02de631d (patch) | |
| tree | 43f1c62613f3aee5074009a3b8e4582dc65c3638 /include | |
| parent | Add the family() member to the sockaddrs union. (diff) | |
Initial support for listening on UNIX socket endpoints.
Diffstat (limited to 'include')
| -rw-r--r-- | include/inspircd.h | 7 | ||||
| -rw-r--r-- | include/socket.h | 2 |
2 files changed, 9 insertions, 0 deletions
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<ListenSocket*>& 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 <sys/types.h> #include <sys/socket.h> #include <sys/stat.h> +#include <sys/un.h> #include <netinet/in.h> #include <unistd.h> #include <fcntl.h> @@ -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 */ |
