# otSrpClientCounters


`#include <openthread/srp_client.h>`

Represents the SRP client counters.

## Summary

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a8a76b7a60b2c50bf24207c522e6cfc54` | `uint64_t` Subset of `mRegisteredTime` while registered with an anycast server. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a4b48f98beb916d94ca35092a63f0bebb` | `uint32_t` Number of host-address change events that triggered an SRP re-registration. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a0914cd5d028e86c09a5d68df37382f09` | `uint32_t` Number of times the host and all services were cleared (local-only). |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a6696cacf04984b6739713b6964b505cb` | `uint32_t` Number of times the host and all services were removed (notifies server). |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a531fae7d3f36fc6115461e9047391ec4` | `uint64_t` Cumulative number of milliseconds spent in the registered state. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1adbf7dffa773c2c06d39d6cf21a133435` | `uint32_t` Number of transactions completed with a name/record conflict response. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a5a5e83072be5ab6171182bdf129b6a28` | `uint32_t` Number of transactions completed with any other server error response. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1ac4dc2ef6a91033b0167f6d5a87076d67` | `uint32_t` Number of transactions completed with a security/policy/algorithm response. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a0001acdf3a3ee9dc7c5ef2c423d9caad` | `uint32_t` Number of auto-start server (re-)selections that triggered an SRP update. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1aae7a37512ff98ebb677e7de5e4005124` | `uint32_t` Number of times a service was successfully added. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a7379d36ebf0cbff86379b78e2032aede` | `uint32_t` Number of times a service was cleared (local-only, no server message). |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a174d65b297b7113674e763840fa760ea` | `uint32_t` Number of times a service was removed (sends an unregister to server). |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a5e21749c9caf546680152516fb9c6769` | `uint32_t` Number of transactions completed with a successful server response. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1ae821116569db2167b521c6ad48f78582` | `uint32_t` Number of retransmission timers that expired before a response arrived. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a191d8ccde5a7ab0ffa33906bc0a298b8` | `uint64_t` Cumulative milliseconds since last counter reset, across all client states (including stopped/paused). |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1a3a32661b1faf131062f31cd0e00f6ebb` | `uint32_t` Cumulative UDP payload bytes of transmitted SRP messages. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1ac7a4499d90ed967ca56128117617cd71` | `uint32_t` Number of SRP update transmissions (wire-level; includes retransmissions). |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1acc13d61c23758c71e50f5a5a073dca40` | `uint64_t` Subset of `mRegisteredTime` while registered with a unicast server. |
| `https://openthread.io/reference/struct/ot-srp-client-counters#structot_srp_client_counters_1aef60d6a52e6292581a9f2ccd5f1b27a4` | `uint32_t` Number of fresh SRP update transactions started. |

## Public attributes

### mAnycastAvailableTime

```
uint64_t otSrpClientCounters::mAnycastAvailableTime
```
Subset of `mRegisteredTime` while registered with an anycast server.

### mHostAddressChanges

```
uint32_t otSrpClientCounters::mHostAddressChanges
```
Number of host-address change events that triggered an SRP re-registration.

### mHostAndServicesClears

```
uint32_t otSrpClientCounters::mHostAndServicesClears
```
Number of times the host and all services were cleared (local-only).

### mHostAndServicesRemoves

```
uint32_t otSrpClientCounters::mHostAndServicesRemoves
```
Number of times the host and all services were removed (notifies server).

### mRegisteredTime

```
uint64_t otSrpClientCounters::mRegisteredTime
```
Cumulative number of milliseconds spent in the registered state.

### mRejectedDuplicate

```
uint32_t otSrpClientCounters::mRejectedDuplicate
```
Number of transactions completed with a name/record conflict response.

### mRejectedOther

```
uint32_t otSrpClientCounters::mRejectedOther
```
Number of transactions completed with any other server error response.

### mRejectedSecurity

```
uint32_t otSrpClientCounters::mRejectedSecurity
```
Number of transactions completed with a security/policy/algorithm response.

### mServerChanges

```
uint32_t otSrpClientCounters::mServerChanges
```
Number of auto-start server (re-)selections that triggered an SRP update.

### mServiceAdds

```
uint32_t otSrpClientCounters::mServiceAdds
```
Number of times a service was successfully added.

### mServiceClears

```
uint32_t otSrpClientCounters::mServiceClears
```
Number of times a service was cleared (local-only, no server message).

### mServiceRemoves

```
uint32_t otSrpClientCounters::mServiceRemoves
```
Number of times a service was removed (sends an unregister to server).

### mSuccess

```
uint32_t otSrpClientCounters::mSuccess
```
Number of transactions completed with a successful server response.

### mTimeouts

```
uint32_t otSrpClientCounters::mTimeouts
```
Number of retransmission timers that expired before a response arrived.

### mTrackedTime

```
uint64_t otSrpClientCounters::mTrackedTime
```
Cumulative milliseconds since last counter reset, across all client states (including stopped/paused).

### mTxTotalBytes

```
uint32_t otSrpClientCounters::mTxTotalBytes
```
Cumulative UDP payload bytes of transmitted SRP messages.

### mTxUpdates

```
uint32_t otSrpClientCounters::mTxUpdates
```
Number of SRP update transmissions (wire-level; includes retransmissions).

### mUnicastAvailableTime

```
uint64_t otSrpClientCounters::mUnicastAvailableTime
```
Subset of `mRegisteredTime` while registered with a unicast server.

### mUpdateAttempts

```
uint32_t otSrpClientCounters::mUpdateAttempts
```
Number of fresh SRP update transactions started.

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).