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