Unix ___domain socket: Difference between revisions

Content deleted Content added
m "is" should not be followed by a colon when used like this
Tags: Mobile edit Mobile app edit iOS app edit App full source
AF is Address Family, PF is Protocol Family; one should use PF for the 'socket()' function's '___domain' argument and AF for the struct sockaddr_in. Reference for this added.
Tag: Reverted
Line 97:
|page=1151}}</ref>
 
# Within the same host by using the [[Constant (computer programming)|constant]] <code>AF_UNIX</code>{{efn|Alternatively, <code>PF_UNIX</code> or <code>AF_LOCAL</code> may be used.<ref name="man-unix-sockets">{{cite web
# Between two hosts via the [[IPv4]] protocol by using the constant <code>AF_INETPF_INET</code>
# Between two hosts via the [[IPv6]] protocol by using the constant <code>AF_INET6PF_INET6</code>
# Within the same host or between two hosts via the [[Stream Control Transmission Protocol]] by using the constant <code>SOCK_SEQPACKET</code><ref name="man-unix-sockets"/>{{cite web
| url = http://man7.org/linux/man-pages/man7/unix.7.html
| date = 30 April 2018
| title = Linux Programmer's Manual (unix - sockets for local interprocess communication)
| access-date = 22 February 2019
| df = dmy-all}}</ref> The AF stands for "Address Family", and the PF stands for "Protocol Family".}}
# Between two hosts via the [[IPv4]] protocol by using the constant <code>AF_INET</code>
# Between two hosts via the [[IPv6]] protocol by using the constant <code>AF_INET6</code>
# Within the same host or between two hosts via the [[Stream Control Transmission Protocol]] by using the constant <code>SOCK_SEQPACKET</code><ref name="man-unix-sockets"/>
 
The ''Unix ___domain socket'' label is used when the <code>___domain</code> parameter's value is <code>AF_UNIXPF_UNIX</code>. The ''Internet ___domain socket'' label is used when the <code>___domain</code> parameter's value is either <code>AF_INETPF_INET</code> or <code>AF_INET6PF_INET6</code>.<ref>https://beej.us/guide/bgnet/html/#system-calls-or-bust</ref><ref name="lpi-p1197">{{cite book
|title=The Linux Programming Interface
|last=Kerrisk