ecryptfs_wri...acket_length(9)
π ecryptfs_wri...acket_length(9) β Kernel API Manual
okay bestie, so this one is a kernel API manpage, the ecryptfs_wri...acket_length one (yes the name is literally abbreviated with ... in the header, that's just how it's printed, don't come for me π«Ά). It lives in the Kernel API Manual, and we're gonna walk through it together, no cap.
β¨ NAME β¨
ecryptfs_write_packet_length -
and that's it. that's the whole NAME line. just the function and a little dash with nothing after it π no one-liner description, no teaser, nothing. lowkey iconic of it to give us zero context, but okay.
πΈ SYNOPSIS πΈ
int ecryptfs_write_packet_length (char *dest , size_t size , size_t
*packet_size_length );
there she is. returns an int, takes three args, and yes the spacing is a little chaotic but we copy it exactly, character for character, periodt π
π ARGUMENTS π
destβ the byte array target where the length gets written. it must have at leastECRYPTFS_MAX_PKT_LEN_SIZEbytes allocated. like, not "probably", not "eh, close enough" β at least that many. respect the buffer, bestie πsizeβ the actual length you're writing. that's the number going in.packet_size_lengthβ the number of bytes used to encode the packet length gets written to this address. so it's like, the length of the length. very meta of it β¨
π¦ DESCRIPTION π¦
Returns zero on success; non-zero on error. short and sweet, fr fr. zero = we ate. non-zero = something went sideways π
π SEE ALSO π
the kernel file ./fs/ecryptfs/keystore.c β that's the source of truth, go look if you're curious π and then the whole friend group of related functions:
ecryptfs_parse_packet_length(9)ecryptfs_verify_version(9)ecryptfs_verify_auth_tok_from_key(9)ecryptfs_find_auth_tok_for_sig(9)ecryptfs_parse_tag_70_packet(9)decrypt_pki_encrypted_session_key(9)parse_tag_1_packet(9)parse_tag_3_packet(9)parse_tag_11_packet(9)decrypt_passphrase_encrypted_session_key(9)ecryptfs_parse_packet_set(9)write_tag_1_packet(9)write_tag_11_packet(9)write_tag_3_packet(9)ecryptfs_generate_key_packet_set(9)
like a whole group chat of packet functions, and this one is absolutely a main character in it π
ngl the vibe check here is simple: givedestenough room (ECRYPTFS_MAX_PKT_LEN_SIZEminimum, no negotiations), pass the size, and let it tell you how many bytes it used viapacket_size_length. zero means slay, anything else means go debug π§
and that's the page, bestie π cute lil sign-off: this one comes from ./fs/ecryptfs, dated October 2026, and the manual name is ecryptfs_wri...acket_length(9). go forth and write those packet lengths πΈπ
π¦ 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