RE: Changing PPP settings
RE: Changing PPP settings
- Subject: RE: Changing PPP settings
- From: Joe Kelly <email@hidden>
- Date: Mon, 18 Feb 2002 12:33:21 -0800
Alastair M. Rampell writes:
>
First, is it possible to compile something that uses MoreSCF
>
as a Carbon
>
application? Or does it need to be built as a Mach
>
executable?
Yes and yes. You can use MoreSCF in a Carbon application that's built as
mach-O. Unfortunately, since you seem intent on actually CHANGING some of
the SCF settings, you will also need to be running as root. See AuthTool
sample for Apple's recommended approach to running a root tool (it's
twisted).
>
What I need
>
to do should be relatively simple; I just need to change the
>
PPP Options of
>
the current location. Does configuration = location? I'm
>
actually assuming
>
it's a Port Configuration...
>
>
In that case, what I need to do is find all the port
>
configurations which
>
use PPP, and then change the advanced PPP options. (Is there
>
a call for
>
just changing the PPP options? I see how to create, but in
>
order to change
>
do I need to make a copy and replace?
To get the current set (location): MoreSCCopyCurrentSet().
To get a list of services that location uses (service is roughly akin to
port): MoreSCCopyServiceIDs().
Iterate that list to find the service you are looking for ("PPP") -- I use
MoreSCCopyUserVisibleNameOfService() in conjunction with CFStringCompare().
Once you have the service ID, you could then make it active
(MoreSCSetServiceActive())
A service is composed of entities (these are the individual prefs you want
to change). To get the service's entities, you use MoreSCCopyEntityMutable()
which returns its data in a CFMutableDictionaryRef -- I think you'd want to
use the entity key kSCEntNetPPP. You can then grope this dictionary for the
keys you need (see SCSchemaDefinitions.h, in SC.framework, search on
"kSCEntNetPPP Entity Keys"), use CFDictionaryReplaceValue() to change a key,
and then MoreSCSetEntity() to commit the changes.
Hope that helps.
joe
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.