• 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: Changing PPP settings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing PPP settings


  • Subject: Re: Changing PPP settings
  • From: Quinn <email@hidden>
  • Date: Mon, 18 Feb 2002 20:07:33 +0000

At 23:06 -0500 17/2/02, Alastair M. Rampell wrote:
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?

You're talking at cross purposes here. Carbon == API set, Mach == name of kernel. I presume you meant "PEF" and "Mach-O"? If so, the answer is simple. No, you can't directly link to SCF from a PEF executable. You have to do some sort of bridging. There are numerous examples of doing this in the CarbonLib SDK. My personal favourite (probably because I wrote it) is CallMachOFramework.

<http://developer.apple.com/samplecode/Sample_Code/Runtime_Architecture/
CallMachOFramework.htm>

Remember, building Mach-O is not necessarily a huge burden, depending on your platform. MoreSCF was developed entirely with CodeWarrior in Mach-O.

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...

I'm a little confused where you get this "configuration" word. "MoreSCF.h" never uses that work (except as part of "System Configuration"), so it's not a term that I'm familiar with. Perhaps you mean "set"? If so, then it's true to say "set == location".

Within a set there are services, generally one per hardware port on the machine. This corresponds to the port list you're shown when you choose "Active Network Ports" from the "Show" popup in the Network preferences panel.

Within a service there are entities, generally one per protocol running over that port. These generally correspond to the protocol tabs when you choose a specific port in the "Show" popup in the Network preferences panel.

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?

As a rule I wouldn't recommend modifying all of the user's PPP advanced options. The user may have locations that are totally independent of your application. here's the advice I included in the MoreSCF documentation.

Apple strongly recommends that Internet setup assistant developers
create a new set (known as a "location" in the user interface) for
their specific service. This prevents your settings from overwriting
the user's prized network setup and allows the user a quick escape
(switching back to their previous location) if your setup assistant
doesn't work properly.

However, if you're sure you want to do this, you can do it with MoreSCF.

1. Bracket this whole process in MoreSCOpen/MoreSCClose to ensure that your operation is atomic.

2. Call MoreSCCopySetIDs to get an array of all of the set IDs for all sets (ie locations) on the system.

3. For each set, call MoreSCCopyServiceIDs to get an array of all the service IDs for that set.

4. For each service ID, call MoreSCCopyEntityMutable with the set ID, the service ID, and kSCEntNetPPP as the protocol. If this errors, the service doesn't contain a PPP configuration. Just skip this service.

5. If MoreSCCopyEntityMutable succeeds, you have a CFMutableDictionary that contains the information about that particular PPP entity. You can modify the keys in the dictionary at will to set whatever advanced options you need.

6. Use MoreSCSetEntity to store the settings back.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.

References: 
 >Changing PPP settings (From: "Alastair M. Rampell" <email@hidden>)

  • Prev by Date: URL Access Problem
  • Next by Date: RE: Changing PPP settings
  • Previous by thread: Changing PPP settings
  • Next by thread: RE: Changing PPP settings
  • Index(es):
    • Date
    • Thread