Re: Ethernet Cable Status Detection
Re: Ethernet Cable Status Detection
- Subject: Re: Ethernet Cable Status Detection
- From: "v.1 Labs" <email@hidden>
- Date: Thu, 12 Apr 2007 13:25:37 -0300
Hi, Sunil
What you need is the System Configuration framework, which is pure
evil distilled into an API. There's a handy utility called SCExplorer
(http://homepage.mac.com/rominar/scexplorer.html) that will help you
see what the current state of things is. I'm not sure if you can see
whether a cable in unplugged, but you can certainly find out if a
particular ethernet interface is connected or not. The best part is
that you can set your app up to get notified when the state changes,
instead of polling things.
Here's the SCExplorer path to look at the state of your default
ethernet connection, just to get you started: State:/Network/
Interface/en0/Link.
Best of luck;
Mark
On 12-Apr-07, at 12:04 PM, sunil prajapati wrote:
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.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40v1labs.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden