1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 23*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 24*7c478bd9Sstevel@tonic-gate 25*7c478bd9Sstevel@tonic-gate 26*7c478bd9Sstevel@tonic-gate /* 27*7c478bd9Sstevel@tonic-gate * University Copyright- Copyright (c) 1982, 1986, 1988 28*7c478bd9Sstevel@tonic-gate * The Regents of the University of California 29*7c478bd9Sstevel@tonic-gate * All Rights Reserved 30*7c478bd9Sstevel@tonic-gate * 31*7c478bd9Sstevel@tonic-gate * University Acknowledgment- Portions of this document are derived from 32*7c478bd9Sstevel@tonic-gate * software developed by the University of California, Berkeley, and its 33*7c478bd9Sstevel@tonic-gate * contributors. 34*7c478bd9Sstevel@tonic-gate */ 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 37*7c478bd9Sstevel@tonic-gate 38*7c478bd9Sstevel@tonic-gate /* 39*7c478bd9Sstevel@tonic-gate * mailx -- a modified version of a University of California at Berkeley 40*7c478bd9Sstevel@tonic-gate * mail program 41*7c478bd9Sstevel@tonic-gate * 42*7c478bd9Sstevel@tonic-gate * This file contains the definitions of data structures used in 43*7c478bd9Sstevel@tonic-gate * configuring the network behavior of Mail when replying. 44*7c478bd9Sstevel@tonic-gate */ 45*7c478bd9Sstevel@tonic-gate 46*7c478bd9Sstevel@tonic-gate /* 47*7c478bd9Sstevel@tonic-gate * The following constants are used when you are running 4.1a bsd or 48*7c478bd9Sstevel@tonic-gate * later on a local network. The name thus found is inserted 49*7c478bd9Sstevel@tonic-gate * into the host table slot whose name was originally EMPTY. 50*7c478bd9Sstevel@tonic-gate */ 51*7c478bd9Sstevel@tonic-gate #define EMPTY "** empty **" 52*7c478bd9Sstevel@tonic-gate #define EMPTYID 'E' 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gate /* 55*7c478bd9Sstevel@tonic-gate * The following data structure is the host table. You must have 56*7c478bd9Sstevel@tonic-gate * an entry here for your own machine, plus any special stuff you 57*7c478bd9Sstevel@tonic-gate * expect the mailer to know about. Not all hosts need be here, however: 58*7c478bd9Sstevel@tonic-gate * mailx can dope out stuff about hosts on the fly by looking 59*7c478bd9Sstevel@tonic-gate * at addresses. The machines needed here are: 60*7c478bd9Sstevel@tonic-gate * 1) The local machine 61*7c478bd9Sstevel@tonic-gate * 2) Any machines on the path to a network gateway 62*7c478bd9Sstevel@tonic-gate * 3) Any machines with nicknames that you want to have considered 63*7c478bd9Sstevel@tonic-gate * the same. 64*7c478bd9Sstevel@tonic-gate * The machine id letters can be anything you like and are not seen 65*7c478bd9Sstevel@tonic-gate * externally. Be sure not to use characters with the 0200 bit set -- 66*7c478bd9Sstevel@tonic-gate * these have special meanings. 67*7c478bd9Sstevel@tonic-gate */ 68*7c478bd9Sstevel@tonic-gate struct netmach { 69*7c478bd9Sstevel@tonic-gate char *nt_machine; 70*7c478bd9Sstevel@tonic-gate char nt_mid; 71*7c478bd9Sstevel@tonic-gate short nt_type; 72*7c478bd9Sstevel@tonic-gate }; 73*7c478bd9Sstevel@tonic-gate 74*7c478bd9Sstevel@tonic-gate /* 75*7c478bd9Sstevel@tonic-gate * Network type codes. Basically, there is one for each different 76*7c478bd9Sstevel@tonic-gate * network, if the network can be discerned by the separator character, 77*7c478bd9Sstevel@tonic-gate * such as @ for the arpa net. The purpose of these codes is to 78*7c478bd9Sstevel@tonic-gate * coalesce cases where more than one character means the same thing, 79*7c478bd9Sstevel@tonic-gate * such as % and @ for the arpanet. Also, the host table uses a 80*7c478bd9Sstevel@tonic-gate * bit map of these codes to show what it is connected to. 81*7c478bd9Sstevel@tonic-gate * BN -- connected to Bell Net. 82*7c478bd9Sstevel@tonic-gate * AN -- connected to ARPA net, SN -- connected to Schmidt net. 83*7c478bd9Sstevel@tonic-gate */ 84*7c478bd9Sstevel@tonic-gate #define AN 1 /* Connected to ARPA net */ 85*7c478bd9Sstevel@tonic-gate #define BN 2 /* Connected to BTL net */ 86*7c478bd9Sstevel@tonic-gate #define SN 4 /* Connected to Schmidt net */ 87*7c478bd9Sstevel@tonic-gate 88*7c478bd9Sstevel@tonic-gate /* 89*7c478bd9Sstevel@tonic-gate * Data structure for table mapping network characters to network types. 90*7c478bd9Sstevel@tonic-gate */ 91*7c478bd9Sstevel@tonic-gate struct ntypetab { 92*7c478bd9Sstevel@tonic-gate char nt_char; /* Actual character separator */ 93*7c478bd9Sstevel@tonic-gate int nt_bcode; /* Type bit code */ 94*7c478bd9Sstevel@tonic-gate }; 95*7c478bd9Sstevel@tonic-gate 96*7c478bd9Sstevel@tonic-gate /* 97*7c478bd9Sstevel@tonic-gate * Codes for the "kind" of a network. IMPLICIT means that if there are 98*7c478bd9Sstevel@tonic-gate * physically several machines on the path, one does not list them in the 99*7c478bd9Sstevel@tonic-gate * address. The arpa net is like this. EXPLICIT means you list them, 100*7c478bd9Sstevel@tonic-gate * as in UUCP. 101*7c478bd9Sstevel@tonic-gate * By the way, this distinction means we lose if anyone actually uses the 102*7c478bd9Sstevel@tonic-gate * arpa net subhost convention: name@subhost@arpahost 103*7c478bd9Sstevel@tonic-gate */ 104*7c478bd9Sstevel@tonic-gate #define IMPLICIT 1 105*7c478bd9Sstevel@tonic-gate #define EXPLICIT 2 106*7c478bd9Sstevel@tonic-gate 107*7c478bd9Sstevel@tonic-gate /* 108*7c478bd9Sstevel@tonic-gate * Table for mapping a network code to its type -- IMPLICIT routing or 109*7c478bd9Sstevel@tonic-gate * IMPLICIT routing. 110*7c478bd9Sstevel@tonic-gate */ 111*7c478bd9Sstevel@tonic-gate struct nkindtab { 112*7c478bd9Sstevel@tonic-gate int nk_type; /* Its bit code */ 113*7c478bd9Sstevel@tonic-gate int nk_kind; /* Whether explicit or implicit */ 114*7c478bd9Sstevel@tonic-gate }; 115*7c478bd9Sstevel@tonic-gate 116*7c478bd9Sstevel@tonic-gate /* 117*7c478bd9Sstevel@tonic-gate * The following table gives the order of preference of the various 118*7c478bd9Sstevel@tonic-gate * networks. Thus, if we have a choice of how to get somewhere, we 119*7c478bd9Sstevel@tonic-gate * take the preferred route. 120*7c478bd9Sstevel@tonic-gate */ 121*7c478bd9Sstevel@tonic-gate struct netorder { 122*7c478bd9Sstevel@tonic-gate short no_stat; 123*7c478bd9Sstevel@tonic-gate char no_char; 124*7c478bd9Sstevel@tonic-gate }; 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gate /* 127*7c478bd9Sstevel@tonic-gate * External declarations for above defined tables. 128*7c478bd9Sstevel@tonic-gate */ 129*7c478bd9Sstevel@tonic-gate extern struct netmach netmach[]; 130*7c478bd9Sstevel@tonic-gate extern struct ntypetab ntypetab[]; 131*7c478bd9Sstevel@tonic-gate extern struct nkindtab nkindtab[]; 132*7c478bd9Sstevel@tonic-gate extern struct netorder netorder[]; 133*7c478bd9Sstevel@tonic-gate extern char *metanet; 134