The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
pair_legacy.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/** Legacy API functions - DO NOT USE IN NEW CODE
19 *
20 * @file src/lib/util/pair_legacy.h
21 *
22 * @copyright 2015 The FreeRADIUS server project
23 */
24RCSIDH(pair_legacy_h, "$Id: 5f3ef16685a949c75eb103798f24508a271b6f98 $")
25
26#include <freeradius-devel/build.h>
27#include <freeradius-devel/missing.h>
28#include <freeradius-devel/util/dcursor.h>
29#include <freeradius-devel/util/pair.h>
30#include <freeradius-devel/util/value.h>
31#include <freeradius-devel/util/token.h>
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
37int fr_pair_list_afrom_file(TALLOC_CTX *ctx, fr_dict_t const *dict,
38 fr_pair_list_t *out, FILE *fp, bool *pfiledone);
39
41
42typedef struct fr_pair_parse_s {
43 TALLOC_CTX *ctx;
44 fr_dict_attr_t const *da; //!< root da to start parsing from
45 fr_pair_list_t *list; //!< list where output is placed
46 bool allow_compare; //!< allow comparison operators
47 bool allow_crlf; //!< allow CRLF, and treat like comma
48 bool tainted; //!< source is tainted
49 char last_char; //!< last character we read - ',', '\n', or 0 for EOF
51
53 fr_sbuff_t *in) CC_HINT(nonnull);
54
55#ifdef __cplusplus
56}
57#endif
#define RCSIDH(h, id)
Definition build.h:484
static fr_slen_t in
Definition dict.h:824
ssize_t fr_slen_t
struct fr_pair_parse_s fr_pair_parse_t
fr_slen_t fr_pair_list_afrom_substr(fr_pair_parse_t const *root, fr_pair_parse_t *relative, fr_sbuff_t *in)
Parse a fr_pair_list_t from a substring.
fr_pair_list_t * list
list where output is placed
Definition pair_legacy.h:45
int fr_pair_list_afrom_file(TALLOC_CTX *ctx, fr_dict_t const *dict, fr_pair_list_t *out, FILE *fp, bool *pfiledone)
Read valuepairs from the fp up to End-Of-File.
void fr_pair_list_move_op(fr_pair_list_t *to, fr_pair_list_t *from, fr_token_t op)
Move pairs from source list to destination list respecting operator.
TALLOC_CTX * ctx
Definition pair_legacy.h:43
bool allow_compare
allow comparison operators
Definition pair_legacy.h:46
fr_dict_attr_t const * da
root da to start parsing from
Definition pair_legacy.h:44
bool tainted
source is tainted
Definition pair_legacy.h:48
bool allow_crlf
allow CRLF, and treat like comma
Definition pair_legacy.h:47
char last_char
last character we read - ',', ' ', or 0 for EOF
Definition pair_legacy.h:49
enum fr_token fr_token_t
int nonnull(2, 5))
static size_t char ** out
Definition value.h:997