SSH_MSGOFFSET_COMMAND(9)
π SSH_MSGOFFSET_COMMAND(9) π
okay so bestie, welcome to the Kernel API Manual, page literally called SSH_MSGOFFSET_COMMAND(9). yes the whole page is named after a macro. she's that girl. π
β¨ NAME β¨
SSH_MSGOFFSET_COMMAND β computes the offset in an SSH message to a specified field in the command. like, where in the byte soup does this field actually live? that's the whole gig. π¦
πΈ SYNOPSIS πΈ
SSH_MSGOFFSET_COMMAND (field );
no cap, that's it. one argument. she's low maintenance. π
π«Ά ARGUMENTS π«Ά
fieldβ the field you want the offset of. the one thing you gotta tell her, and she'll do the math. no notes. β¨
π RETURN π
returns the offset of the specified struct ssh_command field in the raw SSH message data. and she's not just vibing β she actually takes stuff into account:
- the
SYNbytes (u16) that sit before the frame, and - the frame
CRC(u16) that sits between the frame and the command.
so those two little u16s are accounted for, fr fr. main character attention to detail. ππ₯
π SEE ALSO π
the whole friend group π β from the kernel file ./include/linux/surface_aggregator/serial_hub.h:
enum ssh_frame_type(9)struct ssh_frame(9)enum ssh_payload_type(9)struct ssh_command(9)SSH_MESSAGE_LENGTH(9)SSH_COMMAND_MESSAGE_LENGTH(9)SSH_MSGOFFSET_FRAME(9)ssh_crc(9)ssh_rqid_next_valid(9)ssh_rqid_to_event(9)ssh_rqid_is_event(9)ssh_tc_to_rqid(9)ssh_tid_to_index(9)ssh_tid_is_valid(9)struct ssam_span(9)enum ssam_ssh_tid(9)enum ssh_packet_base_priority(9)SSH_PACKET_PRIORITY(9)ssh_packet_priority_get_try(9)ssh_packet_priority_get_base(9)struct ssh_packet_ops(9)struct ssh_packet(9)ssh_packet_set_data(9)struct ssh_request_ops(9)struct ssh_request(9)to_ssh_request(9)ssh_request_get(9)ssh_request_put(9)ssh_request_set_data(9)
that's the whole roster. iykyk. ππΈ
π§ friendly reminder: this is a macro, sofieldneeds to be something she can take the offset of β that's just howoffsetof-style vibes work, bestie. go off. π«Ά
so anyway, this page came out of ./include/linux/surface_aggreg... and it's dated October 2026 (yes, future queen behavior β) β signed off with love by SSH_MSGOFFSET_COMMAND(9), xoxo. ππ
π¦ 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