[Winpcap-users] Re : how to find active ports

rajath kumara rajathkumara at gmail.com
Sun Jul 3 23:38:38 PDT 2011


Thanks for the reply.

However guess, its better to restate my problem, so that i can make you
people clear about my query.

I am using some  3 NICS ( network interface cards), which together get me 10
ports.
2 NICs are are from D-Link NIC cards which have 4 ports each in them, and
another is NETGEAR NIC, which has 2 ports in it.

with the help of pcap_findalldevs() , i can obtain the list of all ports ,
along with details of NIC cards, their MAC_ addresses and others.

But my question is , pcap_findalldevs( ), gives me list of all 10 ports i am
using,

assume i use a cross-cable and connect any 2 ports to form a loopback
condition,then  is their any function in wpcap, which tells me
which 2 ports are in loopback state among the 10 ports i am using.

or any other function is their apart from wpcap, which helps me to do this.


please help me to figure out this problem.


On Mon, Jul 4, 2011 at 12:07 PM, rajath kumara <rajathkumara at gmail.com>wrote:

>
> Thanks for the reply.
>
> However guess, its better to restate my problem, so that i can make you
> people clear about my query.
>
> I am using some  3 NICS ( network interface cards), which together get me
> 10 ports.
> 2 NICs are are from D-Link NIC cards which have 4 ports each in them, and
> another is NETGEAR NIC, which has 2 ports in it.
>
> with the help of pcap_findalldevs() , i can obtain the list of all ports ,
> along with details of NIC cards, their MAC_ addresses and others.
>
> But my question is , pcap_findalldevs( ), gives me list of all 10 ports i
> am using,
>
> assume i use a cross-cable and connect any 2 ports to form a loopback
> condition,then  is their any function in wpcap, which tells me
> which 2 ports are in loopback state among the 10 ports i am using.
>
> or any other function is their apart from wpcap, which helps me to do this.
>
>
> please help me to figure out this problem.
>
>
>
>
>
> On Sat, Jul 2, 2011 at 12:30 AM, <winpcap-users-request at winpcap.org>wrote:
>
>> Send Winpcap-users mailing list submissions to
>>        winpcap-users at winpcap.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>        https://www.winpcap.org/mailman/listinfo/winpcap-users
>> or, via email, send a message with subject or body 'help' to
>>        winpcap-users-request at winpcap.org
>>
>> You can reach the person managing the list at
>>        winpcap-users-owner at winpcap.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of Winpcap-users digest..."
>>
>>
>> Today's Topics:
>>
>>   1. Re: PacketRequest() (geek techie)
>>   2. Re: how to find active ports (rajath kumara)
>>   3. Re: PacketRequest() (Gisle Vanem)
>>   4. Re: how to find active ports (Gisle Vanem)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Fri, 1 Jul 2011 11:22:52 +0530
>> From: geek techie <geektechgo at gmail.com>
>> To: winpcap-users at winpcap.org
>> Subject: Re: [Winpcap-users] PacketRequest()
>> Message-ID: <BANLkTinLEjMWb7e_5N4zGTnPTXciqZ=cFQ at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hello,
>>  Please help me to understand wpcap API - PacketRequest ( ).
>>
>>
>> any suggestions?
>>
>> On Thu, Jun 30, 2011 at 11:09 AM, geek techie <geektechgo at gmail.com>
>> wrote:
>>
>> > Hello,
>> >  could someone please elaborate on wpcap API - PacketRequest( ) ,
>> > regarding its functionalities and what does it do?
>> >
>> > Also is this function PacketRequest connected with NDIS-OID( object
>> > identifiers), in any way ?
>> > if so, explain how ?
>> >
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://www.winpcap.org/pipermail/winpcap-users/attachments/20110701/e529e115/attachment-0001.html
>> >
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Fri, 1 Jul 2011 17:16:27 +0530
>> From: rajath kumara <rajathkumara at gmail.com>
>> To: winpcap-users at winpcap.org
>> Subject: Re: [Winpcap-users] how to find active ports
>> Message-ID: <BANLkTikTpk=tjVbdNwyy7Vc0qq9LPK57yA at mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi,
>>
>> Kindly suggest me how to proceed for the below mentioned problem.
>> your replies, will be valuable to me.
>>
>> On Thu, Jun 30, 2011 at 10:42 AM, rajath kumara <rajathkumara at gmail.com
>> >wrote:
>>
>> > Hi,
>> >
>> >  Currently I am using wpcap function to obtain list of all ports in my
>> > system.
>> >
>> > 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,
>> > is their any wpcap function, which gives me list of only
>> >           loopback active ports?
>> >
>> >
>> > kindly suggest me.
>> >
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <
>> http://www.winpcap.org/pipermail/winpcap-users/attachments/20110701/1ccb4127/attachment-0001.html
>> >
>>
>> ------------------------------
>>
>> Message: 3
>> Date: Fri, 01 Jul 2011 14:55:08 +0200
>> From: Gisle Vanem <gvanem at broadpark.no>
>> To: WinDump <winpcap-users at winpcap.org>
>> Subject: Re: [Winpcap-users] PacketRequest()
>> Message-ID: <C0AE5B30A04E435E889740C843F77518 at broadpark.no>
>> Content-Type: text/plain; CHARSET=US-ASCII; format=flowed;
>>        reply-type=original
>>
>> "geek techie" <geektechgo at gmail.com> wrote:
>>
>> >  Please help me to understand wpcap API - PacketRequest ( ).
>>
>> the PacketRequest() function is used to send an OID (object ID number) to
>> the interface card driver. It can be used, for example, to retrieve the
>> status
>> of the error counters on the adapter, its MAC address, the list of the
>> multicast
>> groups defined on it, and so on.
>>
>> E.g. see here:
>>
>> http://www.winpcap.org/docs/docs_41b5/html/struct__PACKET__OID__DATA.html
>>
>> or Google for "PacketRequest + WinPcap".
>>
>> --gv
>>
>>
>> ------------------------------
>>
>> Message: 4
>> Date: Fri, 01 Jul 2011 15:11:07 +0200
>> From: Gisle Vanem <gvanem at broadpark.no>
>> To: WinDump <winpcap-users at winpcap.org>
>> Subject: Re: [Winpcap-users] how to find active ports
>> Message-ID: <772EE3BDF5AF48A39F8A3738749D7FC7 at broadpark.no>
>> Content-Type: text/plain; CHARSET=US-ASCII; format=flowed;
>>        reply-type=original
>>
>> "rajath kumara" <rajathkumara at gmail.com> 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
>> Winpcap-users at winpcap.org
>> https://www.winpcap.org/mailman/listinfo/winpcap-users
>>
>>
>> End of Winpcap-users Digest, Vol 76, Issue 1
>> ********************************************
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20110704/a475d08d/attachment-0001.html>


More information about the Winpcap-users mailing list