create_aapl_rsp_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ“ create_aapl_rsp_buf(9) β€” like, the whole vibe ✨

okay so bestie, welcome to the Kernel API Manual entry for create_aapl_rsp_buf(9) πŸ’… this is the one that builds the AAPL kAAPL_SERVER_QUERY response, and honestly? it's giving niche-but-iconic. sit down, grab a boba, we're doing this 🧚


🌸 NAME 🌸

create_aapl_rsp_buf β€” build AAPL kAAPL_SERVER_QUERY response ✨


πŸŽ€ SYNOPSIS πŸŽ€

void create_aapl_rsp_buf (char *cc , __u64 vol_caps , __u64 req_bitmap ,
bool readdir_attr_v2 );

that's it. that's the signature. no cap, she's compact πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • cc β€” the buffer you write the create context into. it has to be AAPL_RSP_MAX_SIZE bytes, so like… don't skimp, she needs room πŸŽ€
  • vol_caps β€” the volume capability flags, aka the SMB2_CRTCTX_AAPL_* volume bits πŸ‘‘
  • req_bitmap β€” the client's request bitmap. we literally echo it right back in reply_bitmap, it's a whole mirror moment πŸͺž
  • readdir_attr_v2 β€” set this and we advertise SMB2_CRTCTX_AAPL_SUPPORTS_READ_DIR_ATTR_V2 instead of the V1 bit. glow-up behavior fr fr ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

So the response format follows the exact layout observed from macOS's own smbd, and it matches the client-side parsing in AAPL's published public client kernel source β€” specifically the public client behavior reference, kAAPL_SERVER_QUERY case πŸ‘€ like, we're being faithful to the source material, periodt.

The layout goes: reply_bitmap first, and then the server_caps / vol_caps / model-info fields are present only when their reply_bitmap bit is set 🫢

  • reply_bitmap = req_bitmap masked to the fields we support πŸ’…
  • server_caps = AAPL_SERVER_CAPS_KSMBD when requested 🌟
  • vol_caps = caller-supplied, you bring your own, we don't judge πŸ’œ
  • model string = server_conf.aapl_model (default "Xserve") in UTF-16LE, when SMB2_CRTCTX_AAPL_MODEL_INFO is requested πŸŽ€
⚠️ okay serious moment, bestie, listen: sending reply_bitmap with MODEL_INFO set but no model string causes smbfs.kext to enter a broken disconnect path requiring a macOS reboot. πŸ˜­πŸ’€ like, not cute. not the vibe. don't do it. that's a whole system reboot because of one missing string, and we are NOT about that life.

🌈 SEE ALSO 🌈

Kernel file ./fs/smb/server/oplock.c and honestly her whole extended friend group πŸ’…:


⭐ bye bestie ⭐

this whole page lives in ./fs/smb/server, dated October 2026, and it's filed under create_aapl_rsp_buf(9) in the Kernel API Manual β€” mwah, stay hydrated, don't forget your MODEL_INFO string, and slay your SMB queries responsibly πŸ«ΆπŸ’–πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from