Extending The Microsoft PassThru NDIS Intermediate Driver--Part 3
TestIOCTL Application User's Guide
March 15, 2004

Copyright © 2004 by Printing Communications Assoc., Inc. (PCAUSA). All rights reserved

 

Test Application Overview

To view the list of adapters that have been bound to the PassThru NDIS IM driver just run the TestIOCTL application with the /enum option:

    TestIOCTL /enum

You will see information similar to this example output:

PassThru User I/O Test Application
Copyright (c) 2003 Printing Communications Assoc., Inc. (PCAUSA)
All rights reserved.
Driver Bindings:
   "\Device\{B3B985AD-EB56-4F6A-8D16-131118E52131}"
      "\DEVICE\{9C9770B5-CFBC-41DF-BE1D-510CEC826190}"  <-- Lower Adapter Name
      Description: " National Semiconductor Corp. DP83820 10/100/1000 GigPhyter PCI Adapter"
      Medium: 802.3
      Mac address = 00-40-F4-00-07-B5
      Media Connect Status: Connected
   "\Device\{03BB2564-4AA2-4E9B-B251-79D6A69B461F}"
      "\DEVICE\NDISWANIP"
      Description: " NdisWan Adapter"
      Medium: 802.3
      Mac address = A6-3E-20-52-41-53
      Media Connect Status: Connected

 

To set a blocking list use this command:

    TestIOCTL /set filename

Where filename is a file that contains the NDIS name of the lower adapter to be used followed by the list of dotted IP addresses to block on the adapter. Here is an example that is targeted to the "National Semiconductor Corp. DP83820 10/100/1000 GigPhyter PCI Adapter":

#
# Sample IP Address Blocking List File
#
# Lines beginning with '#' are comments. Leading and trailing whitespace
# is ignored. Empty lines are ignored.
#
# The first non-comment line must be the NDIS name of the lower adapter
# that the list of IP addresses to block is intended.
#
\Device\{B3B985AD-EB56-4F6A-8D16-131118E52131}
#
# Then comes the list of IP addresses to block. The IP addresses can
# have a comment, if desirable.
#
172.16.1.10
  192.168.2.1
    192.168.2.2     
 192.168.2.3    
172.16.100.5
...
192.168.2.4     ; Can have comments per IP address, if desirable...

 

If you want to return all adapters to the default state – namely, no IP addresses and so no filtering – do

    TestIOCTL /setdflt

 

If you want view IP blocking statistics use this command:

    TestIOCTL /stats