STRUCT DCCP_HDR(9)
π struct dccp_hdr(9) π
okay so bestie, welcome to the Kernel API Manual entry for struct dccp_hdr β no cap, this is the β¨genericβ¨ part of the DCCP packet header, and we're gonna get into it. π¦
πΈ NAME πΈ
struct dccp_hdr β the generic part of a DCCP packet header. that's it, that's the vibe. π
β¨ SYNOPSIS β¨
here's the icon itself, in all her bitfield glory. copying it exactly because we do not mess with the source, periodt:
struct dccp_hdr {
__be16 dccph_sport, dccph_dport;
__u8 dccph_doff;
#if defined(__LITTLE_ENDIAN_BITFIELD);
__u8 dccph_cscov:4, dccph_ccval:4;
#elif defined(__BIG_ENDIAN_BITFIELD);
__u8 dccph_ccval:4, dccph_cscov:4;
#else;
#error Adjustyour<asm/byteorder.h>defines";"
#endif;
__sum16 dccph_checksum;
#if defined(__LITTLE_ENDIAN_BITFIELD);
__u8 dccph_x:1, dccph_type:4, dccph_reserved:3;
#elif defined(__BIG_ENDIAN_BITFIELD);
__u8 dccph_reserved:3, dccph_type:4, dccph_x:1;
#else;
#error Adjustyour<asm/byteorder.h>defines";"
#endif;
__u8 dccph_seq2;
__be16 dccph_seq;
};
π quick vibe check: those two#errorlines are literally the struct telling you to adjust your<asm/byteorder.h>defines if neither endianness bitfield macro is set. it's giving "fix your build, bestie." π
π Members π
π Description π
here's the member-by-member breakdown, main character energy only:
dccph_sportβ the relevant port on the endpoint that sent this packet π«Άdccph_dportβ the relevant port on the other endpointdccph_doffβ Data Offset from the start of the DCCP header, measured in 32-bit wordsdccph_ccvalβ used by the HC-Sender CCID βdccph_cscovβ the parts of the packet that are covered by the Checksum fielddccph_checksumβ the Internet checksum, which depends ondccph_cscovπ₯dccph_xβ0= 24 bit sequence number,1= 48 π¦dccph_typeβ packet type, see theDCCP_PKT_prefixed macros πdccph_seqβ sequence number high or low order 24 bits, depends ondccph_x
π side eye todccph_reservedanddccph_seq2for sitting in the struct and not getting a description. we see you. we love you anyway. π
also lowkey obsessed with how the endian branches just swap the bitfield order β little endian gets dccph_cscov:4, dccph_ccval:4 and big endian gets dccph_ccval:4, dccph_cscov:4. same for dccph_x:1, dccph_type:4, dccph_reserved:3 vs dccph_reserved:3, dccph_type:4, dccph_x:1. iykyk. π
π§ SEE ALSO π§
go read the kernel file ./include/uapi/linux/dccp.h fr fr, and then these iconic siblings:
struct dccp_hdr_ext(9)struct dccp_hdr_request(9)struct dccp_hdr_ack_bits(9)struct dccp_hdr_response(9)struct dccp_hdr_reset(9)
and that's the whole page, bestie!! π this little beauty lives in ./include/uapi/linux, dated October 2026, and it will forever be known as struct dccp_hdr(9). slay. πβ¨
π¦ 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