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