1: /* smail.h - definitions for the MH-SendMail/SMTP Interface */
   2: 
   3: 
   4: #define S_MAIL  0
   5: #define S_SEND  1
   6: #define S_SOML  2
   7: #define S_SAML  3
   8: 
   9: 
  10: struct smtp {
  11:     int     code;
  12:     int     length;
  13:     char    text[BUFSIZ];
  14: };
  15: 
  16: 
  17: int client ();
  18: int sm_init (), sm_winit (), sm_wadr (), sm_waend (), sm_wtxt (),
  19:     sm_wtend (), sm_end ();
  20: char   *rp_string ();
  21: 
  22: /*  */
  23: 
  24: /* The remainder of this file is derived from "mmdf.h" */
  25: 
  26: /*
  27:  *     Copyright (C) 1979,1980,1981,1982,1983  University of Delaware
  28:  *     Used by permission, May, 1984.
  29:  */
  30: 
  31: /*
  32:  *     MULTI-CHANNEL MEMO DISTRIBUTION FACILITY  (MMDF)
  33:  *
  34:  *
  35:  *     Copyright (C) 1979,1980,1981,1982,1983  University of Delaware
  36:  *
  37:  *     Department of Electrical Engineering
  38:  *     University of Delaware
  39:  *     Newark, Delaware  19711
  40:  *
  41:  *     Phone:  (302) 738-1163
  42:  *
  43:  *
  44:  *     This program module was developed as part of the University
  45:  *     of Delaware's Multi-Channel Memo Distribution Facility (MMDF).
  46:  *
  47:  *     Acquisition, use, and distribution of this module and its listings
  48:  *     are subject restricted to the terms of a license agreement.
  49:  *     Documents describing systems using this module must cite its source.
  50:  *
  51:  *     The above statements must be retained with all copies of this
  52:  *     program and may not be removed without the consent of the
  53:  *     University of Delaware.
  54:  *
  55:  */
  56: 
  57: /*                      Reply Codes for MMDF
  58:  *
  59:  *  Based on: "Revised FTP Reply Codes", by Jon Postel & Nancy Neigus Arpanet
  60:  *      RFC 640 / NIC 30843, in the "Arpanet Protocol Handbook", E.  Feinler
  61:  *      and J. Postel (eds.), NIC 7104, Network Information Center, SRI
  62:  *      International:  Menlo Park, CA.  (NTIS AD-A0038901)
  63:  *
  64:  *  Actual values are different, but scheme is same.  Codes must fit into
  65:  *  8-bits (to pass on exit() calls); fields are packed 2-3-3 and interpreted
  66:  *  as octal numbers.
  67:  *
  68:  *  Basic format:
  69:  *
  70:  *      0yz: positive completion; entire action done
  71:  *      1yz: positive intermediate; only part done
  72:  *      2yz: Transient negative completion; may work later
  73:  *      3yz: Permanent negative completion; you lose forever
  74:  *
  75:  *      x0z: syntax
  76:  *      x1z: general; doesn't fit any other category
  77:  *      x2z: connections; truly transfer-related
  78:  *      x3z: user/authentication/account
  79:  *      x4x: mail
  80:  *      x5z: file system
  81:  *
  82:  *      3-bit z field is unique to the reply.  In the following,
  83:  *      the RP_xVAL defines are available for masking to obtain a field.
  84:  */
  85: 
  86: /*  */
  87: 
  88: /***************  FIELD DEFINITIONS & BASIC VALUES  ******************* */
  89: 
  90: /*          Field 1:  Basic degree of success (2-bits)                  */
  91: 
  92: #define RP_BTYP '\200'            /* good vs. bad; on => bad		*/
  93: 
  94: #define RP_BVAL '\300'            /* basic degree of success		*/
  95: 
  96: #define RP_BOK  '\000'            /* went fine; all done                */
  97: #define RP_BPOK '\100'            /* only the first part got done       */
  98: #define RP_BTNO '\200'            /* temporary failure; try later       */
  99: #define RP_BNO  '\300'            /* not now, nor never; you lose       */
 100: 
 101: /*          Field 2:  Basic domain of discourse (3-bits)                */
 102: 
 103: #define RP_CVAL '\070'            /* basic category (domain) of reply   */
 104: 
 105: #define RP_CSYN '\000'            /* purely a matter of form            */
 106: #define RP_CGEN '\010'            /* couldn't find anywhere else for it */
 107: #define RP_CCON '\020'            /* data-transfer-related issue        */
 108: #define RP_CUSR '\030'            /* pertaining to the user             */
 109: #define RP_CMAI '\040'            /* specific to mail semantics         */
 110: #define RP_CFIL '\050'            /* file system                        */
 111: #define RP_CLIO '\060'            /* local i/o system                   */
 112: 
 113: /*          Field 3:  Specific value for this reply (3-bits)            */
 114: 
 115: #define RP_SVAL '\007'            /* specific value of reply            */
 116: 
 117: /*  */
 118: 
 119: /*********************  SPECIFIC SUCCESS VALUES  ********************** */
 120: 
 121: 
 122: /*                        Complete Success                              */
 123: 
 124: #define RP_DONE (RP_BOK | RP_CGEN | '\000')
 125:                   /* done (e.g., w/transaction)         */
 126: #define RP_OK   (RP_BOK | RP_CGEN | '\001')
 127:                   /* general-purpose OK                 */
 128: 
 129: #define RP_MOK  (RP_BOK | RP_CMAI | '\000')
 130:                   /* message is accepted (w/text)       */
 131: 
 132: 
 133: /*                        Partial Success                               */
 134: 
 135: #define RP_MAST (RP_BPOK| RP_CGEN | '\000')
 136:                   /* you are the requestor              */
 137: #define RP_SLAV (RP_BPOK| RP_CGEN | '\001')
 138:                   /* you are the requestee              */
 139: #define RP_AOK  (RP_BPOK| RP_CMAI | '\000')
 140:                   /* message address is accepted        */
 141: 
 142: /*  */
 143: 
 144: /* ********************  SPECIFIC FALURE VALUES  ********************** */
 145: 
 146: 
 147: /*                        Partial Failure                               */
 148: 
 149: #define RP_AGN  (RP_BTNO | RP_CGEN | '\000')
 150:                   /* not now; maybe later               */
 151: #define RP_TIME (RP_BTNO | RP_CGEN | '\001')
 152:                   /* timeout                            */
 153: #define RP_NOOP (RP_BTNO | RP_CGEN | '\002')
 154:                   /* no-op; nothing done, this time     */
 155: #define RP_EOF  (RP_BTNO | RP_CGEN | '\003')
 156:                   /* encountered an end of file         */
 157: 
 158: #define RP_NET  (RP_BTNO | RP_CCON | '\000')
 159:                   /* channel went bad                   */
 160: #define RP_BHST (RP_BTNO | RP_CCON | '\001')
 161:                   /* foreign host screwed up            */
 162: #define RP_DHST (RP_BTNO | RP_CCON | '\002')
 163:                   /* host went away                     */
 164: #define RP_NIO  (RP_BTNO | RP_CCON | '\004')
 165:                   /* general net i/o problem            */
 166: 
 167: #define RP_FIO  (RP_BTNO | RP_CFIL | '\000')
 168:                   /* error reading/writing file         */
 169: #define RP_FCRT (RP_BTNO | RP_CFIL | '\001')
 170:                   /* unable to create file              */
 171: #define RP_FOPN (RP_BTNO | RP_CFIL | '\002')
 172:                   /* unable to open file                */
 173: #define RP_LIO  (RP_BTNO | RP_CLIO | '\000')
 174:                   /* general local i/o problem          */
 175: #define RP_LOCK (RP_BTNO | RP_CLIO | '\001')
 176:                   /* resource currently locked          */
 177: 
 178: 
 179: /*                       Complete Failure                               */
 180: 
 181: #define RP_MECH (RP_BNO | RP_CGEN | '\000')
 182:                   /* bad mechanism/path; try alternate? */
 183: #define RP_NO   (RP_BNO | RP_CGEN | '\001')
 184:                   /* general-purpose NO                 */
 185: 
 186: #define RP_PROT (RP_BNO | RP_CCON | '\000')
 187:                   /* general prototocol error           */
 188: 
 189: #define RP_RPLY (RP_BNO | RP_CCON | '\001')
 190:                   /* bad reply code (PERMANENT ERROR)   */
 191: 
 192: #define RP_NDEL (RP_BNO | RP_CMAI | '\000')
 193:                   /* couldn't deliver                   */
 194: 
 195: #define RP_HUH  (RP_BNO | RP_CSYN | '\000')
 196:                   /* couldn't parse the request         */
 197: #define RP_NCMD (RP_BNO | RP_CSYN | '\001')
 198:                   /* no such command defined            */
 199: #define RP_PARM (RP_BNO | RP_CSYN | '\002')
 200:                   /* bad parameter                      */
 201: #define RP_UCMD (RP_BNO | RP_CSYN | '\003')
 202:                   /* command not implemented            */
 203: #define RP_USER (RP_BNO | RP_CUSR | '\000')
 204:                   /* unknown user                       */
 205: 
 206: /*  */
 207: 
 208: /*              PSEUDO-FUNCTIONS TO ACCESS REPLY INFO                   */
 209: 
 210: #define rp_gval(val)    ((char) (val))
 211:                   /* get the entire return value        */
 212: 
 213: 
 214: /*  The next three give the field's bits, within the whole value        */
 215: 
 216: #define rp_gbval(val)   (rp_gval (val) & RP_BVAL)
 217:                   /* get the basic part of return value */
 218: #define rp_gcval(val)   (rp_gval (val) & RP_CVAL)
 219:                   /* get the domain part of value       */
 220: #define rp_gsval(val)   (rp_gval (val) & RP_SVAL)
 221:                   /* get the specific part of value     */
 222: 
 223: 
 224: /*  The next three give the numeric value withing the field             */
 225: 
 226: #define rp_gbbit(val)   ((rp_gval (val) >> 6) & 03)
 227:                   /* get the basic part right-shifted   */
 228: #define rp_gcbit(val)   ((rp_gval (val) >> 3 ) & 07)
 229:                   /* get the domain part right-shifted  */
 230: #define rp_gsbit(val)   (rp_gval (val) & 07)
 231:                   /* get the specific part right-shifted */
 232: 
 233: 
 234: /* MACHINE DEPENDENCY:  The following treat the value as strictly numeric.
 235:  *                      It relies on the negative values being numerically
 236:  *                      negative.
 237:  */
 238: 
 239: #define rp_isgood(val)  (rp_gval (val) >= 0)
 240:                   /* is return value positive?          */
 241: #define rp_isbad(val)   (rp_gval (val) < 0)
 242:                   /* is return value negative?          */

