Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jjin

macrumors newbie
Original poster
Jul 4, 2011
2
0
I want to set the interface I created as a primary interface using System Configuration Framework.

According to SCSchemaDefinitions Reference (http://developer.apple.com/library/.../SCSchemaDefinitions/Reference/reference.html), kSCPropNetOverridePrimary is a key in kSCCompNetwork dictionary. So I create a dictionary and set it using SCNetworkInterfaceSetConfiguration. But that doesn't work.

But if I open preferences.plist, the key / value pair appears under IPV4 dictionary. So I tried to set it in kSCEntNetIPv4 dictionary. But that doesn't work either. However, I can set other key / value pairs under IPV4 dictionary. So I believe I called the API correctly.

Also, Apple's own code (ipconfigd@ http://www.opensource.apple.com/source/bootp/bootp-89/IPConfiguration.bproj/ipconfigd.c) set this under ipv4 key. So it appears that kSCPropNetOverridePrimary key should belong to IPV4 dictionary.

But I just could not get it work using either kSCCompNetwork or kSCEntNetIPv4.

Can anyone give some insights?
Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.