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