微软RNDIS协议_第1页
微软RNDIS协议_第2页
微软RNDIS协议_第3页
微软RNDIS协议_第4页
微软RNDIS协议_第5页
已阅读5页,还剩63页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、MkmsoftRemote NDIS SpecificationRevAugust 9, 20021998 -2001 Microsoft Corporation. All rights reserved.1 INTRODUCTION. 错误!未定义书签LICENSE AGREEMENT. 错误!未定义书签2 CONCEPTS AND DEFINITIONS 错误!未定义书签CONTROL CHANNEL 错误!未定义书签Data channel 错误!未定义书签I NITIALIZATION AND TEARDOWN 错误!未定义书签Device State Definitions 错误!未

2、定义书签Halt 错误!未定义书签Reset 错误!未定义书签FLOWCONTROL. 错误!未定义书签Byte Ordering 错误!未定义书签ENCAPSULATION 错误!未定义书签REMOTENDIS VERSION 错误!未定义书签STATUSVALUES 错误!未定义书签3 MESSAGE SET FOR CONNECTIONLESS DEVICES 错误!未定义书签REMOTE_NDIS_INITIALIZE_MSG 错误!未定义书签REMOTE_NDIS_INITIALIZE_MSG Format 错误!未定义书签Response to REMOTE_NDIS_INITIA

3、LIZE_MSG错误!未定义书签REMOTE_NDIS_HALT_MSG 错误!未定义书签REMOTE_NDIS_QUERY_MSG 错误!未定义书签REMOTE_NDIS_QUERY_MSG Format 错误!未定义书签Response to REMOTE_NDIS_QUERY_MSG错误!未定义书签REMOTE_NDIS_SET_MSG 错误!未定义书签REMOTE_NDIS_SET_MSG Format 错误!未定义书签Response to REMOTE_NDIS_SET_M.SG 错误!未定义书签Setting Device-specific Parameters 错误!未定义书签

4、错误错误!未定义书签。REMOTE_NDIS_RESET_MSG FQrmatResponse to REMOTE_NDIS_RESET_MSGREMOTE_NDIS_INDICATE_STATUS_MSG 错误!未定义书签REMOTE_NDIS_INDICATE_STATUS_MSG Format错误!未定义书经REMOTE_NDIS_KEEPALIVE_MSG 错误!未定义书签REMOTE_NDIS_KEEPALIVE_MSG Format错误!未定义书经Response to REMOTE_NDIS_KEEPALIVE_MSG错误!未定义书经EXAMPLECONNECTIONLESS N

5、ITIALIZATION SEQUENCE. 错误!未定义书签DATA MESSAGESREMOTE_NDIS_PACKET_MSG) 错误!未定义书签REMOTE_NDIS_PACKET_MSG Format 错误!未定义书经Multi-Packet Transfers 错误!未定义书经4 REQUIRED NDIS OIDS 错误!未定义书签GENERALOIDS 错误!未定义书签OIDS 错误!未定义书签OPTIONAL POWEFMKNAGEMENOIDS 错误!未定义书签Network Wake-Up 错误!未定义书签5 REMOTE NDIS TO USB MAPPING 错误!未

6、定义书签RELATEDSPECIFICATIONS 错误!未定义书签PNP AND USB-LEVEL INITIALIZATION 错误!未定义书签USB Device Descriptor 错误!未定义书签USB Configuration Descriptor 错误!未定义书签Communication Class Interface 错误!未定义书签Data Class Interface 错误!未定义书签USB-LEVEL TERMINATION 错误!未定义书签CONTROL CHANNEL CHARACTERISTICS. 错误!未定义书签DATA CHANNEL CHARACT

7、ERISTICS 错误!未定义书签USB Short Packets 错误!未定义书签Flow Control 错误!未定义书签POWER MANAGEMENT错误!未定义书签TIMER CONSTANTS错误!未定义书签1 IntroductionRemote NDIS is a bus-independent class specification for Ethernet network devices on dynamic PnP busses such as USB, 1394, BlueTooth, and InfiniBand. This specificationdefines

8、 a bus-independent message protocol between a host PC and a Remote NDIS deviceover abstract control and data channels.Also included are bus-mapping chapterswhich define specific features of the specification on the respective busses.The “legacy - free" PC revolution is eliminating not only lega

9、cy connection ports .serial, parallel, PS/2) but also legacy expansion buses like ISA and PCI in mainstream PCs.Theresulting “sealedcase“ PCs will require eitherbuilt -innetworking supportonthe motherboard orsupport for network adapters onexternalbusses. This specification defines a message protocol

