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