aboutsummaryrefslogtreecommitdiff
path: root/include/socket.h
Commit message (Expand)AuthorAgeFilesLines
* Add irc::sockets::isunix for checking if a file is a UNIX socket.Gravatar Peter Powell2019-05-291-0/+6
* Add irc::sockets::untosa() for creating AF_UNIX sockaddrs.•••Also fix an overly long albeit harmless memcpy when creating UNIX socket listeners. Thanks to @psychon for reporting this. Gravatar Peter Powell2019-02-071-0/+7
* Initial support for listening on UNIX socket endpoints.Gravatar Peter Powell2018-07-181-0/+2
* Add the family() member to the sockaddrs union.Gravatar Peter Powell2018-07-181-0/+2
* Fix a ton of -Wsign-conversion warnings.Gravatar Peter Powell2017-11-171-2/+2
* Change FailedPortList to store a sockaddrs/int instead of string.Gravatar Peter Powell2017-09-121-0/+3
* Store the server endpoint as a sockaddrs in ListenSocket.Gravatar Peter Powell2017-09-121-4/+1
* Get rid of irc::sockets::satoap().•••This function is being misused in all but one scenario. It isn't really worth keeping IMO. Gravatar Peter Powell2017-09-121-8/+0
* Keep multiple IOHookProvider references in class ListenSocket•••This adds the <bind:hook> config option which works together with <bind:ssl> Gravatar Attila Molnar2016-08-081-3/+14
* Change return type of ListenSocket::ResetIOHookProvider() to void•••No code was using the return value Gravatar Attila Molnar2016-08-081-2/+1
* Predeclare IOHookProvider, remove iohook.h include from socket.hGravatar Attila Molnar2016-08-081-1/+0
* Dispatch EventHandler events to dedicated virtual functions•••Remove enum EventType Gravatar Attila Molnar2015-04-121-5/+2
* Split IOHook into IOHook and IOHookProvider•••Create one IOHook instance for each hooked socket which contains all the hook specific data and read/write/close functions, removing the need for the "issl_session" array in SSL modules. Register instances of the IOHookProvider class in the core and use them to create specialized IOHook instances (OnConnect/OnAccept). Remove the OnHookIO hook, add a dynamic reference to ListenSocket that points to the hook provider (if any) to use for incoming connections on that socket. For outgoing connections modules still have to find the IOHookProvider they want to use themselves but instead of calling AddIOHook(hookprov), now they have to call IOHookProvider::OnConnect() after the connection has been established. Gravatar Attila Molnar2014-01-221-0/+13
* Remove some pointless code:•••- Remove the CHARSET entry from ISUPPORT. CHARSET was removed in draft-brocklesby-irc-isupport-03 and we always used the default value anyway. This has also been removed in the latest version of Charybdis. - Remove irc::sockets::satouser. This helper method was longer than the code it replaced. Gravatar Peter Powell2013-12-151-7/+0
* Modularize DNS•••The DNS modules are temporarily in commands/ so they're loaded automatically Thanks to Attila for helping with much of this. Gravatar Adam2013-04-261-3/+0
* Tidy up source files:•••- Use #pragma once instead of include guards. - Move header files in src/modules to include/modules. - Fixed various spacing issues. Gravatar Peter Powell2013-04-121-5/+1
* Windows: In-depth cleanup (see details)•••-Fix x64 builds for Windows. Now all configurations compile. -Remove the non-working rebase stuff. -Remove the Windows fork hack and instead use FreeConsole() to emulate the behavior. This directly allows us to compile with ASLR, which is turned on now. -Remove the old IPC mechanism for the removed GUI. This is not needed anymore as the GUI wasn't ever supported on anything newer than 1.2 -Remove the WIN32/WINDOWS macros. _WIN32 is supported on all x86-based VC++ targets, so that's what we need. -Enable optimizations for release builds. -De-duplicate printf_c(), it was previously copy-pasted into colors.h for configure -Add the VC++ specific bad files in .gitignore -Disable PID writing on Windows. This is only making sense for *nix builds. -Replace the CPU usage retrieval with an algorithm analogous to the *nix behavior. Also supports separated now/total values. (Tested with a dummy busy loop - seems working) -Removed certain unused functions and variables -Remove stdint defines from the windows wrapper -Remove CRT debug alloc. This is a bad idea as it would define a macro to replace free which breaks builds. -Re-evaluated the warnings list, commented it. -Moved inspircd_config/_version to include/ to match *nix -Removed the creation of inspircd_se_config, as it isn't used at all. -Made non-git builds show as "r0" instead of "r" (thanks to @SaberUK for pointing this out) -Fixed up m_spanningtree's project paths. Now all configurations (debug/release x86/x64) have been tested and build properly. -Moved FindDNS out of the wrapper and matched its log behavior with *nix. (It's pointless having it in the wrapper after the recent slimming down) -Replaced random/srandom wrappers with a mechanism that tries to use Windows' Random API first is no SSL module is loaded. -Removed more old junk from support for compilers older than VC++ 2010 (we don't have project files for these, so compiling them would be hard anyways) -Removed the unused ClearConsole() -Removed unused includes from the wrapper. Also, do not include psapi.h here if we don't link psapi.lib. This should be done where appropriate. -Made inet_aton an inline function for increased performance -C4800, performance warning about bool forcing, resolved at all occurrences. -C4701, uninitialized variable 'cached', resolved at all occurrences. -dlerror() was migrated out of the wrapper for more thread safety (no global buffer being shared) and increased performance. -Removed the wrong CRT debug flags. This drains a lot of performance. -Removed the clock_gettime/gettimeofday wrappers -Replaced all TCHAR/ANSI mix-ups of functions with the correct respective function. -Added a block of C4355 for < VS2012 -Update project files for c870714 Gravatar ChrisTX2012-10-121-1/+1
* Fix bug #291 - fix rehashing bind tags not changing them between servers/clie...Gravatar Adam2012-09-121-1/+1
* Fix Doxygen syntax errors.Gravatar Peter Powell2012-07-051-0/+1
* Replace copyright headers with headers granting specific authors copyrightGravatar Robby-2012-04-191-8/+19
* Define comparator for irc::sockets::sockaddrs•••This only compares IP/port, which ignores IPv6 flow information and scope ID, which aren't important in testing for equality. Gravatar Daniel De Graaf2010-04-261-2/+5
* Remove unneeded save of errno•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12309 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2010-01-211-1/+1
* ...because every now and again, i have to do a massive commit.•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar brain2010-01-111-1/+1
* Get rid of socklen_t parameter to Bind, we are using C++ here and can do it o...•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12129 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-11-131-1/+1
* Get rid of OpenTCPSocket•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11969 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-10-241-7/+0
* Create irc::sockets::cidr_mask•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11968 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-10-241-34/+34
* Move forward declarations to typedefs.h•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11967 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-10-241-1/+0
* Make ConfigTag::items private•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11956 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-10-221-1/+1
* Make irc::sockets::* parameters consistent, add irc::sockets::mask•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11953 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-10-221-3/+10
* Kill ListenSocketBase, use OnAcceptConnection for all new connections•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11950 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-10-211-44/+8
* Add server ports to ServerInstance->ports, enable SSL on them using OnHookIO•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11810 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-10-091-21/+9
* Get rid of a bunch of memory-wasting C-style strings•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11796 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-10-031-2/+2
* Remove InspIRCd* parameters and fields•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-261-5/+2
* Create StreamSocket for IO hooking implementation•••Fixes the SSL SendQ bug Removes duplicate code between User and BufferedSocket Simplify SSL module API Simplify EventHandler API (Readable/Writeable moved to SE) Add hook for culled objects to invoke callbacks prior to destructor Replace SocketCull with GlobalCull now that sockets can close themselves Shorten common case of user read/parse/write path: User::Write is now zero-copy up to syscall/SSL invocation User::Read has only two copy/scan passes from read() to ProcessCommand git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11752 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-211-1/+1
* Fix some ICC-found warnings and remove unused #define•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11639 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-021-1/+1
* Use a set to mark client SSL ports rather than going by textual IP/port pairs•••This theoretically speeds up accepting connections. Visible changes are proper IPv6 port text in 005 output and no possibility of incorrect SSL on addresses that mismatch an incoming port (possible with IPv4 wildcard SSL and IPv6 plaintext on the same port, not that anyone would do such a thing). Bind ports also now tell which SSL module they use in /stats p. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11629 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-021-6/+7
* Add irc::sockets::satouser for user-readable IP/port pairs•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11627 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-021-0/+6
* Use a bool return type for boolean return•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11585 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-011-2/+2
* Remove unneeded paramaters from OnAcceptReady•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11581 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-011-4/+2
* Remove now-unused insp_sockaddr and insp_inaddr types•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11579 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-011-43/+0
* Remove needless sockaddr[2] allocations, replace with irc::sockets::sockaddrs...•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11574 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-09-011-2/+1
* Fix incorrect attempted inline of irc::sockets::sa_size•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11415 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-06-161-4/+1
* Fix sockaddr length argument, BSD will complain if it doesn't exactly match t...•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11414 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-06-161-0/+6
* Canonicalize bind addresses when creating listen sockets•••This fixes /stats p output for SSL ports not working if a non-canonical address is used in the configuration (IPv6 with :: or mixed hexadecimal case). This also cleans up some now-useless sockaddr[2] allocations. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11361 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-05-041-18/+14
* Add IP address conversion utility functions, irc::sockets::aptosa and irc::so...•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11336 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-04-291-0/+15
* Correct bind address of ident requests on multihomed IPv6-capable servers.•••Fixes bug #815, reported by Szymek. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11274 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar danieldg2009-04-011-0/+6
* Update all wiki links to point to the new wiki. This was done automatically w...•••for file in $(find -type f -and -not -path '*/.svn/*' -and -not -name '*.so') ; do sed -e 's#http://www.inspircd.org/wiki#http://wiki.inspircd.org#' -e 's#http://wiki.inspircd.org/index.php/#http://wiki.inspircd.org/#' -i $file ; done git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11223 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar psychon2009-03-151-1/+1
* Update copyrights for 2009.•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar w00t2009-01-021-1/+1
* Remove crappy, unsafe (and now unneeded!) casts.•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10476 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar w00t2008-09-081-3/+3
* Make OnAcceptReady pure virtual, rename ListenSocket to ListenSocketBase, cre...•••git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10469 e03df62e-2008-0410-955e-edbf42e46eb7 Gravatar w00t2008-09-081-8/+10