Content deleted Content added
Reverted 3 edits by 94.21.161.60 (talk): Not a reliable source |
correct false or misleading information which is not supported by or even contradicts cited references |
||
Line 105:
# 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>
The ''Unix ___domain socket'' label is used when the <code>___domain</code> parameter's value is <code>AF_UNIX</code>. The ''Internet ___domain socket'' label is used when the <code>___domain</code> parameter's value is either <code>AF_INET</code> or <code>AF_INET6</code>.<ref name="lpi-p1197">{{cite book
Line 116 ⟶ 115:
|page=1197}}</ref>
The <code>type</code> parameter should be one of
# <code>SOCK_STREAM</code> will create a stream socket. A stream socket provides a reliable, bidirectional, and [[connection-oriented communication]] channel between two processes.
# <code>SOCK_DGRAM</code> will create a datagram socket.{{efn|A datagram ''socket'' should not be confused with a [[datagram]] [[Network packet|packet]] used in the [[network layer]].<ref name="lpi-p1183">{{cite book
|title=The Linux Programming Interface
Line 125 ⟶ 124:
|year=2010
|isbn=978-1-59327-220-3
|page=1183}}</ref>}} A
|title=The Linux Programming Interface
|last=Kerrisk
Line 133 ⟶ 132:
|isbn=978-1-59327-220-3
|page=1152}}</ref>
# <code>
|title=The Linux Programming Interface
|last=Kerrisk
Line 140 ⟶ 139:
|year=2010
|isbn=978-1-59327-220-3
|page=
# <code>SOCK_RAW</code> will create a raw [[Internet Protocol]] (IP) [[datagram]] socket. A raw socket bypasses the [[transport layer]] and allows applications to interface directly with the [[network layer]].<ref name="lpi-p1184">{{cite book
|title=The Linux Programming Interface
|last=Kerrisk
Line 149 ⟶ 147:
|year=2010
|isbn=978-1-59327-220-3
|page=1184}}</ref> This option is only available for internet ___domain sockets.<ref name="man-unix-sockets"/>
The <code>protocol</code> parameter should be set to zero
|title=The Linux Programming Interface
|last=Kerrisk
|