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