gnutls_dtls_set_data_mtu(3)
π gnutls_dtls_set_data_mtu π
okay bestie, welcome to the gnutls manual, this page is gnutls_dtls_set_data_mtu(3) and it's literally so specific but so important, stay with me π«Ά
β¨ NAME β¨
gnutls_dtls_set_data_mtu β API function. that's it, that's the name, she's an API function and she's iconic for it π
πΈ SYNOPSIS πΈ
#include <gnutls/dtls.h>
int gnutls_dtls_set_data_mtu(gnutls_session_t session, unsigned int
mtu);
π ARGUMENTS π
gnutls_session_t sessionβ is agnutls_session_ttype. yes queen, the session itself, the whole vibe, the main character πunsigned int mtuβ The maximum unencrypted transfer unit of the session. note the word unencrypted, it's about to matter so much, iykyk π
π¦ DESCRIPTION π¦
okay so here's the tea β β this function will set the maximum size of the *unencrypted* records which will be sent over a DTLS session.
and the way it does that?? it's equivalent to calculating the DTLS packet overhead with the current encryption parameters, and calling gnutls_dtls_set_mtu() with that value. periodt. that's literally what it is.
β οΈ and this next part is NOT a drill bestie: because of that, you may need to call this function again after any negotiation or renegotiation, in order to ensure that the MTU is still sufficient to account for the new protocol overhead. the encryption params change, the overhead changes, and suddenly your number isn't cute anymore. so re-check it, okay?? π
and honestly? in most cases you only need to call gnutls_dtls_set_mtu() with the maximum MTU of your transport layer. like, that's the normal-girl path. this function is for when you want the fine-grained control and you're ready for the upkeep π
β RETURNS β
GNUTLS_E_SUCCESS (0) on success, or a negative error code. so like, zero = slay, negative = not slay, check it, always check it π
π SINCE π
3.1 β she's been here since 3.1, a true veteran, an elder icon π
π REPORTING BUGS π
found a bug? don't suffer in silence, tell the people:
- 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. (yes, go ahead, redistribute her, she said it's fine πΈ)
π₯ 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 whole page bestie, you ate that π β¨
cute sign-off time: this lil masterpiece lives in the gnutls manual, version 3.8.13, and it's the gnutls_dtls_set_data_mtu(3) page β go forth and set your MTUs responsibly, mwah ππ¦π
π¦ 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