xref: /netbsd-src/external/bsd/wpa/dist/src/utils/config.h (revision bb6183629cf165db498d8e1f4e2de129f7efb21c)
1*bb618362Schristos /*
2*bb618362Schristos  * Configuration parsing
3*bb618362Schristos  * Copyright (c) 2003-2019, Jouni Malinen <j@w1.fi>
4*bb618362Schristos  *
5*bb618362Schristos  * This software may be distributed under the terms of the BSD license.
6*bb618362Schristos  * See README for more details.
7*bb618362Schristos  */
8*bb618362Schristos 
9*bb618362Schristos #ifndef UTILS_CONFIG_H
10*bb618362Schristos #define UTILS_CONFIG_H
11*bb618362Schristos 
12*bb618362Schristos /**
13*bb618362Schristos  * wpa_config_get_line - Read the next configuration file line
14*bb618362Schristos  * @s: Buffer for the line
15*bb618362Schristos  * @size: The buffer length
16*bb618362Schristos  * @stream: File stream to read from
17*bb618362Schristos  * @line: Pointer to a variable storing the file line number
18*bb618362Schristos  * @_pos: Buffer for the pointer to the beginning of data on the text line or
19*bb618362Schristos  * %NULL if not needed (returned value used instead)
20*bb618362Schristos  * Returns: Pointer to the beginning of data on the text line or %NULL if no
21*bb618362Schristos  * more text lines are available.
22*bb618362Schristos  *
23*bb618362Schristos  * This function reads the next non-empty line from the configuration file and
24*bb618362Schristos  * removes comments. The returned string is guaranteed to be null-terminated.
25*bb618362Schristos  */
26*bb618362Schristos char * wpa_config_get_line(char *s, int size, FILE *stream, int *line,
27*bb618362Schristos 			   char **_pos);
28*bb618362Schristos 
29*bb618362Schristos #endif /* UTILS_CONFIG_H */
30