ReactOS 0.4.15-dev-8119-g4fb2fdb
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
15struct 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
27typedef struct {
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
92extern void *setnetconfig (void);
93extern struct netconfig *getnetconfig (void *);
94extern struct netconfig *getnetconfigent (const char *);
95extern void freenetconfigent (struct netconfig *);
96extern int endnetconfig (void *);
97
98extern void *setnetpath (void);
99extern struct netconfig *getnetpath (void *);
100extern int endnetpath (void *);
101
102extern void nc_perror (const char *);
103extern char *nc_sperror (void);
104
106
107#endif /* _NETCONFIG_H_ */
void freenetconfigent(struct netconfig *)
Definition: getnetconfig.c:530
int endnetpath(void *)
Definition: getnetpath.c:191
struct netconfig * getnetconfig(void *)
Definition: getnetconfig.c:253
struct netconfig * getnetpath(void *)
Definition: getnetpath.c:134
__BEGIN_DECLS void * setnetconfig(void)
Definition: getnetconfig.c:217
int endnetconfig(void *)
Definition: getnetconfig.c:373
void nc_perror(const char *)
void * setnetpath(void)
Definition: getnetpath.c:78
struct netconfig * getnetconfigent(const char *)
char * nc_sperror(void)
Definition: getnetconfig.c:648
#define NETCONFIG
Definition: netconfig.h:11
struct netconfig ** nc_head
Definition: netconfig.h:28
struct netconfig ** nc_curr
Definition: netconfig.h:29
unsigned long nc_nlookups
Definition: netconfig.h:22
unsigned long nc_semantics
Definition: netconfig.h:17
unsigned long nc_flag
Definition: netconfig.h:18
char * nc_netid
Definition: netconfig.h:16
unsigned long nc_unused[9]
Definition: netconfig.h:24
char * nc_protofmly
Definition: netconfig.h:19
char * nc_proto
Definition: netconfig.h:20
char * nc_device
Definition: netconfig.h:21
char ** nc_lookups
Definition: netconfig.h:23
#define __END_DECLS
Definition: wintirpc.h:63
#define __BEGIN_DECLS
Definition: wintirpc.h:62