nbd_stats_chunks_received(3)

πŸ’… nbd_stats_chunks_received(3) β€” like, the libnbd manual, bestie edition πŸŽ€

okay so this is a page from libnbd(3) β€” yes, the libnbd manual, the whole library situation β€” and today we're doing nbd_stats_chunks_received(3). it's a stats girlie. she counts things. let's get into it ✨


✨ NAME ✨

nbd_stats_chunks_received β€” the statistics of chunks received over the connection, like, so far πŸ’«


🌸 SYNOPSIS 🌸

#include <libnbd.h>

uint64_t nbd_stats_chunks_received (
           struct nbd_handle *h
         );

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: this function returns the number of chunks that the client has received from the server. and a chunk, bestie, is a group of bytes delineated by a magic number that cannot be further subdivided without breaking the protocol. iconic. no notes. πŸ”₯

and the way that this number does not necessarily relate to the number of API calls made β€” like, at all β€” nor to the number of TCP packets received over the connection. ngl she's her own independent queen, don't try to math her into a different metric πŸ’…


πŸ‘‘ RETURN VALUE πŸ‘‘

this call returns a counter. that's it. that's the tea β˜•


🧚 ERRORS 🧚

kk so β€” this function does not fail. she simply does not miss. πŸ’€

but (and this is the important part) the following parameters must not be NULL: h. like, please don't. for more information see "Non-NULL parameters" in libnbd(3), mwah 🫢


⭐ VERSION ⭐

this function first appeared in libnbd 1.16. a legend was born, fr fr 🌈

if you need to test if this function is available at compile time, check if the following macro is defined:

#define LIBNBD_HAVE_NBD_STATS_CHUNKS_RECEIVED 1

πŸ’œ SEE ALSO πŸ’œ

go read these too, they're all in the group chat:

  • nbd_create(3)
  • nbd_get_structured_replies_negotiated(3)
  • nbd_stats_bytes_received(3)
  • nbd_stats_bytes_sent(3)
  • nbd_stats_chunks_sent(3)
  • libnbd(3)

πŸ“ AUTHORS πŸ“

  • Eric Blake
  • Richard W.M. Jones

(absolute icons, both of them πŸ‘‘)


Copyright Red Hat


πŸ“œ LICENSE πŸ“œ

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

real talk though β€” that warranty disclaimer is not a vibe check you want to fail, so read it properly, k? πŸ™ˆ

aaaand that's the whole page, bestie! πŸ’… mwah! this one's from libnbd-1.25.8, dated 2026-10-13 β€” write that down, put it in your notes app, screenshot it, whatever πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from