Read Me About MoreSCF
=====================
1.1
System Configuration framework (SCF) allows you to programmatically configure network settings. SCF provides a nice, abstract, extensible API for manipulating persistent preferences. However, older versions of the framework do not provide a high-level API. Thus, prior to Mac OS X 10.4, if you want to do common operations, like creating a new set (known as a "location" in the user interface), you have to combine a number of diverse APIs from I/O Kit, System Configuration, and Core Foundation.
MoreSCF is an attempt to make this easier. It includes a library of code to do all of the things that the user might do in the Network preferences panel. For example, you can create a new location, duplicate a location, activate and inactivate services (known as "ports" in the user interface), and so on. MoreSCF also provides high-level APIs to do common operations, such as creating a new set that contains a single PPP dialup service.
System Configuration framework was introduced in Mac OS X 10.1. In theory, MoreSCF could work on that system or later. In practice, I have tested it back to Mac OS X 10.3.
IMPORTANT: If your product requires Mac OS X 10.4 or later, you should use the new, high-level System Configuration framework API instead of MoreSCF. This API, defined in the "SCNetworkConfiguration.h" header file, includes routines for doing all of things that MoreSCF does. By using this API you make your code simpler and more future-proof.
Packing List
------------
The sample contains the following items:
o Read Me.txt -- A document that redirects you to this document.
o MoreSCF -- A folder containing MoreSCF and various support files.
- Read Me About MoreSCF.txt -- This document.
- MoreSCFHelpers.h -- Interface to the following.
- MoreSCFHelpers.c -- A high-level module that provides commonly
used System Configuration framework functions, such as creating
a new set that contains a single PPP dialup service.
- MoreSCF.h -- Interface to the following.
- MoreSCF.c -- A mid-level module layered on top of the SCPreferences
component of System Configuration framework. This module recasts
the SCPreferences API in terms that you would recognize from
looking at the Network preferences panel.
- MoreSCFDigest.h -- Interface to the following.
- MoreSCFDigest.c -- Code to create SCPreferences entities from
simple C structures.
- MoreSCFPortScanner.h -- Interface to the following.
- MoreSCFPortScanner.c -- Code to scan the I/O Registry for
network-capable ports.
- MoreSCFCCLScanner.h -- Interface to the following.
- MoreSCFCCLScanner.c -- Code to scan the system for modem scripts (CCLs).
- MoreSCFTest -- A program that both tests MoreSCF and gives an example
of its use.
o MoreCFQ -- MoreIsBetter Core Foundation utilities.
Using the Sample
----------------
The sample includes a compiled version of the MoreSCFTest command line tool. This tool modifies the SCF preferences, which means you must run it as root. The following example assumes that you've downloaded the sample to your desktop:
$ sudo Desktop/MoreSCF/MoreSCF/MoreSCFTest/build/Debug/MoreSCFTest -lq
Password: ********
MoreSCFTest
Running all tests
LeakTest(TestPortScanner)
LeakTest(TestPortScannerOld)
MoreSCFPortScanner.c: You should install a port name callback.
LeakTest(TestCCLScanner)
LeakTest(TestCopySetsDict)
LeakTest(TestSetEnumerationAndSwitch)
LeakTest(TestDuplicateAndDeleteSet)
LeakTest(TestRenameSet)
LeakTest(TestServiceEnumerate)
LeakTest(TestDuplicateAndDeleteService)
LeakTest(TestRenameService)
LeakTest(TestEnumerateEntities)
LeakTest(TestCreateSet)
LeakTest(TestISP)
LeakTest(TestAppleTalk)
LeakTest(TestTrivialCreate)
You can also run an individual test by naming it as an argument:
$ Desktop/MoreSCF/MoreSCF/MoreSCFTest/build/Debug/MoreSCFTest TestCCLScanner
MoreSCFTest
TestCCLScanner
3Com Impact Analog 14.4
3Com Impact ISDN 56K
3Com Impact ISDN 56K MLPPP
3Com Impact ISDN 64K
3Com Impact ISDN 64K MLPPP
Apple External 56K Modem (v.32)
Apple External 56K Modem (v.34)
Apple External 56K Modem (v.90)
Apple External 56K Modem (v.92)
Apple Internal 56K Modem (v.32)
Apple Internal 56K Modem (v.34)
* Apple Internal 56K Modem (v.90)
Apple Internal 56K Modem (v.92)
[...]
When running all tests the tool takes quite some time to run (up to a few minutes on my ancient test machine). As long as it runs to completion it should leave your network preferences how it found them. However, if you stop it halfway through you may need to manually restore your preferences.
Some of the tests requires that you have a location called "DefaultLocationForMoreSCFTest". You should create this location using the Network panel of System Preferences. Just create the location and leave its settings unmodified. The test uses this location to verify that a new set created by MoreSCF exactly matches a default set created by the control panel.
Note: Under some circumstances the TestCreateSet test will fail because the newly created set doesn't exactly match the contents of "DefaultLocationForMoreSCFTest". There are a few common reasons for this.
o Your "DefaultLocationForMoreSCFTest" set might be is out of date; to rectify this simply open the control panel, deleting the existing "DefaultLocationForMoreSCFTest" location and create a new one.
o You might have NetInfo enabled; to rectify this, turn off NetInfo using the "Directory Setup" application, then update your "DefaultLocationForMoreSCFTest" set as described previously.
o The "DefaultLocationForMoreSCFTest" might be set to use non-DHCP address acquisition (in the "Configure" popup menu). This can happen if you create the new set when your current set is not using DHCP. In that case the Network preferences panel creates a set with the same address acquisition mode as your current set. This anomalous behavior is not replicated by MoreSCF. To make TestCreateSet run without error, open the Network preferences panel and modify the services within the "DefaultLocationForMoreSCFTest" set to acquire address via PPP.
Building the Sample
-------------------
The sample was built using Xcode 2.4.1 on Mac OS X 10.4.8. To build the sample, open the MoreSCFTest project file (MoreSCF/MoreSCFTest/MoreSCFTest.xcodeproj) and choose Build from the Build menu. By default this builds the Debug build configuration, resulting in a new executable tool (MoreSCF/MoreSCFTest/build/Debug/MoreSCFTest).
Note: When you build the Intel side of the universal binary, you'll see warnings of the form:
#warning MoreSCF is deprecated if you are building for 10.4 or later.
This is because MoreSCF is not recommended for use on Mac OS X 10.4 and later (you should instead use the nice high-level API from "SCNetworkConfiguration.h"), and all Intel-based Macintosh computers 10.4 or later. If you get this warning, you should consider removing MoreSCF from your product and using the System Configuration framework directly. If that's not feasible, you can quieten the warning by setting the MORE_SCF_NO_DEPRECATION_WARNINGS compile-time variable.
SCF Hints and Tips
------------------
This section describes a number of things to keep in mind while working with SCF, or indeed MoreSCF.
o Documentation -- You can find System Configuration framework documentation in the Darwin > Networking section of the ADC Reference Library. The current URLs on the Apple developer web site are:
<http://developer.apple.com/documentation/Networking/Conceptual/SystemConfigFrameworks/index.html>
<http://developer.apple.com/documentation/Networking/Reference/SysConfig/index.html>
o Running with Privileges -- Code that modifies the System Configuration framework preferences must run as root (with effective user ID of 0). There are simple ways to work around this during development (described below). However, your final product will need to be smarter abou
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
认证前获取IP.zip (51个子文件)
Ruijie Supplicant.app
Contents
Resources
failure.png 3KB
IcoArrowR.png 212B
messageManager.png 1KB
disconnect.png 2KB
Read Me About MoreSCF.txt 32KB
success.png 5KB
msgWndBackgroud.png 36KB
middle.png 293B
smsWndBackgroud1.png 7KB
head.png 2KB
smsWndBackgroud3.png 9KB
SuApp.icns 182KB
smsWndBackgroud2.png 9KB
progress.png 4KB
SuConfig.ini 291B
IcoDel2.png 900B
Read Me.txt 178B
private.png 26KB
exit.png 952B
IcoArrowL.png 216B
SuMessage.ini 0B
tail.png 805B
English.lproj
Text_Switch.png 410B
MainMenu.nib 27KB
SuRealtimeSMS.nib 23KB
Text_Self.png 385B
SuMiniWnd.nib 20KB
SuMsgWnd.nib 28KB
ModifyPassword.nib 13KB
InfoPlist.strings 92B
SuApp.strings 33KB
SwitchSvr.nib 12KB
2.png 16KB
SuConfig_new.ini 818B
4.png 16KB
IcoDel1.png 895B
zh_CN.lproj
Text_Switch.png 422B
MainMenu.nib 27KB
SuRealtimeSMS.nib 23KB
Text_Self.png 388B
SuMiniWnd.nib 20KB
SuMsgWnd.nib 28KB
ModifyPassword.nib 13KB
InfoPlist.strings 92B
SuApp.strings 16KB
SwitchSvr.nib 12KB
blockbg.png 7KB
3.png 15KB
MacOS
Supplicant 655KB
PkgInfo 8B
Info.plist 2KB
共 51 条
- 1
资源评论
- Deku7722020-09-1610.15确实可以,拷贝在桌面,打开包里的macos就可以认证,但是会过几分钟断开认证
- xyz00791102020-05-29根本无法使用,打开报错dqwzh2020-05-31这是10.15推出几个月后,锐捷才研发出来的产品,我们一直在使用,没有任何问题,有问题可以私信我dqwzh2020-05-31这属于你对mac系统使用不熟练,这是锐捷官方的产品
dqwzh
- 粉丝: 2
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功