# 2.11BSD#431 - /usr/src/local/zmodem/zmodem.h

##### Macros

    ALTCOFF           X
    CANBRK            X
    CANFC32           X
    CANFDX            X
    CANLZW            X
    CANOVIO           X
    CANRLE            X
    CANVHDR           X
    ESC8              X
    ESCCTL            X
    GOTCAN            X
    GOTCRCE           X
    GOTCRCG           X
    GOTCRCQ           X
    GOTCRCW           X
    GOTOR             X
    TESC8             X
    TESCCTL           X
    ZABORT            X
    ZACK              X
    ZATTNLEN          X
    ZBIN              X
    ZBIN32            X
    ZBINR32           X
    ZCACK1            X
    ZCAN              X
    ZCANVHDR          X
    ZCBIN             X
    ZCHALLENGE        X
    ZCNL              X
    ZCOMMAND          X
    ZCOMPL            X
    ZCRC              X
    ZCRCE             X
    ZCRCG             X
    ZCRCQ             X
    ZCRCW             X
    ZCRESUM           X
    ZDATA             X
    ZDLE              X
    ZDLEE             X
    ZEOF              X
    ZF0               X
    ZF1               X
    ZF2               X
    ZF3               X
    ZFERR             X
    ZFILE             X
    ZFIN              X
    ZFREECNT          X
    ZHEX              X
    ZMAPND            X
    ZMAXHLEN          X
    ZMAXSPLEN         X
    ZMCLOB            X
    ZMCRC             X
    ZMDIFF            X
    ZMMASK            X
    ZMNEW             X
    ZMNEWL            X
    ZMPROT            X
    ZMSKNOLOC         X
    ZNAK              X
    ZP0               X
    ZP1               X
    ZP2               X
    ZP3               X
    ZPAD              X
    ZRESC             X
    ZRINIT            X
    ZRPOS             X
    ZRQINIT           X
    ZRUB0             X
    ZRUB1             X
    ZRWOVR            X
    ZSINIT            X
    ZSKIP             X
    ZSTDERR           X
    ZTLZW             X
    ZTRLE             X
    ZVBIN             X
    ZVBIN32           X
    ZVBINR32          X
    ZVHEX             X
    ZXSPARS           X

       1: /*
       2:  *   Z M O D E M . H     Manifest constants for ZMODEM
       3:  *    application to application file transfer protocol
       4:  *    04-17-89  Chuck Forsberg Omen Technology Inc
       5:  */
       6: #define ZPAD '*'    /* 052 Padding character begins frames */
       7: #define ZDLE 030    /* Ctrl-X Zmodem escape - `ala BISYNC DLE */
       8: #define ZDLEE (ZDLE^0100)   /* Escaped ZDLE as transmitted */
       9: #define ZBIN 'A'    /* Binary frame indicator (CRC-16) */
      10: #define ZHEX 'B'    /* HEX frame indicator */
      11: #define ZBIN32 'C'  /* Binary frame with 32 bit FCS */
      12: #define ZBINR32 'D' /* RLE packed Binary frame with 32 bit FCS */
      13: #define ZVBIN 'a'   /* Binary frame indicator (CRC-16) */
      14: #define ZVHEX 'b'   /* HEX frame indicator */
      15: #define ZVBIN32 'c' /* Binary frame with 32 bit FCS */
      16: #define ZVBINR32 'd'    /* RLE packed Binary frame with 32 bit FCS */
      17: #define ZRESC   0176    /* RLE flag/escape character */
      18: #define ZMAXHLEN 16 /* Max header information length  NEVER CHANGE */
      19: #define ZMAXSPLEN 1024  /* Max subpacket length  NEVER CHANGE */
      20:
      21: /* Frame types (see array "frametypes" in zm.c) */
      22: #define ZRQINIT 0   /* Request receive init */
      23: #define ZRINIT  1   /* Receive init */
      24: #define ZSINIT 2    /* Send init sequence (optional) */
      25: #define ZACK 3      /* ACK to above */
      26: #define ZFILE 4     /* File name from sender */
      27: #define ZSKIP 5     /* To sender: skip this file */
      28: #define ZNAK 6      /* Last packet was garbled */
      29: #define ZABORT 7    /* Abort batch transfers */
      30: #define ZFIN 8      /* Finish session */
      31: #define ZRPOS 9     /* Resume data trans at this position */
      32: #define ZDATA 10    /* Data packet(s) follow */
      33: #define ZEOF 11     /* End of file */
      34: #define ZFERR 12    /* Fatal Read or Write error Detected */
      35: #define ZCRC 13     /* Request for file CRC and response */
      36: #define ZCHALLENGE 14   /* Receiver's Challenge */
      37: #define ZCOMPL 15   /* Request is complete */
      38: #define ZCAN 16     /* Other end canned session with CAN*5 */
      39: #define ZFREECNT 17 /* Request for free bytes on filesystem */
      40: #define ZCOMMAND 18 /* Command from sending program */
      41: #define ZSTDERR 19  /* Output to standard error, data follows */
      42:
      43: /* ZDLE sequences */
      44: #define ZCRCE 'h'   /* CRC next, frame ends, header packet follows */
      45: #define ZCRCG 'i'   /* CRC next, frame continues nonstop */
      46: #define ZCRCQ 'j'   /* CRC next, frame continues, ZACK expected */
      47: #define ZCRCW 'k'   /* CRC next, ZACK expected, end of frame */
      48: #define ZRUB0 'l'   /* Translate to rubout 0177 */
      49: #define ZRUB1 'm'   /* Translate to rubout 0377 */
      50:
      51: /* zdlread return values (internal) */
      52: /* -1 is general error, -2 is timeout */
      53: #define GOTOR 0400
      54: #define GOTCRCE (ZCRCE|GOTOR)   /* ZDLE-ZCRCE received */
      55: #define GOTCRCG (ZCRCG|GOTOR)   /* ZDLE-ZCRCG received */
      56: #define GOTCRCQ (ZCRCQ|GOTOR)   /* ZDLE-ZCRCQ received */
      57: #define GOTCRCW (ZCRCW|GOTOR)   /* ZDLE-ZCRCW received */
      58: #define GOTCAN  (GOTOR|030) /* CAN*5 seen */
      59:
      60: /* Byte positions within header array */
      61: #define ZF0 3   /* First flags byte */
      62: #define ZF1 2
      63: #define ZF2 1
      64: #define ZF3 0
      65: #define ZP0 0   /* Low order 8 bits of position */
      66: #define ZP1 1
      67: #define ZP2 2
      68: #define ZP3 3   /* High order 8 bits of file position */
      69:
      70: /* Bit Masks for ZRINIT flags byte ZF0 */
      71: #define CANFDX  01  /* Rx can send and receive true FDX */
      72: #define CANOVIO 02  /* Rx can receive data during disk I/O */
      73: #define CANBRK  04  /* Rx can send a break signal */
      74: #define CANRLE  010 /* Receiver can decode RLE */
      75: #define CANLZW  020 /* Receiver can uncompress */
      76: #define CANFC32 040 /* Receiver can use 32 bit Frame Check */
      77: #define ESCCTL 0100 /* Receiver expects ctl chars to be escaped */
      78: #define ESC8   0200 /* Receiver expects 8th bit to be escaped */
      79:
      80: /* Bit Masks for ZRINIT flags byte ZF1 */
      81: #define CANVHDR 01  /* Variable headers OK */
      82:
      83: /* Parameters for ZSINIT frame */
      84: #define ZATTNLEN 32 /* Max length of attention string */
      85: #define ALTCOFF ZF1 /* Offset to alternate canit string, 0 if not used */
      86: /* Bit Masks for ZSINIT flags byte ZF0 */
      87: #define TESCCTL 0100    /* Transmitter expects ctl chars to be escaped */
      88: #define TESC8   0200    /* Transmitter expects 8th bit to be escaped */
      89:
      90: /* Parameters for ZFILE frame */
      91: /* Conversion options one of these in ZF0 */
      92: #define ZCBIN   1   /* Binary transfer - inhibit conversion */
      93: #define ZCNL    2   /* Convert NL to local end of line convention */
      94: #define ZCRESUM 3   /* Resume interrupted file transfer */
      95: /* Management include options, one of these ored in ZF1 */
      96: #define ZMSKNOLOC   0200    /* Skip file if not present at rx */
      97: /* Management options, one of these ored in ZF1 */
      98: #define ZMMASK  037 /* Mask for the choices below */
      99: #define ZMNEWL  1   /* Transfer if source newer or longer */
     100: #define ZMCRC   2   /* Transfer if different file CRC or length */
     101: #define ZMAPND  3   /* Append contents to existing file (if any) */
     102: #define ZMCLOB  4   /* Replace existing file */
     103: #define ZMNEW   5   /* Transfer if source newer */
     104:     /* Number 5 is alive ... */
     105: #define ZMDIFF  6   /* Transfer if dates or lengths different */
     106: #define ZMPROT  7   /* Protect destination file */
     107: /* Transport options, one of these in ZF2 */
     108: #define ZTLZW   1   /* Lempel-Ziv compression */
     109: #define ZTRLE   3   /* Run Length encoding */
     110: /* Extended options for ZF3, bit encoded */
     111: #define ZXSPARS 64  /* Encoding for sparse file operations */
     112: #define ZCANVHDR    01  /* Variable headers OK */
     113: /* Receiver window size override */
     114: #define ZRWOVR 4    /* byte position for receive window override/256 */
     115:
     116: /* Parameters for ZCOMMAND frame ZF0 (otherwise 0) */
     117: #define ZCACK1  1   /* Acknowledge, then do command */
     118:
     119: long rclhdr();
     120:
     121: /* Globals used by ZMODEM functions */
     122: extern Rxframeind;  /* ZBIN ZBIN32, or ZHEX type of frame */
     123: extern Rxtype;      /* Type of header received */
     124: extern Rxcount;     /* Count of data bytes received */
     125: extern Rxtimeout;   /* Tenths of seconds to wait for something */
     126: extern long Rxpos;  /* Received file position */
     127: extern long Txpos;  /* Transmitted file position */
     128: extern Txfcs32;     /* TURE means send binary frames with 32 bit FCS */
     129: extern Crc32t;      /* Display flag indicating 32 bit CRC being sent */
     130: extern Crc32;       /* Display flag indicating 32 bit CRC being received */
     131: extern Znulls;      /* Number of nulls to send at beginning of ZDATA hdr */
     132: extern char Attn[ZATTNLEN+1];   /* Attention string rx sends to tx on err */
     133: extern char *Altcan;    /* Alternate canit string */
     134:
     135: /* End of ZMODEM.H */

