Annotation of 42BSD/usr.bin/uucp/pk.h, revision 1.1

1.1     ! root        1: /*     pk.h    5.1     83/07/02        */
        !             2: 
        !             3: struct header {
        !             4:        char    sync;
        !             5:        char    ksize;
        !             6:        unsigned short sum;
        !             7:        char    cntl;
        !             8:        char    ccntl;
        !             9: };
        !            10: #define        HDRSIZ  6
        !            11: 
        !            12: struct pack {
        !            13:        short   p_state;        /* line state */
        !            14:        short   p_bits;         /* mask for getepack */
        !            15:        short   p_rsize;        /* input packet size */
        !            16:        short   p_xsize;        /* output packet size */
        !            17:        struct  header p_ihbuf; /* input header */
        !            18:        struct  header p_ohbuf; /* output header */
        !            19:        char    *p_rptr;
        !            20:        char    p_mode;
        !            21:        char    **p_ipool;
        !            22:        char    p_xcount;       /* # active output buffers */
        !            23:        char    p_rcount;
        !            24:        char    p_nout,p_tout;
        !            25:        char    p_lpsize;       /* log(psize/32) */
        !            26:        char    p_timer;
        !            27:        char    p_obusy;
        !            28:        char    p_srxmit;
        !            29:        char    p_rwindow;      /* window size */
        !            30:        char    p_swindow;
        !            31:        char    p_msg;          /* control msg */
        !            32:        char    p_rmsg;         /* repeated control msg */
        !            33:        char    p_ps,p_pr;      /* last packet sent, recv'd */
        !            34:        char    p_rpr;
        !            35:        char    p_nxtps;        /* next output seq number */
        !            36:        char    p_imap;         /* bit map of input buffers */
        !            37:        char    p_pscopy;       /* newest output packet */
        !            38:        char    *p_ob[8];       /* output buffers */
        !            39:        char    *p_ib[8];       /* input buffers */
        !            40:        char    p_os[8];        /* output buffer status */
        !            41:        char    p_is[8];        /* input buffer status */
        !            42:        short   p_osum[8];      /* output checksums */
        !            43:        short   p_isum[8];      /* input checksums */
        !            44:        DSYSTEM;
        !            45: };
        !            46: #define        CHECK   0125252
        !            47: #define        SYN     020
        !            48: #define        MOD8    7
        !            49: #define        ISCNTL(a)       ((a & 0300)==0)
        !            50: /* MIN may have been defined in <sys/param.h> */
        !            51: #undef MIN
        !            52: #define        MIN(a,b)        ((a<b)? a:b)
        !            53: 
        !            54: extern char    next[8];
        !            55: extern char    mask[8];
        !            56: extern int     npbits;
        !            57: extern int     pkactive;
        !            58: 
        !            59: /*
        !            60:  * driver state
        !            61:  */
        !            62: #define        DEAD    0
        !            63: #define        INITa   1
        !            64: #define        INITb   2
        !            65: #define        INITab  3
        !            66: #define        LIVE    010
        !            67: #define        RXMIT   020
        !            68: #define        RREJ    040
        !            69: #define PDEBUG 0200
        !            70: #define        DRAINO  0400
        !            71: #define        WAITO   01000
        !            72: #define        DOWN    02000
        !            73: #define        RCLOSE  04000
        !            74: #define        BADFRAME 020000
        !            75: 
        !            76: /*
        !            77:  * io buffer states
        !            78:  */
        !            79: #define        B_NULL  0
        !            80: #define        B_READY 1
        !            81: #define        B_SENT  2
        !            82: #define        B_RESID 010
        !            83: #define        B_COPY  020
        !            84: #define        B_MARK  040
        !            85: #define        B_SHORT 0100
        !            86: 
        !            87: /*
        !            88:  * control messages
        !            89:  */
        !            90: #define        CLOSE   1
        !            91: #define        RJ      2
        !            92: #define        SRJ     3
        !            93: #define        RR      4
        !            94: #define        INITC   5
        !            95: #define        INITB   6
        !            96: #define        INITA   7
        !            97: 
        !            98: #define        M_RJ    4
        !            99: #define        M_SRJ   010
        !           100: #define        M_RR    020
        !           101: #define        M_INITC 040
        !           102: #define        M_CLOSE 2
        !           103: #define        M_INITA 0200
        !           104: #define        M_INITB 0100
        !           105: 
        !           106: 
        !           107: 
        !           108: #define        PKOPRI  31
        !           109: #define        PKIPRI  30
        !           110: 
        !           111: /*
        !           112:  * allegra.1402, allegra!honey, Peter Honeyman. Increase PKLINES
        !           113:  * to avoid PKSTART FAILEDs.  (This is a kludge.)
        !           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 pkdebug;
        !           129: 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.