Sockets services: Difference between revisions

TuxSH (talk | contribs)
Document SocketExempt, sysctl, ioctl, fcntl + some refactoring
TuxSH (talk | contribs)
socket
Line 10: Line 10:
| 1  || StartMonitoring
| 1  || StartMonitoring
|-
|-
| 2  || Socket
| 2  || [[#Socket]]
|-
|-
| 3  || [[#SocketExempt]]
| 3  || [[#Socket||#SocketExempt]]
|-
|-
| 4  || [[#Open]]
| 4  || [[#Open]]
Line 103: Line 103:
  }
  }


== SocketExempt ==
== Socket ==
This command is exclusive to <code>bsd:s</code> (FIXME: test whether this is actually the case).
FreeBSD's <code>socket</code> command.
<code>bsd:u</code> disallows the usage of the <code>SOCK_SEQPACKET</code> and <code>SOCK_RAW</code> types, with the exception of <code>(AF_INET, SOCK_RAW, IPPROTO_ICMP)</code> (IPv4 <code>ping</code>), <code>bsd:s</code> needs to be used for those.


Performs a FIONBIO <code>ioctl</code> on the socket, making it non-blocking. POSIX-compliant code should use <code>fcntl</code> instead.
The only implemented domains are <code>AF_INET</code> and <code>AF_INET6</code>.
 
SocketExempt: same as socket but the socket is immediately shutdown (disconnected) on creation.


== Open ==
== Open ==