How does a unix domain socket packet look like? Is it like a TCP/IP packet which have an ethernet header, an IP header and a TCP header? How do they look like in unix domain socket?
1 Answer
Unix domain sockets are not transmitted over the wire, they only exist inside the one machine. So they don't have a packet header in that sense.
AFAIK stream oriented unix domain sockets (SOCK_STREAM
) are not even broken into packets as such. Message oriented sockets (SOCK_DGRAM
) may have a data structure associated with each message although this will be entirely internal to the Kernel.
- Thanks for the reply, any source code reference is appreciated.– WilliamCommentedJul 10, 2024 at 2:41