The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
cbor.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
16  */
17 
18 /** CBOR encoder and decoder
19  *
20  * @file src/lib/util/cbor.h
21  *
22  * @copyright 2024 Network RADIUS SAS (legal@networkradius.com)
23  */
24 RCSIDH(cbor_h, "$Id: d2ef1e44327859a2a69463250f1ff328764c606e $")
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #include <freeradius-devel/util/dbuff.h>
31 #include <freeradius-devel/util/pair.h>
32 
34 
35 ssize_t fr_cbor_decode_value_box(TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff,
36  fr_type_t hint, fr_dict_attr_t const *enumv, bool tainted)
37  CC_HINT(nonnull(2,3));
38 
40 
41 ssize_t fr_cbor_decode_pair(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dbuff_t *dbuff,
42  fr_dict_attr_t const *parent, bool tainted) CC_HINT(nonnull);
43 
44 
45 #ifdef __cplusplus
46 }
47 #endif
#define RCSIDH(h, id)
Definition: build.h:482
ssize_t fr_cbor_encode_value_box(fr_dbuff_t *dbuff, fr_value_box_t *vb)
Encode CBOR.
Definition: cbor.c:166
ssize_t fr_cbor_encode_pair(fr_dbuff_t *dbuff, fr_pair_t *vp)
Encode a pair.
Definition: cbor.c:1436
ssize_t fr_cbor_decode_value_box(TALLOC_CTX *ctx, fr_value_box_t *vb, fr_dbuff_t *dbuff, fr_type_t hint, fr_dict_attr_t const *enumv, bool tainted))
Definition: cbor.c:989
ssize_t fr_cbor_decode_pair(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dbuff_t *dbuff, fr_dict_attr_t const *parent, bool tainted)
Definition: cbor.c:1629
fr_type_t
Definition: merged_model.c:80
long int ssize_t
Definition: merged_model.c:24
fr_pair_t * vp
Stores an attribute, a value and various bits of other data.
Definition: pair.h:68
static fr_slen_t parent
Definition: pair.h:851
int nonnull(2, 5))
static size_t char ** out
Definition: value.h:997