![]() |
sysrepo
5.2.34
YANG-based system repository for all-around configuration management.
|
Encoding notifications into UDP-Notif datagrams. More...
Data Structures | |
| struct | srudpn_dgram_t |
| One encoded UDP-Notif datagram, header and data to be sent together. More... | |
Functions | |
| int | srudpn_build_dgrams (srudpn_media_type_t media_type, uint32_t publisher_id, uint32_t message_id, const uint8_t *payload, uint32_t payload_len, uint16_t max_segment_size, srudpn_dgram_t **dgrams) |
| Encode a payload into UDP-Notif datagrams. More... | |
| int | srudpn_encode_notification (const struct lyd_node *notif, const struct timespec *event_time, srudpn_media_type_t media_type, uint8_t **payload, uint32_t *payload_len) |
| Encode a notification in the RFC 5277 envelope. More... | |
Encoding notifications into UDP-Notif datagrams.
| struct srudpn_dgram_t |
One encoded UDP-Notif datagram, header and data to be sent together.
Definition at line 296 of file udp_notif.h.
| int srudpn_build_dgrams | ( | srudpn_media_type_t | media_type, |
| uint32_t | publisher_id, | ||
| uint32_t | message_id, | ||
| const uint8_t * | payload, | ||
| uint32_t | payload_len, | ||
| uint16_t | max_segment_size, | ||
| srudpn_dgram_t ** | dgrams | ||
| ) |
Encode a payload into UDP-Notif datagrams.
| [in] | media_type | Media type of the payload, not SRUDPN_MT_PRIVATE. |
| [in] | publisher_id | Message publisher ID. |
| [in] | message_id | Message ID. |
| [in] | payload | Payload to send, dgrams point into it so it must not be freed before them. |
| [in] | payload_len | Length of payload. |
| [in] | max_segment_size | Maximum datagram size, segmenting the message if it does not fit, 0 to never segment. |
| [out] | dgrams | Address of a srudpn_dgram_t pointer set to the encoded datagrams as a libyang sized array, iterate with LYA_FOR() and free with LYA_FREE(). |
| int srudpn_encode_notification | ( | const struct lyd_node * | notif, |
| const struct timespec * | event_time, | ||
| srudpn_media_type_t | media_type, | ||
| uint8_t ** | payload, | ||
| uint32_t * | payload_len | ||
| ) |
Encode a notification in the RFC 5277 envelope.
| [in] | notif | Notification to encode. |
| [in] | event_time | Event time of the notification. |
| [in] | media_type | Media type to encode in. |
| [out] | payload | Encoded payload. |
| [out] | payload_len | Length of payload. |