亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sw.h

?? 網絡驅動開發
?? H
?? 第 1 頁 / 共 3 頁
字號:
/*++

Copyright (c) 2000 Microsoft Corporation. All rights reserved.

   File:       sw.h
 
               Developed for Toshiba by Elisa Research Inc., CA
               http://www.elisaresearch.com
               (510) 770-4920


Abstract:

Author:

   A. Wang

Environment:

   Kernel mode

Revision History:

   09/23/96    kyleb       Added support for NdisAllocateMemoryWithTag
   01/07/97    awang       Initial of Toshiba ATM 155 Device Driver.
   02/10/97    awang       Moved RECV_SEG_INFO from sar.h

--*/

#ifndef __SW_H
#define __SW_H

#define ABS(x)         (((x) < 0) ? -(x) : (x))

//
//	Macros to read from the adapters memory.
//
#define TBATM155_READ_BUFFER_UCHAR(pDst, pSrc, Length)                     \
{                                                                          \
	UINT	_c;                                                             \
                                                                           \
	for (_c = 0; _c < (Length); _c++)                                       \
	{                                                                       \
		NdisReadRegisterUchar((PUCHAR)(pSrc) + _c, (PUCHAR)(pDst) + _c);    \
	}                                                                       \
}

//
//	This macro is used to convert big-endian to host format.
//
#define TBATM155_SWAP_USHORT(x) (USHORT)((((x) >> 8) & 0xFF)   |   \
                                   (((x) << 8) & 0xFF00))

#define TBATM155_SWAP_ULONG(x)  (ULONG)((((x) >> 24) & 0xFF)   |   \
                               (((x) >> 8) & 0xFF00)           |   \
                               (((x) << 8) & 0xFF0000)         |   \
                               (((x) << 24) & 0xFF000000))

// buffer size passed in NdisMQueryAdapterResources                            
// We should only need three adapter resources (IO, interrupt and memory),
// Some devices get extra resources, so have room for 10 resources 
#define ATM_RESOURCE_BUF_SIZE           (sizeof(NDIS_RESOURCE_LIST) + \
                                        (10 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR)))

//
//	Macros used to allocate and free memory.
//
#define ALLOCATE_MEMORY(_pStatus, _pAddress, _Length, _Tag)    \
{                                                              \
   *(_pStatus) = NdisAllocateMemoryWithTag(                    \
                   (PVOID *)(_pAddress),                       \
                   (UINT)(_Length),                            \
                   (ULONG)(_Tag));                             \
}

#define FREE_MEMORY(_Address, _Length)                         \
{                                                              \
   NdisFreeMemory((PVOID)(_Address), (UINT)(_Length), 0);      \
}

#define ZERO_MEMORY(_Address, _Length)                         \
{                                                              \
   NdisZeroMemory((_Address), (_Length));                      \
}

#define TBATM155_PROTOCOL_RESERVED	(sizeof(MEDIA_SPECIFIC_INFORMATION) + sizeof(ATM_AAL_OOB_INFO))

//
//	Contains allocation information.
//
typedef struct	_ALLOCATION_INFO
{
   PVOID                   VirtualAddress;
   NDIS_PHYSICAL_ADDRESS   PhysicalAddress;
   ULONG                   Size;
}
   ALLOCATION_INFO,
   *PALLOCATION_INFO;



//
//	The following is used to keep track of the receive buffers.
//
typedef struct _RECV_BUFFER_HEADER
{
   ULONG                       Signature;

   //
   //	These are the list pointers used to keep track of free
   //	receive buffers, or of a list of receive buffers that
   //	are being used to receive a packet.
   //
   struct _RECV_BUFFER_HEADER  *Next;
   struct _RECV_BUFFER_HEADER  *Prev;
   struct _RECV_BUFFER_HEADER  *Last;
   
   //
   //	Pointer to the pool this receive buffer came from.
   //
   struct _RECV_BUFFER_POOL    *Pool;
   
   //
   //	Flags that describe the state of the receive buffer.
   //
   ULONG                       Flags;
   
   //
   //	Used for cache coherency.
   //
   PNDIS_BUFFER                FlushBuffer;
   
   //
   //	Used to indicate data in an NDIS_PACKET.
   //
   PNDIS_BUFFER                NdisBuffer;
   
   //
   //	Packet that is associated with this buffer.
   //
   PNDIS_PACKET                Packet;
   
   //
   //	Pointer to the VC that this receive is destined for.
   //
   PVC_BLOCK                   pVc;
   
   //
   //	The posted tags information of this receive buffer.
   //
   USHORT                      TagPosted;

   //
   //	If this buffer was allocated from a pool then there is
   //	only allocation information that describes the aligned
   //	buffer to be used for the receive information.
   //	If the buffer was allocated individually then there is
   //	the aligned allocation information as well as the original
   //	allocation information which is to be used to free the
   //	receive buffer if necessary.
   //
   ALLOCATION_INFO             Alloc[1];
};


