aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2018-12-21[socket-nif] Fixed erl_interface config/make issues on OpenBSDMicael Karlberg
2018-10-19[socket-nif|test] Moved socket tests from kernel to erts/emulatorMicael Karlberg
OTP-14831
2018-10-18[socket-nif|test] Enables test case sc_lc_recvmsg_response_tcp4Micael Karlberg
2018-10-18[socket-nif|test] Some minor test case re-groupingMicael Karlberg
2018-10-16[socket-nif|test] Added test case for closed socket while recvMicael Karlberg
Added a test cases for testing "socket cleanup" while process is reading using recv. OTP-14831
2018-10-15[socket-nif|test] Added two test cases regarding exiting ownerMicael Karlberg
Added two (working) test cases for testing "socket cleanup" when the controlling-process exits. OTP-14831
2018-10-12[socket-nif|test] Add skeletons for controlling-process test casesMicael Karlberg
2018-10-12[socket-nif|test] Add multi accept timeout test caseMicael Karlberg
Added simple multi-accept (multiple acceptors) timeout testcase. OTP-14831
2018-10-12[socket-nif|test] Add accept timeout test case and update other timeout test ↵Micael Karlberg
cases(s) Added simple accept timeout testcase. Updated timeout test cases(s) with a timeout validation. OTP-14831
2018-10-12[socket-nif|test] Reworked (IPv4) udp recvmsg timeout test caseMicael Karlberg
2018-10-12[socket-nif|test] Reworked (IPv4) udp recvfrom timeout test caseMicael Karlberg
2018-10-11[socket-nif|test] Wrapped each test case in tryMicael Karlberg
Each test case is wrapped in a try catch in the ttc_try function. It handles entry, exit and skip.
2018-10-11[socket-nif|test] Reworked (IPv4) tcp recvmsg timeout test caseMicael Karlberg
2018-10-11[socket-nif|test] Reworked tcp (IPv4) recv timeout test caseMicael Karlberg
2018-10-11[socket-nif|test] Reworked the connect timeout test caseMicael Karlberg
2018-10-10[socket-nif|test] Reworked otp controlling process option test caseMicael Karlberg
2018-10-10[socket-nif|test] Reworked simple otp options test caseMicael Karlberg
2018-10-05[socket-nif|test] Two more test cases (tcp) reworkedMicael Karlberg
Two (tcp) test cases where reworked using the command evaluator. OTP-14831
2018-10-05[socket-nif|test] Two more test cases (udp) reworkedMicael Karlberg
Two test cases where reworked using the command evaluator. OTP-14831
2018-10-04[socket-nif|test] begin rework socket suiteMicael Karlberg
Begin rework socket test suite using a command evaluator. OTP-14831
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|test] Add controlling_process test caseMicael Karlberg
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
2018-10-04[socket-nif|test] Updated test case for connect timeoutMicael Karlberg
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
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-27[socket-nif|test] Test case groupingMicael Karlberg
The test cases has been slighly regrouped. The to-group has moved into the api-group. OTP-14831
2018-09-27[socket-nif|test] Add operation timeout test casesMicael Karlberg
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
2018-09-27[socket-nif] Add proper recv timeout handlingMicael Karlberg
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
2018-09-27[socket-nif|test] Add first preliminary socket test suiteMicael Karlberg
Add a proper but very basic test suite. The only (6) test cases now are very basic (open-close and send-receive). OTP-14831
2018-09-20[socket-nif] Add proper send timeout handlingMicael Karlberg
Added proper send timeout handling. Made use of the enif_select(mode = cancel) feature. Each time a timeout expires, the "active" send (the surrent write select) has to be cancelled. OTP-14831
2018-09-19[socket-nif] Add proper connect and accept timeout handlingMicael Karlberg
Added proper connect and accept timeout handling. Made use of the enif_select(mode = cancel) feature. Each time a timeout expires, the previous operation (connect or accept) has to be cancelled (actually its the select operation that has to be cancelled). Only partial implementation of cancel for now (connect and accept). More to follow... OTP-14831
2018-09-18[socket-nif] Added (more) tests for [recv|send]msgMicael Karlberg
Added some more tests for sendmsg (with cmsghdr). OTP-14831
2018-09-18[socket-nif] Add more data types (with doc) and (C) debugMicael Karlberg
Add more debug printouts for the new sendmsg. Also added new (erlang) types with doc. OTP-14831
2018-09-18[socket-nif] Add preliminary support for sendmsgMicael Karlberg
Added function sendmsg/2,3,4. Actually worked on the first try. Something must be wrong... Still no supported cmsghdr's (only support headers where the data part is already a binary, which therefor does not require any processing). So if the cmsghdrs actually work is unclear. OTP-14831
2018-09-18[socket-nif] Processing of more cmsg headersMicael Karlberg
Added processing or more cmsg headers (for more options). Now (also) supports: socket:timestamp. Also various fixes and cleanups. For some reason calling getopt(Sock, 0, {13, int}) (or similar) fails with badarg even though the nif-function (nif_getopt) actually returns a valid value (for instance: {ok, 0}). OTP-14831
2018-09-18[socket-nif] Add more control message decodingMicael Karlberg
Added decoding of the "known" control message options: pktinfo, recvtos, recvttl and recvorigdstaddr). OTP-14831
2018-09-18[socket-nif] Debugged and stuffMicael Karlberg
It seems to work, with atleast some of the cmsg options. More testing needed... OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option sendsrcaddrMicael Karlberg
Added support for ip level socket option SENDSRCADDR. This option requires sendmsg to actually use, so we cannot test this fully at the moment. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option recvorigdstaddrMicael Karlberg
Added support for ip level socket option RECVORIGDSTADDR. This option requires recvmsg to actually use, so we cannot test this fully at the moment (although both set and get works). OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option retoptsMicael Karlberg
Added support for ip level socket option RETOPTS. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option transparentMicael Karlberg
Added support for ip level socket option TRANSPARENT. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option pktinfoMicael Karlberg
Added support for ip level socket option PKTINFO. This option requires sendmsg and/or recvmsg to actually use, so we cannot test this fully at the moment (although both set and get works). OTP-14831
2018-09-18[socket-nif] Add support for socket (level ipv6) option recverrMicael Karlberg
Added support for the IPv6 socket option RECVERR. To actually make use of this option, we need the recvmsg function, which we don't have yet. Baby steps. OTP-14831.
2018-09-18[socket-nif] Add support for socket (level ip) option recverrMicael Karlberg
Added support for the IP socket option RECVERR. To actually make use of this option, we need the recvmsg function, which we don't have yet. Baby steps. OTP-14831.
2018-09-18[socket-nif] Add support for socket (level ipv6) option router_alertMicael Karlberg
Added support for the IPv6 socket option ROUTER_ALERT. Only supported for raw sockets. OTP-14831.
2018-09-18[socket-nif] Add support for socket (level ipv6) option unicast_hopsMicael Karlberg
Added support for the IPv6 socket option UNICAST_HOPS. OTP-14831.
2018-09-18[socket-nif] Add support for socket (level ipv6) option flowinfoMicael Karlberg
Added support for the IPv6 socket option(s) FLOWINFO. The option returns with einval when calling setsockopt, so either you need to be a privileged user to update, or its not actually possible to update this option (even though it says nothing about that in the man page. It only talks about set). This is the same behaviour as with DSTOPTS. Needs furher checking. OTP-14831.
2018-09-18[socket-nif] Add support for socket (level ipv6) option dstoptsMicael Karlberg
Added support for the IPv6 socket option(s) DSTOPTS. The option returns with einval when calling setsockopt, so either you need to be a privileged user to update, or its not actually possible to update this option (even though it says nothing about that in the man page. It only talks about set). This is the same behaviour as with RTHDR and HOPLIMIT. On FreeBSD, it says that HOPOPTS requires superuser privileges. Needs furher checking. OTP-14831.
2018-09-18[socket-nif] Add support for socket (level ipv6) option authhdr & hopoptsMicael Karlberg
Added support for the IPv6 socket option(s) AUTHHDR and HOPOPTS. Its possible that the option is AUTHHDR is obsolete. It says so in the include files and when trying to get it (getsockopt) it returns with enoprotoopt. The option HOPOPTS returns with einval when calling setsockopt, so either you need to be a privileged user to update, or its not actually possible to update this option (even though it says nothing about that in the man page. It only talks about set). This is the same behaviour as with RTHDR and HOPLIMIT. On FreeBSD, it says that HOPOPTS requires superuser privileges. Needs furher checking. OTP-14831.
2018-09-18[socket-nif] Add support for socket (level ipv6) option rthdrMicael Karlberg
Added support for the IPv6 socket option RTHDR. On FreeBSD this option requires superuser privileges to update. There is no mention of this on linux, but its still not possible to update (einval), so I assume that its the same there. OTP-14831.
2018-09-18[socket-nif] Add support for socket (level ipv6) option recvpktinfoMicael Karlberg
Added support for the IPv6 socket option RECVPKTINFO. This option is called PKTINFO on FreeBSD, so that value will also be accepted. OTP-14831.