• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting ethernet cable plugged in
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting ethernet cable plugged in


  • Subject: Re: Detecting ethernet cable plugged in
  • From: Mark Thomas <email@hidden>
  • Date: Thu, 04 Oct 2007 17:11:00 +0100

Hi Joss,
  I think that is my problem as there are no services using the interface,
so has been powered down, so using the System Configuration doesn't
publishes it. I can also see that ifconfig also report's status as unknown
as well.

   I think I'm going to have rework the diagnostics so it checks that there
is service in use first, but looking at this value, as Powering down the
device makes sense as its not in use.

Thanks
Mark.

>
> I think you can use ioctls to get the interface media information.
> Look at the output from ifconfig. There is a media entry:
> media: autoselect (1000baseT <full-duplex,flow-control>) status: active
>
> If you see status: active, the link is up. You can look through the
> ifconfig sources to see how ifconfig gets this information.
>
> System Configuration will publish the link state regardless of IP
> settings. There is a system configuration agent that monitors kernel
> events and publishes state about things like the link status of
> interfaces to the dynamic store.
>
> You may see no active link status if there are no services using the
> interface. In this case, the interface may be powered down to save
> power. When the interface is powered down, the link is down whether or
> not the cable is connected.
>
> -josh
>
> On Oct 2, 2007, at 2:29 AM, Mark Thomas wrote:
>
>> Hi All,
>>  I presently using the System Configuration Dynamic store Ethernet
>> device
>> link status, to detect if users have plugged in the Ethernet cables
>> and
>> while this works, there is a slight problem as this status is linked
>> to the
>> tcp/ip stack being setup correctly.
>>
>>  Does anybody know of another way to detect whether that cable is
>> plugged
>> in ?, which wouldn't have a dependency on the network stack ?
>>
>> Thanks
>> Mark.
>>
>> _______________________________________________
>> 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
>

 _______________________________________________
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

References: 
 >Re: Detecting ethernet cable plugged in (From: Josh Graessley <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Re: Getting MAC Addresses
  • Previous by thread: Re: Keeping unconfigured Ethernet powered on [was Re: Detecting ethernet cable plugged in]
  • Next by thread: Method for determining wireless connection type
  • Index(es):
    • Date
    • Thread