Defined struct's

smtp defined in line 10; used 6 times

Defined macros

RP_AGN defined in line 149; never used
RP_AOK defined in line 139; never used
RP_BHST defined in line 160; used 5 times
RP_BNO defined in line 99; used 10 times
RP_BOK defined in line 96; used 3 times
RP_BPOK defined in line 97; used 3 times
RP_BTNO defined in line 98; used 13 times
RP_BTYP defined in line 92; never used
RP_BVAL defined in line 94; used 1 times
RP_CCON defined in line 107; used 6 times
RP_CFIL defined in line 110; used 3 times
RP_CGEN defined in line 106; used 10 times
RP_CLIO defined in line 111; used 2 times
RP_CMAI defined in line 109; used 3 times
RP_CSYN defined in line 105; used 4 times
RP_CUSR defined in line 108; used 1 times
RP_CVAL defined in line 103; used 1 times
RP_DHST defined in line 162; never used
RP_DONE defined in line 124; never used
RP_EOF defined in line 155; never used
RP_FCRT defined in line 169; never used
RP_FIO defined in line 167; never used
RP_FOPN defined in line 171; never used
RP_HUH defined in line 195; never used
RP_LIO defined in line 173; never used
RP_LOCK defined in line 175; never used
RP_MAST defined in line 135; never used
RP_MECH defined in line 181; used 2 times
RP_MOK defined in line 129; used 3 times
RP_NCMD defined in line 197; never used
RP_NDEL defined in line 192; used 2 times
RP_NET defined in line 158; never used
RP_NIO defined in line 164; never used
RP_NO defined in line 183; used 3 times
RP_NOOP defined in line 153; never used
RP_OK defined in line 126; used 14 times
RP_PARM defined in line 199; used 2 times
RP_PROT defined in line 186; never used
RP_RPLY defined in line 189; used 7 times
RP_SLAV defined in line 137; never used
RP_SVAL defined in line 115; used 1 times
RP_TIME defined in line 151; never used
RP_UCMD defined in line 201; never used
RP_USER defined in line 203; used 1 times
S_SAML defined in line 7; used 2 times
S_SEND defined in line 5; used 2 times
S_SOML defined in line 6; used 2 times
rp_gbbit defined in line 226; never used
rp_gbval defined in line 216; never used
rp_gcbit defined in line 228; never used
rp_gcval defined in line 218; never used
rp_gsbit defined in line 230; never used
rp_gsval defined in line 220; never used
rp_gval defined in line 210; used 10 times
rp_isbad defined in line 241; used 54 times
rp_isgood defined in line 239; never used

Usage of this include

Last modified: 1986-04-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1641
Valid CSS Valid XHTML 1.0 Strict