# otBorderAgentSessionInfo Struct Reference

# otBorderAgentSessionInfo


`#include <openthread/border_agent.h>`

Represents information about a Border Agent session.

## Summary

This structure is populated by `https://openthread.io/reference/group/api-border-agent#group__api-border-agent_1gaeddd5429664f14707e75bd26b2af9664` during iteration over the list of sessions using an `https://openthread.io/reference/struct/ot-border-agent-session-iterator`.

To ensure consistent `mLifetime` calculations, the iterator's initialization time is stored within the iterator, and each session's `mLifetime` is calculated relative to this time.

| ### Public attributes ||
|---|---|
| `https://openthread.io/reference/struct/ot-border-agent-session-info#structot_border_agent_session_info_1a02ad32e1951e1fbdf2e3f06f1c38d732` | `bool` Indicates whether the session is accepted as full commissioner. |
| `https://openthread.io/reference/struct/ot-border-agent-session-info#structot_border_agent_session_info_1afa76ed91a9c986fc4643cc866a594d25` | `bool` Indicates whether the session is connected. |
| `https://openthread.io/reference/struct/ot-border-agent-session-info#structot_border_agent_session_info_1adbf0134f9a392e5807fc0b342778d3b9` | `uint64_t` Milliseconds since the session was first established. |
| `https://openthread.io/reference/struct/ot-border-agent-session-info#structot_border_agent_session_info_1a9a40664f1f5f4aed9a814e0aed9c8164` | `https://openthread.io/reference/struct/ot-sock-addr` Socket address (IPv6 address and port number) of session peer. |

## Public attributes

### mIsCommissioner

```
bool otBorderAgentSessionInfo::mIsCommissioner
```
Indicates whether the session is accepted as full commissioner.

### mIsConnected

```
bool otBorderAgentSessionInfo::mIsConnected
```
Indicates whether the session is connected.

### mLifetime

```
uint64_t otBorderAgentSessionInfo::mLifetime
```
Milliseconds since the session was first established.

### mPeerSockAddr

```
otSockAddr otBorderAgentSessionInfo::mPeerSockAddr
```
Socket address (IPv6 address and port number) of session peer.

## 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).