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

📄 tcp.h

📁 mcf5307实验源代码
💻 H
字号:
/*************************************************************************/
/*                                                                       */
/*   Copyright (c) 1993 - 1996 by Accelerated Technology, Inc.  NET 3.2  */
/*                                                                       */
/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the      */
/* subject matter of this material.  All manufacturing, reproduction,    */
/* use, and sales rights pertaining to this subject matter are governed  */
/* by the license agreement.  The recipient of this software implicitly  */
/* accepts the terms of the license.                                     */
/*                                                                       */
/*************************************************************************/
#ifndef TCP_H
#define TCP_H

#include "protocol.h"

#define DATA           1
#define ACK            2

/* This is the number of ticks to delay sending an ACK.  A value of
   approximately a 1/4 is recommended. */
#define ACKTIMEOUT     (TICKSPERSEC >> 2)

/**************************************************************************/
/*  INT32_CMP                                                             */
/*                                                                        */
/*  Compare two sequence numbers.  This macro handles will handle sequence*/
/*  space wrap around.  Overflow/Underflow makes the results below        */
/*  correct.                                                              */
/*  RESULTS:            result       implies                              */
/*                        -          a < b                                */
/*                        0          a = b                                */
/*                        +          a > b                                */
/**************************************************************************/
#define INT32_CMP(a, b)      ((int32)(a-b))
#define INT16_CMP(a, b)      ((int16)(a-b))


/*****************************************************************************/
/* IN_CLASSA,  IN_CLASSB, IN_CLASSC                                          */
/*                                                                           */
/* These macros are used to determine the class of an IP address.  Note that */
/* they will only work if i is unsigned.  The class of the address is        */
/* determined by the first two bits of the IP address.                       */
/*                                                                           */
/*****************************************************************************/
#define IN_CLASSC(i)   ((i >> 30) == 3)
#define IN_CLASSB(i)   ((i >> 30) == 2)
#define IN_CLASSA(i)   ((i >> 30) <= 1)


#endif /* TCP.H */

⌨️ 快捷键说明

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