write_tag_1_packet(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so write_tag_1_packet(9) β€” straight out of the Kernel API Manual β€” is the function that writes an RFC2440-compatible tag 1 (public key) packet. yes bestie, a whole packet. iconic πŸ’…

✨ SYNOPSIS ✨

int write_tag_1_packet (char *dest , size_t *remaining_bytes , struct key *auth_tok_key , struct ecryptfs_auth_tok *auth_tok , struct ecryptfs_crypt_stat *crypt_stat , struct ecryptfs_key_record *key_rec , size_t *packet_size );

πŸ’… ARGUMENTS πŸ’…

  • dest β€” the buffer into which to write the packet. put the packet here, bestie 🫢
  • remaining_bytes β€” maximum number of bytes that can be writtn. (yes, that's the spelling on the page, no cap πŸ’€) so it's the max bytes situation.
  • auth_tok_key β€” the authentication token key to unlock and put when done with auth_tok. unlock it, then put it when you're done with auth_tok, periodt πŸ”‘
  • auth_tok β€” the authentication token used for generating the tag 1 packet. it's the token doing the tag 1 packet generation ✨
  • crypt_stat β€” the cryptographic context. the crypto context, iykyk πŸ”₯
  • key_rec β€” the key record struct for the tag 1 packet. the struct holding the key record for the tag 1 packet πŸŽ€
  • packet_size β€” this function will write the number of bytes that end up constituting the packet; set to zero on error. so on the way out it writes how many bytes actually make up the packet, and if there's an error it's set to zero 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the whole return situation is: returns zero on success; non-zero on error. that's the vibe check, bestie ✨

🌈 SEE ALSO 🌈


mwah πŸ’‹ source/version: ./fs/ecryptfs; date: October 2026; page: write_tag_1_packet(9). bye bestie, go write that packet! 🫢

πŸ“¦ where this page comes from