• 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: MoreSCF 1.1 and Cross-Development
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MoreSCF 1.1 and Cross-Development


  • Subject: Re: MoreSCF 1.1 and Cross-Development
  • From: John Andersson <email@hidden>
  • Date: Tue, 23 Oct 2007 18:40:12 +0200

OK. I think I will manage to get it to work. I wont use scutil from my app, but it's nice to get some hints from the code.
Thanks a lot for your advice!


Regards
/John

23 okt 2007 kl. 15.33 skrev Allan Nathanson:


On Oct 23, 2007, at 8:47 AM, Quinn wrote:

At 13:48 +0200 23/10/07, John Andersson wrote:
By the way, is there any sample code to give me an idea to use SCNetworkConfiguration in a proper way?

Alas, I don't know of any. I got half way through writing a sample like this but it's not in a good enough state to give away.


Perhaps Allan has something?

Most of the APIs should be fairly easy to use :

* the preferences contain "sets"
* each "set" can have zero or more "services"
* each "service" can have zero or more "protocols"
* each "protocol" has a configuration dictionary (and the keys/ values are defined in <SystemConfiguration/SCSchemaDefinitions.h>
* each "service" is associated with one "interface"
* each "interface" has a configuration dictionary
* "interface"s may be layered (e.g. a "PPP" interface layered on top of a "modem")


What has tripped up many developers :

* if you want to make changes to an "interface" configuration, please make sure that you are using the SCNetworkInterfaceRef derived from a SCNetworkServiceRef (the interface configuration are stored per-set/per-service and I need that association to know where to make the changes).
* you can't create a network service over a "modem" interface. You need to start with the "modem", layer "PPP" on top (w/ SCNetworkInterfaceCreateWithInterface), and create the service with the PPP->modem interface.
* watch your usage of CFRetain/CFRelease


If not, you may get some joy from the Leopard Darwin drop.

Speaking of Darwin drops, if you rummage around in the Darwin source for SCF you'll find some useful code. You can play around with this by running scutil as shown below:

$ ENABLE_EXPERIMENTAL_SCUTIL_COMMANDS=1 scutil --net

To all :

The "experimental" commands are just that. PLEASE PLEASE PLEASE don't rely on this command being available in any future release. If the command sticks around, expect the syntax to change. I'm saying this now because I most certainly have plans for big changes!

The source for all of this stuff is in the files beginning with "net" in the following location.

<http://www.opensource.apple.com/darwinsource/Current/ configd-137.3/scutil.tproj/>

[This link requires an APSL <http://www.opensource.apple.com/apsl/>
account.]

Feedback, bug reports, and enhancement requests are always welcome :-)

- Allan


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40peekaboo.se


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
References: 
 >MoreSCF 1.1 and Cross-Development (From: Tobias Walser <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Mike Cohen <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Quinn <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Tobias Walser <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Quinn <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Tobias Walser <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Quinn <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: John Andersson <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Quinn <email@hidden>)
 >Re: MoreSCF 1.1 and Cross-Development (From: Allan Nathanson <email@hidden>)

  • Prev by Date: Re: MoreSCF 1.1 and Cross-Development
  • Next by Date: Re: MoreSCF 1.1 and Cross-Development
  • Previous by thread: Re: MoreSCF 1.1 and Cross-Development
  • Next by thread: Re: MoreSCF 1.1 and Cross-Development
  • Index(es):
    • Date
    • Thread