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