• 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: Detect network interface changes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect network interface changes


  • Subject: Re: Detect network interface changes
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 19 Jul 2009 11:34:02 -0700


On Jul 19, 2009, at 10:27 AM, Ian Mark Salvame wrote:

Actually, I don't want any daemon or agent or any application running which continuously listens to the network interface changes.
I am looking for some way, if there's any, that the OS would automatically launch my daemon or agent or application whenever there are changes to the network states.

I don't think there is such a facility. The closest you get from launchd is the NetworkState option:
NetworkState <boolean>
If true, the job will be kept alive as long as the network is up,
where up is defined as at least one non-loopback interface being up
and having IPv4 or IPv6 addresses assigned to them. If false, the job
will be kept alive in the inverse condition.


A process that's just listening for network changes is going to consume effectively zero system resources while waiting. I don't think it'll be a problem to set your daemon up that way.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Detect network interface changes (From: Ian Mark Salvame <email@hidden>)
 >Re: Detect network interface changes (From: Ian Mark Salvame <email@hidden>)
 >Re: Detect network interface changes (From: Josh Graessley <email@hidden>)
 >Re: Detect network interface changes (From: Ian Mark Salvame <email@hidden>)

  • Prev by Date: Re: Detect network interface changes
  • Next by Date: Re: Detect network interface changes
  • Previous by thread: Re: Detect network interface changes
  • Next by thread: Re: Detect network interface changes
  • Index(es):
    • Date
    • Thread