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