Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
buf.h
Go to the documentation of this file.
1/*
2 * Copyright Runtime.io 2018. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_MGMT_BUF_H_
8#define ZEPHYR_INCLUDE_MGMT_BUF_H_
9
10#include <inttypes.h>
11#include "tinycbor/cbor.h"
12#include "tinycbor/cbor_buf_writer.h"
13struct net_buf;
14
16 struct cbor_decoder_reader r;
17 struct net_buf *nb;
18};
19
21 struct cbor_encoder_writer enc;
22 struct net_buf *nb;
23};
24
32
38void mcumgr_buf_free(struct net_buf *nb);
39
47 struct net_buf *nb);
48
56 struct net_buf *nb);
57
58#endif
void cbor_nb_writer_init(struct cbor_nb_writer *cnw, struct net_buf *nb)
Initializes a CBOR writer with the specified net_buf.
void mcumgr_buf_free(struct net_buf *nb)
Frees an mcumgr net_buf.
struct net_buf * mcumgr_buf_alloc(void)
Allocates a net_buf for holding an mcumgr request or response.
void cbor_nb_reader_init(struct cbor_nb_reader *cnr, struct net_buf *nb)
Initializes a CBOR reader with the specified net_buf.
Definition: buf.h:15
struct net_buf * nb
Definition: buf.h:17
struct cbor_decoder_reader r
Definition: buf.h:16
Definition: buf.h:20
struct cbor_encoder_writer enc
Definition: buf.h:21
struct net_buf * nb
Definition: buf.h:22
Network buffer representation.
Definition: buf.h:919