aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/netinet/libalias/util.c
Commit message (Collapse)AuthorAgeFilesLines
* libalias: Add support for EIM NATDamjan Jovanovic2024-12-051-0/+1
| | | | | | | | | | | | | | Add support for endpoint-independent mapping ("full cone NAT") in Libalias's UDP NAT. This conforms to RFC 4787 requirements 1 and 3. All UDP packets sent out from a particular internal address:port leave via the same NAT address:port, regardless of their destination. Add some libalias tests and supporting defines. Reviewed by: igoro, thj Differential Revision: https://reviews.freebsd.org/D46689D
* Cast pointer to uintptr_t to avoid alignment warnings.John Baldwin2022-02-121-3/+3
| | | | | | | | | | Both struct ip and struct udphdr both have an aligment of 2, but the cast from struct ip to a uint32_t pointer confused GCC 9 into raising the required alignment to 4 and then raising a -Waddress-of-packed-member error when casting to struct udphdr. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D31941
* tests/libalias: Factor out common primitivesLutz Donnerhacke2021-05-261-3/+11
| | | | | | | | Rework the tests to check the correct layer in a single test. Factor out tests for reuse in other modules. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30412
* tests/libalias: Add missing copyright statementsLutz Donnerhacke2021-05-241-0/+33
|
* tests/libalias: Add perfomance test utilityLutz Donnerhacke2021-05-221-5/+12
| | | | | | | | | | | | In order to compare upcoming changes for their effectivness, measure performance by counting opertions and the runtime of each operation over the time. Accumulate all tests in a single instance, so make it complicated over the time. If you wait long enough, you will notice the expiry of old flows. Reviewed by: kp (earlier version) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30379
* test/libalias: Tests for outgoing NATLutz Donnerhacke2021-05-211-0/+74
Testing LibAliasOut functionality. This concentrates the typical use case of initiating data transfers from the inside. Provide a exhaustive test for the data structure in order to check for performance improvements. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30335