10、 for external bus attached network devices.Itis precise enoughto allow vendor-independent classdriver support for Remote NDIS devices on the host PC.Remote NDIS is a fairly simple extension of the well-understood and time-tested NDISarchitecture.NDIS defines a function-call interface for device-spec

11、ific NDISminiport drivers. This interface defines primitives to send and receive network data, and to query and set configuration parameters and statistics. Remote NDIS leveragesNDIS by defining a message wrapping for the NDIS miniport interface, thus moving theNDIS-handling code from a miniport dri

12、ver into the device itself. In this and otherways, the Remote NDIS specification allows for a wide range of device functionality and performance levels.1.1 License AgreementThe Remote NDIS Specification and any accompanyingmaterials (the “Specification ")provided by Microsoft is for your person

13、al use only, and may be used solely for the purpose of implementing the Remote NDIS protocol message set to interface with (i) a Microsoft Windows operating system or (ii) a bus or network-connected communications device, such as a USB, 1394 or TCP/IP device.THE SPECIFICATION MAY NOT BE COPIEDOR DIS

14、TRIBUTED.Microsoft may have copyrights, patents or pending patent applications covering subject matter in the Specification. To the extent Microsoft has such copyrights, patents or applications, Microsoft agrees to grant a nonexclusive, royalty-free, world-wide license under these copyrights, patent

15、s or applications solely to implement the Remote NDIS Specification to interface with (i) a Microsoft Windows operating system or (ii) a bus or network-connected communications device, such as a USB, 1394 or TCP/IP device, on condition that you agree not to assert any intellectual property rights ag

16、ainst Microsoft or other companies for their implementation of the Specification.Microsoft reserves all other rights it mayhave in the Specification. The furnishing of this document does not give you any license to any other Microsoft patents, trademarks, copyrights, or other intellectual property r

17、ights. Specifically, neither this document nor the Specification give you any license to the NDIS Specification or to USB Communication Device Class technology.The Specification is provided "AS IS" without warranty of any kind. To the maximum extent permitted by applicable law, Microsoft f

18、urther disclaims all warranties, including without limitation any implied warranties of merchantability and fitness for a particular purpose, as well as warranties of title and noninfringement. The entire risk arising out of the use or performance of the Specification remains with you.orits supplier

19、sbeliableforany consequential,incidental,direct,indirect,special,punitive,or otherdamages whatsoever(including,without limitation,damages for lossof businessprofits,businessinterruption,loss of businessTo the maximum extent permitted by applicable law, in no event shall Microsoftinformation, or othe

20、r pecuniary loss) arising out of the use of or inability to usethe Specification, even if Microsoft has been advised of the possibility of such damages. Because some states/jurisdictionsdo not allow the exclusion orlimitation of liability for consequential or incidental damages, the above limitation

21、 may not apply to you.2 Concepts and DefinitionsThis section discusses requirements and characteristics of the channels used to communicate between the host and the remote device. Device state transitionsandmajor operations such as initialization, halt and reset are also defined here.2.1 Control cha

22、nnelThe specifics of the control channel are given in the appropriate bus-mapping chapter.The control channel must be reliable and ensure sequenced delivery. It is used for all communication except for the transmission of network data packets. All required control messages except REMOTE NDIS HALTand

23、 REMOTE NDIS INDICATE STATUS MSGre request/response exchanges initiated by the host. The device must respond within the ControlTimeoutPeriod as specified in the appropriate bus-mapping chapter.2.2 Data channelThe specifics of the data channel are given in the appropriate bus-mapping chapter.The data

24、 channel is used exclusively for the transmission of network data packets.It may consist of multiple sub-channels . for varying quality of service) as definedin the appropriate bus-mapping chapter. The reliability and delivery specifics of the data channel are likewise defined in the respective bus-

25、mapping chapter.2.3 Initialization and TeardownThe control and data channels are initializedas specifiedin the respective bus-mapping chapter.The host and Remote NDIS device then exchange initializationmessages. The host sends REMOTE_NDIS_INITIALIZE_MSG to the device,and the deviceprovides informati

26、onabout its type, supported medium and versionin the responsemessage REMOTE_NDIS_INITIALIZE_CMPLT.Either the host or the remote device can halt the network connection in an abortiveAll outstanding requests and packetsfashion via the REMOTE_NDIS_HALT_MSmessage.should be discarded on receipt of this m

27、essage.2.4 Device State DefinitionsFollowing bus-level initialization, the device is in the rndis-uninitialized state.Upon receiving REMOTE_NDIS_INITIALIZE_MSG and returning REMOTE_NDIS_INITIALIZE_CMPLT with status success, the device enters therndis-initialized state.Upon receiving REMOTE NDIS SET

