KNET_HAN...EAR_STATS(3)

πŸŽ€ KNET_HAN...EAR_STATS(3) πŸŽ€

hiii welcome to the Kronosnet Programmer's Manual, bestie!! this is the page for knet_handle_clear_stats, and lowkey it's the "start fresh, wipe the slate" button for your knet stats. let's get into it πŸ’…


✨ NAME ✨

knet_handle_clear_stats β€” Clear knet stats, link and/or handle.

like... it clears stats. the link ones, the handle ones, or both, depending on what you ask for. iconic behavior honestly 🫢


🌸 SYNOPSIS 🌸

#include <libknet.h>

int knet_handle_clear_stats(
    knet_handle_t  knet_h,
    int            clear_option
);

no cap, that's the whole thing. two args, one int back, and a dream ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

knet_handle_clear_stats

so here's the vibe check on the arguments:

  • knet_h β€” pointer to knet_handle_t. your handle. your main character. you already know her 🫢
  • clear_option β€” Which stats to clear, must be one of

KNET_CLEARSTATS_HANDLE_ONLY or KNET_CLEARSTATS_HANDLE_AND_LINK

heads up bestie: clear_option must be one of those two values. it's not a free-for-all, it's a menu of exactly two things. pick one πŸ’€

πŸ’œ RETURN VALUE πŸ’œ

  • 0 on success ✨
  • -1 on error and errno is set 😭

so like, if you get a -1, go check errno before you spiral. it's giving "the answer is right there" fr fr.


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, in order, exactly as the original rolls them out. go read these next, bestie, they're all connected:


Copyright (C) 2010-2026 Red Hat, Inc. All rights reserved.


and that's the whole page, bestie!! πŸŽ€ this cutie came to you courtesy of kronosnet, dated 2026-07-20, and yes the header really is truncated like that β€” KNET_HAN...EAR_STATS(3), she's mysterious, she's elusive, she ate πŸ’…βœ¨ go clear some stats and hydrate!! πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from