Age | Commit message (Collapse) | Author |
|
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
|
|
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
|
|
Updated the (send) cmsghdr type and the handling of it
(in the nif code). Still not tested!
Removed the is_loaded nif function.
Tried to get fix the doc build problem (socket.erl *i think*),
which causes socket.html generation to fail with:
"cannot find module exporting type"
To solve this I tried to run dialyzer on preloaded, and ran into
problems with enc_setopt_value. Update various specs and types
to "solve" this (which did not work).
Updated the nif-stub functions to make dialyzer happy.
|
|
Added support for (recvmsg) control message ipv6_pktinfo, for
level = ipv6 and type = pktinfo. This is enabled by setting the
socket option: recvpktinfo for level ipv6.
Not yet tested!
OTP-14831
|
|
Add more debug printouts for the new sendmsg. Also added
new (erlang) types with doc.
OTP-14831
|
|
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
|
|
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
|
|
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
|
|
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
|
|
Added support for ip level socket option RETOPTS.
OTP-14831
|
|
Added support for ip level socket option TRANSPARENT.
OTP-14831
|
|
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
|
|
Added support for ip level socket option HDRINCL.
As this option is raw only, it has not yet been tested!
OTP-14831
|
|
Added support for ip level socket option MSFILTER.
This option has not been tested *in any way*...
OTP-14831
|
|
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.
|
|
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.
|
|
Added support for the IPv6 socket option ADDRFORM.
Only allowed for IPv6 sockets that are connected and bound to a
v4-mapped-on-v6 address.
OTP-14831.
|
|
Added support for the IPv6 socket option ROUTER_ALERT.
Only supported for raw sockets.
OTP-14831.
|
|
Added support for the IPv6 socket option UNICAST_HOPS.
OTP-14831.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Added support for the IPv6 socket option RECVPKTINFO.
This option is called PKTINFO on FreeBSD, so that value
will also be accepted.
OTP-14831.
|
|
Added support for the IPv6 socket option MULTICAST_LOOP.
OTP-14831.
|
|
Added support for the IPv6 socket option MULTICAST_IF.
OTP-14831.
|
|
Added support for the IPv6 socket option MULTICAST_HOPS.
OTP-14831.
|
|
Added support for ip level socket option RECVOPTS.
OTP-14831
|
|
Added support for ip level socket option FREEBIND.
Note that there is an option available on FreeBSD called
IP_BINDANY, which seems to have similar properties (FREEBIND
is *not* available on FreeBSD). There are some restrictions
for this option though (which is not mentioned in the Linux
man page).
OTP-14831
|
|
Added support for socket level socket option TIMESTAMP.
OTP-14831
|
|
Added support for socket level socket option RCVLOWAT and SNDLOWAT.
These are both a little strange, at least on Linux. See the man
pages for more info. For instance, sndlowat cannot be set on Linux.
OTP-14831
|
|
Added support for socket level socket option RCVTIMEO and SNDTIMEO.
These are both a little strange, at least on linux. See the man
pages for more info.
OTP-14831
|
|
Added support for the SCTP option INITMSG.
OTP-14831
|
|
Added support for the SCTP option MAXSEG.
OTP-14831
|
|
Added support for the SCTP option RTOINFO.
We have the same questions for this option as for ASSOCINFO.
Maybe the assoc field shall be made 'out' only (that is, it will
be ignored for setopt). The assoc id used will be that which
is stored in the descriptor (how do we get it to begin with?).
Questions, questions...
OTP-14831
|
|
Added support for the SCTP option ASSOCINFO.
This option is a bit tricky. As the underlying structure (sctp_assocparams)
contains the assoc_id, it begs the question what happens if this option
is fetched for:
* The own assoc (which means that we might have the assoc id in the
descriptor and can initiate that part of the struct accordningly).
* Another assoc: From assoc A asks for info with assoc_id set to
that of assoc B.
* The "owning" endpoint.
* Another endpoint (an endpoint to which the assoc does not belong).
So, if the user calls socket:[getopt|setopt] for an association socket,
shall we require that the assoc_id field is set to -1? Or not set at all
and therefor filled in automatically by the nif-code?
And, if the user calls socket:[getopt|setopt] for an endpoint socket,
shall we require that the assoc_id field is set to a valid id? Or shall
it not be allowed?
Questions, questions...
OTP-14831
|
|
Added support for the SCTP option DISABLE_FRAGMENTS.
OTP-14831
|
|
Added support for the SCTP option EVENTS.
OTP-14831
|
|
Added support for the VPv6 socket option MTU_DISCOVER.
OTP-14831.
|
|
Added support for the VPv6 socket option MTU.
OTP-14831.
|
|
Added a very preliminary users guide. Currently where we
place the socket option tables.
OTP-14831
|
|
Added a commented out (preliminary) table in the getopt function
for the socket level. The table is not included (atleast) in the
man page, so there is no point in including it yet. But since its
table(s) of all socket options (one for each level) we need
comprehensive tables "somewhere", but where...
OTP-14831
|
|
Added doc for the net module.
Also some socket-nif cleanup.
OTP-14831
|
|
Updated the documentation of recv, recvfrom, send and sendto.
Also added doc for functions peername and sockname.
OTP-14831
|
|
Also added (a very) temporary example.
OTP-14831
|
|
The doc for type socket was missing (as it is opaque),
so instead its replaced with a simple text referring
to the functions open and accept.
The open function missed a spec (for open/2), the text
for default protocol needed some omrpvement and finally
the Extra argument needed explaining.
|
|
The doc now builds. Had to update the code (spec and types)
to match. Though, te result is less then stellar.
OTP-14831
|