sysrepo  5.2.34
YANG-based system repository for all-around configuration management.

Constants and types shared by the collector and the publisher. More...

Collaboration diagram for Common:

Data Structures

struct  srudpn_hdr_t
 Parsed header of one UDP-Notif datagram. More...
 

Macros

#define SRUDPN_ADDR_STRLEN   (INET6_ADDRSTRLEN + IF_NAMESIZE)
 
#define SRUDPN_HDR_SIZE   12
 
#define SRUDPN_OPT_SEGMENTATION   1
 
#define SRUDPN_OPT_SEGMENTATION_SIZE   4
 
#define SRUDPN_VERSION   1
 

Enumerations

enum  srudpn_media_type_t { SRUDPN_MT_JSON = 1 , SRUDPN_MT_XML = 2 , SRUDPN_MT_CBOR = 3 , SRUDPN_MT_PRIVATE = 16 }
 UDP-Notif media types (MT values with the S-flag unset). More...
 

Detailed Description

Constants and types shared by the collector and the publisher.


Data Structure Documentation

◆ srudpn_hdr_t

struct srudpn_hdr_t

Parsed header of one UDP-Notif datagram.

The header format is defined by https://datatracker.ietf.org/doc/draft-ietf-netconf-udp-notif/.

Definition at line 75 of file udp_notif.h.

Data Fields
uint8_t header_len

header length in octets, including options

int last_segment

whether this is the last segment, only if segmented

uint8_t media_type

media type, srudpn_media_type_t with S-flag unset

uint32_t message_id

message ID

uint16_t message_len

datagram length in octets, including the header

uint32_t publisher_id

message publisher ID

uint8_t s_flag

media type space, 1 for a private one

uint16_t segment_num

segment number, only if segmented

int segmented

whether the segmentation option is present

uint8_t version

header version

Macro Definition Documentation

◆ SRUDPN_ADDR_STRLEN

#define SRUDPN_ADDR_STRLEN   (INET6_ADDRSTRLEN + IF_NAMESIZE)

Size of a buffer for a numeric source address, including the scope of an IPv6 one

Definition at line 58 of file udp_notif.h.

◆ SRUDPN_HDR_SIZE

#define SRUDPN_HDR_SIZE   12

UDP-Notif fixed header size in octets

Definition at line 49 of file udp_notif.h.

◆ SRUDPN_OPT_SEGMENTATION

#define SRUDPN_OPT_SEGMENTATION   1

UDP-Notif segmentation option type

Definition at line 52 of file udp_notif.h.

◆ SRUDPN_OPT_SEGMENTATION_SIZE

#define SRUDPN_OPT_SEGMENTATION_SIZE   4

UDP-Notif segmentation option size in octets

Definition at line 55 of file udp_notif.h.

◆ SRUDPN_VERSION

#define SRUDPN_VERSION   1

UDP-Notif header version (draft-ietf-netconf-udp-notif-26)

Definition at line 46 of file udp_notif.h.

Enumeration Type Documentation

◆ srudpn_media_type_t

UDP-Notif media types (MT values with the S-flag unset).

Enumerator
SRUDPN_MT_JSON 

application/yang-data+json

SRUDPN_MT_XML 

application/yang-data+xml

SRUDPN_MT_CBOR 

application/yang-data+cbor

SRUDPN_MT_PRIVATE 

any media type of the private space (S-flag set), outside the 4-bit MT range

Definition at line 63 of file udp_notif.h.