gsasl_mechanism_name_p(3)

πŸ’– gsasl_mechanism_name_p(3) β€” the vibe check for SASL mechanism names πŸ’–

okay bestie, so this page lives in the gsasl manual (section 3, the library-call section, iykyk), and it's literally just one little function that goes πŸ‘‘


✨ NAME ✨

gsasl_mechanism_name_p β€” API function 🫢


πŸŽ€ SYNOPSIS πŸŽ€

#include <gsasl.h>

int gsasl_mechanism_name_p(const char * mech);

🌸 ARGUMENTS 🌸

  • const char * mech β€” this is your input variable, and it's holding the mechanism name string. that's it, that's the whole job. it just wants a string, bestie πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does this do? it checks whether the mechanism name string mech follows syntactical rules. that's the whole mission. periodt.

but lowkey, listen, it's important what it does not do:

  • it does not check that the name is registered with IANA πŸ™ˆ
  • it does not check that the mechanism name is actually implemented and supported πŸ’€

so like, it's a vibe check on the shape of the name, not a background check on the name's whole life. do not @ her about IANA, she does not know and she does not care.

Now the actual rules, no cap: SASL mechanisms are named by strings, from 1 to 20 characters in length, consisting of upper-case letters, digits, hyphens, and/or underscores. that's the tea β˜• convert to lowercase at your own peril, she will not accept it.


πŸ’… RETURNS πŸ’…

non-zero when mechanism name string mech conforms to rules, zero when it does not meet the requirements.

so: truthy = slay βœ…, falsy = not it ❌.


⭐ SINCE ⭐

2.0.0 β€” she's been iconic for a minute, not new here πŸ‘‘


πŸ› REPORTING BUGS πŸ›

found a bug? tell the gsasl girlies, they want to know fr fr:


Copyright Β© 2002-2026 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. so like, take her everywhere, just don't be weird about the receipts πŸ’œ


🌈 SEE ALSO 🌈

The full documentation for gsasl is maintained as a Texinfo manual, which is the ✨deluxe✨ version of this whole situation. If the info and gsasl programs are properly installed at your site, the command

info gsasl

should give you access to the complete manual. (go press Enter on that, it's free real estate 🧚)

As an alternative you may obtain the manual from:

https://www.gnu.org/software/libidn/gsasl/manual/

okay that's the whole page, you ate it, I'm obsessed πŸ’– if you remember nothing else, remember: 1 to 20 chars, upper-case letters, digits, hyphens, underscores, and no IANA opinions. this has been the gsasl manual, version 2.2.4, page gsasl_mechanism_name_p(3), signing off with main character energy πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from