微软RNDIS协议书范本.docx
《微软RNDIS协议书范本.docx》由会员分享,可在线阅读,更多相关《微软RNDIS协议书范本.docx(44页珍藏版)》请在冰豆网上搜索。
![微软RNDIS协议书范本.docx](https://file1.bdocx.com/fileroot1/2023-1/5/947baa05-c6ad-4933-b0a1-a94531ab25b5/947baa05-c6ad-4933-b0a1-a94531ab25b51.gif)
微软RNDIS协议书范本
RemoteNDISSpecification
Rev1.1
August9,2002
©1998-2001MicrosoftCorporation.Allrightsreserved.
1Introduction
2
RemoteNDISisabus-independentclassspecificationforEthernet(802.3)networkdevicesondynamicPnPbussessuchasUSB,1394,BlueTooth,andInfiniBand.Thisspecificationdefinesabus-independentmessageprotocolbetweenahostPCandaRemoteNDISdeviceoverabstractcontrolanddatachannels.Alsoincludedarebus-mappingchapterswhichdefinespecificfeaturesofthespecificationontherespectivebusses.
The“legacy-free”PCrevolutioniseliminatingnotonlylegacyconnectionports(e.g.serial,parallel,PS/2)butalsolegacyexpansionbuseslikeISAandPCIinmainstreamPCs.Theresulting“sealedcase”PCswillrequireeitherbuilt-innetworkingsupportonthemotherboardorsupportfornetworkadaptersonexternalbusses.Thisspecificationdefinesamessageprotocolforexternalbusattachednetworkdevices.Itispreciseenoughtoallowvendor-independentclassdriversupportforRemoteNDISdevicesonthehostPC.
RemoteNDISisafairlysimpleextensionofthewell-understoodandtime-testedNDISarchitecture.NDISdefinesafunction-callinterfacefordevice-specificNDISminiportdrivers.Thisinterfacedefinesprimitivestosendandreceivenetworkdata,andtoqueryandsetconfigurationparametersandstatistics.RemoteNDISleveragesNDISbydefiningamessagewrappingfortheNDISminiportinterface,thusmovingtheNDIS-handlingcodefromaminiportdriverintothedeviceitself.Inthisandotherways,theRemoteNDISspecificationallowsforawiderangeofdevicefunctionalityandperformancelevels.
2.1LicenseAgreement
2.2
TheRemoteNDISSpecificationandanyaccompanyingmaterials(the“Specification”)providedbyMicrosoftisforyourpersonaluseonly,andmaybeusedsolelyforthepurposeofimplementingtheRemoteNDISprotocolmessagesettointerfacewith(i)aMicrosoftWindowsoperatingsystemor(ii)abusornetwork-connectedcommunicationsdevice,suchasaUSB,1394orTCP/IPdevice.THESPECIFICATIONMAYNOTBECOPIEDORDISTRIBUTED.
Microsoftmayhavecopyrights,patentsorpendingpatentapplicationscoveringsubjectmatterintheSpecification.TotheextentMicrosofthassuchcopyrights,patentsorapplications,Microsoftagreestograntanonexclusive,royalty-free,world-widelicenseunderthesecopyrights,patentsorapplicationssolelytoimplementtheRemoteNDISSpecificationtointerfacewith(i)aMicrosoftWindowsoperatingsystemor(ii)abusornetwork-connectedcommunicationsdevice,suchasaUSB,1394orTCP/IPdevice,onconditionthatyouagreenottoassertanyintellectualpropertyrightsagainstMicrosoftorothercompaniesfortheirimplementationoftheSpecification.MicrosoftreservesallotherrightsitmayhaveintheSpecification.ThefurnishingofthisdocumentdoesnotgiveyouanylicensetoanyotherMicrosoftpatents,trademarks,copyrights,orotherintellectualpropertyrights.Specifically,neitherthisdocumentnortheSpecificationgiveyouanylicensetotheNDISSpecificationortoUSBCommunicationDeviceClasstechnology.
TheSpecificationisprovided"ASIS"withoutwarrantyofanykind.Tothemaximumextentpermittedbyapplicablelaw,Microsoftfurtherdisclaimsallwarranties,includingwithoutlimitationanyimpliedwarrantiesofmerchantabilityandfitnessforaparticularpurpose,aswellaswarrantiesoftitleandnoninfringement.TheentireriskarisingoutoftheuseorperformanceoftheSpecificationremainswithyou.
Tothemaximumextentpermittedbyapplicablelaw,innoeventshallMicrosoftoritssuppliersbeliableforanyconsequential,incidental,direct,indirect,special,punitive,orotherdamageswhatsoever(including,withoutlimitation,damagesforlossofbusinessprofits,businessinterruption,lossofbusinessinformation,orotherpecuniaryloss)arisingoutoftheuseoforinabilitytousetheSpecification,evenifMicrosofthasbeenadvisedofthepossibilityofsuchdamages.Becausesomestates/jurisdictionsdonotallowtheexclusionorlimitationofliabilityforconsequentialorincidentaldamages,theabovelimitationmaynotapplytoyou.
3ConceptsandDefinitions
4
Thissectiondiscussesrequirementsandcharacteristicsofthechannelsusedtocommunicatebetweenthehostandtheremotedevice.Devicestatetransitionsandmajoroperationssuchasinitialization,haltandresetarealsodefinedhere.
4.1Controlchannel
4.2
Thespecificsofthecontrolchannelaregivenintheappropriatebus-mappingchapter.Thecontrolchannelmustbereliableandensuresequenceddelivery.Itisusedforallcommunicationexceptforthetransmissionofnetworkdatapackets.AllrequiredcontrolmessagesexceptREMOTE_NDIS_HALTandREMOTE_NDIS_INDICATE_STATUS_MSGarerequest/responseexchangesinitiatedbythehost.ThedevicemustrespondwithintheControlTimeoutPeriodasspecifiedintheappropriatebus-mappingchapter.
4.3Datachannel
4.4
Thespecificsofthedatachannelaregivenintheappropriatebus-mappingchapter.Thedatachannelisusedexclusivelyforthetransmissionofnetworkdatapackets.Itmayconsistofmultiplesub-channels(e.g.forvaryingqualityofservice)asdefinedintheappropriatebus-mappingchapter.Thereliabilityanddeliveryspecificsofthedatachannelarelikewisedefinedintherespectivebus-mappingchapter.
4.5InitializationandTeardown
4.6
Thecontrolanddatachannelsareinitializedasspecifiedintherespectivebus-mappingchapter.ThehostandRemoteNDISdevicethenexchangeinitializationmessages.ThehostsendsREMOTE_NDIS_INITIALIZE_MSGtothedevice,andthedeviceprovidesinformationaboutitstype,supportedmediumandversionintheresponsemessageREMOTE_NDIS_INITIALIZE_CMPLT.
EitherthehostortheremotedevicecanhaltthenetworkconnectioninanabortivefashionviatheREMOTE_NDIS_HALT_MSGmessage.Alloutstandingrequestsandpacketsshouldbediscardedonreceiptofthismessage.
4.7DeviceStateDefinitions
4.8
Followingbus-levelinitialization,thedeviceisintherndis-uninitializedstate.UponreceivingREMOTE_NDIS_INITIALIZE_MSGandreturningREMOTE_NDIS_INITIALIZE_CMPLTwithstatussuccess,thedeviceenterstherndis-initializedstate.
UponreceivingREMOTE_NDIS_SET_MSGfortheOID_GEN_CURRENT_PACKET_FILTERparameterwithanon-zerofilter,thedeviceenterstherndis-data-initializedstate.Whenintherndis-data-initializedstate,receivingREMOTE_NDIS_SET_MSGforOID_GEN_CURRENT_PACKET_FILTERwithazerofiltervalueforcesthedevicebackintotherndis-initializedstate.
ReceivingREMOTE_NDIS_HALT_MSGorabus-leveldisconnectorhard-resetatanytimeforcesthedeviceintotherndis-uninitializedstate.
4.8.1Halt
4.8.2
Atanytimethatthedeviceisintherndis-initializedorrndis-data-initializedstate,thehostcomputermayterminatetheRemoteNDISfunctionalityofthedeviceinanabortivefashionbysendingREMOTE_NDIS_HALT_MSGtothedevice.
4.8.3Reset
4.8.4
Thecommunicationchannelis“soft-reset”whenanerrorsuchasmessagetimeoutoccurs.Thehostmayinitiateasoft-resetatanytimewhenthedeviceisintherndis_initializedstatebysendingREMOTE_NDIS_RESET_MSGtothedevice(seedetailsbelow);andthedevicemustsendaresponsemessagewhenithascompletedthereset.Forexample,thehostmayinitiateasoft-resetwhenanerror,suchasamessagetimeouthasoccurred.
Notethatthisisasoftresetinthesensethatanyhandles(e.g.VCsforconnection-orienteddevices)continuetobevalidafterthereset.TheRemoteNDISdevice,aspartoftheresetprocess,discardsalloutstandingrequestsandpackets.Theremotedevicemayresetsomeofitshardwarecomponents,butkeepsallcommunicationchannelstothehostintact.
4.8.4.1HardReset
4.8.4.2
IftheRemoteNDISdeviceperformsahardreset(i.e.reboot),thiseventisassumedtobeequivalentof“Remove”followedby“Add”plug-and-playevents.ThehostNDISmini-portwillbehaltedandremoved,andanewinstancewillbeaddedandstarted.Allbus-levelandRemoteNDISinitializationwillbere-executed.ARemoteNDISdevicemayhard-resetitselfintheeventofacriticaldevicefailure.
4.9FlowControl
4.10
TheRemoteNDISdevicemayneedtoexerciseflowcontroltopreventthehostfromoverflowingitsdatabufferswithpackets.Anyflowcontrolprovisionsorrequirementsaregivenintherespectivebus-mappingchapter.
4.11ByteOrdering
4.12
Allnumericvaluesinmessagefieldsdefinedbythisspecificationareassumedtobecodedinlittle-endianformat,i.e.leastsignificantbytefirst.
4.13Encapsulation
4.14
ThissectiondoesnotspecifythewayNDISmessagesareencapsulatedinnativebusmessagesorprimitives.Pleaserefertotheappropriatebus-mappingchapterformoredetails.
4.15RemoteNDISVersion
4.16
Table21definestheRemoteNDISprotocolversionidentifiersexchangedbetweenhostanddevice.
Notethattheseareunrelatedtotherevisionnumberofthisspecification.
Table21:
RemoteNDISProtocolVersion
VersionIdentifier
Value
Description
RNDIS_MAJOR_VERSION
1
RemoteNDISMajorVersionspecifiedinthisdocument.
RNDIS_MINOR_VERSION
0
RemoteNDISMinorVersionspecifiedinthisdocument.
4.17StatusValues
4.18
TheRemoteNDISstatusvaluesaregenerallyequivalenttothe32-bitstatusvaluesdefinedintheWindows2000DDK.Specifically,highbitsetindicatesanerrorstateandthehighbitclearindicatesasuccessstate.ThespecificRemoteNDISstatusvaluesusedinthisspecificationarelistedbelow,otherscanbeinferredfromtheWindows2000DDKorMSDN.AdevicemayreturnanysemanticallycorrectRemoteNDISstatusv