smb2_get_name(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… smb2_get_name(9) β€” from the Kernel API Manual, bestie ✨

Okay so picture this: you're deep in the kernel, SMB2 land, and you've got a filename sitting there on the wire in raw smb format. You need it as an actual string. That's literally the whole gig of smb2_get_name β€” it's the glow-up station for filenames πŸŽ€ get filename string from on the wire smb format, periodt.


✨ SYNOPSIS ✨

char * smb2_get_name (const char *src , const int maxlen , struct
nls_table *local_nls );

Three args in, one converted filename out. Iconic signature ngl πŸ’–


🫢 ARGUMENTS 🫢

  • src β€” the source buffer, aka where the raw filename bytes are chillin' πŸ¦‹
  • maxlen β€” maxlen of source string, so it knows when to stop reading πŸ‘‘
  • local_nls β€” your nls_table pointer, the charset bestie doing the translating 🌸

🌈 RETURN 🌈

Matching converted filename on success β€” slay πŸ’… Otherwise you get an error ptr. Not the vibe, but that's the deal 😭


🧚 SEE ALSO 🧚

Kernel file ./fs/smb/server/smb2pdu.c, plus this whole friend group right here:


okay that's the whole page, go touch some grass and then go read your filenames πŸ’œ This lil drop came out of ./fs/smb/server and it's stamped October 2026 β€” and yeah, it's smb2_get_name(9) signing off, mwah πŸŒΈπŸ’–

πŸ“¦ where this page comes from