00001 /* $NetBSD: netconfig.h,v 1.1 2000/06/02 22:57:54 fvdl Exp $ */ 00002 /* $FreeBSD: src/include/netconfig.h,v 1.3 2002/03/23 17:24:53 imp Exp $ */ 00003 00004 00005 #ifndef _NETCONFIG_H_ 00006 #define _NETCONFIG_H_ 00007 00008 #include <sys/cdefs.h> 00009 00010 #define NETCONFIG "/etc/netconfig" 00011 #define NETPATH "NETPATH" 00012 00013 struct netconfig { 00014 char *nc_netid; /* Network ID */ 00015 unsigned long nc_semantics; /* Semantics (see below) */ 00016 unsigned long nc_flag; /* Flags (see below) */ 00017 char *nc_protofmly; /* Protocol family */ 00018 char *nc_proto; /* Protocol name */ 00019 char *nc_device; /* Network device pathname */ 00020 unsigned long nc_nlookups; /* Number of directory lookup libs */ 00021 char **nc_lookups; /* Names of the libraries */ 00022 unsigned long nc_unused[9]; /* reserved */ 00023 }; 00024 00025 typedef struct { 00026 struct netconfig **nc_head; 00027 struct netconfig **nc_curr; 00028 } NCONF_HANDLE; 00029 00030 /* 00031 * nc_semantics values 00032 */ 00033 #define NC_TPI_CLTS 1 00034 #define NC_TPI_COTS 2 00035 #define NC_TPI_COTS_ORD 3 00036 #define NC_TPI_RAW 4 00037 00038 /* 00039 * nc_flag values 00040 */ 00041 #define NC_NOFLAG 0x00 00042 #define NC_VISIBLE 0x01 00043 #define NC_BROADCAST 0x02 00044 00045 /* 00046 * nc_protofmly values 00047 */ 00048 #define NC_NOPROTOFMLY "-" 00049 #define NC_LOOPBACK "loopback" 00050 #define NC_INET "inet" 00051 #define NC_INET6 "inet6" 00052 #define NC_IMPLINK "implink" 00053 #define NC_PUP "pup" 00054 #define NC_CHAOS "chaos" 00055 #define NC_NS "ns" 00056 #define NC_NBS "nbs" 00057 #define NC_ECMA "ecma" 00058 #define NC_DATAKIT "datakit" 00059 #define NC_CCITT "ccitt" 00060 #define NC_SNA "sna" 00061 #define NC_DECNET "decnet" 00062 #define NC_DLI "dli" 00063 #define NC_LAT "lat" 00064 #define NC_HYLINK "hylink" 00065 #define NC_APPLETALK "appletalk" 00066 #define NC_NIT "nit" 00067 #define NC_IEEE802 "ieee802" 00068 #define NC_OSI "osi" 00069 #define NC_X25 "x25" 00070 #define NC_OSINET "osinet" 00071 #define NC_GOSIP "gosip" 00072 00073 /* 00074 * nc_proto values 00075 */ 00076 #define NC_NOPROTO "-" 00077 #define NC_TCP "tcp" 00078 #define NC_UDP "udp" 00079 #define NC_ICMP "icmp" 00080 00081 00082 #endif /* _NETCONFIG_H_ */