xref: /haiku/headers/os/net/net_settings.h (revision 1214ef1b2100f2b3299fc9d8d6142e46f70a4c3f)
1 /*******************************************************************************
2 /
3 /	File:		net_settings.h
4 /
5 /	Description:	Network preferences settings.
6 /
7 /	Copyright 1993-98, Be Incorporated, All Rights Reserved.
8 /
9 *******************************************************************************/
10 
11 #ifndef _NET_SETTINGS_H
12 #define _NET_SETTINGS_H
13 
14 #include <BeBuild.h>
15 #include <SupportDefs.h>
16 
17 #if __cplusplus
18 extern "C" {
19 #endif /* __cplusplus */
20 
21 /*
22  * Private types
23  */
24 typedef struct _ns_entry {
25 	const char *key;
26 	const char *value;
27 } _ns_entry_t;
28 
29 typedef struct _ns_section {
30 	const char *heading;
31 	unsigned nentries;
32 	_ns_entry_t *entries;
33 } _ns_section_t;
34 
35 
36 /*
37  * Public type, but the data members are private
38  */
39 typedef struct _net_settings {
40 	int _dirty;
41 	unsigned _nsections;
42 	_ns_section_t *_sections;
43 	char _fname[64];
44 } net_settings;
45 
46 /*
47  * For finding and setting network preferences
48  */
49 extern
50 char *find_net_setting(net_settings *ncw,
51 					   const char *heading, const char *name, char *value,
52 					   unsigned nbytes);
53 extern
54 status_t set_net_setting(net_settings *ncw,
55 						 const char *heading, const char *name,
56 						 const char *value);
57 
58 #if __cplusplus
59 }
60 #endif /* __cplusplus */
61 
62 #endif /* _NET_SETTINGS_H */
63