---
name: "nng_stat_child"
section: "3"
platform: "linux"
package: "libnng-dev"
version: "1.10.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nng_stat_child"
---

# nng\_stat\_child(3)

get child statistic

## NAME

nng\_stat\_child - get child statistic

## SYNOPSIS

```
#include <nng/nng.h>
typedef struct nng_stat nng_stat;
nng_stat *nng_stat_child(nng_stat *parent);
```

## DESCRIPTION

The `nng_stat_child()` function returns the first child statistic of the statistic *parent*. If no children are present, then `NULL` is returned.

**Tip**\

Only statistics with type (see `nng_stat_type()`) of `NNG_STAT_SCOPE` will have children.

## RETURN VALUES

The first child statistic of *parent*, or NULL if *parent* has no children.

## ERRORS

None.

## SEE ALSO

[libnng(3)](/libnng/3.md), [nng\_stat\_next(3)](/nng_stat_next/3.md), [nng\_stats\_get(3)](/nng_stats_get/3.md), [nng\_stat(5)](/nng_stat/5.md), [nng(7)](/nng/7.md)
