Age | Commit message (Collapse) | Author |
|
bmk/20180918/nififying_inet/OTP-14831
|
|
The level argument for IPv6 can be either SOL_IPV6 or
IPPROTO_IPV6, whichever is defined. But it was hard-
coded to SOL_IPV6, which is not defined on FreeBSD.
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
|
|
When calling the recvmsg function when there is no data,
we should be wait (for the specified amount of time).
But this not not wotk because the "current reader" structure
was not initiated.
OTP-14831
|
|
|
|
Fixed a number of issues regarding monitor handling.
Monitors are now wrapped in its own type (ESockMonitor).
This is hopefully temporary!
The reason for this is that there is no way to "initialize"
a monitor after a demonitor. This could mean that after a
successful demonitor, you could still get a down-callback,
and thenh compare with, for instance, ctrlMOn field and get
a match, even though it was just (successfully) demonitor'ed.
To make debugging easier, the monitor and demonitor calls
are now wrapped in their own functions, with debug printouts
before and in case of failure, also after the actual calls
Also, fixed a number of problems with cancel, where monitors
where left still active after cleaning up current and active
reader, writer and acceptor.
OTP-14831
|
|
Added a test cases for testing "socket cleanup" while
process is reading using recv.
OTP-14831
|
|
Fixed more issues regarding closing sockets. Specifically
with respect to recv calls.
Also, added demonitor for all *current* processes.
Also fixed a buffer overflow problem when writing an
warning message (the timestamp buffer was not large
enough).
OTP-14831
|
|
Added two (working) test cases for testing "socket cleanup"
when the controlling-process exits.
OTP-14831
|
|
The handling of terminating controlling-process was
incomplete.
Also added state check (CLOSED and CLOSING) in all
nif-functions to prevent access for a closed (or
closing) socket.
OTP-14831
|
|
|
|
Added simple multi-accept (multiple acceptors) timeout testcase.
OTP-14831
|
|
cases(s)
Added simple accept timeout testcase.
Updated timeout test cases(s) with a timeout validation.
OTP-14831
|
|
|
|
|
|
Each test case is wrapped in a try catch in the ttc_try function.
It handles entry, exit and skip.
|
|
|
|
|
|
|
|
|
|
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Added preliminary documentation for the function socket:supports/0,1,2,3.
It still does not generate proper doc for supports/3 (the last
arg, Opt, don't get a type).
OTP-14831
|
|
The supports function now also handles testing for SCTP and
IPv6 support. Basic test at the moment, but better then nothing.
OTP-14831
|
|
"Completed" the socket options part of the supports function.
OTP-14831
|
|
Add the options for level socket (full), ip and ipv6 to the
supports function.
OTP-14831
|
|
Added the first three socket (level socket) options to the
supports function(s).
OTP-14831
|
|
Two (tcp) test cases where reworked using the command evaluator.
OTP-14831
|
|
|
|
Two test cases where reworked using the command evaluator.
OTP-14831
|
|
Begin rework socket test suite using a command evaluator.
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
|
|
Added a test case that specifically tested setting
the controlling_process.
Also, ensure that invalid updates of controlling-process
(not owner) actually fails.
OTP-14831
|
|
Before allowing setopt(Sock, opt, controlling_process, NewPid),
verify that the caller is actually the current controlling_process.
OTP-14831
|
|
The connect timeout test case uses the listen backlog argument
to test connect timeout (its set to 1). The idea is that when
the server backlog is full, it should not reply. The client attempting
to connect will then get a timeout.
But as it turns out, this behaviour is not "set in stone". On FreeBSD
11.2, the result is instead a 'econnreset'.
It should also be noted that this local connections. That is, both end
of the connection is on the same machine.
So, test case has been updated to also accept a econnreset (even
though that is not what it is testing).
OTP-14831
|
|
Add explicitly handling the default case, when not flags
are provided (value of zero).
OTP-14831
|
|
Internally in the socket module we accessed domain, type and
protocol for an open socket. But as it turns out, domain (family)
is not actually available as a socket option on all platforms.
FreeBSD in this case. So, since we store these values in the socket
descriptor anyway, we switch to use these values for our internal
use instead.
OTP-14831
|
|
Add support for otp level socket options rcvbuf, rcvctrlbuf and
sndctrlbuf. These options define default sizes for these
buffers.
The 'rcvbuf' is used when receiving messages when calling
the recv, recvfrom and recvmsg functions.
The 'rcvctrlbuf' is used for the control message header info
when calling the recvmsg function.
The 'sndctrlbuf' is used for the control message header info
when calling the sendmsg function.
OTP-14831
|
|
Removed some cruft. Also tried, without success, to fix the
build issue ("Error file: cannot find module exporting type").
It may be because of a spec-file issue.
Finally fixed the setopt doc. It did not have a seperate clause
for clause 8 (the fallback clause that takes level and key as
integer).
|
|
Added missing SCTP type (for assoc id) and updated sento doc
(missing clauses).
OTP-14831
|
|
The test cases has been slighly regrouped. The to-group
has moved into the api-group.
OTP-14831
|
|
Add a number of *basic* operation (connect, accept, send and recv).
All of which are not yet implemented (skipped with 'not-yet-implemented').
All of these are basic and only local (both sides on the same host).
OTP-14831
|
|
Make sure the current whatever (writer, reader or writer) is
not the closer pid before *attempting* to sending the abort message.
And if that fails, issue a warning message (not aborting).
OTP-14831
|
|
Added proper recv timeout handling.
Made use of the enif_select(mode = cancel) feature. Each
time a timeout expires, the "active" recv (the surrent reader
select) has to be cancelled. Not yet tested...something for
the new test suite...
Also, added support for getopt(controlling_pprocess) that,
for some reason, was not yet implemented.
OTP-14831
|
|
Add a proper but very basic test suite.
The only (6) test cases now are very basic (open-close and
send-receive).
OTP-14831
|
|
bmk/20180918/nififying_inet/OTP-14831
Also needed to "revert" two of the chnages, related to assoc id.
This is in FreeBSD defined as an uint32 but on linux as a int32.
|
|
|
|
|
|
|