#define RECV_BUFFER_HEADER_SIG         0x30303030

//
//	Indices into the ALLOCATION_INFO array...
//
#define RECV_BUFFER_ALIGNED    0
#define RECV_BUFFER_ORIGINAL   1

//
//	This structure is used to keep track of transmit contexts
//
typedef struct _TRANSMIT_CONTEXT
{
   ULONG                       Signature;
   ULONG                       BufferSize;
   ULONG                       DmaAlignment;
   PVC_BLOCK                   pVc;
   PXMIT_SEG_INFO              pTransmitSegInfo;
}TRANSMIT_CONTEXT, *PTRANSMIT_CONTEXT;

#define XMIT_BUFFER_SIG           0x88888888

//
//	This structure is used to keep track of pools of receive
//	buffers.  Receive buffer pools are allocated on a per VC basis.
//	So a buffer pool allocated for VC x is never used for VC y. 
//
struct _RECV_BUFFER_POOL
{
   ULONG                       Signature;

   //
   //	Pointer to the next pool of receive buffers.
   //
   struct _RECV_BUFFER_POOL    *Next;

   //
   //	Back pointer to the owning receive buffer information structure.
   //
   struct _RECV_BUFFER_INFO    *RecvBufferInfo;

   //
   //	Count of buffers allocated to this pool.
   //	This is the same for the packets.
   //
   ULONG                       ReceiveBufferCount;

   //
   //	This is the size of the receive buffer that the adapter can use
   //	to receive into.
   //
   ULONG                       ReceiveBufferSize;

   //
   //	This is the allocated virtual, physical addresses and
   //	the allocated size of the pool.
   //
   ALLOCATION_INFO;

   //
   //	Size of the receive buffer's header.
   //
   ULONG                       ReceiveHeaderSize;
   
   //
   //	Handle for the flush buffers associated with the
   //	pool.
   //
   NDIS_HANDLE                 hFlushBufferPool;
   NDIS_HANDLE                 hNdisBufferPool;

   //
   //	NDIS wrapper handle to a packet pool.
   //
   NDIS_HANDLE                 hNdisPacketPool;

   //
   //	This is a list of buffers that are requested to be returned.
   //  This list is always to be NULL until the pool state is changed
   //  to fRECV_POOL_BEING_FREED.
   //	Once the BuffersFreed count has reached the total count then
   //	this pool can be freed (with consideration for the packets also).
   //	
   PRECV_BUFFER_HEADER         FreeBuffersHead;

   //
   //	Buffers free'd
   //
   ULONG                       BuffersFreed;

   //
   //	Flags describing the buffer pools state.
   //
   ULONG                       Flags;
};


#define RECV_BUFFER_POOL_SIG               0x20202020

//
//	Flag definitions for the receive buffer pool.
//
#define fRECV_POOL_BEING_FREED             0x00000001
#define fRECV_POOL_BLOCK_ALLOC             0x00000002
#define fRECV_POOL_ALLOCATING_BLOCK        0x00000004
#define fRECV_POOL_ALLOCATING_INDIVIDUAL   0x00000008

//
//	Macros used for accessing the receive pool flags
//
#define RECV_POOL_TEST_FLAG(x, f)          (((x)->Flags & (f)) == (f))
#define RECV_POOL_SET_FLAG(x, f)           ((x)->Flags |= (f))
#define RECV_POOL_CLEAR_FLAG(x, f)         ((x)->Flags &= ~(f))

//
//	This structure is used to keep track of multiple pools of receive
//	buffers, guard their access in the case of UBR VCs.
//	It is also used to manage a free list of buffers to be used in
//	the case of a service interrupt.
//
typedef struct _RECV_BUFFER_INFO
{
   ULONG                   Signature;
   
   NDIS_SPIN_LOCK          lock;

   //
   //	Flags for the receive buffer allocation.
   //
   ULONG                   Flags;

   //
   //	Pointer to the owning VC_BLOCK.  If this is NULL then it's
   //	the common UBR receive buffer information.
   //
   PVC_BLOCK               pVc;

   //
   //	This is the amount of information each receive buffer
   //	can hold.
   //
   ULONG                   RecvBufferSize;

   //
   //	Pointer to the list of buffer pools allocated.
   //
   PRECV_BUFFER_POOL       RecvPool;

   //
   //	This is the free list of buffers from all the available pools.
   //
   PRECV_BUFFER_HEADER     FreeBufferListHead;
   PRECV_BUFFER_HEADER     BufferListTail;

   //
   //	Count of available receive buffers in the free list.
   //
   ULONG					FreeReceiveBufferCount;
};

