none
Help Me to understand / NDIS INF RRS feed

  • Question

  • ; TODO: Ensure that the list of media types below is correct.  Typically,
    ; filters include "ethernet".  Filters may also include "ppip" to include
    ; native WWAN stacks, but you must be prepared to handle the packet framing.
    ; Possible values are listed on MSDN, but common values include:
    ;     ethernet, wan, ppip, wlan
    HKR, Ndi\Interfaces, FilterMediaTypes,,"ethernet, wan, ppip"
    ; TODO: Specify whether you have a Mandatory or Optional filter.
    ; For a Mandatory filter, use this:
    ;     HKR, Ndi,FilterRunType,0x00010001, 1 ; Mandatory filter
    ; For an Optional filter, use this:
    ;     HKR, Ndi,FilterRunType,0x00010001, 2 ; Optional filter
    HKR, Ndi,FilterRunType,0x00010001, 1 ; Mandatory filter
    
    ; By default, Mandatory filters unbind all protocols when they are
    ; installed/uninstalled, while Optional filters merely pause the stack.  If you
    ; would like to override this behavior, you can include these options.  These
    ; options only take effect with 6.30 filters on Windows "8" or later.
    ; To prevent a full unbind, and merely pause/restart protocols:
    ;     HKR, Ndi,UnbindOnAttach,0x00010001, 0 ; Do not unbind during FilterAttach
    ;     HKR, Ndi,UnbindOnDetach,0x00010001, 0 ; Do not unbind during FilterDetach
    ; To force a full unbind/bind (which includes pause/restart, of course):
    ;     HKR, Ndi,UnbindOnAttach,0x00010001, 1 ; Unbind during FilterAttach
    ;     HKR, Ndi,UnbindOnDetach,0x00010001, 1 ; Unbind during FilterDetach
    ;
    
    ; NDIS can start a miniport stack even if some Optional filters are
    ; missing.  However, NDIS reserves the right to wait for the Optional
    ; filters to be registered, since it's faster to attach a filter if
    ; the protocols haven't been bound yet.
    ; If your Optional filter is unlikely to be started at boot, you can
    ; use this hint to inform NDIS to spend less time waiting for your
    ; filter.  Note this setting is ignored for Mandatory filters; NDIS
    ; always waits forever for all Mandatory filters.
    ;     HKR, Ndi,NdisBootStart,0x00010001, 0 ; Don't wait for this driver to start at boot
    ; Enable this setting only if your filter will be bound, but the driver
    ; is not usually started at boot.  If your driver will typically start
    ; at boot, then enabling this setting would defeat the NDIS heuristic
    ; and slightly slow down boot.
    
    ;-------------------------------------------------------------------------
    ; Service installation support
    ;-------------------------------------------------------------------------
    [Install.Services]
    ; TODO: Customize the name of your NT service here.
    ; You may also want to add the SPSVCINST_STARTSERVICE flag, like this:
    ;     AddService=NdisLwf,0x800,NdisLwf_Service_Inst ; SPSVCINST_STARTSERVICE
    AddService=NdisLwf,,NdisLwf_Service_Inst
    
    [NdisLwf_Service_Inst]
    DisplayName     = %NdisLwf_Desc%
    ServiceType     = 1 ;SERVICE_KERNEL_DRIVER
    ; Typically you will want your filter driver to start with SERVICE_SYSTEM_START.
    ; If it is an Optional filter, you may also use 3;SERVICE_DEMAND_START.
    StartType       = 1 ;SERVICE_SYSTEM_START
    ErrorControl    = 1 ;SERVICE_ERROR_NORMAL
    ; TODO: Customize this to your binary's filename.
    ServiceBinary   = %12%\ndislwf.sys
    LoadOrderGroup  = NDIS
    Description     = %NdisLwf_Desc%
    AddReg          = Common.Params.reg, NdisImPlatformBindingOptions.reg
    
    [Install.Remove.Services]
    ; TODO: Customize the name of your NT service here.
    ; The SPSVCINST_STOPSERVICE flag instructs SCM to stop the NT service
    ; before uninstalling the driver.
    DelService=NdisLwf,0x200 ; SPSVCINST_STOPSERVICE
    
    [Common.Params.reg]
    ; TODO: You can add any sort of NDIS parameters here.  Filter drivers
    ; don't always need NDIS parameters, so it's okay to have nothing here.
    
    ; TODO: Remove the sample parameters below.
    
    ; Sample 1: "DriverParam" is a per-driver parameter.
    HKR, FilterDriverParams\DriverParam,     ParamDesc,   , "Driverparam for lwf"
    HKR, FilterDriverParams\DriverParam,     default,     , "5"
    HKR, FilterDriverParams\DriverParam,     type,        , "int"
    
    ; Sample 2: "AdapterParam" is a per-module parameter.
    HKR, FilterAdapterParams\AdapterParam,   ParamDesc,   , "Adapterparam for lwf"
    HKR, FilterAdapterParams\AdapterParam,   default,     , "10"
    HKR, FilterAdapterParams\AdapterParam,   type,        , "int"
    
    [NdisImPlatformBindingOptions.reg]
    ; By default, when an LBFO team or Bridge is created, all filters will be
    ; unbound from the underlying members and bound to the TNic(s). This keyword
    ; allows a component to opt out of the default behavior
    ; To prevent binding this filter to the TNic(s):
    ;   HKR, Parameters, NdisImPlatformBindingOptions,0x00010001,1 ; Do not bind to TNic
    ; To prevent unbinding this filter from underlying members:
    ;   HKR, Parameters, NdisImPlatformBindingOptions,0x00010001,2 ; Do not unbind from Members
    ; To prevent both binding to TNic and unbinding from members:
    ;   HKR, Parameters, NdisImPlatformBindingOptions,0x00010001,3 ; Do not bind to TNic or unbind from Members
    HKR, Parameters, NdisImPlatformBindingOptions,0x00010001,0 ; Subscribe to default behavior
    
    
    
    
    

    The following snippet is NDIS Driver INF file. Can you please help me understand the bold marked text sectios ? 

    Tuesday, March 1, 2016 6:42 PM

