gnutls_alpn_set_protocols(3)
β¨ gnutls_alpn_set_protocols β¨
okay bestie, so this is a page straight out of the gnutls manual β like, the actual gnutls_alpn_set_protocols(3) one π β and I'm gonna walk you through it like we're texting at 2am.
πΈ NAME πΈ
gnutls_alpn_set_protocols β it's an API function, no cap π«Ά
π SYNOPSIS π
#include <gnutls/gnutls.h>
int gnutls_alpn_set_protocols(gnutls_session_t session, const
gnutls_datum_t * protocols, unsigned protocols_size, unsigned int
flags);
π ARGUMENTS π
gnutls_session_t sessionβ it's agnutls_session_ttype. that's the whole vibe of this one, she's just here being herself β¨const gnutls_datum_t * protocolsβ these are the protocol names you're adding. the cast πunsigned protocols_sizeβ the number of protocols you're adding. yes bestie, you gotta count them, she doesn't guess π₯unsigned int flagsβ zero, or a sequence ofgnutls_alpn_flags_t. zero is always an option and that's iconic of her π
π DESCRIPTION π
so this function? both clients and servers use it, okay β it's giving equal opportunity. you call it to declare the supported ALPN protocols, and those are the ones that get used during negotiation with the peer. that's literally the whole job π¦
for the documentation of the available flags, go look at the gnutls_alpn_flags_t description. she explains herself there, iykyk β¨
β RETURNS β
- if it works:
GNUTLS_E_SUCCESS(0) comes back to you π - if it doesn't: you get a negative error code. not me getting a negative error code π
Since 3.2.0 β she's been here a minute, an OG fr fr π
π REPORTING BUGS π
found something cursed? report bugs to <bugs@gnutls.org>. π«Ά
home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
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. like, go off, just keep the receipts π§
π₯ SEE ALSO π₯
the full documentation for gnutls is maintained as a Texinfo manual. if the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:
https://www.gnutls.org/manual/
and that's the page, bestie β no notes, she ate π
this whole thing lives in the gnutls 3.8.13 manual set under the name gnutls_alpn_set_protocols(3), and yeah the footer in the original is just the version stamp β so consider this your cute little sign-off: gnutls, 3.8.13, periodt β¨πΈπ
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms