Windows NDIS filter - how to check if port is used by operating system

Hi,
I am writing a windows NDIS filter driver (for versions 6.0,6.2.6.3) and would like to be able to query from inside the kernel about the status of a tcp port (is it in use?).
The function: FilterReceiveNetBufferLists is called when I receive a packet. Afterwards the tcp header of the packet is  extracted. I want to check if the destination port which I've extracted from the header is being used on the local machine. 
Can I use WSK Network API, WFP or some other API to check if a port is being used by the operating system? and if so how do I do it?
Thanks in advance!

This won't be easy, but you can get the address table by sending IOCTL_TCP_QUERY_INFORMATION_EX to \Device\TCP as documented
here. You'll need to spend some time looking at TCPIOCTL.H in the SDK, too. If you search the Internet for IOCTL_TCP_QUERY_INFORMATION_EX, you'll find some hints on how to use it.
 -Brian
Azius Developer Training www.azius.com Windows device driver, internals, security, & forensics training and consulting. Blog at www.azius.com/blog

Similar Messages

  • How to check does my notebook use integrated or AMD graphic card?

    How to check does my notebook use integrated or AMD graphic card? Some games show me that they use integrated card: http://img849.imageshack.us/img849/4125/98ab1c28dc9f4b51b537435.png ?
    This question was solved.
    View Solution.

    Hello,
    First click in Start Menu, Control Painel in the up right side click in Category and left in Small Icons.
    Search Device Manager.
    Display Adapters.
    Which is your Operation System ?
    Windows 7?
    If yes.
    Click with the right clickpad in the desktop and select Display.
    Screen Resolution you can see how graphic your used or change if you want to.
    Att Cristian
    If this answer help you click in Kudos to tanks.
    Tanks
    If this answer help you click in Kudos to tanks.
    If you don't have more question click in Accept as Solution to close this case.
    Best Regards Cristian Derick.
    Senior Support Analyst.

  • In ecatt - how to check at database level using ABAP

    Hi,
    How to check at database level using ABAP in Ecatt tool.
    say,for example I want to check a particular sales order is invoiced or not ,at the database level and if it is invoiced I have stop proceeding to invoicing of that sales order number.
    Could anybody suggest on this with an example?
    thanks.

    Hi,
    you can use the command GETTAB to access single db records.
    Full specified or partitial specified keys can be use at GETTAB. It will return always only one record, also if a couple could match your selection.
    For more advanced scenarios you can also use eCATTs Inline ABAP. In a block between the commands ABAP. ENDABAP. you can code ABAP statements, e.g. SELECT ... INTO TABLE ...
    eCATT script parameters of type 'V' defined in that script using ABAP/ENDABAP will be transfered into the ABAP block and back to script after ABAP perform.
    Best regards
    Jens

  • How to identify Which ports are using in RAC setup?

    Hi,
    how to identify Which ports are using in RAC setup?
    Thnaks,

    [Viewing Port Numbers and Access URLS|http://download.oracle.com/docs/cd/B19306_01/install.102/b14205/ports.htm#sthref1208]

  • How to check & unzip zip file using java

    Dear friends
    How to check & unzip zip file using java, I have some files which are pkzip or some other zip I want to find out the type of ZIp & then I want to unzip these files, pls guide me
    thanks

    How to check & unzip zip file using java, I have
    ve some files which are pkzip or some other zip I
    want to find out the type of ZIp & then I want to
    unzip these files, pls guide meWhat do you mean "other zip"? Either they're zip archives or not, there are no different types.

  • How to Check authorizations (user profiles) using eCATT?

    Hi All,
    Please tell me how to Check authorizations (user profiles) using eCATT?
    Thanks in advance.
    Regards
    Kalyani

    Hello ,
    Create a script for SU02 transaction in the SAPGUI mode, in the script move to the profiles tab and GETGUI the first profile and loop to all the profiles assigned to the user until you find your required profile.
    Other way is to identify the table where the profiles are stored and then create script using GETTAB , pass the user name and retreive all the profiles assigned to tht particular user, loop through profiles untill you find your required profile.
    Thanks & Best regards,
    Ajay

  • How to findout vnc port no. used by the each guest vm

    hi,
    i am using OVM 2.2.0
    how to findout vnc port no. used by the each guest vm using command line on the VM server
    thanks in advance..

    hi Avi,
    Thanks for your reply
    i tried but still no success & iam getting the following error
    [root@OVM-SERVER-1 ~]# xm list
    Name ID Mem VCPUs State Time(s)
    Domain-0 0 543 2 r----- 459.1
    test 1 300 1 r----- 13.0
    [root@OVM-SERVER-1 ~]# virsh dumpxml
    error: command 'dumpxml' requires <domain> option
    [root@OVM-SERVER-1 ~]# virsh dumpxml 1
    libvir: Remote error : No such file or directory
    libvir: warning : Failed to find the network: Is the daemon running ?
    libvir: Xen Daemon error : internal error domain information incomplete, missing kernel & bootloader
    [root@OVM-SERVER-1 ~]# virsh dumpxml test
    libvir: Remote error : No such file or directory
    libvir: warning : Failed to find the network: Is the daemon running ?
    libvir: Xen Daemon error : internal error domain information incomplete, missing kernel & bootloader

  • How to add tape drive in hyper V operating system

    how to add tape drive in hyper V operating system
    tape drive may be to scsci or USB port.
    how to add pls suggest

    how to add tape drive in hyper V operating system
    tape drive may be to scsci or USB port.
    how to add pls suggest
    You need something like StarWind Tape Redirector that "iSCSI-izes" hardware attached to host. So you'll be able to connect with iSCSI initiator from inside a VM running on this host, some other host or even other physical machine (as long as it
    has iSCSI connectivity), see:
    StarWind Tape Redirector
    http://www.starwindsoftware.com/download-starwind-tape-redirector
    So at the end of the day you'll have something like on the picture below:
    Good news: this software offering is 100% free so you don't need to pay anything to anybody :)
    Hope this helped!
    StarWind Virtual SAN clusters Hyper-V without SAS, Fibre Channel, SMB 3.0 or iSCSI, uses Ethernet to mirror internally mounted SATA disks between hosts.

  • I downloaded microsoft office to my MBP and my question is how do i get the right file or operating system to open it and so that i can use it?

    i downloaded microsoft office to my MBP and my question is how do i get the right file or operating system to open it and so that i can use it?

    Welcome to the Apple Support Communities
    There are two Office versions: Office for Windows, and Office for Mac.
    I suspect that you have downloaded Office for Windows, and you can use it if you install Windows, but a cheaper and easiest way to use Office is to use Office for Mac, so you won't have to install Windows. See > http://www.microsoft.com/mac

  • How to write the given query using 'ANY ' operator

    Hi,
    How to write the given query using 'ANY ' operator , I dont need to fetch to grade_master table twice in database, just need to fetch within the result set.
    SELECT dsg_code,dsg_name,dsg_grade FROM designation_master WHERE dsg_orgn='&&Orgn' and dsg_ctry='&&ctry'
    And dsg_loc ='&&loc' And dsg_oru = '&&oru' and dsg_grade in decode('&&radio_group',
    1, SELECT grd_code FROM grade_master WHERE grd_osm_code in (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&Orgn' and grd_ctry='&&ctry' And grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade'),
    2, SELECT grd_code FROM grade_master WHERE grd_osm_code > (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' and grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code),
    3, SELECT grd_code FROM grade_master WHERE grd_osm_code < (Select grd_osm_code FROM grade_master WHERE grd_orgn='&&orgn' and grd_ctry='&&ctry' And grd_loc ='&&loc' And grd_oru = '&&oru' and grd_code ='&&emp_grade'))
    thanks
    rincy

    Hi,
    One thing I understood my your issue is you want to perform, execution of query once or fetch the results sets my minimizing the number of times executions of queries. It would be hard for us to check in this way, atleast provide some temporary data and some business rules. Only I can IN, >, < (queries logical conditons on inner query)
    - Pavan Kumar N
    - ORACLE OCP - 9i/10g
    https://www.oracleinternals.blogspot.com

  • How do I create multiple live USBs of Operating systems to boot from on one flashdrive?

    How do I create multiple live USBs of Operating systems to boot from on one flashdrive?
    I am attempting to create multiple live USBs within one flashdrive so that i can boot various operating systems without having to buy multiple USb sticks. I am using a Mac OS X Snow Leopard 10.6.8 Operating System currently. I am using the Terminal provided by the OS.
    I would like to try Debian, Kali, Precise Puppy, and Sabayon- with one space left empty for whatever Linux OS I would like to try next. I have partitioned an 8GB flashdrive into the following sections:
    name of intended OS,     space allocated for it:
    1)Debian ........................1.32 GB
    2)Kali..............................2.61GB
    3)Precise Puppy..............163.7MB
    4)Sabayon.......................1.77GB
    5)TBD..............................2.14GB
    I have figured out how to change the .iso files of the operating systems into .img files with the following commands:
    hdiutil convert -format UDRW /path/to/input.iso -o /path/to/output.img
    a .img.dmg file is created, this is corrected in the next line of code *please note: I am a a very beginner at programming, and would greatly appreciate any help. Thank you!
    mv /path/to/output/file.img{.dmg,}
    This is where I started to get confused:
    I entered diskutil list to find the location of the partitions on my flashdrive, and this is the relevant section:
    /dev/disk1
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:     FDisk_partition_scheme                        *8.0 GB     disk1
       1:                 DOS_FAT_32 DEBIAN               1.3 GB     disk1s1
       2:                 DOS_FAT_32 KALI                    2.6 GB     disk1s2
       3:                 DOS_FAT_32 PRECISE            163.7 MB   disk1s3
       4:                 DOS_FAT_32 SABAYON           1.8 GB     disk1s5
       5:                 DOS_FAT_32 TBD                     2.1 GB     disk1s6
    This is the code I attempted to use and the subsequent result:
    charles-burtons-mac-mini:~ charlesburton$ sudo dd if=/Users/charlesburton/Desktop/debian-live-7.2-i386-gnome-desktop.img of=/dev/disk1s1 bs=1m
    dd: /dev/disk1s1: Resource busy
    *at this point I went to the Disk Utility GUi and unmounted only the DEBIAN partition, now back to the terminal*
    charles-burtons-mac-mini:~ charlesburton$ sudo dd if=/Users/charlesburton/Desktop/debian-live-7.2-i386-gnome-desktop.img of=/dev/disk1s1 bs=1m
    dd: /dev/disk1s1: end of device
    1259+0 records in
    1258+1 records out
    1320005632 bytes transferred in 1011.966891 secs (1304396 bytes/sec)
    Please may someone help explain why I had a return value of +1 in my records in and how I can make it work properly.

    I would like to know the answer to this as well.  I tried renaming the 3D version by adding 3D after it, but it still not a separate movie in iTunes.
    It's putting them in the same folder.

  • How do i go back to my old operating system? now i can't play my photos on apple tv with lion os

    how do i go back to my old operating system? now i can't play my photos on apple tv with lion os

    There's an overview here
    http://applehelpwriter.com/2011/09/10/how-to-turn-a-lion-into-a-snow-leopard/

  • How can I file share with another person if both of us are using Mac operating systems?  Do we need to use a third party file sharing system or does apple have this capability?

    How can I file share with another personif both of us are using Mac operating systems (one of us using a Mac laptop and the other using iMac).  Our intention is to have a working document that can be changed by both parties over time and both parties will have visibility to the others changes.

    Use SugarSync

  • Yosemite looks like a downgrade, flat, childish and no more ability to make the view of anything personal.  How do I go back to the previous operating system?

    Yosemite looks like a downgrade, flat, childish and no more ability to make the view of anything personal.  How do I go back to the previous operating system?

    Erase your hard drive using Disk Utility from the Recovery HD, then restore your old system from your backups.

  • How to upgrade ( touchsmart 610-1130f ) under Linux Operating System: Ubuntu 10.11

    How to upgrade ( touchsmart 610-1130f ) under Linux Operating System: Ubuntu X11
    Unfortunatly didn't do it before erasing Win Se7en.

    I got the answer: If your operating systemt is not listed, we don't have upgrade for you.  If I knew that I woud'nt buy a HP computer.

Maybe you are looking for