gnutls_range_split(3)
π gnutls_range_split(3) π
okay bestie, welcome to the gnutls manual β yes THAT gnutls, the TLS library, and yes this page is gonna be cute AND correct. no cap.
β¨ NAME β¨
gnutls_range_split β an API function, and honestly? a whole little lifesaver. π«Ά
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int gnutls_range_split(gnutls_session_t session, const gnutls_range_st *
orig, gnutls_range_st * next, gnutls_range_st * remainder);
π ARGUMENTS π
gnutls_session_t sessionβ bestie it's literally just agnutls_session_ttype. that's the vibe. πconst gnutls_range_st * origβ the original range, the one the user handed you. untouched, unbothered, iconic. πgnutls_range_st * nextβ the returned range that can actually fit and be conveyed in a TLS record. the chunk that gets to go first. β¨gnutls_range_st * remainderβ the returned remaining range, aka whatever's left over afternextdid its thing. π¦
π DESCRIPTION π
so here's the tea. you use this function when you need to hide the length of some very long data that you literally cannot hand straight over to gnutls_record_send_range(). π
in that case, call this function with your desired length-hiding range sitting in orig. the returned next value is then what you use in your next call to gnutls_record_send_range(), together with the partial data. and then you justβ¦ keep doing that. repeat the whole process until remainder is (0,0). that's it, that's the loop, periodt. π
β RETURNS β
0β in case splitting succeeds. slay. π- non zero β in case of error. π
and heads up, bestie: orig is not changed. meanwhile the values of next and remainder are modified, because that's where the resulting values get stored. don't get it twisted. π
π REPORTING BUGS π
found a bug? not me ignoring it β report it, fr fr:
- 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.
π§ 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/
lowkey the most important part: read the full manual. iykyk. π
and that's the whole page, bestie β you ate it. this was gnutls_range_split(3) from the gnutls manual, version 3.8.13. mwah, go forth and split those ranges. π
πΈπ
π¦ 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