1/*
2 * Copyright 2009, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _NET_SETTINGS_H
6#define _NET_SETTINGS_H
7
8
9#include <SupportDefs.h>
10
11#if __cplusplus
12	extern "C" {
13#endif /* __cplusplus */
14
15
16/* private types */
17typedef struct _ns_entry {
18	const char*		key;
19	const char*		value;
20} _ns_entry_t;
21
22typedef struct _ns_section {
23	const char*		heading;
24	unsigned		nentries;
25	_ns_entry_t*	entries;
26} _ns_section_t;
27
28
29/* public type (data members are private) */
30typedef struct _net_settings {
31	int				_dirty;
32	unsigned		_nsections;
33	_ns_section_t*	_sections;
34	char			_fname[64];
35} net_settings;
36
37/* finding and setting network preferences */
38extern char* find_net_setting(net_settings* ncw, const char* heading,
39	const char* name, char* value, unsigned nbytes);
40
41extern status_t set_net_setting(net_settings* ncw, const char* heading,
42	const char* name, const char* value);
43
44
45#if __cplusplus
46}
47#endif /* __cplusplus */
48
49#endif /* _NET_SETTINGS_H */
50