#### Defined macros

ALTCOFF defined in line 85; used 1 times

- in /usr/src/local/zmodem/sz.c line 1524

CANBRK defined in line 73; used 1 times

- in /usr/src/local/zmodem/rz.c line 1147

CANFC32 defined in line 76; used 3 times

- in /usr/src/local/zmodem/rz.c line 1147-1149(2)
- in /usr/src/local/zmodem/sz.c line 1396

CANFDX defined in line 71; used 4 times

- in /usr/src/local/zmodem/rz.c line 1147-1149(2)
- in /usr/src/local/zmodem/sz.c line 1399
- in /usr/src/local/zmodem/zm.c line 49

CANLZW defined in line 75; never used
CANOVIO defined in line 72; used 2 times

- in /usr/src/local/zmodem/rz.c line 1147-1149(2)

CANRLE defined in line 74; used 3 times

- in /usr/src/local/zmodem/rz.c line 1153
- in /usr/src/local/zmodem/sz.c line 1493, 1608

CANVHDR defined in line 81; used 2 times

- in /usr/src/local/zmodem/rz.c line 1154
- in /usr/src/local/zmodem/sz.c line 1395

ESC8 defined in line 78; never used
ESCCTL defined in line 77; never used
GOTCAN defined in line 58; used 1 times