#define RECV_BUFFER_INFO_SIG           0x10101010

//							
//	Flag definitions for the RECV_BUFFER_INFO structure.
//
#define fRECV_INFO_COMPLETE_VC_ACTIVATION      0x00000001

//
//	Macros used for accessing the receive buffer flags
//
#define RECV_INFO_TEST_FLAG(x, f)      (((x)->Flags & (f)) == (f))
#define RECV_INFO_SET_FLAG(x, f)       ((x)->Flags |= (f))
#define RECV_INFO_CLEAR_FLAG(x, f)     ((x)->Flags &= ~(f))


//
// Define that what kind to slot type used in a VC.
//
#define RECV_SMALL_BUFFER      BIT(0)
#define RECV_BIG_BUFFER        BIT(1)


struct _RECV_SEG_INFO
{
   //
   //	Pointer to the owning adapter.
   //	
   PADAPTER_BLOCK			    pAdapter;
   
   //
   //	The size of the segment in ULONGs.
   //
   ULONG					    SegmentSize;
   
   //
   //	Pointer to the entry of Recv state table.
   //
   ULONG                       pEntryOfRecvState;

   TBATM155_RX_STATE_ENTRY     InitRecvState;

   //
   //	Queue of packets that are waiting for the receive complete
   //	interrupt.
   //
   RECV_BUFFER_QUEUE           SegCompleting;

   //
   //	This contains receive pools for buffers and packets.
   //
   PRECV_BUFFER_INFO		    pRecvBufferInfo;

   PRECV_BUFFER_QUEUE          FreeSmallBufQ;
   PRECV_BUFFER_QUEUE          FreeBigBufQ;

   NDIS_SPIN_LOCK			    lock;
};


//
// Number and size of allocated PadTrailer buffers;
//
#define TBATM155_MAX_PADTRAILER_BUFFERS    30


