• Advertisement
Sign in to follow this  

How to get IP Address?

This topic is 4089 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, everybody! Can you tell me how to get ip address and subnet mask of my own computer? I need it to send broadcast message... I use Microsoft Visual C++ 6.0 and Winsock 2. Thanx :)

Share this post


Link to post
Share on other sites
Advertisement
I think the getaddrinfo function is what you are looking for. You can look it up on MSDN. I'm not sure if it can give you the subnet mask, though...

Share this post


Link to post
Share on other sites
The Forum FAQ talks about how to get your local address -- and why it's a bad idea.

To send a broadcast message, you can send it to 255.255.255.255, and it will still be filtered to the local subnet.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement