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