ENUM SOCK_TYPE(9)
π enum sock_type(9) β the Kernel API Manual, but make it make sense
okay bestie, sit down, hydrate, because we're talking about enum sock_type β the lil β¨iconicβ¨ list of socket types from the kernel API manual, and honestly? it's giving "short but powerful." no cap.
πΈ NAME πΈ
enum sock_type β socket types. that's it. that's the whole name. short, sweet, and absolutely load-bearing. π«Ά
β¨ SYNOPSIS β¨
here's the whole squad, exactly as written, no edits, no notes:
enum sock_type {
SOCK_STREAM ,
SOCK_DGRAM ,
SOCK_RAW ,
SOCK_RDM ,
SOCK_SEQPACKET ,
SOCK_DCCP ,
SOCK_PACKET
};
(and yes, that blank line before the closing brace is canon, we respect the source material in this house π )
π Constants π
every member, one by one, with zero skips because we don't do that here:
SOCK_STREAMβ stream (connection) socket. the classic reliable-connection girlie πSOCK_DGRAMβ datagram (conn.less) socket. connectionless, free-spirited, sends it and moves on π¦SOCK_RAWβ raw socket. no filter, no chill, straight to the metal π₯SOCK_RDMβ reliably-delivered message. exactly what it says on the tin, bestie πSOCK_SEQPACKETβ sequential packet socket. packets, but in order, because chaos isn't always the vibe βSOCK_DCCPβ Datagram Congestion Control Protocol socket. datagram energy but with congestion control, highkey sophisticated πSOCK_PACKETβ linux specific way of getting packets at the dev level. for writing rarp and other similar things on the user level. lowkey the reckless one of the group π
π Description π
okay so real talk, this is the part where the kernel maintainers basically leave a note on the fridge for future you:
When adding some new socket type pleasegrep ARCH_HAS_SOCKET_TYPEinclude/asm-*/socket.h, at least MIPS overrides this enum for binary compat reasons.
fr fr, that's the whole description β but it's an important one!! if you're out here adding a brand new socket type like it's a new emoji, you gotta go grep for ARCH_HAS_SOCKET_TYPE across include/asm-* /socket.h first. and why? because at least MIPS overrides this enum for binary compat reasons. so likeβ¦ don't just yeet a new constant in there and call it a day, the MIPS girlies need their binary compat intact π
π§ SEE ALSO π§
go click around, bestie, there's lore in here:
- Kernel file
./include/linux/net.hstruct sockopt(9) enum sock_shutdown_cmd(9)struct socket(9)
anyway, that's the page π stay hydrated, read your headers, and remember: adding socket types is a group project, not a solo era.
π«Ά this little transmission came straight out of ./include/linux, dated October 2026, and it's filed under enum sock_type(9). mwah, go touch grass (or a socket) πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms