summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Simon Guinot [Sat, 23 Nov 2019 12:01:39 +0000 (13:01 +0100)]
net.c: don't tune SO_RCVLOWAT
Sometimes the netsum server is blocked waiting for control messages
while it has been sent by the client.
It is because SO_RCVLOWAT is tuned to message size (ctrl->size). Since
the control message size is only 13 bytes, then recvfrom() blocks on
control message waiting for more bytes or a timeout.
This patch fixes the issue by letting SO_RCVLOWAT to its default value
(1). Since the {recv,send}_message functions are able to deal with
incomplete messages, then it should work just fine.
Simon Guinot [Thu, 21 Nov 2019 22:07:44 +0000 (23:07 +0100)]
Remove whitespaces
Simon Guinot [Thu, 21 Nov 2019 21:58:04 +0000 (22:58 +0100)]
net.c: add check of the first received buffer when using memcmp
The first received buffer is not checked when the "memcmp" method is
selected. This patch adds the missing check.
Simon Guinot [Thu, 21 Nov 2019 21:31:26 +0000 (22:31 +0100)]
net.c: fix overflow in tx/rx size computation
This patch fixes the ctrl->rx and ctrl->tx computation when
"ctrl->count * ctrl->size" is greater than 2^32.
Simon Guinot [Thu, 21 Nov 2019 15:52:01 +0000 (16:52 +0100)]
net.c: fix compilation warning
This patch fixes the following compilation warning:
net.c: In function ‘recv_data_messages’:
net.c:411:5: warning: too many arguments for format [-Wformat-extra-args]
411 | "Reference buffer stored in file: ref\n", "ref");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
net.c:413:5: warning: too many arguments for format [-Wformat-extra-args]
413 | "Corrupted buffer stored in file: err\n", "err");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Simon Guinot [Wed, 28 Jan 2015 16:31:57 +0000 (17:31 +0100)]
If a corruption occurs, save buffers into files
With this patch, both the reference and corrupted buffers are saved
info files when a corruption is detected.
Simon Guinot [Tue, 27 Jan 2015 13:27:49 +0000 (14:27 +0100)]
Save first data message into a reference buffer
With this patch, the first data message is saved into a buffer. Note
that is was already the case previously but only when the -m|--memcmp
option was given.
If a corruption occurs then this "reference" buffer can be used to
display the differences between the original buffer and the corrupted
one.
Simon Guinot [Tue, 27 Jan 2015 13:26:12 +0000 (14:26 +0100)]
Introduce function write_buffer_to_file
The function write_buffer_to_file allows to write a buffer content
into a file.
Simon Guinot [Fri, 24 Oct 2014 09:09:58 +0000 (11:09 +0200)]
Fix GPLv3 headers
Simon Guinot [Wed, 9 Apr 2014 13:53:57 +0000 (15:53 +0200)]
Initial import for netsum