- in /usr/src/local/zmodem/zm.c line 839

GOTCRCE defined in line 54; used 2 times

- in /usr/src/local/zmodem/zm.c line 322, 384

GOTCRCG defined in line 55; never used
GOTCRCQ defined in line 56; never used
GOTCRCW defined in line 57; used 3 times

- in /usr/src/local/zmodem/rz.c line 1178, 1184, 1200

GOTOR defined in line 53; used 6 times

- in line 54-58(5)
- in /usr/src/local/zmodem/zm.c line 844

TESC8 defined in line 88; never used
TESCCTL defined in line 87; used 5 times

- in /usr/src/local/zmodem/rz.c line 1152, 1183
- in /usr/src/local/zmodem/sz.c line 1397, 1518, 1527

ZABORT defined in line 29; never used
ZACK defined in line 25; used 9 times

- in /usr/src/local/zmodem/rz.c line 1186, 1193, 1402, 1414
- in /usr/src/local/zmodem/sz.c line 1387, 1780, 1802, 1877
- in /usr/src/local/zmodem/zm.c line 217

ZATTNLEN defined in line 84; used 4 times

- in line 132
- in /usr/src/local/zmodem/rz.c line 1184
- in /usr/src/local/zmodem/sz.c line 1531
- in /usr/src/local/zmodem/zm.c line 75

