shishi_server_for_local_service(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– shishi_server_for_local_service(3) πŸ’–

okay bestie, so this one is from the shishi manual, version 1.0.3, section 3 β€” and it's literally just the API page for one lil function. let's get into it 🫢


✨ NAME ✨

shishi_server_for_local_service β€” bestie it's an API function. that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

#include <shishi.h>

char * shishi_server_for_local_service(Shishi * handle, const char *
service);

like. look at her. two args. returns a char *. iconic behavior honestly ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • Shishi * handle β€” the shishi handle, aka the one you got handed back when you called shishi_init(). no handle, no vibes πŸ¦‹
  • const char * service β€” a null terminated string holding the name of the service, like for example "host". (or "imap", we'll get to that πŸ‘€)

πŸ’œ DESCRIPTION πŸ’œ

okay so here's what she does: she builds you a service principal from scratch. 🧚

like say you hand her the service name β€” for example "imap" β€” and she takes that plus your system's hostname (the one that comes back from hostname(), for example "yxa.extundo.com") and stitches them together into something like "imap/yxa.extuno.com".

that's the whole magic trick. service name + hostname = principal. periodt ✨

⚠️ IMPORTANT BESTIE, DO NOT SKIP THIS ONE: the string she gives you must be deallocated by the caller. that's you. you're the caller. she is NOT cleaning that up for you, so don't leave her hanging 😭

⭐ RETURN VALUE ⭐

she returns a newly allocated service name string. freshly allocated, just for you, and (say it with me) yours to free πŸ’–


πŸ› REPORTING BUGS πŸ›

found a bug? don't suffer in silence, spill it to <bug-shishi@gnu.org> πŸ’Œ


Copyright Β© 2002-2022 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, share the love, keep the notice, no royalties needed. generous queen fr fr πŸ’…)


🌈 SEE ALSO 🌈

The full documentation for shishi is maintained as a Texinfo manual. If the info and shishi programs are properly installed at your site, the command

info shishi

should give you access to the complete manual. go read the whole thing bestie, it's giving ✨


and that's the page!! this was shishi version 1.0.3, page shishi_server_for_local_service(3) β€” mwah, no cap, go allocate responsibly and free your strings πŸŽ€πŸ’–πŸ¦‹