aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/nifs/common/socket_util.h
AgeCommit message (Collapse)Author
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-18[socket-nif] Encoding of cmsg headers for sendmsgMicael Karlberg
Fixed various issues with regard to encode of CMsgHdrs during sendmsg. 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 recvmsgMicael Karlberg
Added preliminary support for function recvmsg. At the moment this only works on *nix (Windows has another function, WSARecvMsg, which has a slightly different API). Also we have "no" cmsg decode at the moment (just level and type). OTP-14831
2018-09-18[net+socket-nif] Updated on_load stuffMicael Karlberg
The net nif-module had debug on by default. Fixed this and also made it an option, just as for the socket nif-module. OTP-14831
2018-09-18[socket-nif] Add support for socket (level ip) option multicast_ifMicael Karlberg
Added support for the IP option MULTICAST_IF. OTP-14831
2018-09-18[net-nif] Changed return type of getaddrinfoMicael Karlberg
The returned address info was supposed to be a map, by was instead (still) a record. OTP-14831
2018-09-18[socket-nif] Fixed (stream) recvMicael Karlberg
Fixed handling of closed in the recv function. We still need to properly handle when we get 0 bytes of data for other types ock sockets then stream (its valid for dgram for instance). OTP-14831
2018-09-18[socket+net-nif] Moved common functions into util filesMicael Karlberg
The common stuff, like decode and encode of common types (soch as socket address), has been moved into a util file (socket_util). The debug stuff has also been moved into its own file. Also introduced a common include file for common macros and types. OTP-14831
2018-09-18[socket+net-nif] BackupMicael Karlberg
2018-09-18[socket+net-nif] Introduced a couple of common filesMicael Karlberg
Started to move the common stuff, such as common utility functions, debug and encode / decode of basic types. OTP-14831