aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* fixes #1890 stats could support an inline lock - remove most atomicsGarrett D'Amore2024-10-13
| | | | | This starts by updating UDP to use this approach, since we already have a convenient lock. We should look at doing the same for other stats.
* stats: Reduce some wasted space for disabled stats.Garrett D'Amore2024-10-13
| | | | | Unfortunately for now we have the struct itsel,f but it can become mostly empty.
* UDP: More test tuning for lossy environments.Garrett D'Amore2024-10-13
|
* udp: fix race, fix testsGarrett D'Amore2024-10-13
|
* UDP/sanitizer: Don't be strict about message loss in sanitizer or coverage runs.Garrett D'Amore2024-10-13
|
* UDP: burst testing to improve coverageGarrett D'Amore2024-10-13
| | | | | We are finding that on darwin its very easy for us to lose UDP messages as the socket buffer appears to be depressingly small.
* UDP: numerous fixes, added test for copy breakGarrett D'Amore2024-10-13
| | | | | | There were several bugs here, including use-after-free, a problem when the copy limit was exceeded, and uninitialized receive thresholds.
* stats: Reduce the need for NNG_ENABLE_STATS checks everywhere.Garrett D'Amore2024-10-13
|
* UDP: add some statisticsGarrett D'Amore2024-10-12
|
* udp: fix leaks on EP destroyGarrett D'Amore2024-10-07
|
* Finally, actually register the UDP transport.Garrett D'Amore2024-10-07
|
* Fix case for infinite sleep.Garrett D'Amore2024-10-07
| | | | | If one tries to sleep indefinitely, a sign bug leads to constantly waking calls, which causes an infinite cycle in the expire loop.
* Integer sign extension bug in socket.c.Garrett D'Amore2024-10-07
| | | | | | It turns out that for now this results in early wakeups, due to another bug in the aio framework. But when that bug is fixed, this bug will lead to hangs when redialing.
* fix aio test failures on darwinGarrett D'Amore2024-10-06
| | | | | Actually this test appears to be broken everywhere, and the only reason it ever worked is that we took > 50 ms to context switch.
* Actually enable UDP. Also fix some UWYI includes.Garrett D'Amore2024-10-06
|
* Remove the last of the legacy option handling functions.Garrett D'Amore2024-10-06
|
* Remove deprecated context option functions.Garrett D'Amore2024-10-06
|
* Drop the legacy listener option functionsGarrett D'Amore2024-10-06
|
* Remove dialer legacy option functionsGarrett D'Amore2024-10-06
|
* Drop unused nng_msg_getoptGarrett D'Amore2024-10-06
|
* Remove unused legacy nng_closeall.Garrett D'Amore2024-10-06
|
* Remove deprecated `nng_pipe_getopt` and friends.Garrett D'Amore2024-10-06
|
* Remove the legacy transport registration functions.Garrett D'Amore2024-10-06
| | | | | | This also allows to remove most of the transport headers. Only zerotier.h sticks around, and only for now. (We expect to eject it into a separate module.)
* posix: add getentropy() based RNGGarrett D'Amore2024-10-06
| | | | | | | | XPG8 defines getentropy() as the only good source for random numbers. However, real world use a bit more nuanced. On BSD systems, we would prefer to use arc4random as it avoids unnecessary system calls. On Linux however, getentropy is implemented in terms of getrandom, and should be used directly when available.
* fix maybe uninitialized warningshikokuchuo2024-10-05
|
* fix int-to-pointer conversion warningshikokuchuo2024-10-05
|
* test: support UDP urls for marryGarrett D'Amore2024-10-05
|
* fixes #168 UDP transportGarrett D'Amore2024-10-05
| | | | | | | | | | | | | | | | This is the initial implementation of UDP transport. It does in order guarantees (and consequently filters duplicates), but it does not guarantee delivery. The protocol limits payloads to 65000 bytes (minus headers for SP), but you really want to keep it to much less -- probably best for short messages that within a single MTU to avoid IP fragmentation and reassembly. This is unicast only for now (although there are plans for some support for multicast and broadcast as well as being able to perform automatic mesh building, but that will be in following work. Additional tunables are coming. This is only lightly tested at this point, and should be considered experimental. Its also undocumented.
* msg: add sockaddr to message structureGarrett D'Amore2024-10-05
| | | | | This is expected to be useful for new transports where we need the sock address to properly reply (think UDP with multicast).
* idhash: introduce nni_idhash_count.Garrett D'Amore2024-10-05
| | | | This will be used for some follow up work (UDP).
* Endianness improvements.Garrett D'Amore2024-10-05
| | | | | | | This adds endian awareness at compile time, and defines some little endian versions of some macros. We antiicpate making more use of little endian in new protocols to reduce the "endian tax", as nearly every modern system is little endian these days.
* Introduce nni_url_to_address for common URL to sockaddr support.Garrett D'Amore2024-10-05
| | | | | This will be used in UDP. It also lets us reduce some unnecessary code paths for redundant library initialization.
* fixes #1866 clock_gettime is not used on Android, even though availablev1.9.0Garrett D'Amore2024-09-07
|
* fixes #1858 Warning on calloc()Garrett D'Amore2024-08-14
|
* log: eliminate redundant newlines sometimes presentGarrett D'Amore2024-08-14
|
* TLS: enable TLS 1.3 for Mbed TLS.Garrett D'Amore2024-08-14
| | | | | This requires using a supporting version of Mbed TLS. We have to use PSA crypto for TLS 1.3.
* fixes #1837 IPC - Use After FreeGarrett D'Amore2024-08-13
| | | | This fixes a problem only found on Windows, that affected both IPC and TCP.
* idhash: add nng_id_visit APIGarrett D'Amore2024-08-11
| | | | | | This allows an efficient way to iterate over the entries stored in an ID hash. The iteration is fast, and requires no additional storage. The order of iteration is not guaranteed.
* fixes #1849 merge wolfSSL support inline, and relicense it under same terms ↵Garrett D'Amore2024-07-22
| | | | as NNG and add PSK
* TLS: make some tests conditional.Garrett D'Amore2024-07-22
| | | | This is in preparation for the wolfSSL integration.
* TLS: Stop making the licensing message a warning - notice is sufficient.Garrett D'Amore2024-07-22
| | | | | Also, while here, prepare for PSK support to be conditional -- it is not necessarily on by default in all future engines (e.g. WolfSSL.)
* TLS: announce which engine we are using (in anticipation of newer TLS engines)Garrett D'Amore2024-07-22
|
* Fix conditional tls_tran_testGarrett D'Amore2024-07-21
|
* fixes #1846 Add support for TLS PSKGarrett D'Amore2024-07-21
| | | | | | This also adds an SP layer transport test for TLS, based on the TCP test but with some additions; this test does not cover all the edge cases for TLS, but it does at least show how to use it.
* fixes #1835 setting NNG_OPT_TLS_CONFIG on socket should hold referenceGarrett D'Amore2024-07-21
|
* UDP: Introduce an experimental (undocumented for now) public API for UDP. ↵Garrett D'Amore2024-06-02
| | | | | | | | (#1838) This exposes the UDP methods as nng_ methods, and adds support for Multicast Membership, which is useful in a variety of situations. No documentation is provided, and applications should consider thios API experimental.
* Fixes problem that causing it unable to pass compile when ↵Peter Wang2024-06-01
| | | | | | NNG_TRANSPORT_ZEROTIER is enabled. It seems that there are typo in the struct type naming. And the wrong function name in `nni_sp_zt_register` that will cause link error.
* windows: refactor IPC to avoid possible hangs and use after free.Garrett D'Amore2024-05-30
|
* Free SP protocol streams before discarding aio objects.Garrett D'Amore2024-05-30
| | | | | | | | This seems to alleviate the use after free crashes, although it does not seem like it should. Current theory is that this closes the handle ensuring that it is unregistered from the I/O subsystem, thus preventing callbacks from firing and referring to objects that have been freed.
* Safer initialization of aiosGarrett D'Amore2024-05-30
|