ZBIN defined in line 9; used 1 times

- in /usr/src/local/zmodem/zm.c line 143

ZBIN32 defined in line 11; used 1 times

- in /usr/src/local/zmodem/zm.c line 136

ZBINR32 defined in line 12; used 1 times

- in /usr/src/local/zmodem/zm.c line 133

ZCACK1 defined in line 117; used 3 times

- in /usr/src/local/zmodem/rz.c line 1201, 1211
- in /usr/src/local/zmodem/sz.c line 416

ZCAN defined in line 38; used 5 times

- in /usr/src/local/zmodem/zm.c line 327, 389, 442, 462, 560

ZCANVHDR defined in line 112; used 1 times

- in /usr/src/local/zmodem/rz.c line 1173

ZCBIN defined in line 92; used 2 times

- in /usr/src/local/zmodem/rz.c line 750
- in /usr/src/local/zmodem/sz.c line 408

ZCHALLENGE defined in line 36; never used
ZCNL defined in line 93; used 2 times

- in /usr/src/local/zmodem/rz.c line 748
- in /usr/src/local/zmodem/sz.c line 405

ZCOMMAND defined in line 40; used 3 times

- in /usr/src/local/zmodem/sz.c line 579, 1503, 1931

ZCOMPL defined in line 37; used 4 times

- in /usr/src/local/zmodem/rz.c line 428, 1207, 1213, 1222

ZCRC defined in line 35; used 1 times

- in /usr/src/local/zmodem/sz.c line 1593

ZCRCE defined in line 44; used 5 times

- in line 54
- in /usr/src/local/zmodem/sz.c line 1744, 1786, 1806
- in /usr/src/local/zmodem/zm.c line 232

ZCRCG defined in line 45; used 2 times

- in line 55
- in /usr/src/local/zmodem/sz.c line 1754

ZCRCQ defined in line 46; used 4 times

- in line 56
- in /usr/src/local/zmodem/sz.c line 1752, 1799-1800(2)

ZCRCW defined in line 47; used 9 times

- in line 57
- in /usr/src/local/zmodem/sz.c line 1531, 1563, 1746-1750(3), 1760, 1932
- in /usr/src/local/zmodem/zm.c line 250

ZCRESUM defined in line 94; used 2 times

- in /usr/src/local/zmodem/sz.c line 459-461(2)

ZDATA defined in line 32; used 3 times

- in /usr/src/local/zmodem/sz.c line 1698
- in /usr/src/local/zmodem/zm.c line 125, 155

ZDLE defined in line 7; used 8 times

- in line 8
- in /usr/src/local/zmodem/zm.c line 129, 195, 244, 270, 739, 753, 760

ZDLEE defined in line 8; never used
ZEOF defined in line 33; used 1 times

- in /usr/src/local/zmodem/sz.c line 1818

ZF0 defined in line 61; used 13 times

- in /usr/src/local/zmodem/rz.c line 1147-1153(4), 1170, 1183, 1199
- in /usr/src/local/zmodem/sz.c line 579, 1394, 1503, 1527, 1556, 1930

ZF1 defined in line 62; used 6 times

- in line 85
- in /usr/src/local/zmodem/rz.c line 1154, 1171
- in /usr/src/local/zmodem/sz.c line 1395, 1557-1559(2)

ZF2 defined in line 63; used 2 times

- in /usr/src/local/zmodem/rz.c line 1172
- in /usr/src/local/zmodem/sz.c line 1560

ZF3 defined in line 64; used 3 times

- in /usr/src/local/zmodem/rz.c line 1162, 1173
- in /usr/src/local/zmodem/sz.c line 1561

ZFERR defined in line 34; used 1 times

- in /usr/src/local/zmodem/rz.c line 1312

ZFILE defined in line 26; used 2 times

- in /usr/src/local/zmodem/rz.c line 1179
- in /usr/src/local/zmodem/sz.c line 1562

ZFIN defined in line 30; used 4 times

