rribd.h
来自「用于嵌入式系统的TCP/IP协议栈及若干服务」· C头文件 代码 · 共 75 行
H
75 行
/** Copyright (c) 1998-2001 by NETsilicon Inc.** This software is copyrighted by and is the sole property of* NETsilicon. All rights, title, ownership, or other interests* in the software remain the property of NETsilicon. This* software may only be used in accordance with the corresponding* license agreement. Any unauthorized use, duplication, transmission,* distribution, or disclosure of this software is expressly forbidden.** This Copyright notice may not be removed or modified without prior* written consent of NETsilicon.** NETsilicon, reserves the right to modify this software* without notice.** NETsilicon* 411 Waverley Oaks Road USA 781.647.1234* Suite 227 http://www.netsilicon.com* Waltham, MA 02452 AmericaSales@netsilicon.com*************************************************************************** $Name: Fusion 6.52 Fusion 6.51 $* $Date: 2001/09/10 16:22:38 $* $Source: M:/psisrc/routing/incl/rcs/rribd.h $* $Revision: 1.4 $************************************************************************** File Description: Buffer descriptor for packets to be transmitted (IBD) *************************************************************************/#ifndef _rribd_h#define _rribd_htypedef struct ir_buf_desc{ struct ir_buf_desc *ibd_fwd; /* higher level */ struct ir_buf_desc *ibd_bwd; int ibd_type; void *ibd_gptr; /* free for any use */ unsigned char *ibd_bstart; unsigned char *ibd_bend; void *ibd_buf; /* active ptr to pdu */ int ibd_dlen; struct ir_buf_desc *ibd_next; /* this chain */}IBD, *(ibd_pt);/* standard buffer block size */#define rrIBD_BBSIZE 256/* returns ptr to start of unused portion of buf chain and amount remaining*/#define rrIBD_ENDPTR(xbd,xcurp,xrem) { \ ibd_pt xxbd = xbd; \ *(xcurp) = 0; \ while(xxbd){ \ if( (*(xrem) = (xxbd)->ibd_bend - \ (unsigned char *)(xxbd)->ibd_buf - \ (xxbd)->ibd_dlen) > 0){ \ *(xcurp) = (unsigned char *)(xxbd)->ibd_buf +\ (xxbd)->ibd_dlen; \ break; \ } \ (xxbd) = (xxbd)->ibd_next; \ } \ if(!*(xcurp)) *(xrem) = 0; \}/* adds front padding to buffer, used for later header prepend. Equivalently, strips front of buf */#define rrIBD_FPAD(xbd,xlen) ((xbd)->ibd_buf = (void *)((byte *)(xbd)->ibd_buf + (xlen)))#define RRBDTOD(xbd,xcast) (xcast)(xbd)->ibd_buf#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?