aboutsummaryrefslogtreecommitdiff
path: root/tests/idhash.c
Commit message (Collapse)AuthorAge
* fixes #1289 zerotier should have it's own copy of the id hashing codeGarrett D'Amore2020-08-16
| | | | | | | | | | | fixes #1288 id allocation can overallocate fixes #1126 consider removing lock from idhash This substantially refactors the id hash code, giving a cleaner API, and eliminating a extra locking as well as some wasteful allocations. The ZeroTier code has it's own copy, that is 64-bit friendly, as the rest of the consumers need only a simpler 32-bit API.
* move all public headers to include/nng/ folderGregor Burger2018-11-22
| | | | | | | | | | This change makes embedding nng + nggpp (or other projects depending on nng) in cmake easier. The header files are moved to a separate include directory. This also makes installation of the headers easier, and allows clearer identification of private vs public heade files. Some additional cleanups were performed by @gedamore, but the main credit for this change belongs with @gregorburger.
* fixes #710 idhash has nasty performance bugGarrett D'Amore2018-09-09
| | | | fixes #709 idhash bug on duplicate add
* fixes #396 illumos doesn't build (missing NNG_PLATFORM_POSIX ON)Garrett D'Amore2018-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #397 Need to cast zoneid fixes #395 sun is predefined on illumos/Solaris fixes #394 alloca needs to #include <alloca.h> fixes #399 Cannot use SVR4.2 specific msghdr fixes #402 getpeerucred needs a NULL initialized ucred fixes #403 syntax error in posix_tcp - attempt to return void fixes #407 illumos getegid wrong fixes #406 nni_idhash_count is dead code fixes #404 idhash typedef redeclared fixes #405 warning: newline not last character in file This is basically a slew of related bug fixes required to make this work on illumos. Note that the fixes are not "complete", because more work is required to support port events given that epoll is busted on illumos. We also fixed a bunch of things that aren't actually "bugs" per se, but really just warnings. Silencing them makes things better for everyone. Apparently not all compilers are equally happy with redundant (but otherwise identical) typedefs; we use structs in some places instead of shorter type names to silence these complaints. Note that IPC permissions (the mode bits on the socket vnode) are not validated on SunOS systems. This change includes documentation to reflect that.
* fixes #234 Investigate enabling more verbose compiler warningsGarrett D'Amore2018-02-14
| | | | | | | We enabled verbose compiler warnings, and found a lot of issues. Some of these were even real bugs. As a bonus, we actually save some initialization steps in the compat layer, and avoid passing some variables we don't need.
* Allow forcibly adding idhash values outside of the range.Garrett D'Amore2017-09-05
| | | | | This will allow us to use idhash to manage ephemeral ports (indexed by port), while also allowing us to insert managed ports.
* Add support for 64-bit ids in idhash.Garrett D'Amore2017-08-22
| | | | | | | | | | | We intend to use this with transports where dynamic "port numbers" might be 32-bits. This would allow us to formulate a 64-bit number representing a conversation, and be able to find that conversation by the 64-bit value. Note that the hashed values are probably not perfectly optimal, as only the low order bits are particularly significant in the hash. We might want to consider XOR'ing in the upper bits to address that.
* idhash has it's own lock now.Garrett D'Amore2017-07-13
|
* Make idhash non-inlined (so we can add a mutex.)Garrett D'Amore2017-07-13
|
* Fix compilation warnings found on Windows.Garrett D'Amore2017-01-21
|
* Fix leaks in bus, socket leaks, tighten up close-side refcnting.Garrett D'Amore2017-01-21
| | | | | | | | | | | | | | This does a few things. First it closes some preexisting leaks. Second it tightens the overall close logic so that we automatically discard idhash resources (while keeping numeric values for next id etc. around) when the last socket is closed. This then eliminates the need for applications to ever explicitly terminate resources. It turns out platform-specific resources established at nni_init() time might still be leaked, but it's also the case that we now no longer dynamically allocate anything at platform initialization time. (This presumes that the platform doesn't do so under the hood when creating critical sections or mutexes for example.)
* Windows compilation fixes.Garrett D'Amore2017-01-18
|
* Fixes for valgrind issues.Garrett D'Amore2017-01-18
|
* Added dynamic ID generation & management for idhash tables.Garrett D'Amore2017-01-17
| | | | | | This will allow us to use idhash tables to manage id handles a bit more flexibly. For example, sockets, pipe IDs, etc. can all be generated, and we can use hash tables to ensure that values do not collide.
* Various complaints found in AppVeyor build.Garrett D'Amore2017-01-16
|
* One more c99 thing.Garrett D'Amore2016-12-31
|
* Can't use C99 in tests either.Garrett D'Amore2016-12-31
|
* Richer tests and fixes for idhash. Also dynamically allocate idhash.Garrett D'Amore2016-12-29
|
* Test suite for idhash, fix symbol errors, and value changing.Garrett D'Amore2016-12-29