Annotation of researchv9/jerq/src/mux/proto/proto.h, revision 1.1.1.1

1.1       root        1: #ifdef XT
                      2: #ifndef        MAXPCHAN
                      3: #include       "sys/xtproto.h"
                      4: #endif
                      5: #else  XT
                      6: /*
                      7: **     Mpx -- Blit packet protocol definition
                      8: */
                      9: 
                     10: typedef        unsigned char   Pbyte;                  /* The unit of communication */
                     11: 
                     12: /*
                     13: **     Packet header
                     14: **     (if only bit fields in C were m/c independant, sigh...)
                     15: */
                     16: 
                     17: #define        P_PTYPE         0x80                    /* always set */
                     18: #define        P_CNTL          0x40                    /* TRUE if control packet */
                     19: #define        MAXPCHAN        16                      /* Maximum channel number */
                     20: #define        CBITS           4                       /* Bits for channel number */
                     21: #define        SEQMOD          4                       /* Sequence number modulus */
                     22: #define        SBITS           2                       /* Bits for sequence number */
                     23: 
                     24: /* was 64 */
                     25: #define        MAXPKTDSIZE     (124 * sizeof(Pbyte))   /* Maximum data part size */
                     26: #define        EDSIZE          (2 * sizeof(Pbyte))     /* Error detection part size */
                     27: 
                     28: #define P_channel(b)   (((b)>>SBITS) & (MAXPCHAN-1))
                     29: #define P_seq(b)       ((b) & (SEQMOD-1))
                     30: 
                     31: /*
                     32: **     Packet definition for maximum sized packet for transmission
                     33: */
                     34: 
                     35: struct Packet
                     36: {
                     37:        Pbyte           header, dsize;          /* Header part */
                     38:        Pbyte           data[MAXPKTDSIZE];      /* Data part */
                     39:        Pbyte           edb[EDSIZE];            /* Error detection part */
                     40: };
                     41: 
                     42: typedef struct Packet *        Pkt_p;
                     43: 
                     44: /*
                     45: **     Control codes
                     46: */
                     47: 
                     48: #define        ACK     (Pbyte)(006)    /* Last packet with same seq. ok and in seq. */
                     49: #define        NAK     (Pbyte)(025)    /* Last packet with same seq. rec'd out of seq. */
                     50: #define        PCDATA  (Pbyte)(002)    /* Data only control packet */
                     51: #endif XT

unix.superglobalmegacorp.com

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