|
|
1.1 root 1: /* configdefs.h 1.4 83/08/11 */
2:
3: /*
4: * This file contains the definitions of data structures used in
5: * configuring the network behavior of Mail when replying.
6: */
7:
8: /*
9: * The following constants are used when you are running 4.1a bsd or
10: * later on a local network. Under control of the #define flag
11: * GETHOST, the host name is determined dynamically using the
12: * gethostname() system call. The name thus found is inserted
13: * into the host table slot whose name was originally EMPTY.
14: */
15: #define EMPTY "** empty **"
16: #define EMPTYID 'E'
17:
18: /*
19: * The following data structure is the host table. You must have
20: * an entry here for your own machine, plus any special stuff you
21: * expect the mailer to know about. If you have #define'd GETHOST
22: * in v7.local.h, you needn't add your machine to the host table.
23: * Not all hosts need be here, however:
24: * Mail can dope out stuff about hosts on the fly by looking
25: * at addresses. The machines needed here are:
26: * 1) The local machine
27: * 2) Any machines on the path to a network gateway
28: * 3) Any machines with nicknames that you want to have considered
29: * the same.
30: * The machine id letters can be anything you like and are not seen
31: * externally. Be sure not to use characters with the 0200 bit set --
32: * these have special meanings.
33: */
34: struct netmach {
35: char *nt_machine;
36: char nt_mid;
37: short nt_type;
38: };
39:
40: /*
41: * Network type codes. Basically, there is one for each different
42: * network, if the network can be discerned by the separator character,
43: * such as @ for the arpa net. The purpose of these codes is to
44: * coalesce cases where more than one character means the same thing,
45: * such as % and @ for the arpanet. Also, the host table uses a
46: * bit map of these codes to show what it is connected to.
47: * BN -- connected to Bell Net.
48: * AN -- connected to ARPA net, SN -- connected to Schmidt net.
49: */
50: #define AN 1 /* Connected to ARPA net */
51: #define BN 2 /* Connected to BTL net */
52: #define SN 4 /* Connected to Schmidt net */
53:
54: /*
55: * Data structure for table mapping network characters to network types.
56: */
57: struct ntypetab {
58: char nt_char; /* Actual character separator */
59: int nt_bcode; /* Type bit code */
60: };
61:
62: /*
63: * Codes for the "kind" of a network. IMPLICIT means that if there are
64: * physically several machines on the path, one does not list them in the
65: * address. The arpa net is like this. EXPLICIT means you list them,
66: * as in UUCP.
67: * By the way, this distinction means we lose if anyone actually uses the
68: * arpa net subhost convention: name@subhost@arpahost
69: */
70: #define IMPLICIT 1
71: #define EXPLICIT 2
72:
73: /*
74: * Table for mapping a network code to its type -- IMPLICIT routing or
75: * IMPLICIT routing.
76: */
77: struct nkindtab {
78: int nk_type; /* Its bit code */
79: int nk_kind; /* Whether explicit or implicit */
80: };
81:
82: /*
83: * The following table gives the order of preference of the various
84: * networks. Thus, if we have a choice of how to get somewhere, we
85: * take the preferred route.
86: */
87: struct netorder {
88: short no_stat;
89: char no_char;
90: };
91:
92: /*
93: * External declarations for above defined tables.
94: */
95: #ifndef CONFIGFILE
96: extern struct netmach netmach[1];
97: extern struct ntypetab ntypetab[1];
98: extern struct nkindtab nkindtab[1];
99: extern struct netorder netorder[1];
100: extern char *metanet;
101: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.