// **********************************************************************
// Allocation Map
//
// This structure holds the mapping parameters of a structure allocated
// in memory for transmission.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一二三| 欧美日韩亚州综合| 国产欧美综合在线观看第十页| 午夜精品一区二区三区电影天堂 | 精品视频全国免费看| 日韩一区欧美一区| 成人三级在线视频| 69久久夜色精品国产69蝌蚪网| 国产色一区二区| 天天综合日日夜夜精品| 欧美一级专区免费大片| 国产精品一区三区| 国产精品毛片大码女人| 欧美三区在线观看| 韩日av一区二区| 夜夜嗨av一区二区三区中文字幕| 欧美精品在线观看一区二区| 国产成人免费视| 三级久久三级久久久| 国产精品精品国产色婷婷| 在线播放欧美女士性生活| 欧美丰满少妇xxxxx高潮对白 | 国产另类ts人妖一区二区| 亚洲视频在线观看一区| 日韩一区二区三区视频在线观看| 国产精品私人影院| 天涯成人国产亚洲精品一区av| 日本韩国视频一区二区| 亚洲国产人成综合网站| 欧美精品一区二区在线播放| 91片黄在线观看| 日韩不卡一二三区| 国产目拍亚洲精品99久久精品| 国产jizzjizz一区二区| 中文字幕在线观看一区| 日韩精品一区二区三区老鸭窝| 成人高清视频免费观看| 天使萌一区二区三区免费观看| 久久久久久久久伊人| 91在线观看下载| 激情久久五月天| 一区二区在线电影| 国产欧美日本一区视频| 欧美一区二区三区思思人| 成人国产精品免费观看动漫 | 粉嫩嫩av羞羞动漫久久久| 亚洲黄色录像片| 国产精品不卡一区二区三区| 91久久精品午夜一区二区| 色成人在线视频| 成人国产视频在线观看| 国产毛片精品国产一区二区三区| 午夜精品爽啪视频| 亚洲蜜臀av乱码久久精品蜜桃| 日韩视频在线一区二区| 欧美视频一区二区三区| 色婷婷久久99综合精品jk白丝| 99riav久久精品riav| 99视频精品全部免费在线| 极品少妇一区二区| 午夜电影一区二区| 中文字幕欧美国产| 欧美成人三级在线| 久久久另类综合| 国产欧美日韩精品一区| 在线欧美一区二区| 国产一区亚洲一区| 午夜精品久久久久久久99水蜜桃| 亚洲国产日产av| 国产酒店精品激情| 欧美在线免费视屏| 日韩欧美国产精品| 欧美一区二区三区在线视频| 91精品国产一区二区三区| 欧美日本在线播放| 欧美激情在线观看视频免费| 日韩视频免费观看高清完整版 | 色94色欧美sute亚洲线路一久| 亚洲va国产va欧美va观看| 青草av.久久免费一区| 91一区一区三区| 欧美国产精品劲爆| 久久精品国产一区二区三区免费看 | 久久精品亚洲麻豆av一区二区| 男人操女人的视频在线观看欧美| 在线免费一区三区| 国产精品久久二区二区| 成人性生交大片免费看中文| 欧美三级视频在线播放| 国产三级精品在线| 亚洲成人www| voyeur盗摄精品| 精品国产百合女同互慰| 亚洲精品国产视频| 国产一区二区0| 欧美一区二区精品| 亚洲免费观看在线观看| 欧洲亚洲国产日韩| 精品国产一二三区| 亚洲不卡一区二区三区| 成人国产精品免费观看动漫| 日韩欧美电影一区| 日韩av不卡一区二区| 一本到不卡精品视频在线观看| 久久综合网色—综合色88| 日韩高清在线不卡| 在线亚洲一区观看| 亚洲精品水蜜桃| 97se亚洲国产综合自在线| 中文成人综合网| 国产成人综合视频| 日本一区二区三区国色天香| 国产乱码精品一区二区三区五月婷| 欧美一级日韩一级| 久久精品国产精品亚洲红杏| 日韩一级免费观看| 久久精品理论片| 国产亚洲欧美色| 成人免费福利片| 国产精品久久久久久久久图文区| 国产成a人亚洲| 国产精品每日更新| 欧洲一区在线观看| 亚洲高清免费一级二级三级| 91麻豆精品国产91久久久更新时间 | 91网址在线看| 日韩电影在线一区二区| 日韩一级高清毛片| 国产成人自拍高清视频在线免费播放| 亚洲欧美一区二区视频| 欧美精三区欧美精三区 | 国产精品久久久久久久久免费桃花 | 蜜桃av一区二区三区电影| xfplay精品久久| 91天堂素人约啪| 亚洲国产成人tv| 久久综合色婷婷| 99久久精品情趣| 亚洲成人综合视频| 久久久亚洲精品石原莉奈| av午夜精品一区二区三区| 日本成人在线一区| 久久久久青草大香线综合精品| 91在线播放网址| 久久99在线观看| 亚洲久本草在线中文字幕| 91精品国产综合久久久蜜臀图片| 国产 日韩 欧美大片| 亚洲国产视频一区| 国产精品国产自产拍高清av| 日韩一区二区三区电影| 色999日韩国产欧美一区二区| 国产成人亚洲精品狼色在线| 五月婷婷久久丁香| 亚洲日本va在线观看| 久久久久久久久免费| 正在播放亚洲一区| 亚洲婷婷在线视频| 日韩欧美一级二级三级| 欧美精品一二三| 色综合久久综合网97色综合| 国产精品一二三四| 久久99这里只有精品| 免费人成在线不卡| 五月天婷婷综合| 亚洲福利电影网| 亚洲一区二区av在线| 亚洲三级理论片| 一区二区三区在线观看网站| 亚洲人成7777| 亚洲裸体在线观看| 亚洲欧美一区二区三区久本道91| 国产精品久久久久久久久动漫| 欧美激情一区三区| 亚洲视频综合在线| 洋洋av久久久久久久一区| 亚洲另类在线制服丝袜| 亚洲一区二区三区美女| 午夜精品爽啪视频| 国内精品久久久久影院薰衣草| 韩国毛片一区二区三区| 丁香婷婷综合色啪| 色av综合在线| 欧美大白屁股肥臀xxxxxx| 亚洲国产高清在线| 亚洲国产日韩精品| 精品一区免费av| jlzzjlzz国产精品久久| 337p亚洲精品色噜噜噜| 久久蜜桃av一区精品变态类天堂| 亚洲免费视频中文字幕| 久久精品国产亚洲高清剧情介绍| 成人免费看黄yyy456| 一区二区三区在线不卡| 亚洲一区二区三区四区中文字幕| 激情文学综合网| 欧美专区日韩专区| 精品国产免费人成在线观看| 最近日韩中文字幕| 国产成人精品三级|