Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Tell code we are breaking strict aliasing.
Most of the time works but with some strong optimisation
compiler could produce not working code because of the
aliasing breakage.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Always true, it would be better to write a test instead.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Result is the same, allocator can do some optimization.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Required since Fedora 29.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Some system uses "th_sum" and "uh_sum" for checksum fields while
other use "check".
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Adding missing include headers.
Use compatibles IP structures.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
More or less perror+exit does the same of err call
so simplify code using err function.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Allow to run make check from distribution
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
Make dist take care to generate manual page so the .tar.gz
already contain the generated version.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Instead of using a thread for reading from tun(s)/remote use a
thread for every direction.
This remove a lot of synchronisation from the code.
Some test I did prove that this implementation although using
a single thread for a direction is faster allowing to use higher
speed.
Also this make easier to reduce the internal queue at a minimum
emulating better a real card and allowing to do some tests with QoS
settings.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Use network namespaces to test the remote case using
a single machine.
Server is run in a subprocess with a different namespace.
Client and server are connected with a veth interface.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This could potentially sligthly change the speed while
transfering data.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Allows to take into account possible framing for the
physical layer.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
This is required to better handle 2 network queue (back and forth)
improving network emulation. In real case there are 2 queue, one on
local machine and another in the remote one.
This will also allow to reduce the queue.
Another problem is that using a single queue there was a single flow
and the combined bandwidth (forth and back) was limited using a single
flow. Now two flows are correctly used for the local case.
This require some more complicate NAT fixing the checksums.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Test that ping utility works
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Add and use check_res function
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Add test infrastructure.
Add a "delay" test checking delay introduced is correct.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Instead of manually building/installing use configure and make install.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Allow more complicated rules.
Avoid duplication of version.
Use more standard settings in Makefiles.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Added spec file and some Makefile target like "dist" and "rpm".
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Add some notes and history
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Just an optimisation, configure routing to direct only 2 ip addresses
to the tun interface.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
|
|
Although you should not use high speed you can specify speeds
like 0.01G.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
Allows to specify options only on one end making easier to change them.
Also one UDP port is automatically assigned.
|
|
Allows to restrict latency/bandwidth between 2 machines.
This require to setup both machines pointing to each other.
Works but it's hard to change parameters.
To do that both end encapsulate packets in a UDP packet (the UDP data
it's just the packet received from tun interface). Quite easy but works.
Would be easier if server will be launched just with a port specification
while client with all parameters so to make easier to change.
|
|
|
|
|
|
tun functions use global state in tun.c anyway.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|