28、MSGor the OID GEN CURRENT PACKET FILTEparameter with a non-zero filter, the device enters therndis-data-initialized state. When inthe rndis-data-initializedstate, receiving REMOTE_NDIS_SET_MSG forOID_GEN_CURRENT_PACKET_FILTERth a zero filter value forces the device back into the rndis-initialized st

29、ate.Receiving REMOTE_NDIS_HALT_MSor a bus-level disconnect or hard-reset at any time forces the device into therndis-uninitialized state.2.4.1 HaltAt any time that the device is in the rndis-initialized or rndis-data-initializedstate, the host computer may terminate the Remote NDIS functionality of

30、the device in an abortive fashion by sending REMOTE_NDIS_HALT_MSG to the device.2.4.2ResetThe communicationchannel is “soft - reset ”when an error such as messagetimeoutoccurs. The hostmay initiatea soft-resetat any time when the device isin therndis initializedstate by sending REMOTENDIS_RESET_MStG

31、 the device (seedetailsbelow); and the device must send a response message when it has completed the reset.For example, the host may initiate a soft-reset when an error, such as a message timeout has occurred.Note that this is asoft reset in the sense that any handles . VCs for connection-oriented d

32、evices)continue to be valid after the reset. The Remote NDIS device, aspart of the reset process, discards all outstanding requests and packets. The remote device may reset some of its hardware components, but keeps all communication channels to the host intact.2.4.2.1 Hard ResetIf the Remote NDIS d

33、evice performs a hard reset . reboot), this event is assumed tobe equivalent of “Remove followed by"Add'plug -and-play events. The host NDISmini-port will be halted and removed, and a new instance will be added and started.All bus-level and Remote NDIS initialization will be re-executed. A

34、Remote NDIS device may hard-reset itself in the event of a critical device failure.2.5 Flow ControlThe Remote NDIS devicemay need to exercise flow controlto prevent the host fromoverflowing its databuffers with packets.Any flow controlprovisionsorrequirements are given in the respective bus-mapping

35、chapter.2.6 Byte OrderingAll numeric values in message fields defined by this specification are assumed to be coded in little-endian format, . least significant byte first.2.7 EncapsulationThis section does not specify the way NDIS messages are encapsulated in native bus messages or primitives.Pleas

36、e refer to the appropriate bus-mapping chapter formore details.2.8 Remote NDIS Version错误!未找至U 弓I 用源。 defines the Remote NDIS protocol version identifiers exchanged between host and device.Note that these are unrelated to the revision number of this specification.Table 2-1: Remote NDIS Protocol Versi

37、onVersion IdentifierValueDescriptionRNDIS_MAJOR_VERSION1Remote NDIS Major specified in this document.VersionRNDIS_MINOR_VERSION0Remote NDIS Minorspecified in this document.Version2.9 Status ValuesThe Remote NDIS status values are generally equivalent to the 32-bit status values defined in the Window

38、s 2000 DDK. Specifically, high bit set indicates an error state and the high bit clear indicates a success state. The specific Remote NDIS status values used in this specification are listed below, others can be inferred from thestatus value in aWindows 2000 DDK or MSDN. A device may return any sema

39、ntically correct Remote NDISStatus field of a message that it generates.Table 2-2: Remote NDIS Status ValuesStatus IdentifierValueDescriptionRNDIS_STATUS_SUCCESS0x00000000SuccessRNDIS_STATUS_FAILURE0xC0000001Unspecifiederror (equivalentto STATUS_UNSUCCESSFUL)RNDIS_STATUS_INVALID_DATA0xC0010015Invali

40、d data errorRNDIS_STATUS_NOT_SUPPORTED0xC00000BBUnsupported request errorRNDIS_STATUS_MEDIA_CONNECT0x4001000BDevice is connected to network medium(equivalenttoNDIS_STATUS_MEDIA_CONNECTromWindows 2000 DDK)RNDIS_STATUS_MEDIA_DISCONNECT0x4001000cDevice is disconnectedfromnetwork medium (equivalent to N

41、DIS_STATUS_MEDIA_DISCONNECT from Windows 2000 DDK)RNDIS_STATUS_XxxEqual to NDIS_STATUS_Xxx valuesdefined in Windows 2000 DDK orMSDN3 Message Set for Connectionless DevicesThe following Remote NDIS control messages that must be supported by anconnectionless device, see错误!未找至U弓I用源。for an overview. In

42、the more detaileddescriptions below, some messages include a RequestId field. This is used to matchsent messages with responses. With this mechanism, a host driver can send multipleRemote NDIS messages to a device without concern for the ordering of responses. ARemote NDIS device must maintain the R

