ReactOS  0.4.15-dev-1377-ga59cecd
netconfig.h
Go to the documentation of this file.
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 
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 
106 
107 #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:18
void nc_perror(const char *)
char * nc_protofmly
Definition: netconfig.h:19
#define __END_DECLS
Definition: wintirpc.h:63
char * nc_proto
Definition: netconfig.h:20
struct netconfig * getnetpath(void *)
Definition: getnetpath.c:134
unsigned long nc_unused[9]
Definition: netconfig.h:24
struct netconfig * getnetconfigent(const char *)
struct netconfig * getnetconfig(void *)
Definition: getnetconfig.c:253
char * nc_netid
Definition: netconfig.h:16
__BEGIN_DECLS void * setnetconfig(void)
Definition: getnetconfig.c:217
int endnetconfig(void *)
Definition: getnetconfig.c:373
char * nc_device
Definition: netconfig.h:21
char ** nc_lookups
Definition: netconfig.h:23
struct netconfig ** nc_curr
Definition: netconfig.h:29
#define NETCONFIG
Definition: netconfig.h:11
#define __BEGIN_DECLS
Definition: wintirpc.h:62
struct netconfig ** nc_head
Definition: netconfig.h:28
int endnetpath(void *)
Definition: getnetpath.c:191
unsigned long nc_semantics
Definition: netconfig.h:17
unsigned long nc_nlookups
Definition: netconfig.h:22