summaryrefslogtreecommitdiff
path: root/src/socket.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Define comparator for irc::sockets::sockaddrsGravatar Daniel De Graaf2010-04-261-0/+11
| | | | | This only compares IP/port, which ignores IPv6 flow information and scope ID, which aren't important in testing for equality.
* Replace #define IPV6 with <config defaultbind="ipv6">, and autodetect if not ↵Gravatar danieldg2010-02-231-33/+18
| | | | | | specified git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12550 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix cidr_mask::str not correctly displaying mask lengthGravatar danieldg2010-02-031-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12363 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove unneeded save of errnoGravatar danieldg2010-01-211-3/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12309 e03df62e-2008-0410-955e-edbf42e46eb7
* ERROR is not a valid log level, so all these messages were getting droppedGravatar danieldg2010-01-191-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12304 e03df62e-2008-0410-955e-edbf42e46eb7
* ...because every now and again, i have to do a massive commit.Gravatar brain2010-01-111-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
* Get rid of socklen_t parameter to Bind, we are using C++ here and can do it ↵Gravatar danieldg2009-11-131-1/+1
| | | | | | other ways git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12129 e03df62e-2008-0410-955e-edbf42e46eb7
* Get rid of OpenTCPSocketGravatar danieldg2009-10-241-40/+10
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11969 e03df62e-2008-0410-955e-edbf42e46eb7
* Create irc::sockets::cidr_maskGravatar danieldg2009-10-241-47/+128
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11968 e03df62e-2008-0410-955e-edbf42e46eb7
* Make irc::sockets::* parameters consistent, add irc::sockets::maskGravatar danieldg2009-10-221-33/+65
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11953 e03df62e-2008-0410-955e-edbf42e46eb7
* Kill ListenSocketBase, use OnAcceptConnection for all new connectionsGravatar danieldg2009-10-211-35/+29
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11950 e03df62e-2008-0410-955e-edbf42e46eb7
* Use ConfigTagList as a faster access method for access to configurationGravatar danieldg2009-10-211-4/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11948 e03df62e-2008-0410-955e-edbf42e46eb7
* Rewrite ConfigReader againGravatar danieldg2009-10-171-13/+12
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11879 e03df62e-2008-0410-955e-edbf42e46eb7
* 3rd time lucky? Fix again for setsockopt.Gravatar peavey2009-10-101-7/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11825 e03df62e-2008-0410-955e-edbf42e46eb7
* Slight tweak to setsockopt fix.Gravatar peavey2009-10-101-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11824 e03df62e-2008-0410-955e-edbf42e46eb7
* Compile fixes for windows.Gravatar peavey2009-10-101-1/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11823 e03df62e-2008-0410-955e-edbf42e46eb7
* Add server ports to ServerInstance->ports, enable SSL on them using OnHookIOGravatar danieldg2009-10-091-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11810 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix crash due to null address in DNSGravatar danieldg2009-10-031-4/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11797 e03df62e-2008-0410-955e-edbf42e46eb7
* Get rid of a bunch of memory-wasting C-style stringsGravatar danieldg2009-10-031-8/+7
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11796 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove InspIRCd* parameters and fieldsGravatar danieldg2009-09-261-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
* Create StreamSocket for IO hooking implementationGravatar danieldg2009-09-211-1/+1
| | | | | | | | | | | | | | 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
* Rewrite BindPorts to index ports by their human-readable descriptionGravatar danieldg2009-09-021-31/+24
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11635 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove duplicated address conversion from InspIRCd::BindSocket, fix FD leak ↵Gravatar danieldg2009-09-021-27/+10
| | | | | | in listensocket git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11632 e03df62e-2008-0410-955e-edbf42e46eb7
* Use a set to mark client SSL ports rather than going by textual IP/port pairsGravatar danieldg2009-09-021-1/+3
| | | | | | | | | | 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
* Add irc::sockets::satouser for user-readable IP/port pairsGravatar danieldg2009-09-021-0/+37
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11627 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix valgrind uninitialised memory errorGravatar danieldg2009-09-021-4/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11612 e03df62e-2008-0410-955e-edbf42e46eb7
* Cast rework: use C++ style static_cast<> instead of C-style castsGravatar danieldg2009-09-021-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11595 e03df62e-2008-0410-955e-edbf42e46eb7
* Use a bool return type for boolean returnGravatar danieldg2009-09-011-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11585 e03df62e-2008-0410-955e-edbf42e46eb7
* Use sa_size() rather than sizeof() when passing input parameters to a syscallGravatar danieldg2009-09-011-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11583 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove unneeded #ifdef IPV6 linesGravatar danieldg2009-09-011-11/+11
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11582 e03df62e-2008-0410-955e-edbf42e46eb7
* Move IP<->sockaddr conversions into irc::sockets:: namespaceGravatar danieldg2009-09-011-45/+8
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11580 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove now-unused insp_sockaddr and insp_inaddr typesGravatar danieldg2009-09-011-12/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11579 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove needless sockaddr[2] allocations, replace with ↵Gravatar danieldg2009-09-011-35/+20
| | | | | | irc::sockets::sockaddrs union git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11574 e03df62e-2008-0410-955e-edbf42e46eb7
* Make rehash generate a new ServerInstance->Config objectGravatar danieldg2009-07-011-6/+5
| | | | | | | This makes it possible to cancel a pending rehash, and fixes possible threading issues with rehash and other events. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11424 e03df62e-2008-0410-955e-edbf42e46eb7
* Move list of open ports out of Config objectGravatar danieldg2009-07-011-6/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11423 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix incorrect attempted inline of irc::sockets::sa_sizeGravatar danieldg2009-06-161-0/+8
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11415 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix incomple memset() in irc::sockets::aptosa, add support for converting ↵Gravatar danieldg2009-05-131-2/+13
| | | | | | empty addresses git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11383 e03df62e-2008-0410-955e-edbf42e46eb7
* Add IP address conversion utility functions, irc::sockets::aptosa and ↵Gravatar danieldg2009-04-291-0/+38
| | | | | | irc::sockets::satoap git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11336 e03df62e-2008-0410-955e-edbf42e46eb7
* Update all wiki links to point to the new wiki. This was done automatically ↵Gravatar psychon2009-03-151-1/+1
| | | | | | | | | with the following command, only .Makefile.inc got some indent fixups by hand. 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
* Nuke trailing spacesGravatar peavey2009-02-141-3/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11105 e03df62e-2008-0410-955e-edbf42e46eb7
* Update copyrights for 2009.Gravatar w00t2009-01-021-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
* Patch to allow bindings to all ips on an ipv4 only system where the build is ↵Gravatar brain2008-12-071-1/+7
| | | | | | ipv6 (e.g. how debian build it) -- thanks for the patch danieldg git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10867 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove crappy, unsafe (and now unneeded!) casts.Gravatar w00t2008-09-081-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10476 e03df62e-2008-0410-955e-edbf42e46eb7
* Make OnAcceptReady pure virtual, rename ListenSocket to ListenSocketBase, ↵Gravatar w00t2008-09-081-4/+5
| | | | | | create ClientListenSocket and inherit from ListenSocketBase to create User objects. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10469 e03df62e-2008-0410-955e-edbf42e46eb7
* Move listensocket stuff into a file of it's own.Gravatar w00t2008-09-071-127/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10446 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove last vestige of libircdfoo, by changing tag into a single ↵Gravatar w00t2008-07-291-1/+1
| | | | | | identifier marking object as requiring compilation into a .o (minor commit) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10076 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix output corruption on startup if ports fail to bind, spotted by psychonGravatar brain2008-07-201-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10054 e03df62e-2008-0410-955e-edbf42e46eb7
* Combine IP+port in a failed port list, show (the more helpful) error string ↵Gravatar w00t2008-07-171-1/+1
| | | | | | so the user can have some idea of what actually went wrong.. why we forced people to strace is beyond me.. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10030 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix to give the proper target ip on connect, cookies to w00t and JasonGravatar brain2008-05-191-3/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9772 e03df62e-2008-0410-955e-edbf42e46eb7
* FixGravatar w00t2008-05-091-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9680 e03df62e-2008-0410-955e-edbf42e46eb7