set_smb2_rsp_status(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ set_smb2_rsp_status(9) ✨

okay so bestie, welcome to the kernel API manual page for set_smb2_rsp_status β€” it's a whole vibe, it lives in the ksmbd/smb server corner of the kernel, and it's literally one job: slapping an error response code onto an smb2 header. that's it. that's the whole girl. πŸ’…


🌸 NAME 🌸

set_smb2_rsp_status β€” set error response code on smb2 header


πŸŽ€ SYNOPSIS πŸŽ€

void set_smb2_rsp_status (struct ksmbd_work *work , __le32 err );

no cap, that's the entire signature. void return, two args, in and out. she's efficient. πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • work β€” the smb work that's carrying the response buffer. think of it as the group chat thread where the reply is actually gonna get posted. 🫢
  • err β€” the error response code. the message you're dropping in that thread. __le32, so little-endian, bestie, don't forget. 🧚

πŸ¦‹ SEE ALSO πŸ¦‹

so the kernel file for this one is ./fs/smb/server/smb2pdu.c, and honestly the whole squad shows up in the references. roll call πŸ“£:

smb2_get_ksmbd_tcon(9), smb2_set_err_rsp(9), is_smb2_neg_cmd(9), is_smb2_rsp(9),
get_smb2_cmd_val(9), init_smb2_neg_rsp(9), smb2_set_rsp_credits(9),
init_chained_smb2_rsp(9), is_chained_smb2_message(9), init_smb2_rsp_hdr(9),
smb2_allocate_rsp_buf(9), smb2_check_user_session(9), smb2_get_name(9),
smb2_get_dos_mode(9), build_rdma_ctx(9), smb3_encryption_negotiated(9),
decode_rdma_ctx(9), smb2_handle_negotiate(9), smb2_tree_connect(9),
smb2_create_open_flags(9), smb2_tree_disconnect(9), smb2_session_logoff(9),
create_smb2_pipe(9), smb2_set_ea(9), smb2_open(9), smb2_populate_readdir_entry(9),
buffer_check_err(9), smb2_get_ea(9), smb2_query_info(9), smb2_close_pipe(9),
smb2_close(9), smb2_echo(9), smb2_set_info_file(9), smb2_set_info(9),
smb2_read_pipe(9), smb2_set_rdma_key(9), smb2_prep_rdma_read(9),
smb2_current_req_len(9), check_rdma_desc(9), smb2_parse_rdma_write_transform(9),
smb2_read_rdma(9), smb2_read(9), smb2_write_pipe(9), smb2_write_rdma(9),
smb2_write(9), smb2_flush(9), smb2_cancel(9), smb2_lock(9), smb2_ioctl(9),
smb20_oplock_break_ack(9), smb21_lease_break_ack(9), smb2_oplock_break(9),
smb2_notify(9), smb2_is_sign_req(9), smb2_check_sign_req(9),
smb2_get_sign_rsp_iov(9), smb2_set_sign_rsp(9), smb3_check_sign_req(9),
smb3_set_sign_rsp(9), smb3_preauth_hash_rsp(9)

like, that's the entire extended universe. iykyk. 🌈


quick reminder bestie: err is __le32, so if you're hand-rolling that value, endianness is not a suggestion. πŸ’€

okay that's the page!! mwah πŸ’‹ tiny little sign-off for the record: this one lives under ./fs/smb/server, dated October 2026, and the page itself is set_smb2_rsp_status(9) β€” she said "i'm the main character and i'm in the manual." periodt. πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from