43、equestId field when returning a response.Table 3-1: Control Messages SetMessage IdentifierValueDescriptionREMOTE_NDIS_INITIALIZE_MSG0x00000002Initialize the device.REMOTE_NDIS_HALT_MSG0x00000003Halt the device.This is the only hostcontrolmessage that doesn' t get aresponse.REMOTE_NDIS_QUERY_MSG0

44、x00000004Send a 'query' OID.REMOTE_NDIS_SET_MSG0x00000005Send a 'set' OID.REMOTE_NDIS_RESET_MSG0x00000006Perform a soft reset on the device.REMOTE_NDIS_INDICATE_STATUS_MSG0x00000007Indicates link state or undefined message error.REMOTE_NDIS_KEEPALIVE_MSG0x00000008During idle periods,

45、sent every fewseconds to check that the device is stillresponsive (may optionally also be sent bythe device).Message IdentifierValueDescriptionREMOTE_NDIS_INITIALIZE_CMPLT0xDevice response to initialization request.REMOTE_NDIS_QUERY_CMPLT0xDevice response to 'query' OID request.REMOTE_NDIS_S

46、ET_CMPLT0xDevice response to'set' OID request.REMOTE_NDIS_RESET_CMPLT0xDevice responses to reset request.REMOTE_NDIS_KEEPALIVE_CMPLT0xDevice response to keep alive message.3.1 REMOTE_NDIS_INITIALIZE_MSGThis message issent by thehost to a Remote NDIS device to initializethe networkconnection.

47、Itissent viathe control channeland only when the device is in therndis-uninitializedstate. See错误!未找到引用源。for details of the message.The MaxTransferSizeindicatesthe maximum size,in bytes, of any single bus datadevice. Typically, each bus datatransfer that the host expects to receive from the transfer

48、accommodates a single Remote NDIS message. However, as described below (see错误!未找至U弓I用源。),the device may bundle several Remote NDIS messages containingData packets into a single transfer.MajorVersion and MinorVersion indicate the highest Remote NDIS protocol version implemented by the host. There is

49、no guarantee that the host supports any lower versions; specifics of Remote NDIS version(s) supported by various Windows operating system versions will be documented in appropriate product documentation, . the DDK. See错误!未找到引用源。for more details.3.1.1REMOTE_NDIS_INITIALIZE_MSG FormatOffsetSizeFieldDe

50、scription04MessageTypeSpecifies the Remote NDIS message type.This is set to REMOTE_NDIS_INITIALIZE_MSG =0x2.44MessageLengthSpecifies the total length of this RemoteNDIS message in bytes. (24)84RequestIdSpecifies the Remote NDIS message id value. This value is used to match host sent messages with de

51、vice responses.124MajorVersionRNDIS_MAJOR_VERSIONSpecifies the Remote NDIS protocol major version implemented by the host.164MinorVersionRNDIS_MINOR_VERSIONSpecifies the Remote NDIS protocol minor version implemented by the host.204MaxTransferSizeSpecifies the maximum size, in bytes, of any single b

52、us data transfer that the host expects to receive from the device. Typically,each bus data transferaccommodates a single Remote NDIS message.However, the device may bundle severalRemote NDIS data packets into a single transfer (see REMOTE_NDIS_PACKET_MSG).3.1.2Response to REMOTE_NDIS_INITIALIZE_MSGT

53、he device should report its medium type, Remote NDIS version numbers, and its type (connection-lessor connection-oriented)in its response toREMOTE_NDIS_INITIALIZE_MSG.The Status field should be set to RNDIS_STATUS_SUCCESSif the device initialized successfully; otherwise it is set to an error code in

54、dicating the failure.The device should return the highest Remote NDIS protocol version that it can support, in MajorVersion and MinorVersion the combined version number should be less than or equal to the version number specified by the host in the REMOTE_NDIS_INITIALIZE_MSG message. This allows for

55、 the device to fall back to a compatibility mode when the host implements a Remote NDIS protocol version that is lower than that supported by the device.The DeviceFlags field specifies the device type. MaxPacketsPerTransfer is the maximum number of REMOTE_NDIS_PACKET_MSGthsat the device can handle i

56、n a single transfer to it - this should be at least 1.MaxTransferSize is the maximum size, inbytes, of a single data transfer that the device expects to receive from the host. The device can specify the byte alignment it expects for each Remote NDIS message that is part of a multi-message transfer to itPacketAlignmentFactor contains thisvalue as an exponent of 2. For example, this is set to 3 to indicate 8-byte alignment.NOTE: The AFListSize and AFListOffset fields are only relevantfor connection-oriented devices that include a call manager. Connectionless devices sh

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论