summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h7
-rw-r--r--include/socket.h2
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 */