Get my own wifi ip

Hey everyone,

i want to write a program (client) that looks up its own wifi ip and sends it to a other pc with a known ip address (embedded board) using winsock 2.

I managed to read out all the ip addresses with "gethostname" and "gethostbyname"
but now i have no idea how to determine which address belongs to the wifi network.

i've been searching for over a hour now, hope you have some ideas

thanks
You need to look at the description of the network adapter. There are a few ways to get hold of it, but WIM has a node for it. http://msdn.microsoft.com/en-us/library/hh968170%28v=vs.85%29.aspx

Also, http://msdn.microsoft.com/en-us/library/windows/desktop/aa366314%28v=vs.85%29.aspx

Or just search "msdn network adapter"
Last edited on
Yes thank you ! it's just a hack at the moment but it think this should work. I'll post the code later as soon as i make it work properly
Topic archived. No new replies allowed.