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