create_aapl_rsp_buf(9)
π 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 beAAPL_RSP_MAX_SIZEbytes, so likeβ¦ don't skimp, she needs room πvol_capsβ the volume capability flags, aka theSMB2_CRTCTX_AAPL_*volume bits πreq_bitmapβ the client's request bitmap. we literally echo it right back inreply_bitmap, it's a whole mirror moment πͺreaddir_attr_v2β set this and we advertiseSMB2_CRTCTX_AAPL_SUPPORTS_READ_DIR_ATTR_V2instead 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_bitmapmasked to the fields we support πserver_caps=AAPL_SERVER_CAPS_KSMBDwhen requested πvol_caps= caller-supplied, you bring your own, we don't judge π- model string =
server_conf.aapl_model(default"Xserve") in UTF-16LE, whenSMB2_CRTCTX_AAPL_MODEL_INFOis requested π
β οΈ okay serious moment, bestie, listen: sendingreply_bitmapwithMODEL_INFOset but no model string causessmbfs.kextto 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 π
:
alloc_opinfo(9)opinfo_write_to_read(9)opinfo_read_handle_to_read(9)opinfo_write_to_none(9)opinfo_read_to_none(9)lease_read_to_write(9)lease_none_upgrade(9)close_id_del_oplock(9)grant_write_oplock(9)grant_read_oplock(9)grant_none_oplock(9)same_client_has_lease(9)__smb2_oplock_break_noti(9)smb2_oplock_break_noti(9)__smb2_lease_break_noti(9)smb2_lease_break_noti(9)smb_grant_oplock(9)smb_break_all_write_oplock(9)__smb_break_all_levII_oplock(9)smb_break_all_oplock(9)smb2_map_lease_to_oplock(9)create_lease_buf(9)parse_lease_state(9)smb2_find_context_vals(9)create_durable_rsp_buf(9)create_durable_v2_rsp_buf(9)create_mxac_rsp_buf(9)create_posix_rsp_buf(9)lookup_lease_in_table(9)
β 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
- 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