edust
驱动中牛
驱动中牛
  • 注册日期2002-04-02
  • 最后登录2003-06-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1577回复:11

XP DDK Passthru 的一个疑问

楼主#
更多 发布于:2002-12-03 16:09
XP DDK 的 Passthru 安装之后那个“WAN 微型端口(IP) - Passthru Miniport”和“WAN 微型端口(Network Monitor) - Passthru Miniport”是从哪儿来的?代码里好象没有相关内容啊?
mikeluo
驱动老牛
驱动老牛
  • 注册日期2001-09-04
  • 最后登录2007-05-07
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2002-12-03 16:59
看inf文件,那些东西是加到注册表里的
学而不思则罔,思而不学则殆 学而思之,思而学之,岂非圣人乎?
edust
驱动中牛
驱动中牛
  • 注册日期2002-04-02
  • 最后登录2003-06-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2002-12-03 17:04
没有啊,是下面的哪部分?

 
; -- NETSF.INF --
;
; Passthru driver INF file - this is the INF for the service (protocol)
; part.
;
; Copyright (c) 1993-2001, Microsoft Corporation
;
; ----------------------------------------------------------------------
; Notes:
; 0. The term \"filter\" is used in this INF to refer to an NDIS IM driver that
;    implements a 1:1 relationship between upper and lower bindings.
;
; 1. Items specifically required for a filter have been marked with
;    \"!!--Filter Specific--!!\" keyword
; 2. In general a filter DOES NOT require a notify object for proper installation.
;    A notify object is only required if one wants to have better control
;    over binding operations or if one wants to receive notifications
;    when other components get installed/removed/bound/unbound.
;    Since Windows 2000 systems do not have support for CopyINF directive,
;    a notify object is required to programmatically copy the miniport INF  
;    file to the system INF directory. Previous versions of this INF file
;    erroneously used to copy the INF files directly by using the CopyFiles
;    directive.
;    On Windows XP, you can install a filter IM without a notify object.
;    by following the instructions in (4).
;
; 3. If you want to use this INF file with your own IM driver, please
;    make the following modifications:
;    File netsf.inf
;    --------------
;    a. In section [SourceDiskFiles] and [Passthru.Files.Sys]
;       change passthru.sys to the name of your own driver binary.
;    b. In section [Passthru.ndi.AddReg], change values of
;       BindForm and MiniportId to appropriate values.
;    File netsf_m.inf
;    ----------------
;    a. Replace MS_PassthruMP with InfId of your miniport.
;    b. In section [PassthruMP.AddService],
;       change ServiceBinary appropriately.
;    c. In section [PassthruMP.ndi.AddReg],
;       change \"Passthru\" in the line having \"Service\"
;       to reflect the appropriate name
;
; 4. If you want to use this INF for installing the passthru IM without
;    the notify object, do the following:
;    a. In section [Passthru.ndi.AddReg],
;       Comment out lines having ClsId and ComponentDll
;    b. In section [Passthru.ndi],
;       change the value of Characteristics so that it does not have
;       the NCF_HAS_UI flag
;    c. In section [SourceDiskFiles], comment out the line having passthru.dll
;    d. In section [Passthru.ndi], remove Passthru.Files.Init from the
;       CopyFiles line.
;
; ----------------------------------------------------------------------

[Version]
Signature  = \"$Windows NT$\"
Class      = NetService
ClassGUID  = {4D36E974-E325-11CE-BFC1-08002BE10318}
Provider   = %Msft%
DriverVer  = 06/24/1999,5.00.2071.1


[Manufacturer]
%Msft% = MSFT

[ControlFlags]

;=========================================================================
;
;=========================================================================

[MSFT]
%Passthru_Desc% = Passthru.ndi, ms_passthru



[Passthru.ndi]
AddReg          = Passthru.ndi.AddReg, Passthru.AddReg
Characteristics = 0x4490 ; NCF_HAS_UI | NCF_FILTER | NCF_NO_SERVICE | NCF_NDIS_PROTOCOL !--Filter Specific--!!
CopyFiles       = Passthru.Files.Init, Passthru.Files.Sys
CopyInf         = netsf_m.inf

[Passthru.ndi.Remove]
DelFiles = Passthru.Files.Init, Passthru.Files.Sys

[Passthru.ndi.Remove.Services]
DelService = Passthru

; ----------------------------------------------------------------------
; File copy
;
[SourceDisksNames]
1=%DiskDescription%,\"\",,

[SourceDisksFiles]
passthru.dll=1
passthru.sys=1
netsf_m.inf=1

[DestinationDirs]
DefaultDestDir = 12
Passthru.Files.Init  = 11   ; %windir%\\System32
Passthru.Files.Sys   = 12   ; %windir%\\System32\\drivers

; Copying of passthru.dll is required only if the filter has a Notify object
[Passthru.Files.Init]
passthru.dll,,,2

[Passthru.Files.Sys]
passthru.sys,,,2

[InfSourcePathInfo]
; Used by the notify object to figure out where the original media is
; located (so it can use SetupCopyOEMInf to install Net INF located
; there).

OriginalInfSourcePath = %1%

; ----------------------------------------------------------------------
; Filter Install
;

[Passthru.ndi.AddReg]
HKR, Ndi, HelpText, , %Passthru_HELP%

