ReactOS  0.4.14-dev-77-gd9e7c48
netconfig.h
Go to the documentation of this file.
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 
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 
101 
102 #endif /* _NETCONFIG_H_ */
void freenetconfigent(struct netconfig *)
Definition: getnetconfig.c:530
void * setnetpath(void)
Definition: getnetpath.c:78
char * nc_sperror(void)
Definition: getnetconfig.c:648
unsigned long nc_flag
Definition: netconfig.h:13
void nc_perror(const char *)
char * nc_protofmly
Definition: netconfig.h:14
#define __END_DECLS
Definition: wintirpc.h:63
char * nc_proto
Definition: netconfig.h:15
struct netconfig * getnetpath(void *)
Definition: getnetpath.c:134
unsigned long nc_unused[9]
Definition: netconfig.h:19
struct netconfig * getnetconfigent(const char *)
struct netconfig * getnetconfig(void *)
Definition: getnetconfig.c:253
char * nc_netid
Definition: netconfig.h:11
__BEGIN_DECLS void * setnetconfig(void)
Definition: getnetconfig.c:217
int endnetconfig(void *)
Definition: getnetconfig.c:373
char * nc_device
Definition: netconfig.h:16
char ** nc_lookups
Definition: netconfig.h:18
struct netconfig ** nc_curr
Definition: netconfig.h:24
#define __BEGIN_DECLS
Definition: wintirpc.h:62
struct netconfig ** nc_head
Definition: netconfig.h:23
int endnetpath(void *)
Definition: getnetpath.c:191
unsigned long nc_semantics
Definition: netconfig.h:12
unsigned long nc_nlookups
Definition: netconfig.h:17