"rajath kumara" <[email protected]> wrote:

 Currently I am using wpcap function to obtain list of all ports in my
system.

I thought you were talking about TCP/UDP-ports until ...

but assume i need to find only active ports in my system, for this, is
their any wpcap function which will provide me
list of all active ports in my system?

for eg: i have some 10 ports in my system.
          if i use a cross cable and create a loopback among 2 ports, then,

.. I read the above. You have a box with 10 network interfaces?

is their any wpcap function, which gives me list of only
          loopback active ports?

In any case, there isn't any WinPcap function that does this; neither finds
active/listening UDP/TCP-ports nor makes a "list of all active physical ports".
You have to specify your problem a bit more.

If you want to find active/listening ports, then (depending on your OS) there are functions deep inside the OS for retrieving that information (like netstat
does). In case you use Windows, the functions 
AllocateAndGetTcpExTableFromStack()
and GetExtendedTcpTable() does that.

--gv
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users

Reply via email to