How to detect ethernet cable status

skumar2011

Registered
Hi Guys,

I have written a client - server program using BSD socket in carbon.
Now I want to show an alert if ethernet cable is plugged out. I want to continuosly scan the ethernet port on a thread so that if ethernet cable plugged out client application will show an alert that ethernet cable is plugged out.


Please suggest me some useful link.

Thanks,
Sunil.
 
I m surprised that no body have the answer to my question.
is this question not making sence or really not answerable?
 
Well you could look at the source of ifconfig to see how it gets that info, but I suspect it is just a ioctl call. I would think that you would be batter off registering for the system to give you a notification when the network configuration changes rather than polling yourself.

You really should be looking at developer.apple.com rather than here for this stuff.
 
Back
Top