Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Determining what IP address(es) are connected (VC++)

1 view
Skip to first unread message

PersonX

unread,
Mar 15, 2010, 3:05:14 PM3/15/10
to
I am currently trying to figure out how to pro grammatically determine
which IP addresses are connected to the LAN. I want to be able to use
this IP and its respective subnet mask to dynamically calculate the
broadcast address so that I can send out broadcast packets on the
network.

I have used GetIpAddrTable() to obtain the IP address and mask for
each adapter, but I cannot determine which is actively connected to
the LAN. The wType member of the MIB_IPADDRROW structure returns (1)
indicating that all IPs are the primary IP address.
Does anyone know how I can dynamically determine which IP is currently
connected to the LAN?

Thanks,
Dave

0 new messages