- in /usr/src/local/zmodem/rz.c line 1209, 1503
- in /usr/src/local/zmodem/sz.c line 1897
- in /usr/src/local/zmodem/zm.c line 217

ZFREECNT defined in line 39; never used
ZHEX defined in line 10; used 1 times

- in /usr/src/local/zmodem/zm.c line 201

ZMAPND defined in line 101; used 3 times

- in /usr/src/local/zmodem/rz.c line 292, 752
- in /usr/src/local/zmodem/sz.c line 399

ZMAXHLEN defined in line 18; used 7 times

- in /usr/src/local/zmodem/zm.c line 64-65(2), 506, 516, 529, 539, 551

ZMAXSPLEN defined in line 19; never used
ZMCLOB defined in line 102; used 2 times

- in /usr/src/local/zmodem/rz.c line 757
- in /usr/src/local/zmodem/sz.c line 503

ZMCRC defined in line 100; used 1 times

- in /usr/src/local/zmodem/sz.c line 460

ZMDIFF defined in line 105; never used
ZMMASK defined in line 98; used 2 times

- in /usr/src/local/zmodem/rz.c line 757
- in /usr/src/local/zmodem/sz.c line 460

ZMNEW defined in line 103; used 1 times

- in /usr/src/local/zmodem/sz.c line 453

ZMNEWL defined in line 99; used 1 times

- in /usr/src/local/zmodem/sz.c line 451

ZMPROT defined in line 106; used 2 times

- in /usr/src/local/zmodem/rz.c line 306
- in /usr/src/local/zmodem/sz.c line 457

ZMSKNOLOC defined in line 96; used 1 times

- in /usr/src/local/zmodem/sz.c line 1559

ZNAK defined in line 28; used 5 times

- in /usr/src/local/zmodem/rz.c line 1180, 1189, 1215
- in /usr/src/local/zmodem/sz.c line 1506, 1885

ZP0 defined in line 65; used 4 times

- in /usr/src/local/zmodem/sz.c line 1398
- in /usr/src/local/zmodem/zm.c line 556, 897, 913

ZP1 defined in line 66; used 4 times

- in /usr/src/local/zmodem/sz.c line 1398
- in /usr/src/local/zmodem/zm.c line 555, 898, 912

ZP2 defined in line 67; used 3 times

- in /usr/src/local/zmodem/zm.c line 554, 899, 911

ZP3 defined in line 68; used 3 times

- in /usr/src/local/zmodem/zm.c line 553, 900, 910

ZPAD defined in line 6; used 5 times

- in /usr/src/local/zmodem/sz.c line 1569
- in /usr/src/local/zmodem/zm.c line 129, 195(2), 480

ZRESC defined in line 17; never used
ZRINIT defined in line 23; used 3 times

- in /usr/src/local/zmodem/rz.c line 245, 1158, 1175

ZRPOS defined in line 31; used 2 times

- in /usr/src/local/zmodem/rz.c line 1279
- in /usr/src/local/zmodem/sz.c line 1846

ZRQINIT defined in line 22; used 2 times

- in /usr/src/local/zmodem/sz.c line 580, 1391

ZRUB0 defined in line 48; never used
ZRUB1 defined in line 49; never used
ZRWOVR defined in line 114; never used
ZSINIT defined in line 24; used 2 times

- in /usr/src/local/zmodem/sz.c line 1527-1530(2)

ZSKIP defined in line 27; used 2 times

- in /usr/src/local/zmodem/rz.c line 1157, 1269

ZSTDERR defined in line 41; never used
ZTLZW defined in line 108; never used
ZTRLE defined in line 109; used 3 times

- in /usr/src/local/zmodem/sz.c line 506, 1493, 1620

ZVBIN defined in line 13; used 1 times

- in /usr/src/local/zmodem/zm.c line 139

ZVBIN32 defined in line 15; used 1 times

- in /usr/src/local/zmodem/zm.c line 136

ZVBINR32 defined in line 16; used 1 times

- in /usr/src/local/zmodem/zm.c line 133

ZVHEX defined in line 14; used 1 times

- in /usr/src/local/zmodem/zm.c line 197

ZXSPARS defined in line 111; never used

#### Usage of this include

zmodem.h used 1 times

- in /usr/src/local/zmodem/zm.c line 50

Last modified: 1992-06-14 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 2086 |