; ----------------------------------------------------------------------
; Keys required if a Notify object is present
; These keys should be omitted if the Filter does not have any Notify object
;
; Note:
; 1. Only include the following lines if your filter has configuration UI
;    that needs to be displayed.  Otherwise, you should not need a notify
;    object.
; 2. If you write your own notifyobject, use a different GUID for ClsID!!
;    (Generate this with uuidgen.exe)
;
HKR, Ndi, ClsID,        , {df2e4f67-e93a-11d1-bb14-0000f8779051}
HKR, Ndi, ComponentDll, , passthru.dll

; ----------------------------------------------------------------------
; !!--Filter Specific--!!
;
; Note:
; 1. Other components may also have UpperRange/LowerRange but for filters
;    the value of both of them must be noupper/nolower
; 2. The value FilterClass is required.
; 3. The value Service is required
; 4. FilterDeviceInfId is the InfId of the filter device (miniport) that will
;    be installed for each filtered adapter.
;    In this case this is ms_passthrump (refer to netsf_m.inf)
;
HKR, Ndi,            FilterClass,         , failover
HKR, Ndi,            FilterDeviceInfId,   , ms_passthrump
HKR, Ndi,            Service,             , Passthru
HKR, Ndi\\Interfaces, UpperRange,          , noupper
HKR, Ndi\\Interfaces, LowerRange,          , nolower
HKR, Ndi\\Interfaces, FilterMediaTypes,    , \"ethernet, tokenring, fddi, wan\"

[Passthru.AddReg]
; The following key is Required
; The following key is Passthru specific
HKR, Parameters, Param1, 0, 4

; ----------------------------------------------------------------------
[Strings]
Msft = \"Microsoft\"
DiskDescription = \"Microsoft Passthru Driver Disk\"

Passthru_Desc = \"Passthru Driver\"
Passthru_HELP = \"Passthru Driver\"
edust
驱动中牛
驱动中牛
  • 注册日期2002-04-02
  • 最后登录2003-06-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2002-12-03 17:15
还有个问题,不是说 ProtocolReceivePacket 可能收到一个包数组吗,怎么 XP Passthru 里的 PtReceivePacket 每次只处理一个包?

mikeluo 帮帮忙,顺便连这个问题也解答了吧!
mikeluo
驱动老牛
驱动老牛
  • 注册日期2001-09-04
  • 最后登录2007-05-07
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2002-12-03 17:26
你说的是在设备管理器里面的那个吧?那个应该是PtBindAdapter里面binding上去的
学而不思则罔,思而不学则殆 学而思之,思而学之,岂非圣人乎?
mikeluo
驱动老牛
驱动老牛
  • 注册日期2001-09-04
  • 最后登录2007-05-07
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2002-12-03 17:29
ddk里面说的是当NIC传上来的是一个packet array时,调用的是ProtocolReceivePacket 但是这个调用是通过ndis进行的,ndis每次只会传过来一个完整的包,那个packet array在ndis里面呢,

你在2k下用windbg就可以了吧,那个东西比softice容易使用一些:)
不过要两台机器
学而不思则罔,思而不学则殆 学而思之,思而学之,岂非圣人乎?
edust
驱动中牛
驱动中牛
  • 注册日期2002-04-02
  • 最后登录2003-06-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2002-12-03 18:10
 
你说的是在设备管理器里面的那个吧?那个应该是PtBindAdapter里面binding上去的


对,是在“设备管理器”里面看到的。

你的意思是说是 NDIS 让我们绑定到了 WAN?

这个 WAN 有什么用?可以控制 Modem 等等?
edust
驱动中牛
驱动中牛
  • 注册日期2002-04-02
  • 最后登录2003-06-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
7楼#
发布于:2002-12-03 18:12
 
ddk里面说的是当NIC传上来的是一个packet array时,调用的是ProtocolReceivePacket 但是这个调用是通过ndis进行的,ndis每次只会传过来一个完整的包,那个packet array在ndis里面呢


哈哈,茅塞顿开!多谢多谢!
edust
驱动中牛
驱动中牛
  • 注册日期2002-04-02
  • 最后登录2003-06-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
8楼#
发布于:2002-12-03 18:16
 
你在2k下用windbg就可以了吧,那个东西比softice容易使用一些:)
不过要两台机器


我现在用 DbgView,巨爽!辅助功能也挺多!
mikeluo
驱动老牛
驱动老牛
  • 注册日期2001-09-04
  • 最后登录2007-05-07
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
9楼#
发布于:2002-12-03 21:08
[quote]你说的是在设备管理器里面的那个吧?那个应该是PtBindAdapter里面binding上去的


对,是在“设备管理器”里面看到的。

你的意思是说是 NDIS 让我们绑定到了 WAN?

这个 WAN 有什么用?可以控制 Modem 等等? [/quote]
你的网卡上面也应该binding了一个,道理是一样的,不过具体的我没有跟过,modem接的是ndiswan,
学而不思则罔,思而不学则殆 学而思之,思而学之,岂非圣人乎?
edust
驱动中牛
驱动中牛
  • 注册日期2002-04-02
  • 最后登录2003-06-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
10楼#
发布于:2002-12-04 08:50
呵呵,谢谢!给分:)
mikeluo
驱动老牛
驱动老牛
  • 注册日期2001-09-04
  • 最后登录2007-05-07
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
11楼#
发布于:2002-12-04 09:12
又混到分了,呵呵
学而不思则罔,思而不学则殆 学而思之,思而学之,岂非圣人乎?
游客

返回顶部