22 #ifndef _LWPA_ROOTLAYERPDU_H_
23 #define _LWPA_ROOTLAYERPDU_H_
27 #include "lwpa_bool.h"
42 #define ACN_TCP_PREAMBLE_SIZE 16
44 #define ACN_UDP_PREAMBLE_SIZE 16
46 #define RLP_HEADER_SIZE_NORMAL_LEN 22
48 #define RLP_HEADER_SIZE_EXT_LEN 23
56 #define VECTOR_ROOT_SDT ACN_PROTOCOL_SDT
57 #define VECTOR_ROOT_DRAFT_E131_DATA ACN_PROTOCOL_DRAFT_E131_DATA
58 #define VECTOR_ROOT_E131_DATA ACN_PROTOCOL_E131_DATA
59 #define VECTOR_ROOT_E131_EXTENDED ACN_PROTOCOL_E131_EXTENDED
60 #define VECTOR_ROOT_LLRP ACN_PROTOCOL_LLRP
61 #define VECTOR_ROOT_BROKER ACN_PROTOCOL_BROKER
62 #define VECTOR_ROOT_RPT ACN_PROTOCOL_RPT
63 #define VECTOR_ROOT_EPT ACN_PROTOCOL_EPT
bool parse_root_layer_pdu(const uint8_t *buf, size_t buflen, RootLayerPdu *pdu, LwpaPdu *last_pdu)
Parse a Root Layer PDU.
Definition: lwpa_rootlayerpdu.c:209
size_t pack_tcp_preamble(uint8_t *buf, size_t buflen, size_t rlp_block_len)
Pack an ACN TCP Preamble into a buffer.
Definition: lwpa_rootlayerpdu.c:267
size_t pack_root_layer_header(uint8_t *buf, size_t buflen, const RootLayerPdu *pdu)
Pack only the header of a Root Layer PDU block into a buffer.
Definition: lwpa_rootlayerpdu.c:318
bool parse_tcp_preamble(const uint8_t *buf, size_t buflen, TcpPreamble *preamble)
Parse an ACN TCP Preamble.
Definition: lwpa_rootlayerpdu.c:52
size_t pack_root_layer_block(uint8_t *buf, size_t buflen, const RootLayerPdu *pdu_block, size_t num_pdus)
Pack a Root Layer PDU block into a buffer.
Definition: lwpa_rootlayerpdu.c:360
struct TcpPreamble TcpPreamble
Holds the information contained in an ACN TCP Preamble.
struct UdpPreamble UdpPreamble
Holds the information contained in an ACN UDP Preamble.
size_t pack_udp_preamble(uint8_t *buf, size_t buflen)
Pack an ACN UDP Preamble into a buffer.
Definition: lwpa_rootlayerpdu.c:238
struct RootLayerPdu RootLayerPdu
Holds the information contained in an ACN Root Layer PDU.
bool parse_root_layer_header(const uint8_t *buf, size_t buflen, RootLayerPdu *pdu, RootLayerPdu *last_pdu)
Parse only the header of a Root Layer PDU.
Definition: lwpa_rootlayerpdu.c:112
bool parse_udp_preamble(const uint8_t *buf, size_t buflen, UdpPreamble *preamble)
Parse an ACN UDP Preamble.
Definition: lwpa_rootlayerpdu.c:77
size_t root_layer_buf_size(const RootLayerPdu *pdu_block, size_t num_pdus)
Get the buffer size to allocate for a Root Layer PDU block.
Definition: lwpa_rootlayerpdu.c:291
The CID type.
Definition: lwpa_cid.h:55
Holds state data used when parsing multiple PDUs in a PDU block.
Definition: lwpa_pdu.h:116
Holds the information contained in an ACN Root Layer PDU.
Definition: lwpa_rootlayerpdu.h:86
const uint8_t * pdata
A pointer to the Data segment of this PDU.
Definition: lwpa_rootlayerpdu.h:92
size_t datalen
The length of the Data segment of this PDU.
Definition: lwpa_rootlayerpdu.h:94
uint32_t vector
The Vector indicates the type of data contained in the Data segment.
Definition: lwpa_rootlayerpdu.h:90
LwpaCid sender_cid
The CID of the component that sent this Root Layer PDU.
Definition: lwpa_rootlayerpdu.h:88
Holds the information contained in an ACN TCP Preamble.
Definition: lwpa_rootlayerpdu.h:68
const uint8_t * rlp_block
Pointer to the beginning of the Root Layer PDU block.
Definition: lwpa_rootlayerpdu.h:70
size_t rlp_block_len
Length of the Root Layer PDU block.
Definition: lwpa_rootlayerpdu.h:72
Holds the information contained in an ACN UDP Preamble.
Definition: lwpa_rootlayerpdu.h:77
const uint8_t * rlp_block
Pointer to the beginning of the Root Layer PDU block.
Definition: lwpa_rootlayerpdu.h:79
size_t rlp_block_len
Length of the Root Layer PDU block.
Definition: lwpa_rootlayerpdu.h:81