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

📄 net_trace.h

📁 T-kernel Tcp/ip Protocol Stack Sample
💻 H
字号:
/**************************************************************************** * Copyright (C) 2001-2004 MITSUBISHI ELECTRIC CORPORATION and * RENESAS SOLUTIONS CORPORATION * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. ****************************************************************************/#ifndef _NET_TRACE_H_#define _NET_TRACE_H_/**************************************************************************    ka_set_trc(trace_kind,trace_id,trace_data1,trace_data2,trace_data3);    Trace field    0        2        4            8           12           16 bytes    +--------+--------+------------+------------+------------+    |        |        |            |            |            |     +--------+--------+------------+------------+------------+        |        |           |            |        |        |        |           |            |        +- trace_data3 (int)        |        |           |            +--- trace_data2 (int)        |        |           +------ trace_data1 (int)        |        +------ trace_id (short)        +---- trace_kind (short)**************************************************************************/extern void ka_set_trc();/**************//* trace_kind *//**************/#define	NET_TRC_KIND	0x4/**************//* trace_id *//**************//*******************************    0    4    8    12   16 bit    +----+----+----+----+    |    |    |    |    |     +----+----+----+----+*******************************//* first 4bit */#define ABNORMAL	0x8000#define NORMALL		0x0/* second 4bit */#define NET_LIB		0x0#define NET_SOCK	0x100#define	NET_NETINET	0x200#define	NET_NET		0x300 /* third 8bit *//* socket directory */#define INET_ADDRC	0x0#define	INET_NTOAC	0x1#define	KERN_DESCRIPC	0x2#define	NET_INITC	0x3#define PARAMC		0x4#define SETHOSTENTC	0x5#define	SETSERVENTC	0x6#define	STRINGC		0x7#define SYS_GENERICC	0x8#define	SYS_SOCKETC	0x9#define	UIPC_DOMAINC	0xa#define	UIPC_MBUFC	0xb#define UIPC_PROTOC	0xc#define	UIPC_SOCKETC	0xd#define	UIPC_SOCKET2C	0xe#define UIPC_SYSCALLSC	0xf/* lib directory */#define	UIF_LIBC	0x0#define	UIF_ERRNOC	0x1/* net directory */#define	IFC		0x0#define IF_ETHERSUBRC	0x1#define IF_LOOPC	0x2#define	RADIXC		0x3#define	RAW_CBC		0x4#define	RAW_USRREQC	0x5#define	ROUTEC		0x6#define	RTSOCKC		0x7/* netinet directory */#define	HASHINITC	0x0#define	HZTOC		0x1#define IF_ETHERC	0x2#define	INC		0x3#define	IN_CKSUMC	0x4#define IN_PCBC		0x5#define IN_PROTOC	0x6#define	IN_RMXC		0x7#define	IP_ICMPC	0x8#define IP_INPUTC	0x9#define IP_OUTPUTC	0xa#define	RAW_IPC		0xb#define TCP_DEBUGC	0xc#define	TCP_INPUTC	0xd#define	TCP_OUTPUTC	0xe#define	TCP_SUBRC	0xf#define	TCP_TIMERC	0x10#define	TCP_USRREQC	0x11#define UDP_USRREQC	0x12/***************//* trace_data1 *//***************//******************************    0    1    2        4 bytes    +----+----+--------+    |    |    |        |     +----+----+--------+       |    |    |           |    |    |          |    |    +- trace number (2bytes)       |    +- position in this function (1byte)          +- function number (1byte)       ******************************/#endif /* !_NET_TRACE_H_ */

⌨️ 快捷键说明

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