Check out my first novel, midnight's simulacra!

Packet sockets: Difference between revisions

From dankwiki
Line 71: Line 71:
The IP_HDRINCL (IPV6_HDRINCL) option is not support for IPv6 raw sockets.
The IP_HDRINCL (IPV6_HDRINCL) option is not support for IPv6 raw sockets.
===SOCK_RAW===
===SOCK_RAW===
Path MTU is performed on outgoing packets unless disabled via IP_MTU_DISCOVER sockopt, in which case they might be fragmented if they exceed the outgoing device's MTU (unless IP_HDRINCL is used). Fragment reassembly is performed before delivering packets to receiving sockets.
Path MTU is performed on outgoing packets unless disabled via IP_MTU_DISCOVER sockopt, in which case they might be fragmented if they exceed the outgoing device's MTU (unless IP_HDRINCL is used). Fragment reassembly is performed before delivering packets to receiving sockets. sendto() must be used with raw sockets, as opposed to a mere send(). When using an IPv6 raw socket, sin6_port must be set to 0 to avoid an EINVAL ("Invalid Argument") error.
 
===SOCK_PACKET===
===SOCK_PACKET===
Obsolete since Linux 2.0.
Obsolete since Linux 2.0.