aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/netinet/libalias
Commit message (Collapse)AuthorAgeFilesLines
* libalias: Add support for EIM NATDamjan Jovanovic2024-12-053-1/+172
| | | | | | | | | | | | | | 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
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* libalias tests: Mark an unused variable with __unused.John Baldwin2023-06-201-1/+1
| | | | | | It is not trivial to remove this set but unused variable since it assigned to inside of a macro body, so just mark it with __unused instead.
* 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: PortrangeLutz Donnerhacke2021-12-272-2/+57
| | | | | | | | | | | | | Test ranges of allowed ports for aliasing. - Explicit default like ipfw(8) is doing - Regular range - Exhausting a very small range - Recovery Includes a fix of an utility macro, which was not used before. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31012
* tests/libalias: Make inline functions static inlineDimitry Andric2021-12-201-2/+2
| | | | | | | | In C, plain inline functions should never be used: they should be declared either static inline or extern inline. In this case, they are clearly meant to be static inline. MFC after: 3 days
* tests/libalias: Bugfix in used variablesLutz Donnerhacke2021-07-021-2/+2
| | | | | | Fix two copy and waste errors (referencing the wrong variable). MFC after: 3 days
* tests/libalias: Measure cleanup time separatlyLutz Donnerhacke2021-05-281-3/+7
| | | | | After long test runs, a lot of ressouces can be allocated. Freeing them takes a considerable amount of time.
* tests/libalias: Fix build error due to wrong prototypeLutz Donnerhacke2021-05-261-1/+1
|
* tests/libalias: Add missing prototype to fix build errorLutz Donnerhacke2021-05-261-0/+2
|
* tests/libalias: Add port forwardingsLutz Donnerhacke2021-05-261-13/+49
| | | | | | | | Add port forwardings to the performance tests. This will cause random incoming packets to match the random port forwardings opends beforehand. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30443
* tests/libalias: Improve testingLutz Donnerhacke2021-05-261-48/+88
| | | | | | | | | | | | | | | | gettimeofday(3) is almost as expensive as the calls to libalias. So the call frequency for this call is reduced by a factor of 1000 in order to neglect it's influence. Using NAT entries became more realistic: A communication of a random length of up to 150 packets (10% outgoing, 90% incoming) is applied for each entry. Precision of the execution time is raised to see the trends better. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30405
* tests/libalias: Test LibAliasIn on redirectionLutz Donnerhacke2021-05-262-0/+383
| | | | | | | | Extend the test suite for libalias(3) to incoming connections. Test the various types of redirections. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30408
* tests/libalias: Factor out common primitivesLutz Donnerhacke2021-05-264-158/+144
| | | | | | | | 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-245-0/+165
|
* tests/libalias: Reduce stressLutz Donnerhacke2021-05-231-1/+1
| | | | | | | Due to the new, external performance test utility, the regular test suite can reduce the stress test to a fair amount of activity. MFC after: 1 week
* test/libalias: Fix build errors on various platformsLutz Donnerhacke2021-05-231-7/+7
| | | | | struct timeval has an unspecified integral type, which needs to be canonfied before beeing usable by printf(3).
* tests/libalias: Add perfomance test utilityLutz Donnerhacke2021-05-223-5/+213
| | | | | | | | | | | | 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-215-13/+490
| | | | | | | | | | | 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
* test/libalias: Tests for instantiationLutz Donnerhacke2021-05-182-0/+121
In order to modify libalias for performance, the existing functionality must not change. Enforce this. Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30307