Answers

  • Stop whining. No one here is getting paid to answer your questions, and we're all in different time zones. If you cannot tolerate the pace at which we answer questions, then pay for support

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    • Marked as answer by Thomas Hopes Thursday, March 3, 2016 12:09 PM
    Wednesday, March 2, 2016 5:32 PM
    Moderator
  • The bolded sections add values to the registry that causes the control panel for that device to generate a property page. The docs are here

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Tuesday, March 1, 2016 7:43 PM
    Moderator

All replies

  • The bolded sections add values to the registry that causes the control panel for that device to generate a property page. The docs are here

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Tuesday, March 1, 2016 7:43 PM
    Moderator
  • The bolded sections add values to the registry that causes the control panel for that device to generate a property page. The docs are here

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Can anyone tell me more about it ? 

    I am studying this !

    Tuesday, March 1, 2016 11:19 PM
  • The bolded sections add values to the registry that causes the control panel for that device to generate a property page. The docs are here

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    I don't quite understand. Can you explain a little bit  for me please   ? 

    This will be a great help. I am stuck with this! 

    Wednesday, March 2, 2016 8:06 AM
  • What part of my explanation - and the docs - don't you understand?

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Wednesday, March 2, 2016 5:31 PM
    Moderator
  • Stop whining. No one here is getting paid to answer your questions, and we're all in different time zones. If you cannot tolerate the pace at which we answer questions, then pay for support

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    • Marked as answer by Thomas Hopes Thursday, March 3, 2016 12:09 PM
    Wednesday, March 2, 2016 5:32 PM
    Moderator
  • What part of my explanation - and the docs - don't you understand?

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    Thanks Brian. Thanks that you said to me. I HIGHLY APPRECIATE THAT. I will let you know wherever 

    i stuck. 

    Thanks my buddy.. 

    Wednesday, March 2, 2016 11:37 PM
  • The bolded sections add values to the registry that causes the control panel for that device to generate a property page. The docs are here

     -Brian


    Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

    is the "parameter"from above snippet  and "param" from documentation is same ? 

    Thursday, March 3, 2016 11:40 AM
  • The most important text in the above example is: " Filter drivers don't always need NDIS parameters, so it's okay to have nothing here."

    It's indeed a bit confusing. Not sure what means per-module there. What is "module"?

    Anyway,  ignore petty details that swamp you and stop your progress, keep focused. (But the problem is that you don't know which details are important)

    -- pa



    • Edited by Pavel A Thursday, March 3, 2016 1:07 PM
    Thursday, March 3, 2016 1:02 PM
  • ; TODO: Remove the sample parameters below.

    What it wants me to remove ? 

    Saturday, March 5, 2016 4:16 PM
  • The sample parameters. That's the fictitious parameters used only to illustrate how the parameters can be added if actually needed

    Saturday, March 5, 2016 7:55 PM