/* Copyright (c) 1984 AT&T */ /* All Rights Reserved */ /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */ /* The copyright notice above does not evidence any */ /* actual or intended publication of such source code. */ #ident "@(#)kern-port:sys/xtproto.h 10.8" /* ** Bx -- Blit packet protocol definition */ typedef unsigned char Pbyte; /* The unit of communication */ #define NPCBUFS 2 /* Double buffered protocol */ #define MAXPCHAN 8 /* Maximum channel number */ /* Packet Header: * * High order bits Low order bits * ____________________________________________________________________ * | | | | || | * | ptyp | cntl | chan | seq || dsize | * | | | | || | * -------------------------------------------------------------------- * 15 14 13 11 10 8 7 0 * * ptyp - always 1. * cntl - TRUE if control packet. * chan - channel number. * seq - sequence number. * dsize - size of the data part. * * Note: The following macros are used to set the bits in the packet * header for portability reasons. The bit fields that can be * defined in C are preferable for simplicity reasons, but are * highly machine dependent. */ #define GET_BITS(byte,pos,len,mask) ((byte & mask) >> pos) #define SET_BITS(byte,pos,len,mask,val) (byte = (byte &(~mask))|((val<