1177633Sdfr/* $NetBSD: netconfig.h,v 1.1 2000/06/02 22:57:54 fvdl Exp $ */ 2177633Sdfr/* $FreeBSD: releng/10.3/sys/rpc/netconfig.h 177633 2008-03-26 15:23:12Z dfr $ */ 3177633Sdfr 4177633Sdfr 5177633Sdfr#ifndef _NETCONFIG_H_ 6177633Sdfr#define _NETCONFIG_H_ 7177633Sdfr 8177633Sdfr#include <sys/cdefs.h> 9177633Sdfr 10177633Sdfr#define NETCONFIG "/etc/netconfig" 11177633Sdfr#define NETPATH "NETPATH" 12177633Sdfr 13177633Sdfrstruct netconfig { 14177633Sdfr char *nc_netid; /* Network ID */ 15177633Sdfr unsigned long nc_semantics; /* Semantics (see below) */ 16177633Sdfr unsigned long nc_flag; /* Flags (see below) */ 17177633Sdfr char *nc_protofmly; /* Protocol family */ 18177633Sdfr char *nc_proto; /* Protocol name */ 19177633Sdfr char *nc_device; /* Network device pathname */ 20177633Sdfr unsigned long nc_nlookups; /* Number of directory lookup libs */ 21177633Sdfr char **nc_lookups; /* Names of the libraries */ 22177633Sdfr unsigned long nc_unused[9]; /* reserved */ 23177633Sdfr}; 24177633Sdfr 25177633Sdfrtypedef struct { 26177633Sdfr struct netconfig **nc_head; 27177633Sdfr struct netconfig **nc_curr; 28177633Sdfr} NCONF_HANDLE; 29177633Sdfr 30177633Sdfr/* 31177633Sdfr * nc_semantics values 32177633Sdfr */ 33177633Sdfr#define NC_TPI_CLTS 1 34177633Sdfr#define NC_TPI_COTS 2 35177633Sdfr#define NC_TPI_COTS_ORD 3 36177633Sdfr#define NC_TPI_RAW 4 37177633Sdfr 38177633Sdfr/* 39177633Sdfr * nc_flag values 40177633Sdfr */ 41177633Sdfr#define NC_NOFLAG 0x00 42177633Sdfr#define NC_VISIBLE 0x01 43177633Sdfr#define NC_BROADCAST 0x02 44177633Sdfr 45177633Sdfr/* 46177633Sdfr * nc_protofmly values 47177633Sdfr */ 48177633Sdfr#define NC_NOPROTOFMLY "-" 49177633Sdfr#define NC_LOOPBACK "loopback" 50177633Sdfr#define NC_INET "inet" 51177633Sdfr#define NC_INET6 "inet6" 52177633Sdfr#define NC_IMPLINK "implink" 53177633Sdfr#define NC_PUP "pup" 54177633Sdfr#define NC_CHAOS "chaos" 55177633Sdfr#define NC_NS "ns" 56177633Sdfr#define NC_NBS "nbs" 57177633Sdfr#define NC_ECMA "ecma" 58177633Sdfr#define NC_DATAKIT "datakit" 59177633Sdfr#define NC_CCITT "ccitt" 60177633Sdfr#define NC_SNA "sna" 61177633Sdfr#define NC_DECNET "decnet" 62177633Sdfr#define NC_DLI "dli" 63177633Sdfr#define NC_LAT "lat" 64177633Sdfr#define NC_HYLINK "hylink" 65177633Sdfr#define NC_APPLETALK "appletalk" 66177633Sdfr#define NC_NIT "nit" 67177633Sdfr#define NC_IEEE802 "ieee802" 68177633Sdfr#define NC_OSI "osi" 69177633Sdfr#define NC_X25 "x25" 70177633Sdfr#define NC_OSINET "osinet" 71177633Sdfr#define NC_GOSIP "gosip" 72177633Sdfr 73177633Sdfr/* 74177633Sdfr * nc_proto values 75177633Sdfr */ 76177633Sdfr#define NC_NOPROTO "-" 77177633Sdfr#define NC_TCP "tcp" 78177633Sdfr#define NC_UDP "udp" 79177633Sdfr#define NC_ICMP "icmp" 80177633Sdfr 81177633Sdfr__BEGIN_DECLS 82177633Sdfrvoid *setnetconfig(void); 83177633Sdfrstruct netconfig *getnetconfig(void *); 84177633Sdfrstruct netconfig *getnetconfigent(const char *); 85177633Sdfrvoid freenetconfigent(struct netconfig *); 86177633Sdfrint endnetconfig(void *); 87177633Sdfr 88177633Sdfr#ifndef _KERNEL 89177633Sdfrvoid *setnetpath(void); 90177633Sdfrstruct netconfig *getnetpath(void *); 91177633Sdfrint endnetpath(void *); 92177633Sdfr 93177633Sdfrvoid nc_perror(const char *); 94177633Sdfrchar *nc_sperror(void); 95177633Sdfr#endif 96177633Sdfr 97177633Sdfr__END_DECLS 98177633Sdfr 99177633Sdfr#endif /* _NETCONFIG_H_ */ 100