On Wed, 11 Jul 2007 23:28:01 -0700, weird0 <am********@gmail.comwrote:
But hey what you told about is a dial-up connection ? or it will work
for cable connection too?
The API that will get you the installed network adapters' IP addresses
doesn't care what kind of adapter it is. You will get your _local_ IP
address for each adapter (most people usually only have one, but some
computers do have more than one network adapter installed, especially
laptops and newer PCs with 1394 built in, since those are sometimes mapped
to act as a network adapter).
For dial-up, your local IP address is sometimes the public Internet
routable address, and sometimes it's a DHCP address assigned by your ISP
and routed through their own version of a proxy server or NAT router.
If you have a broadband connection and are directly connection,
again...this could either be your public Internet address, or a
DHCP-assigned address routed through your ISP's servers.
If you have a broadband connection and it goes through a router in your
own home, then you are almost certainly using a NAT router and the
computer has a DHCP-assigned address rather than a public IP address.
The above is not even a complete enumeration of all the possibilities.
It's simply an attempt to illustrate the fact that getting your own
locally-assigned IP address is often not very useful, and in the typical
case is not even needed.
Since, I use cable connection and i have a static IP:
"192.168.0.71"
That's a LAN address, not routable on the Internet. You say it's a static
IP, but if so it's only static within your own LAN. You can use it within
your LAN, but other computers on the Internet won't be able to do anything
useful with that address.
Pete