| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This is expected to be useful for new transports where we need
the sock address to properly reply (think UDP with multicast).
|
| |
|
|
| |
This will be used for some follow up work (UDP).
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This will be used in UDP. It also lets us reduce some unnecessary
code paths for redundant library initialization.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This requires using a supporting version of Mbed TLS.
We have to use PSA crypto for TLS 1.3.
|
| |
|
|
| |
This fixes a problem only found on Windows, that affected both IPC and TCP.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
as NNG and add PSK
|
| |
|
|
| |
This is in preparation for the wolfSSL integration.
|
| |
|
|
|
| |
Also, while here, prepare for PSK support to be conditional -- it is not
necessarily on by default in all future engines (e.g. WolfSSL.)
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
| |
(#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.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
The logic with overlapped structures was fragile as it used
overlapped ios for the connections rather than a single common
one for the listener. This changes it to be more like POSIX, and
robust against this error.
|
| |
|
|
| |
We use overlapped I/O, so we don't need a separate hEvent.
|
| | |
|
| |
|
|
|
|
|
|
| |
When closing pipes, we defer them to be reaped, but also leave
them in the match list where they might be picked up by ep_match,
or leak. It's best to reap these proactively and ensure that they
are not allowed to life longer once they have errored during the
negotiation phase.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
If you want to build on Windows use a toolchain that supports modern APIs.
This means, for Microsoft, UCRT (Universal C Runtime), which is supported
by default on modern Visual Studio. MinGW users may have to go out of their
way to enable it. (New -D_UCRT flag or something.)
The supported toolchain for building on Windows is Visual Studio. Use of
other tool chains is not officially supported or guaranteed to work. YMMV.
|
| |
|
|
| |
when an `aio` has no `a_cancel_fn` and the task is in `task_prep` abort it on `nni_aio_stop` call
|
| |
|
|
|
|
|
| |
With specific message sizes, we the shuffle of data for msg insert
can calculate the wrong value, leading to heap corruption.
This includes a stress test for msg insert to hopefully exercise
every reasonable edge case.
|
| |
|
|
| |
This also deprecates supplemental/util/platform.h.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Add nng_str_sockaddr to get string representation of socket address.
* Added nng_log_get_level() is meant to allow users to obtain the
current level and avoid some possibly expensive operations just
to collect debugging information when debugging is not in effect.
We use a custom logger for NUTS, and this fits within the NUTS
test framework well, so that if -v is supplied we get more content.
All tests now get this by default.
|
| |
|
|
|
| |
Also while here, remove unused sockaddr members from some structs.
This should save a bit of memory for servers with a lot of conns.
|
| | |
|
| |
|
|
|
| |
This isn't complete, but it should go much further in assisting
debugging TLS related errors.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The realtime clock is not (yet) exposed for user applications, but it
is used for logging timestamps accurately.
|