Annotation of 43BSD/usr.bin/uucp/pk.h, revision 1.1.1.1

1.1       root        1: /*     pk.h    5.4     86/01/06        */
                      2: 
                      3: struct header {
                      4:        char    sync;
                      5:        char    ksize;
                      6:        unsigned short sum;
                      7:        char    cntl;
                      8:        char    ccntl;
                      9: };
                     10: 
                     11: #define        HDRSIZ          6       /* Packet header size */
                     12: #define        PACKSIZE        64      /* Standard packet size */
                     13: #define WINDOWS                3
                     14: 
                     15: #define TAILSIZE       2       /* Number of trailing nulls after packet    */
                     16: 
                     17: struct pack {
                     18:        short   p_state;        /* line state */
                     19:        short   p_bits;         /* mask for getepack */
                     20:        short   p_rsize;        /* input packet size */
                     21:        short   p_xsize;        /* output packet size */
                     22:        struct  header p_ihbuf; /* input header */
                     23:        struct  header p_ohbuf; /* output header */
                     24:        char    *p_rptr;
                     25:        char    p_mode;
                     26:        char    **p_ipool;
                     27:        char    p_xcount;       /* # active output buffers */
                     28:        char    p_rcount;
                     29:        char    p_nout,p_tout;
                     30:        char    p_lpsize;       /* log(psize/32) */
                     31:        char    p_timer;
                     32:        char    p_obusy;
                     33:        char    p_srxmit;
                     34:        char    p_rwindow;      /* window size */
                     35:        char    p_swindow;
                     36:        char    p_msg;          /* control msg */
                     37:        char    p_rmsg;         /* repeated control msg */
                     38:        char    p_ps,p_pr;      /* last packet sent, recv'd */
                     39:        char    p_rpr;
                     40:        char    p_nxtps;        /* next output seq number */
                     41:        char    p_imap;         /* bit map of input buffers */
                     42:        char    p_pscopy;       /* newest output packet */
                     43:        char    *p_ob[8];       /* output buffers */
                     44:        char    *p_ib[8];       /* input buffers */
                     45:        char    p_os[8];        /* output buffer status */
                     46:        char    p_is[8];        /* input buffer status */
                     47:        short   p_osum[8];      /* output checksums */
                     48:        short   p_isum[8];      /* input checksums */
                     49:        int p_ifn, p_ofn;
                     50: };
                     51: 
                     52: #define        CHECK   0125252
                     53: #define        SYN     020
                     54: #define        MOD8    7
                     55: #define        ISCNTL(a)       ((a & 0300)==0)
                     56: /* MIN may have been defined in <sys/param.h> */
                     57: #undef MIN
                     58: #define        MIN(a,b)        ((a<b)? a:b)
                     59: 
                     60: extern char    next[8];
                     61: extern char    mask[8];
                     62: 
                     63: /*
                     64:  * driver state
                     65:  */
                     66: #define        DEAD    0
                     67: #define        INITa   1
                     68: #define        INITb   2
                     69: #define        INITab  3
                     70: #define        LIVE    010
                     71: #define        RXMIT   020
                     72: #define        RREJ    040
                     73: #define PDEBUG 0200
                     74: #define        DRAINO  0400
                     75: #define        WAITO   01000
                     76: #define        DOWN    02000
                     77: #define        RCLOSE  04000
                     78: #define        BADFRAME 020000
                     79: 
                     80: /*
                     81:  * io buffer states
                     82:  */
                     83: #define        B_NULL  0
                     84: #define        B_READY 1
                     85: #define        B_SENT  2
                     86: #define        B_RESID 010
                     87: #define        B_COPY  020
                     88: #define        B_MARK  040
                     89: #define        B_SHORT 0100
                     90: 
                     91: /* read or write */
                     92: 
                     93: #define B_WRITE        0
                     94: #define B_READ 1
                     95: 
                     96: /*
                     97:  * control messages
                     98:  */
                     99: #define        CLOSE   1
                    100: #define        RJ      2
                    101: #define        SRJ     3
                    102: #define        RR      4
                    103: #define        INITC   5
                    104: #define        INITB   6
                    105: #define        INITA   7
                    106: 
                    107: #define        M_CLOSE 002
                    108: #define        M_RJ    004
                    109: #define        M_SRJ   010
                    110: #define        M_RR    020
                    111: #define        M_INITC 040
                    112: #define        M_INITA 0200
                    113: #define        M_INITB 0100
                    114: 
                    115: #define        NPLINES 20
                    116: 
                    117: /*
                    118:  * packet ioctl buf
                    119:  */
                    120: struct piocb {
                    121:        unsigned t;
                    122:        short   psize;
                    123:        short   mode;
                    124:        short   state;
                    125:        char    window;
                    126: };
                    127: 
                    128: extern int pksizes[];

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.