Re: Removing stale network service entries
Re: Removing stale network service entries
- Subject: Re: Removing stale network service entries
- From: Mike <email@hidden>
- Date: Wed, 20 Feb 2008 13:54:20 -0700
There are notification mechanisms in both IOKit and SCF. Read the docs
and headers for SCF to find what you need.
Also have a look at Apple's MoreSCF in MoreIsBetter. It has higher-level
routines that can be used to manage services. Using the notifications
along with those routines should enable you to track/manage/clean up
your services when they become stale.
However, be forewarned you will need a setuid helper tool to accomplish
this and that is not a trivial task.
http://developer.apple.com/documentation/Networking/Conceptual/SystemConfigFrameworks/SC_Overview/chapter_2_section_5.html#//apple_ref/doc/uid/TP40001065-CH202-CHDIFJAB
Mike
Peter Sichel wrote:
When you plug a USB-to-Ethernet adaptor into your computer for the first
time, a new service entry appears in the Network Preferences Panel. I
have a potential client who moves laptops between stations with
USB-to-Ethernet adaptors. As laptops move from station to station, they
accumulate a lot of stale service entries in the Network Preferences
Panel (for each USB adaptor they've seen). I'm looking for ways to
remove these service entries shortly after a USB-to-Ethernet adaptor is
unplugged.
I'm familiar with accessing the System Configuration Framework and
helped develop an Open Source driver for USB-to-Ethernet adaptors, so I
am able to tweak the driver if that would help.
I can imagine a small faceless application that listens for device
notifications and walks the network service order looking for inactive
service entries that meet some criteria and removes them, but that seems
a little awkward. Is there a more direct way to limit the persistence
of such entries before they pile up?
Thanks for any ideas.
- Peter Sichel
Sustainable Softworks
_______________________________________________
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