1 #ifndef _NETCONFIG_H_
2 #define _NETCONFIG_H_
3 
4 //#include <features.h>
5 
6 // XXX Should be in, or come from, the registry!!!
7 #define NETCONFIG "C:\\ReactOS\\System32\\drivers\\etc\\netconfig"
8 #define NETPATH	  "NETPATH"
9 
10 struct netconfig {
11   char *nc_netid;		/* Network ID */
12   unsigned long nc_semantics;	/* Semantics (see below) */
13   unsigned long nc_flag;	/* Flags (see below) */
14   char *nc_protofmly;		/* Protocol family */
15   char *nc_proto;		/* Protocol name */
16   char *nc_device;		/* Network device pathname */
17   unsigned long nc_nlookups;	/* Number of directory lookup libs */
18   char **nc_lookups;		/* Names of the libraries */
19   unsigned long nc_unused[9];	/* reserved */
20 };
21 
22 typedef struct {
23   struct netconfig **nc_head;
24   struct netconfig **nc_curr;
25 } NCONF_HANDLE;
26 
27 /*
28  * nc_semantics values
29  */
30 #define NC_TPI_CLTS	1
31 #define NC_TPI_COTS	2
32 #define NC_TPI_COTS_ORD	3
33 #define NC_TPI_RAW	4
34 
35 /*
36  * nc_flag values
37  */
38 #define NC_NOFLAG	0x00
39 #define NC_VISIBLE	0x01
40 #define NC_BROADCAST	0x02
41 
42 /*
43  * nc_protofmly values
44  */
45 #define NC_NOPROTOFMLY	"-"
46 #define NC_LOOPBACK	"loopback"
47 #define NC_INET		"inet"
48 #define NC_INET6	"inet6"
49 #define NC_IMPLINK	"implink"
50 #define NC_PUP		"pup"
51 #define NC_CHAOS	"chaos"
52 #define NC_NS		"ns"
53 #define NC_NBS		"nbs"
54 #define NC_ECMA		"ecma"
55 #define NC_DATAKIT	"datakit"
56 #define NC_CCITT	"ccitt"
57 #define NC_SNA		"sna"
58 #define NC_DECNET	"decnet"
59 #define NC_DLI		"dli"
60 #define NC_LAT		"lat"
61 #define NC_HYLINK	"hylink"
62 #define NC_APPLETALK	"appletalk"
63 #define NC_NIT		"nit"
64 #define NC_IEEE802	"ieee802"
65 #define NC_OSI		"osi"
66 #define NC_X25		"x25"
67 #define NC_OSINET	"osinet"
68 #define NC_GOSIP	"gosip"
69 
70 /*
71  * nc_proto values
72  */
73 #define NC_NOPROTO	"-"
74 #define NC_TCP		"tcp"
75 #define NC_UDP		"udp"
76 #define NC_ICMP		"icmp"
77 
78 #ifdef __REACTOS__
79 #ifndef __BEGIN_DECLS
80 #define __BEGIN_DECLS
81 #define __END_DECLS
82 #endif
83 #endif
84 
85 __BEGIN_DECLS
86 
87 extern void *setnetconfig (void);
88 extern struct netconfig *getnetconfig (void *);
89 extern struct netconfig *getnetconfigent (const char *);
90 extern void freenetconfigent (struct netconfig *);
91 extern int endnetconfig (void *);
92 
93 extern void *setnetpath (void);
94 extern struct netconfig *getnetpath (void *);
95 extern int endnetpath (void *);
96 
97 extern void nc_perror (const char *);
98 extern char *nc_sperror (void);
99 
100 __END_DECLS
101 
102 #endif /* _NETCONFIG_H_ */
103