Re: Detect network interface changes
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