xref: /netbsd-src/sys/arch/x68k/include/remote-sl.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: remote-sl.h,v 1.3 2005/12/11 12:19:44 christos Exp $ */
2320e7320Soki 
3320e7320Soki /*
4320e7320Soki  * Copyright (c) 1992, 1993
5320e7320Soki  *	The Regents of the University of California.  All rights reserved.
6320e7320Soki  *
7320e7320Soki  * This software was developed by the Computer Systems Engineering group
8320e7320Soki  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
9320e7320Soki  * contributed to Berkeley.
10320e7320Soki  *
11320e7320Soki  * All advertising materials mentioning features or use of this software
12320e7320Soki  * must display the following acknowledgement:
13320e7320Soki  *	This product includes software developed by the University of
14320e7320Soki  *	California, Lawrence Berkeley Laboratory.
15320e7320Soki  *
16320e7320Soki  * Redistribution and use in source and binary forms, with or without
17320e7320Soki  * modification, are permitted provided that the following conditions
18320e7320Soki  * are met:
19320e7320Soki  * 1. Redistributions of source code must retain the above copyright
20320e7320Soki  *    notice, this list of conditions and the following disclaimer.
21320e7320Soki  * 2. Redistributions in binary form must reproduce the above copyright
22320e7320Soki  *    notice, this list of conditions and the following disclaimer in the
23320e7320Soki  *    documentation and/or other materials provided with the distribution.
24aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
25320e7320Soki  *    may be used to endorse or promote products derived from this software
26320e7320Soki  *    without specific prior written permission.
27320e7320Soki  *
28320e7320Soki  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29320e7320Soki  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30320e7320Soki  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31320e7320Soki  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32320e7320Soki  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33320e7320Soki  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34320e7320Soki  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35320e7320Soki  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36320e7320Soki  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37320e7320Soki  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38320e7320Soki  * SUCH DAMAGE.
39320e7320Soki  *
40320e7320Soki  *	@(#)remote-sl.h	8.1 (Berkeley) 6/11/93
41320e7320Soki  */
42320e7320Soki 
43320e7320Soki /*
44320e7320Soki  * These definitions are factored out into an include file so
45320e7320Soki  * the kernel stub has access to them.
46320e7320Soki  */
47320e7320Soki #define FRAME_START		0xc1		/* Frame End */
48320e7320Soki #define FRAME_END		0xc0		/* Frame End */
49320e7320Soki #define FRAME_ESCAPE		0xdb		/* Frame Esc */
50320e7320Soki #define TRANS_FRAME_START	0xde		/* transposed frame start */
51320e7320Soki #define TRANS_FRAME_END		0xdc		/* transposed frame esc */
52320e7320Soki #define TRANS_FRAME_ESCAPE	0xdd		/* transposed frame esc */
53320e7320Soki 
54320e7320Soki /*
55320e7320Soki  * Message limits. SL_MAXDATA is the maximum number of bytes that can
56320e7320Soki  * be read or written. SL_BUFSIZE is the maximum amount of data that
57320e7320Soki  * can be passed across the serial link. The actual MTU is two times
58320e7320Soki  * the max message (since each byte might be escaped), plus the two
59320e7320Soki  * framing bytes. We add two to the message length to account for the
60320e7320Soki  * type byte and checksum.
61320e7320Soki  */
62320e7320Soki #define SL_MAXDATA 62			/* max data that can be read */
63320e7320Soki #define SL_RPCSIZE (1 + SL_MAXDATA)	/* errno byte + data */
64320e7320Soki #define SL_MTU ((2 * (SL_RPCSIZE + 2) + 2))
65