⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 slip.h

📁 VRTX 商用嵌入式实时操作系统
💻 H
字号:
/***************************************************************************
*
*               Copyright (c) 1993 READY SYSTEMS CORPORATION.
*
*       All rights reserved. READY SYSTEMS' source code is an unpublished
*       work and the use of a copyright notice does not imply otherwise.
*       This source code contains confidential, trade secret material of
*       READY SYSTEMS. Any attempt or participation in deciphering, decoding,
*       reverse engineering or in any way altering the source code is
*       strictly prohibited, unless the prior written consent of
*       READY SYSTEMS is obtained.
*
*
*       Module Name:            slip.h
*
*       Identification:         @(#) 1.3 slip.h
*
*       Date:                   1/6/94  16:36:59
*
****************************************************************************
*/

/*
 RCS header identifier - $Id: slip.h,v 1.4 1993/10/05 18:08:45 robert Exp $
*/
/*
 * Copyrighted as an unpublished work.
 * (c) Copyright 1987-1993 Lachman Technology, Incorporated
 * All rights reserved.
 * 
 * RESTRICTED RIGHTS
 * 
 * These programs are supplied under a license.  They may be used,
 * disclosed, and/or copied only as permitted under such license
 * agreement.  Any copy must contain the above copyright notice and
 * this restricted rights notice.  Use, copying, and/or disclosure
 * of the programs is strictly prohibited unless otherwise provided
 * in the license agreement.
 */
#ifndef slip__h
#define slip__h

#ifdef __cplusplus
extern "C" {
#endif
/*
 * N.B.: For proper interoperability with 4.3 BSD
 * SLMTU is now a hard limit on input packet size.
 * SLMTU must be <= CLBYTES - sizeof(struct ifnet *).
 * This interprets to about 800 bytes
 */
/* 
 * SLMTU is suggested to be a mutiple of 2 + 40 bytes for the IP header
 */
#define	SLMTU	296
#define	MINSLIP	3

#define FRAME_END	 	0300		/* Frame End */
#define FRAME_ESCAPE		0333		/* Frame Esc */
#define TRANS_FRAME_END	 	0334		/* transposed frame end */
#define TRANS_FRAME_ESCAPE 	0335		/* transposed frame esc */

#ifdef KERNEL
/* per physical unit structure */
struct sl_softc {
	u_long sc_flags;	/* see uts/"arch"/io/slip.c for #define's */
	mblk_t *sc_msgb;	/* mblk being filled (from device) */
	struct sl_pcb *sc_pcb;	/* output consumer for this unit */
	struct tty *sc_ttyp;	/* pointer to tty structure */
	struct ifstats sc_stats;	/* netstat stuff */
	struct incompress sc_comp;	/* tcp compression struct */
	ushort sc_mtu;		/* interface mtu */
	ushort sc_ifflags;	/* interface flags */
	u_char sc_oactive;	/* currently copying to clists */
};

/* per minor stucture; minor is physical unit, consumer combo */
struct sl_pcb {
	queue_t *sl_rdq;		/* read queue */
	struct sl_softc *sl_softc;	/* physical unit */
	long sl_sap;			/* SLIP link type for this consumer */
	u_char sl_flags;		/* LLI state */
};
#endif	/* KERNEL */

#define SLIPIOCTL	('P'<<8)
#define S_COMPRESSON	(SLIPIOCTL | 0xfe)
#define S_COMPRESSOFF	(SLIPIOCTL | 0xfd)
#define S_COMPRESSAON	(SLIPIOCTL | 0xfc)
#define S_COMPRESSAOFF	(SLIPIOCTL | 0xfb)
#define S_NOICMP	(SLIPIOCTL | 0xfa)
#define S_ICMP		(SLIPIOCTL | 0xf9)
#define S_MTU		(SLIPIOCTL | 0xf8)
#define S_GETLINEDIS	(SLIPIOCTL | 0xf7)

#define t_scunit t_lflag	/* store unit number in tp lflag */

#ifdef __cplusplus
}
#endif

#endif /* slip__h */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -