Doug Freed
34a2afbc28
librb: add rb_{set,clear}_cloexec
2021-01-26 00:03:48 -05:00
Ed Kellett
a6f63a829e
Innovation by sed
2020-10-15 15:52:41 +01:00
Ed Kellett
3576d1b482
librb/event: delete indirectly via a dead flag
...
This avoids an issue where deleting an event inside the handler of a
different event puts the event iteration in an invalid state.
2019-09-07 14:50:42 +01:00
Simon Arlott
17809d2db7
librb: Fix type of dst for rb_inet_pton_sock()
2019-08-31 16:10:50 +01:00
Simon Arlott
6003ce763c
Add outgoing SCTP connect support
2017-08-24 20:08:21 +01:00
Simon Arlott
c6ad9b0c5f
Add basic SCTP listener support that binds to multiple addresses
...
This only supports two addresses as the intended use is 1 IPv4 and 1 IPv6
address on a single-homed host, and the only supported configuration of
outgoing connections to other servers is to bind a single IPv4 or IPv6
address.
2017-08-24 20:08:20 +01:00
Simon Arlott
de2934965c
remove RB_IPV6
2017-08-20 12:54:46 +01:00
Simon Arlott
fa2367e3f3
librb: remove zstring
...
rb_zstring_serialized leaks memory while doing nothing with its
arguments... nothing is using zstring so remove it
2017-08-06 18:40:24 +01:00
Simon Arlott
4b1cce65ed
ircd: send tags on every message
...
Simplify linebuf by introducing fsnprint to manage a list of printfs.
Add a msgbuf unparse cache for send functions that loop.
2017-08-06 16:21:29 +01:00
Simon Arlott
e5c434a2df
librb: add rb_snprintf_try_append
...
For when it might fit, or it might not.
2017-07-30 17:04:06 +01:00
Simon Arlott
7a06833fb4
librb: linebuf: reduce the number of "put" implementations from 4 to 1
2017-07-30 15:51:45 +01:00
Simon Arlott
4c7d1de8f3
librb: linebuf needs to use the buffer limit from msgbuf_unparse_prefix
2017-07-29 23:32:27 +01:00
Simon Arlott
9f46eae691
linebuf: increase buffer size to accommodate IRCv3 tags
2017-07-29 22:46:06 +01:00
Simon Arlott
b5ad4cdfde
make soft asserts better by allowing them to be used in expressions
2017-07-29 22:39:53 +01:00
William Pitcock
2e29fd422d
librb: remove one more VMS detritius
2016-06-19 21:47:59 -05:00
Aaron Jones
47a66e154f
librb: silence some fairly harmless compiler warnings
...
These include warnings about "break" statements that will never be
executed (because they are after "return" statements), unused macros
(lost to code refactoring or never even used in the first place),
functions that call abort() or loop indefinitely but aren't marked with
the "noreturn" attribute, and use of variables possibly uninitialised
(a false positive).
2016-06-01 20:54:11 +00:00
Simon Arlott
7c7cf006ca
librb: define UINT32_MAX for FreeBSD 4.8
2016-05-12 12:43:16 +01:00
William Pitcock
9cd0063a2c
librb: fix commio build on win32
2016-04-30 19:33:31 -05:00
Simon Arlott
0346918701
add mkfingerprint program
2016-04-26 20:49:03 +01:00
Simon Arlott
5ad62c80ee
librb: remove socklen parameter from rb_connect_tcp
2016-04-24 17:11:20 +01:00
Simon Arlott
cf430c1a40
ssld: Add new certfp_methods spki_sha256 and spki_sha512
...
These operate on the SubjectPublicKeyInfo of the certificate, which does
change unless the private key is changed. This allows the fingerprint to
stay constant even if the certificate is reissued.
(The same fingerprint is also used by DANE)
2016-04-23 22:51:05 +01:00
Elizabeth Myers
4eafa9e62f
ipv4_from_ipv6: move to librb
2016-04-08 03:49:23 -05:00
Elizabeth Myers
508e25a85b
librb: add versions of rb_strcasecmp, rb_strncasecmp, and rb_strcasestr.
...
The first two are POSIX but not standard (Windows has functions that act
like it, so use them), but the latter is non-standard, full stop.
2016-04-05 05:33:43 -05:00
Elizabeth Myers
0e651b1441
librb: rb_run_event -> rb_run_one_event
...
This is to avoid confusion with rb_event_run, which does something else.
2016-04-02 23:38:28 -05:00
Elizabeth Myers
d86692fa44
Add new sockaddr_storage port retrieval/setting macros
...
These macros are safe for use on IPv6 and clean up a lot of code.
2016-03-31 03:00:29 -05:00
Elizabeth Myers
7b2c764f59
librb: don't include linux/tcp.h, that's already included
2016-03-31 01:16:34 -05:00
Elizabeth Myers
42c5dd7e01
serno.h: remove it with make clean.
2016-03-25 11:47:02 -05:00
William Pitcock
ac2f2189f9
librb: define RB_PATH_SEPARATOR
2016-03-24 18:21:11 -05:00
Elizabeth Myers
491b3b39d5
cleanup: u_long -> unsigned long
2016-03-23 22:03:24 -05:00
Matt Ullman
c056dba233
Remove the rest of the SVN id tags
2016-03-23 20:13:12 -04:00
Elizabeth Myers
2fc6772ee1
typedef-ify rb_radixtree for consistency.
2016-03-23 08:32:22 -05:00
Elizabeth Myers
4177311e6e
Change struct Dictionary(*) to rb_dictionary(_\1).
...
This cleans things up a slightly and puts the dictionary stuff in its
own namespace.
2016-03-23 08:09:58 -05:00
Elizabeth Myers
56f84dedf7
DICTIONARY_FOREACH → RB_DICTIONARY_FOREACH
...
This is in librb and therefore should be prefixed.
2016-03-23 07:45:44 -05:00
William Pitcock
790e4dce4e
librb: add rb_path_to_self(), which provides fairly reliable runtime path detection
2016-03-21 21:11:53 -05:00
Elizabeth Myers
98793cc9e4
librb: remove an experiment I had.
...
This won't really work on 32-bit architectures due to pointer
truncation. In any case, I wasn't planning on using it for this reason,
it was simply something I tinkered with.
2016-03-20 10:28:35 -05:00
William Pitcock
38b68802a3
librb: rb_lib: undefine any previous errno consts on win32
2016-03-20 03:41:25 -05:00
William Pitcock
e0dc28c59f
librb: rb_dictionary: temporary hack to shut up gcc on windows
2016-03-20 01:46:00 -05:00
William Pitcock
b1f7e4098f
librb: win32: more cleanups
2016-03-20 00:41:01 -05:00
William Pitcock
339150ec60
commio: further win32 fixes
2016-03-20 00:37:50 -05:00
William Pitcock
17e4e6af83
librb: further cleanups
2016-03-20 00:35:13 -05:00
William Pitcock
dc7e6b42ca
librb: some win32 fixes
2016-03-20 00:33:19 -05:00
William Pitcock
b68dee9bcb
librb: only install WSA stubs if windows SDK does not provide them
2016-03-20 00:18:42 -05:00
Elizabeth Myers
2a9257c652
rb_dictionary: add include needed for int types.
2016-03-19 15:59:27 -05:00
Elizabeth Myers
1d89c9e945
Remove unnecessary autotools cruft and other detritus
2016-03-18 15:13:11 -05:00
Elizabeth Myers
617144af7a
dns: remove unneeded defines
2016-03-14 22:15:28 -05:00
Elizabeth Myers
b22c6f101c
rb_dictionary: add functions for uint64_t (long) variables.
2016-03-13 00:16:19 -06:00
Elizabeth Myers
50f842125a
authd: crap, C was taken already, rename reload to H.
2016-03-10 08:07:29 -06:00
Elizabeth Myers
3a29f678cf
Rename RATBOX_PROFILE to RB_PROFILE.
2016-03-07 18:52:50 -06:00
Elizabeth Myers
749d697c98
Fix generation of serno.h
...
Due to reversed conditionals, it wasn't being generated properly.
This also actually fixes its generation in librb by just copying the
Charybdis version. Unbundlers will want to take note of this.
2016-03-07 17:15:39 -06:00
Elizabeth Myers
a4bf26dd34
Move irc_* data structures to librb.
...
This makes the base ircd less cluttered up with data structures that can
go elsewhere.
2016-03-06 14:17:19 -06:00