aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-11-05[socket-nif|doc] Improved doc for recvmsg and update for sendmsgMicael Karlberg
The API for the sendmsg function has been updated to describe the possible "partial success" of {ok, Remaining}. OTP-14831
2018-11-05[socket-nif] Add "partial success" to sendmsgMicael Karlberg
The sendmsg function attempts to send *one message*. But its possible for the underlying software to fail to send the *entire* message. So, instead of retrying itself, as send does, the sendmsg function will now instead return with {ok, Remaining}, leaving it to the caller to decide what to do. OTP-14831
2018-11-05[socket-nif] Sending when buffer is full failedMicael Karlberg
When the send buffer was full (eagain), the send failed (with the rather useless return of {ok, -1}) instead of returning {error, eagain}. OTP-14831
2018-11-05[socket-nif] Make it possible to send (nif) debug to fileMicael Karlberg
Make it possible to open a file and send debug printouts to (instead of stdout) for debug printouts from the nif-code. OTP-14831
2018-11-02[socket-nif|test] Biffer init and message sizes in ping-pong caseMicael Karlberg
The ping-pong test case(s) now initiates the socket buffers before they are connected (server: before listen is called on the listen socket and client: before connect is called). Also, we now include a length indicator in the messages, so that we know how much to read. OTP-14831
2018-11-02[socket-nif] Inherit buffer sizes when acceptingMicael Karlberg
An "accepted" socket will inherit the parent (listen) socket's buffer sizes (rBufSz, rCtrlSz and wCtrlSz). OTP-14831
2018-11-01[sock-nif|test] Add a ping-pong test caseMicael Karlberg
We got some kind of send hang...
2018-10-30[socket-nif] Add a send and receive chunks test caseMicael Karlberg
The send and recv test case triggered a two bugs. One was that there was no re-selecting when only a portion of the data was received (which meant that we stopped reading). Also, the wrong 'current' (writer) was reset when demonitor current reader after a successful read (which meant that future readers would never have been monitored). OTP-14831
2018-10-30[socket-nif|test] Make more use of the evaluator funcsMicael Karlberg
Make more use the evaluator functions for communication between processes. Specifically, between the server and its handler processes in the sc_rc_receive_response_tcp test cases(s). OTP-14831
2018-10-29[socket-nif|test] Make more use of the evaluator funcsMicael Karlberg
Use the evaluator functions for communication between processes also for communication between "slave" processes (on other nodes). OTP-14831
2018-10-29[socket-nif|test] All test cases now using evaluator moduleMicael Karlberg
All test cases has been updated using the new evaluator module (and their macros). OTP-14831
2018-10-26[socket-nif|test] Added "proper" evaluator moduleMicael Karlberg
Add a "proper" evaluator module and adapted a couple of test cases to use that instead. OTP-14831
2018-10-26[socket-nif|test] Updated socket (remote) close test case(s)Micael Karlberg
Updated the socket (remote) close test case(s) sc_rc_receive_response_tcp. Now has three (remote) client connecting. OTP-14831
2018-10-25[socket-nif|test] Updated socket (local) close test case(s)Micael Karlberg
Updated the socket (local) close test case(s) sc_lc_acceptor_response_tcp with the new evaluator interface functions. OTP-14831
2018-10-25[socket-nif|test] Updated socket (remote) close test case(s)Micael Karlberg
Updated the socket (remote) close test case(s) sc_rc_receive_response_tcp with the new evaluator interface functions. OTP-14831
2018-10-25[socket-nif|test] Updated socket (local) close test case(s)Micael Karlberg
Updated the socket (local) close test case(s) sc_lc_receive_response_udp with the new evaluator interface functions. OTP-14831
2018-10-25[socket-nif|test] Updated socket (local) close test case(s)Micael Karlberg
Updated the socket (local) close test case(s) sc_lc_receive_response_tcp with the new evaluator interface functions. OTP-14831
2018-10-25[socket-nif|test] Updated socket close test case(s)Micael Karlberg
Updated the socket close test case(s) sc_cpe_socket_cleanup with the new evaluator interface functions. OTP-14831
2018-10-24[socket-nif|test] Updated the basic timeout multi accept test caseMicael Karlberg
Updated the basic api timeout test case(s) api_to_maccept_tcp with the new evaluator interface functions. OTP-14831
2018-10-24[socket-nif|test] Updated the basic timeout connect test caseMicael Karlberg
Updated the basic api timeout test case api_to_connect_tcp with the new evaluator interface functions. OTP-14831
2018-10-24[socket-nif|test] Updated the basic option ctrl proc test caseMicael Karlberg
Updated the basic api option test case api_opt_simple_otp_controlling_process with the new evaluator interface functions. OTP-14831
2018-10-24[socket-nif|test] Updated the basic send and recv tcp test casesMicael Karlberg
Updated the basic api test cases api_b_send_and_recv_tcp4 and api_b_sendmsg_and_recvmsg_tcp4 with the new evaluator interface functions. OTP-14831
2018-10-23[socket-nif|test] Evaluator interface functionsMicael Karlberg
Added simple evaluator interface functions, so that it is simple for evaluators to interact (and unified). Only two test cases so far... OTP-14831
2018-10-23[socket-nif|test] Add two "remote close" test casesMicael Karlberg
Added two remote close socket closure test cases (for IPv4 TCP): sc_rc_recv_response_tcp4 and sc_rc_recvmsg_response_tcp4. OTP-14831
2018-10-22[socket-nif|test] Add test case for accept handling socket closeMicael Karlberg
Add test cases for tcp local socket close for the accept function. OTP-14831
2018-10-22[socket-nif|test] Add test cases for UDP recvfrom and recvmsgMicael Karlberg
Add test cases for udp local socket close for UDP recvfrom and recvmsg. OTP-14831
2018-10-22[socket-nif] Initiation of "current reader" missing for recvfromMicael Karlberg
When calling the recvfrom function when there is no data, we should be made wait (for the specified amount of time). But this did not work because the "current reader" structure was not initiated. OTP-14831
2018-10-19[socket-nif|test] Local close cases extendedMicael Karlberg
The receive response local close tcp cases was extended wityh two more handler (readers). OTP-14831
2018-10-19[socket-nif|test] Evaluator improvementsMicael Karlberg
Add name to evaluator printouts. Also added timetraps to all test- cases to shorten the time to wait in case a test case fails. OTP-14831
2018-10-19[socket-nif|test] IO fixesMicael Karlberg
2018-10-19[socket-nif|test] Moved socket tests from kernel to erts/emulatorMicael Karlberg
OTP-14831
2018-10-18[socket-nif] setopt and getopt with level ipv6Micael Karlberg
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
2018-10-18Merge branch 'bmk/20181004/nififying_inet_rework_test_suite/OTP-14831' into ↵Micael Karlberg
bmk/20180918/nififying_inet/OTP-14831
2018-10-18[socket-nif] Initiation of "current reader" missing for recvmsgMicael Karlberg
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
2018-10-18[socket-nif] Socket closeMicael Karlberg
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
2018-10-16[socket-nif] Recv handling of closing socketsMicael Karlberg
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
2018-10-15[socket-nif] Fix socket close when owner process exitsMicael Karlberg
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
2018-10-09[socket-nif|doc] Add preliminary doc for the function supportsMicael Karlberg
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
2018-10-09[socket-nif] The supports function now also handles sctp and ipv6Micael Karlberg
The supports function now also handles testing for SCTP and IPv6 support. Basic test at the moment, but better then nothing. OTP-14831
2018-10-09[socket-nif] Completed (ahum) the socket option(s) part of supportsMicael Karlberg
"Completed" the socket options part of the supports function. OTP-14831
2018-10-08[socket-nif] Add the options for socket, ip and ipv6 for supportsMicael Karlberg
Add the options for level socket (full), ip and ipv6 to the supports function. OTP-14831
2018-10-05[socket-nif] Add first three socket (socket) options to supportsMicael Karlberg
Added the first three socket (level socket) options to the supports function(s). OTP-14831
2018-10-05[socket-nif] Add *preliminary* new function supports/0,1Micael Karlberg
2018-10-04Merge branch 'bmk/20181004/nififying_inet_freebsd_fixes/OTP-14831' into ↵Micael Karlberg
bmk/20180918/nififying_inet/OTP-14831
2018-10-04[socket-nif] Add owner validation when setopt controlling_processMicael Karlberg
Before allowing setopt(Sock, opt, controlling_process, NewPid), verify that the caller is actually the current controlling_process. OTP-14831
2018-10-04[socket-nif] Fixed decode of send and recv flagsMicael Karlberg
Add explicitly handling the default case, when not flags are provided (value of zero). OTP-14831
2018-10-04[socket-nif] Socket option 'SO_DOMAIN' not avalable on all platformsMicael Karlberg
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
2018-09-28[socket-nif] Add support for socket (level otp) buffer optionsMicael Karlberg
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
2018-09-28[socket-nif|doc] Cleanup and fixed setopt docMicael Karlberg
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).
2018-09-27[socket-nif|doc] SCTP type and sendtoMicael Karlberg
Added missing SCTP type (for assoc id) and updated sento doc (missing clauses). OTP-14831