|
Mac OS 9
|
Network Setup Interfaces. More...
Go to the source code of this file.
Macros | |
| #define | __NETWORKSETUPTYPES__ |
| #define | OTCfgTCPInterfacesPackedPartPointer(h) |
Typedefs | |
| typedef struct OpaqueCfgDatabaseRef * | CfgDatabaseRef |
| typedef UInt32 | CfgAreaID |
| typedef OSType | CfgEntityClass |
| typedef OSType | CfgEntityType |
| typedef struct CfgEntityRef | CfgEntityRef |
| typedef struct CfgResourceLocator | CfgResourceLocator |
| typedef struct CfgEntityInfo | CfgEntityInfo |
| typedef void * | CfgEntityAccessID |
| typedef struct CfgPrefsHeader | CfgPrefsHeader |
| typedef UInt32 | code |
| typedef UInt32 SInt32 | result |
| typedef UInt32 SInt32 void * | cookie |
| typedef struct OTCfgNotifierEntry | OTCfgNotifierEntry |
| typedef struct CfgSetsStruct | CfgSetsStruct |
| typedef struct CfgSetsElement | CfgSetsElement |
| typedef struct CfgSetsVector | CfgSetsVector |
| typedef struct OTCfgFlagRecord | OTCfgFlagRecord |
| typedef UInt16 | OTCfgUserMode |
| typedef UInt32 | OTCfgUserMode32 |
| typedef struct OTCfgATalkGeneralAARP | OTCfgATalkGeneralAARP |
| typedef UInt8 | OTCfgATalkUnloadOptions |
| typedef struct OTCfgATalkGeneralDDP | OTCfgATalkGeneralDDP |
| typedef struct OTCfgATalkGeneralNBP | OTCfgATalkGeneralNBP |
| typedef struct OTCfgATalkGeneralZIP | OTCfgATalkGeneralZIP |
| typedef struct OTCfgATalkGeneralATP | OTCfgATalkGeneralATP |
| typedef struct OTCfgATalkGeneralADSP | OTCfgATalkGeneralADSP |
| typedef struct OTCfgATalkGeneralPAP | OTCfgATalkGeneralPAP |
| typedef struct OTCfgATalkGeneralASP | OTCfgATalkGeneralASP |
| typedef struct OTCfgATalkGeneral | OTCfgATalkGeneral |
| typedef struct OTCfgATalkLocks | OTCfgATalkLocks |
| typedef struct OTCfgATalkPortDeviceType | OTCfgATalkPortDeviceType |
| typedef struct OTCfgATalkNetworkArchitecture | OTCfgATalkNetworkArchitecture |
| typedef UInt16 | OTCfgIRPortSetting |
| typedef struct OTCfgIRGeneral | OTCfgIRGeneral |
| typedef UInt8 | OTCfgTCPConfigMethod |
| typedef struct OTCfgTCPInterfacesPackedPart | OTCfgTCPInterfacesPackedPart |
| typedef struct OTCfgTCPInterfacesPacked | OTCfgTCPInterfacesPacked |
| typedef struct OTCfgTCPInterfacesUnpacked | OTCfgTCPInterfacesUnpacked |
| typedef struct OTCfgTCPRoutersListEntry | OTCfgTCPRoutersListEntry |
| typedef struct OTCfgTCPRoutersList | OTCfgTCPRoutersList |
| typedef struct OTCfgTCPSearchList | OTCfgTCPSearchList |
| typedef struct OTCfgTCPDNSServersList | OTCfgTCPDNSServersList |
| typedef struct OTCfgTCPSearchDomains | OTCfgTCPSearchDomains |
| typedef struct OTCfgTCPDHCPLeaseInfo | OTCfgTCPDHCPLeaseInfo |
| typedef UInt16 | OTCfgTCPUnloadAttr |
| typedef struct OTCfgTCPLocks | OTCfgTCPLocks |
| typedef UInt32 | OTCfgModemDialogToneMode |
| typedef struct OTCfgModemGeneral | OTCfgModemGeneral |
| typedef struct OTCfgModemLocks | OTCfgModemLocks |
| typedef struct OTCfgModemApplication | OTCfgModemApplication |
| typedef struct OTCfgRemoteARAP | OTCfgRemoteARAP |
| typedef UInt32 | OTCfgRemoteRedialMode |
| typedef struct OTCfgRemoteDialing | OTCfgRemoteDialing |
| typedef struct OTCfgRemoteAlternateAddress | OTCfgRemoteAlternateAddress |
| typedef struct OTCfgRemoteClientLocks | OTCfgRemoteClientLocks |
| typedef struct OTCfgRemoteClientMisc | OTCfgRemoteClientMisc |
| typedef UInt32 | OTCfgRemotePPPConnectScript |
| typedef UInt32 | OTCfgRemoteProtocol |
| typedef struct OTCfgRemoteConnect | OTCfgRemoteConnect |
| typedef struct OTCfgRemoteDialAssist | OTCfgRemoteDialAssist |
| typedef struct OTCfgRemoteIPCP | OTCfgRemoteIPCP |
| typedef struct OTCfgRemoteLCP | OTCfgRemoteLCP |
| typedef UInt32 | OTCfgRemoteLogLevel |
| typedef struct OTCfgRemoteLogOptions | OTCfgRemoteLogOptions |
| typedef struct OTCfgRemotePassword | OTCfgRemotePassword |
| typedef struct OTCfgRemoteTerminal | OTCfgRemoteTerminal |
| typedef struct OTCfgRemoteUserMode | OTCfgRemoteUserMode |
| typedef struct OTCfgRemoteX25 | OTCfgRemoteX25 |
| typedef struct OTCfgRemoteServer | OTCfgRemoteServer |
| typedef UInt32 | OTCfgRemoteAnswerMode |
| typedef UInt32 | OTCfgRemoteNetworkProtocol |
| typedef UInt8 | OTCfgRemoteNetAccessMode |
| typedef struct OTCfgRemoteServerPort | OTCfgRemoteServerPort |
| typedef struct OTCfgRemoteApplication | OTCfgRemoteApplication |
Enumerations | |
| enum | { kInvalidCfgAreaID = 0 } |
| enum | { kCfgErrDatabaseChanged , kCfgErrAreaNotFound = -3291 , kCfgErrAreaAlreadyExists = -3292 , kCfgErrAreaNotOpen = -3293 , kCfgErrConfigLocked = -3294 , kCfgErrEntityNotFound = -3295 , kCfgErrEntityAlreadyExists , kCfgErrPrefsTypeNotFound , kCfgErrDataTruncated = -3298 , kCfgErrFileCorrupted , kCfgErrFirst = kCfgErrDatabaseChanged , kCfgErrLast = kCfgErrFileCorrupted } |
| enum | { kCfgFreePref = FOUR_CHAR_CODE('free') } |
| enum | { kCfgClassAnyEntity = FOUR_CHAR_CODE('****') , kCfgClassUnknownEntity = 0x3F3F3F3F , kCfgTypeAnyEntity = FOUR_CHAR_CODE('****') , kCfgTypeUnknownEntity = 0x3F3F3F3F } |
| enum | { kCfgIgnoreArea = true , kCfgDontIgnoreArea = false } |
| enum | { kOTCfgIgnoreArea = kCfgIgnoreArea , kOTCfgDontIgnoreArea = kCfgDontIgnoreArea } |
| enum | { kOTCfgDatabaseChanged } |
| enum | { kOTCfgClassNetworkConnection = FOUR_CHAR_CODE('otnc') , kOTCfgClassGlobalSettings = FOUR_CHAR_CODE('otgl') , kOTCfgClassServer = FOUR_CHAR_CODE('otsv') , kOTCfgTypeGeneric = FOUR_CHAR_CODE('otan') , kOTCfgTypeAppleTalk = FOUR_CHAR_CODE('atlk') , kOTCfgTypeTCPv4 = FOUR_CHAR_CODE('tcp4') , kOTCfgTypeTCPv6 = FOUR_CHAR_CODE('tcp6') , kOTCfgTypeDNS = FOUR_CHAR_CODE('dns ') , kOTCfgTypeRemote = FOUR_CHAR_CODE('ara ') , kOTCfgTypeDial = FOUR_CHAR_CODE('dial') , kOTCfgTypeModem = FOUR_CHAR_CODE('modm') , kOTCfgTypeInfrared = FOUR_CHAR_CODE('infr') , kOTCfgClassSetOfSettings = FOUR_CHAR_CODE('otsc') , kOTCfgTypeSetOfSettings = FOUR_CHAR_CODE('otst') } |
| enum | { kOTCfgSetsStructPref = FOUR_CHAR_CODE('stru') , kOTCfgSetsElementPref = FOUR_CHAR_CODE('elem') , kOTCfgSetsVectorPref = FOUR_CHAR_CODE('vect') } |
| enum | { kOTCfgSetsFlagActiveBit = 0 } |
| enum | { kOTCfgSetsFlagActiveMask = 0x0001 } |
| enum | { kOTCfgIndexSetsActive = 0 , kOTCfgIndexSetsEdit = 1 , kOTCfgIndexSetsLimit = 2 } |
| enum | { kOTCfgFlagRecordVersion = 0x01200120 , kOTCfgProtocolActive = (1 << 0) , kOTCfgProtocolMultihoming = (1 << 16) , kOTCfgProtocolLimit = 0x00010001 } |
| enum | { kOTCfgUserVisibleNamePref = FOUR_CHAR_CODE('pnam') , kOTCfgVersionPref = FOUR_CHAR_CODE('cvrs') , kOTCfgPortUserVisibleNamePref = FOUR_CHAR_CODE('port') , kOTCfgPortUIName = FOUR_CHAR_CODE('otgn') , kOTCfgProtocolUserVisibleNamePref , kOTCfgAdminPasswordPref = FOUR_CHAR_CODE('pwrd') , kOTCfgProtocolOptionsPref } |
| enum | { kOTCfgUserModePref , kOTCfgPrefWindowPositionPref } |
| enum | { kOTCfgCompatNamePref = FOUR_CHAR_CODE('cnam') , kOTCfgCompatResourceNamePref = FOUR_CHAR_CODE('resn') } |
| enum | { kOTCfgCompatSelectedPref = FOUR_CHAR_CODE('ccfg') , kOTCfgCompatResourceIDPref = FOUR_CHAR_CODE('resi') } |
| enum | { kOTCfgBasicUserMode = 1 , kOTCfgAdvancedUserMode = 2 , kOTCfgAdminUserMode = 3 } |
| enum | { kOTCfgATalkGeneralPref = FOUR_CHAR_CODE('atpf') , kOTCfgATalkLocksPref = FOUR_CHAR_CODE('lcks') , kOTCfgATalkPortDeviceTypePref } |
| enum | { kOTCfgATalkNetworkArchitecturePref } |
| enum | { kOTCfgATalkInactive = 0 , kOTCfgATalkDefaultUnloadTimeout = 5 , kOTCfgATalkActive = 0xFF } |
| enum | { kOTCfgATalkPortLockMask = 0x01 , kOTCfgATalkZoneLockMask = 0x02 , kOTCfgATalkAddressLockMask = 0x04 , kOTCfgATalkConnectionLockMask = 0x08 , kOTCfgATalkSharingLockMask = 0x10 } |
| enum | { kOTCfgATalkNoBadRouterUpNotification = 1 << 0 , kOTCfgATalkNoAllNodesTakenNotification = 1 << 1 , kOTCfgATalkNoFixedNodeTakenNotification = 1 << 2 , kOTCfgATalkNoInternetAvailableNotification = 1 << 3 , kOTCfgATalkNoCableRangeChangeNotification = 1 << 4 , kOTCfgATalkNoRouterDownNotification = 1 << 5 , kOTCfgATalkNoRouterUpNotification = 1 << 6 , kOTCfgATalkNoFixedNodeBadNotification = 1 << 7 } |
| enum | { kOTCfgIRGeneralPref = FOUR_CHAR_CODE('atpf') } |
| enum | { kOTCfgIRIrDA = 0 , kOTCfgIRIRTalk = 1 } |
| enum | { kOTCfgTCPInterfacesPref , kOTCfgTCPDeviceTypePref = FOUR_CHAR_CODE('dtyp') , kOTCfgTCPRoutersListPref = FOUR_CHAR_CODE('irte') , kOTCfgTCPSearchListPref , kOTCfgTCPDNSServersListPref , kOTCfgTCPSearchDomainsPref , kOTCfgTCPDHCPLeaseInfoPref , kOTCfgTCPDHCPClientIDPref , kOTCfgTCPUnloadAttrPref = FOUR_CHAR_CODE('unld') , kOTCfgTCPLocksPref = FOUR_CHAR_CODE('stng') , kOTCfgTCPPushBelowIPPref , kOTCfgTCPPushBelowIPListPref } |
| enum | { kOTCfgManualConfig = 0 , kOTCfgRARPConfig = 1 , kOTCfgBOOTPConfig = 2 , kOTCfgDHCPConfig = 3 , kOTCfgMacIPConfig = 4 } |
| enum | { kOTCfgTCPActiveLoadedOnDemand = 1 , kOTCfgTCPActiveAlwaysLoaded = 2 , kOTCfgTCPInactive = 3 } |
| enum | { kOTCfgTCPLocksPrefPre2_0Size = 25 , kOTCfgTCPLocksPref2_0Size = 27 , kOTCfgTCPLocksPrefCurrentSize = kOTCfgTCPLocksPref2_0Size } |
| enum | { kOTCfgDontDoPMTUDiscoveryMask = 0x0001 , kOTCfgDontShutDownOnARPCollisionMask , kOTCfgDHCPInformMask = 0x0004 , kOTCfgOversizeOffNetPacketsMask , kOTCfgDHCPDontPreserveLeaseMask } |
| enum | { kOTCfgTypeDNSidns = FOUR_CHAR_CODE('idns') , kOTCfgTypeDNSisdm = FOUR_CHAR_CODE('isdm') , kOTCfgTypeDNSihst = FOUR_CHAR_CODE('ihst') , kOTCfgTypeDNSstng = FOUR_CHAR_CODE('stng') } |
| enum | { kOTCfgModemGeneralPrefs = FOUR_CHAR_CODE('ccl ') , kOTCfgModemLocksPref = FOUR_CHAR_CODE('lkmd') , kOTCfgModemAdminPasswordPref } |
| enum | { kOTCfgModemApplicationPref } |
| enum | { kOTCfgModemDialToneNormal = 0 , kOTCfgModemDialToneIgnore = 1 , kOTCfgModemDialToneManual = 2 } |
| enum | { kOTCfgRemoteDefaultVersion = 0x00020003 , kOTCfgRemoteAcceptedVersion = 0x00010000 } |
| enum | { kOTCfgRemoteARAPPref = FOUR_CHAR_CODE('arap') , kOTCfgRemoteAddressPref , kOTCfgRemoteChatPref , kOTCfgRemoteDialingPref = FOUR_CHAR_CODE('cdia') , kOTCfgRemoteAlternateAddressPref , kOTCfgRemoteClientLocksPref , kOTCfgRemoteClientMiscPref , kOTCfgRemoteConnectPref = FOUR_CHAR_CODE('conn') , kOTCfgRemoteUserPref = FOUR_CHAR_CODE('cusr') , kOTCfgRemoteDialAssistPref , kOTCfgRemoteIPCPPref = FOUR_CHAR_CODE('ipcp') , kOTCfgRemoteLCPPref = FOUR_CHAR_CODE('lcp ') , kOTCfgRemoteLogOptionsPref , kOTCfgRemotePasswordPref = FOUR_CHAR_CODE('pass') , kOTCfgRemoteTerminalPref = FOUR_CHAR_CODE('term') , kOTCfgRemoteUserModePref = FOUR_CHAR_CODE('usmd') , kOTCfgRemoteSecurityDataPref , kOTCfgRemoteX25Pref = FOUR_CHAR_CODE('x25 ') } |
| enum | { kOTCfgRemoteServerPortPref , kOTCfgRemoteServerPref = FOUR_CHAR_CODE('srvr') , kOTCfgRemoteApplicationPref } |
| enum | { kOTCfgRemoteRedialNone = 2 , kOTCfgRemoteRedialMain = 3 , kOTCfgRemoteRedialMainAndAlternate = 4 } |
| enum | { kOTCfgRemotePPPConnectScriptNone = 0 , kOTCfgRemotePPPConnectScriptTerminalWindow = 1 , kOTCfgRemotePPPConnectScriptScript } |
| enum | { kOTCfgRemoteProtocolPPP = 1 , kOTCfgRemoteProtocolARAP = 2 , kOTCfgRemoteProtocolAuto } |
| enum | { kOTCfgRemoteLogLevelNormal = 0 , kOTCfgRemoteLogLevelVerbose = 1 } |
| enum | { kOTCfgAnswerModeOff = 0 , kOTCfgAnswerModeNormal = 1 , kOTCfgAnswerModeTransfer , kOTCfgAnswerModeCallback = 3 } |
| enum | { kOTCfgNetProtoNone = 0 , kOTCfgNetProtoIP = 1 , kOTCfgNetProtoAT = 2 , kOTCfgNetProtoAny } |
| enum | { kOTCfgNetAccessModeUnrestricted , kOTCfgNetAccessModeThisMacOnly } |
Functions | |
| OSStatus | OTCfgOpenDatabase (CfgDatabaseRef *dbRef) |
| OSStatus | OTCfgCloseDatabase (CfgDatabaseRef *dbRef) |
| OSStatus | OTCfgGetAreasCount (CfgDatabaseRef dbRef, ItemCount *itemCount) |
| OSStatus | OTCfgGetAreasList (CfgDatabaseRef dbRef, ItemCount *itemCount, CfgAreaID areaID[], Str255 areaName[]) |
| OSStatus | OTCfgGetCurrentArea (CfgDatabaseRef dbRef, CfgAreaID *areaID) |
| OSStatus | OTCfgSetCurrentArea (CfgDatabaseRef dbRef, CfgAreaID areaID) |
| OSStatus | OTCfgCreateArea (CfgDatabaseRef dbRef, ConstStr255Param areaName, CfgAreaID *areaID) |
| OSStatus | OTCfgDeleteArea (CfgDatabaseRef dbRef, CfgAreaID areaID) |
| OSStatus | OTCfgDuplicateArea (CfgDatabaseRef dbRef, CfgAreaID sourceAreaID, CfgAreaID destAreaID) |
| OSStatus | OTCfgSetAreaName (CfgDatabaseRef dbRef, CfgAreaID areaID, ConstStr255Param areaName, CfgAreaID *newAreaID) |
| OSStatus | OTCfgGetAreaName (CfgDatabaseRef dbRef, CfgAreaID areaID, Str255 areaName) |
| OSStatus | OTCfgOpenArea (CfgDatabaseRef dbRef, CfgAreaID areaID) |
| OSStatus | OTCfgCloseArea (CfgDatabaseRef dbRef, CfgAreaID areaID) |
| OSStatus | OTCfgBeginAreaModifications (CfgDatabaseRef dbRef, CfgAreaID readAreaID, CfgAreaID *writeAreaID) |
| OSStatus | OTCfgCommitAreaModifications (CfgDatabaseRef dbRef, CfgAreaID readAreaID, CfgAreaID writeAreaID) |
| OSStatus | OTCfgAbortAreaModifications (CfgDatabaseRef dbRef, CfgAreaID readAreaID) |
| OSStatus | OTCfgGetEntitiesCount (CfgDatabaseRef dbRef, CfgAreaID areaID, CfgEntityClass entityClass, CfgEntityType entityType, ItemCount *itemCount) |
| OSStatus | OTCfgGetEntitiesList (CfgDatabaseRef dbRef, CfgAreaID areaID, CfgEntityClass entityClass, CfgEntityType entityType, ItemCount *itemCount, CfgEntityRef entityRef[], CfgEntityInfo entityInfo[]) |
| OSStatus | OTCfgCreateEntity (CfgDatabaseRef dbRef, CfgAreaID areaID, const CfgEntityInfo *entityInfo, CfgEntityRef *entityRef) |
| OSStatus | OTCfgDeleteEntity (CfgDatabaseRef dbRef, const CfgEntityRef *entityRef) |
| OSStatus | OTCfgDuplicateEntity (CfgDatabaseRef dbRef, const CfgEntityRef *entityRef, const CfgEntityRef *newEntityRef) |
| OSStatus | OTCfgSetEntityName (CfgDatabaseRef dbRef, const CfgEntityRef *entityRef, ConstStr255Param entityName, CfgEntityRef *newEntityRef) |
| void | OTCfgGetEntityArea (const CfgEntityRef *entityRef, CfgAreaID *areaID) |
| void | OTCfgGetEntityName (const CfgEntityRef *entityRef, Str255 entityName) |
| OSStatus | OTCfgGetEntityLogicalName (CfgDatabaseRef dbRef, const CfgEntityRef *entityRef, Str255 entityName) |
| void | OTCfgChangeEntityArea (CfgEntityRef *entityRef, CfgAreaID newAreaID) |
| Boolean | OTCfgIsSameEntityRef (const CfgEntityRef *entityRef1, const CfgEntityRef *entityRef2, Boolean ignoreArea) |
| Boolean | OTCfgIsSameAreaID (CfgAreaID areaID1, CfgAreaID areaID2) |
| OSStatus | OTCfgOpenPrefs (CfgDatabaseRef dbRef, const CfgEntityRef *entityRef, Boolean writer, CfgEntityAccessID *accessID) |
| OSStatus | OTCfgClosePrefs (CfgEntityAccessID accessID) |
| OSStatus | OTCfgSetPrefs (CfgEntityAccessID accessID, OSType prefsType, const void *data, ByteCount length) |
| OSStatus | OTCfgDeletePrefs (CfgEntityAccessID accessID, OSType prefsType) |
| OSStatus | OTCfgGetPrefs (CfgEntityAccessID accessID, OSType prefsType, void *data, ByteCount length) |
| OSStatus | OTCfgGetPrefsSize (CfgEntityAccessID accessID, OSType prefsType, ByteCount *length) |
| OSStatus | OTCfgGetTemplate (CfgEntityClass entityClass, CfgEntityType entityType, OSType prefsType, void *data, ByteCount *dataSize) |
| Handle | OTCfgGetDefault (OSType entityType, OSType entityClass, OSType prefsType) |
| OSStatus | OTCfgGetPrefsTOCCount (CfgEntityAccessID accessID, ItemCount *itemCount) |
| OSStatus | OTCfgGetPrefsTOC (CfgEntityAccessID accessID, ItemCount *itemCount, CfgPrefsHeader prefsTOC[]) |
| typedef | CALLBACK_API (void, OTCfgNotifyProcPtr)(void *contextPtr |
| OSStatus | OTCfgInstallNotifier (CfgDatabaseRef dbRef, CfgEntityClass theClass, CfgEntityType theType, OTCfgNotifyProcPtr notifier, void *contextPtr) |
| OSStatus | OTCfgRemoveNotifier (CfgDatabaseRef dbRef, CfgEntityClass theClass, CfgEntityType theType) |
| SInt16 | OTCfgEncrypt (UInt8 *key, UInt8 *data, SInt16 dataLen) |
| SInt16 | OTCfgDecrypt (UInt8 *key, UInt8 *data, SInt16 dataLen) |
Network Setup Interfaces.
For bug reports, consult the following page on the World Wide Web:
http://developer.apple.com/bugreporter/
| #define OTCfgTCPInterfacesPackedPartPointer | ( | h | ) |
The OTCfgTCPInterfacesPacked structure holds information about the TCP/IP interfaces configured on the computer. IMPORTANT: You must pack this structure when writing it to the database and unpack it when reading it from the database. The OTCfgTCPInterfacesPacked structure is a complex case, consisting of a fixed size structure, appended after a variable length string. Use this macro to help access the movable part.
| typedef UInt8 OTCfgATalkUnloadOptions |
OTCfgATalkUnloadOptions controls whether AppleTalk is active or not. The various constants deserve some explanation. The original definition of this field was as an inactivity timeout (in minutes), similar to that implemented by TCP/IP in current versions of OT. However, before OT 1.0 shipped Apple realised that loading and unloading AppleTalk on demand was not possible, so this was redefined as a flag, with zero meaning inactive and not-zero meaning active. However, the default preferences were not updated to reflect this change. So, it is possible to see the values defined below stored in this field. When reading, you should treat zero as inactive, and all non-zero values as active. When writing, you should write either kOTCfgATalkInactive or kOTCfgATalkActive, never kOTCfgATalkDefaultUnloadTimeout.
| typedef UInt32 OTCfgModemDialogToneMode |
OTCfgModemDialogToneMode specifies the handling of the dial tone within a OTCfgModemGeneral preference.
| typedef UInt32 OTCfgRemoteAnswerMode |
The following types are used in the OTCfgRemoteServerPort preference.
| typedef UInt32 OTCfgRemoteLogLevel |
OTCfgRemoteLogLevel is used as a field in OTCfgRemoteLogOptions.
| typedef UInt32 OTCfgRemotePPPConnectScript |
The following types are used by the OTCfgRemoteConnect preference.
| typedef UInt32 OTCfgRemoteRedialMode |
OTCfgRemoteRedialMode specifies the handling of redial within a OTCfgRemoteDialing preference.
| typedef UInt8 OTCfgTCPConfigMethod |
OTCfgTCPConfigMethod is used as a field of OTCfgTCPInterfacesUnpacked to denote how TCP/IP should acquire an address.
| typedef UInt16 OTCfgTCPUnloadAttr |
The OTCfgTCPUnloadAttr preference determines whether TCP/IP is active or inactive and, if active, whether it will unload after 2 minutes of inactivity.
| typedef UInt16 OTCfgUserMode |
For most control panels that support a concept of "user mode", the OTCfgUserMode preference holds (or is used as a field in another preference to hold) the current user mode.
| typedef UInt32 OTCfgUserMode32 |
The exceptions (and there has to be exceptions, right) are Remote Access and Modem, where the user mode is always stored as a UInt32 instead of a UInt16. The constant values from OTCfgUserMode apply though.
| anonymous enum |
| anonymous enum |
reserve a 'free' tag for free blocks
| anonymous enum |
CfgEntityClass / CfgEntityType
The database can distinguish between several classes of objects and several types withing each class Use of different classes allow to store type of information in the same database
Other entity classes and types can be defined by developers.
| anonymous enum |
Inputs: CfgEntityRef *entityRef Reference to an entity CfgAreaID newAreaID ID of area to contain moved entity Outputs: none Returns: none
Changes the area ID associated with the specified entity reference.
CALL_NOT_IN_CARBON
| anonymous enum |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgEntityClass theClass remove notifier for this class CfgEntityType theType remove notifier for this type Outputs: none Returns: OSStatus *** list errors ***
Removes a notifier previously installed with OTCfgRemoveNotifier.
Requires Network Setup 1.1 or higher. Constants for the code parameter of the notifier installed by OTCfgInstallNotifier. CALL_NOT_IN_CARBON
| anonymous enum |
Inputs: UInt8 *key encryption key ( user name ) UInt8 *data data to decrypt ( password ) SInt16 dataLen length of data to decrypt Outputs: UInt8 *data decrypted data Returns: SInt16 length of decrypted data
Decrypt the password, using the user name as the encryption key. Return the decrypted password and its length.
Requires Network Setup 1.1 or higher.
CfgEntityClass / CfgEntityType
The database can distinguish between several classes of objects and several types withing each class Use of different classes allow to store type of information in the same database
Other entity classes and types can be defined by developers.
CALL_NOT_IN_CARBON
| anonymous enum |
| anonymous enum |
Bits and masks for the fFlags field of CfgSetsStruct. Second line.
| anonymous enum |
Indexes for the fTimes field of CfgSetsStruct.
| anonymous enum |
---------------— Common ---------------—
Per-connection preference types
| anonymous enum |
| anonymous enum |
Per-connection backward compatibility preference types
| anonymous enum |
Global backward compatibility preference types
| anonymous enum |
| anonymous enum |
Global preference types
| anonymous enum |
Masks for the kOTCfgProtocolOptionsPref preference.
| anonymous enum |
---------------— Infrared ---------------—
Per-connection preference types
| anonymous enum |
---------------— TCP/IP (v4) ---------------—
Per-connection preference types
| Enumerator | |
|---|---|
| kOTCfgTCPDeviceTypePref | OTCfgTCPInterfaces (packed) |
| kOTCfgTCPRoutersListPref | UInt16 (device type) |
| kOTCfgTCPSearchListPref | |
| kOTCfgTCPDNSServersListPref | OTCfgTCPSearchList (packed) |
| kOTCfgTCPSearchDomainsPref | |
| kOTCfgTCPDHCPLeaseInfoPref | |
| kOTCfgTCPDHCPClientIDPref | |
| kOTCfgTCPUnloadAttrPref | DHCP client ID, Pascal string |
| kOTCfgTCPLocksPref | OTCfgTCPUnloadAttr |
| kOTCfgTCPPushBelowIPPref | |
| kOTCfgTCPPushBelowIPListPref | single module to push below IP, Pascal string |
| anonymous enum |
The OTCfgTCPLocks preference has an odd size, either 25 or 27 bytes depending on the verson on OT. It is impossible to represent an odd size structure in 68K aligned C structures, because the compiler always pads structures to an even size. So, when reading and writing this preference you should use one of the constants defined below.
| anonymous enum |
Masks for the kOTCfgProtocolOptionsPref preference.
| anonymous enum |
---------------— DNS ---------------—
Per-connection preference types
| anonymous enum |
| anonymous enum |
Global preference types
| anonymous enum |
---------------— Remote Access ---------------—
Many Remote Access preferences include a version number. Depending on how the preferences were constructed, the version might either be kOTCfgRemoteDefaultVersion or kOTCfgRemoteAcceptedVersion. It turns out that Remote Access doesn't actually check the version, so both versions work equally well. However, you should abide by the following rules:
o When reading the version number field, accept both kOTCfgRemoteDefaultVersion and kOTCfgRemoteAcceptedVersion. o When writing the version number field, write kOTCfgRemoteDefaultVersion.
| anonymous enum |
Per-connection preference types
| Enumerator | |
|---|---|
| kOTCfgRemoteAddressPref | |
| kOTCfgRemoteChatPref | 'TEXT' format, max 255 characters, see also OTCfgRemoteConnect |
| kOTCfgRemoteDialingPref | 'TEXT', see also OTCfgRemoteConnect |
| kOTCfgRemoteAlternateAddressPref | |
| kOTCfgRemoteClientLocksPref | |
| kOTCfgRemoteClientMiscPref | |
| kOTCfgRemoteConnectPref | |
| kOTCfgRemoteUserPref | |
| kOTCfgRemoteDialAssistPref | user name, Pascal string |
| kOTCfgRemoteIPCPPref | |
| kOTCfgRemoteLCPPref | |
| kOTCfgRemoteLogOptionsPref | |
| kOTCfgRemotePasswordPref | |
| kOTCfgRemoteTerminalPref | |
| kOTCfgRemoteUserModePref | |
| kOTCfgRemoteSecurityDataPref | |
| kOTCfgRemoteX25Pref | untyped data for external security modules |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| typedef CALLBACK_API | ( | void | , |
| OTCfgNotifyProcPtr | |||
| ) |
Inputs: CfgEntityAccessID* accessID ID of entity to access ItemCount* itemCount Number of entries requested CfgPrefsHeader prefsTOC[] Pointer to array of itemCount pref headers Outputs: ItemCount itemCount Number of entries returned CfgPrefsHeader prefsTOC[] Filled in array of *itemCount pref headers Returns: OSStatus *** list errors ***
Get the list of all the preference in the entity. Return the number of preferences in the count. prefsTOC has to be big enough to hold information about all the preference.
Current versions of Network Setup don©t read the input value of itemCount to ensure that the returned preference information doesn't write off the end of the prefsTOC array. This is too be fixed in a future version. The upshot is that:
a) always call OTCfgGetPrefsTOCCount before calling this routine and then allocate an appropriate sized array to pass to prefsTOC b) before calling this routine, always set up itemCount to the size of the prefsTOC array so that your code will run on future systems
CALL_NOT_IN_CARBON
| OSStatus OTCfgAbortAreaModifications | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | readAreaID | ||
| ) |
OTCfgCommitAreaModifications()
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID readAreaID ID of area opened for reading CfgAreaID writeAreaID ID of area opened for modification Outputs: none Returns: OSStatus *** list errors ***
Closes an area opened for writing. All modifications are committed and readers are informed that the database changed state. The readAreaID should be the ID of the original area passed to OTCfgBeginAreaModifications. The writeAreaID should be the ID returned by OTCfgBeginAreaModifications. If either area doesn©t exist or there is a mismatch between readAreaID and writeAreaID, kCfgErrAreaNotFound is returned. OTCfgAbortAreaModifications()
| OSStatus OTCfgBeginAreaModifications | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | readAreaID, | ||
| CfgAreaID * | writeAreaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area to close Outputs: none Returns: OSStatus *** list errors ***
Closes an area opened for reading. If the area doesn©t exist kCfgErrAreaNotFound is returned. For write access OTCfgBeginAreaModifications()
| void OTCfgChangeEntityArea | ( | CfgEntityRef * | entityRef, |
| CfgAreaID | newAreaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgEntityRef *entityRef Reference to an entity Outputs: Str255 entityName Logical Name of the entity Returns: none
Returns the logical name associated with the specified entity reference. CALL_NOT_IN_CARBON OTCfgChangeEntityArea()
| OSStatus OTCfgCloseArea | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area to open Outputs: none Returns: OSStatus *** list errors ***
Opens the specified area for reading. If the area doesn©t exist kCfgErrAreaNotFound is returned. OTCfgCloseArea()
| OSStatus OTCfgCloseDatabase | ( | CfgDatabaseRef * | dbRef | ) |
Inputs: none Outputs: CfgDatabaseRef* dbRef Reference to opened database Returns: OSStatus *** list errors ***
Opens Network Setup for a given client. This call should be made prior to any other call. OTCfgCloseDatabase()
| OSStatus OTCfgClosePrefs | ( | CfgEntityAccessID | accessID | ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgEntityRef* entityRef Reference to an entity Boolean writer If true, open for write Outputs: CfgEntityAccessID* accessID ID for entity access Returns: OSStatus *** list errors ***
Open the specified entity and return the CfgEntityAccessID for the following access of the content of the entity. If writer is true, CfgGetPrefs and CfgSetPrefs are allowed, otherwise only CfgGetPrefs is allowed. OTCfgClosePrefs()
| OSStatus OTCfgCommitAreaModifications | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | readAreaID, | ||
| CfgAreaID | writeAreaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID readAreaID ID of area opened for reading Outputs: CfgAreaID* writeAreaID ID of area opened for modification Returns: OSStatus *** list errors ***
Opens the specified area for writing. A new area id is provided. This area id should be used to enumerate, add, delete, read and write to the modified data. The original id can still be used to access the original unmodified data. If the area doesn©t exist, kCfgErrAreaNotFound is returned. OTCfgCommitAreaModifications()
| OSStatus OTCfgCreateArea | ( | CfgDatabaseRef | dbRef, |
| ConstStr255Param | areaName, | ||
| CfgAreaID * | areaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area to make active Outputs: none Returns: OSStatus *** list errors ***
Sets the current area. If the area doesn©t exist kCfgErrAreaNotFound is returned. OTCfgCreateArea()
| OSStatus OTCfgCreateEntity | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID, | ||
| const CfgEntityInfo * | entityInfo, | ||
| CfgEntityRef * | entityRef | ||
| ) |
can be NULL OTCfgGetEntitiesList()
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area to list CfgEntityClass entityClass Class of entities to list CfgEntityType entityType Type of entities to list ItemCount* itemCount Count of entities requested CfgEntityRef entityRef[] Pointer to array of itemCount entity refs CfgEntityInfo entityInfo[] Pointer to array of *itemCount entity infos Outputs: ItemCount itemCount Count of entities listed CfgEntityRef entityRef[] Filled in array of *itemCount entity refs CfgEntityInfo entityInfo[] Filled in array of *itemCount entity infos Returns: OSStatus *** list errors ***
Returns the list of entities of the specified class and type in the specified area. To obtain all entities regardless of their class or type pass kCfgClassAnyEntity or kCfgTypeAnyEntity. The count parameter should have the value obtained by CfgGetEntitiesCount. On exit count may be less if some entities were deleted in the meantime. The id and info parameters should be arrays large enough to hold count entries. If the area doesn©t exist, kCfgErrAreaNotFound is returned. The info array contains information about each entity, including its class, type, name and the area of its icon:
struct CfgEntityInfo { CfgEntityClass fClass; CfgEntityType fType; ConstStr255Param fName; CfgResourceLocator fIcon; }; OTCfgCreateEntity()
| SInt16 OTCfgDecrypt | ( | UInt8 * | key, |
| UInt8 * | data, | ||
| SInt16 | dataLen | ||
| ) |
Inputs: UInt8 *key encryption key ( user name ) UInt8 *data data to encrypt ( password ) SInt16 dataLen length of data to encrypt Outputs: UInt8 *data encrypted data Returns: SInt16 length of encrypted data
Encrypt the password, using the user name as the encryption key. Return the encrypted password and its length.
Requires Network Setup 1.1 or higher. OTCfgDecrypt()
| OSStatus OTCfgDeleteArea | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database ConstStr255Param areaName Name of area to create Outputs: CfgAreaID* areaID ID of newly created area Returns: OSStatus *** list errors ***
Creates a new area with the specified name. Then name must be unique or kCfgErrAreaAlreadyExists will be returned. OTCfgDeleteArea()
| OSStatus OTCfgDeleteEntity | ( | CfgDatabaseRef | dbRef, |
| const CfgEntityRef * | entityRef | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area to contain entity CfgEntityInfo* entityInfo Information that defines the entity Outputs: CfgEntityRef* entityRef Reference to entity created Returns: OSStatus *** list errors ***
Creates a new entity with the specified class, type and name and returns an id for it. If the area doesn©t exist, kCfgErrAreaNotFound is returned. If there is already an entity with the same name kCfgErrEntityAlreadyExists is returned. OTCfgDeleteEntity()
| OSStatus OTCfgDeletePrefs | ( | CfgEntityAccessID | accessID, |
| OSType | prefsType | ||
| ) |
Inputs: CfgEntityAccessID* accessID ID of entity to access OSType prefsType Preference type to set void* data Address of data ByteCount length Number of bytes of data Outputs: none Returns: OSStatus *** list errors ***
Write the data to the specified preference, creating the preference if necessary. The preference is identified by the prefsType. If the entity is not opened for the writer, an error code is returned. CALL_NOT_IN_CARBON OTCfgDeletePrefs()
| OSStatus OTCfgDuplicateArea | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | sourceAreaID, | ||
| CfgAreaID | destAreaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area to delete Outputs: none Returns: OSStatus *** list errors ***
Deletes the specified area. If the area doesn©t exist kCfgErrAreaNotFound is returned. OTCfgDuplicateArea()
| OSStatus OTCfgDuplicateEntity | ( | CfgDatabaseRef | dbRef, |
| const CfgEntityRef * | entityRef, | ||
| const CfgEntityRef * | newEntityRef | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgEntityRef* entityRef Reference to entity to delete Outputs: none Returns: OSStatus *** list errors ***
Deletes the specified entity. If there is no entity with this id, kCfgEntityNotfoundErr is returned OTCfgDuplicateEntity()
| SInt16 OTCfgEncrypt | ( | UInt8 * | key, |
| UInt8 * | data, | ||
| SInt16 | dataLen | ||
| ) |
| OSStatus OTCfgGetAreaName | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID, | ||
| Str255 | areaName | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area being named ConstStr255Param areaName New name for area Outputs: CfgAreaID* newAreaID ID of renamed area Returns: OSStatus *** list errors ***
Renames the specified area. A new id is returned: it should be used from now on. If the area doesn©t exist kCfgErrAreaNotFound is returned. OTCfgGetAreaName()
| OSStatus OTCfgGetAreasCount | ( | CfgDatabaseRef | dbRef, |
| ItemCount * | itemCount | ||
| ) |
Inputs: CfgDatabaseRef* dbRef Reference to opened database Outputs: CfgDatabaseRef* dbRef Reference to opened database is cleared Returns: OSStatus *** list errors ***
Closes Network Setup for a given client. This call should be made when the client no longer wants to use Network Setup.
| OSStatus OTCfgGetAreasList | ( | CfgDatabaseRef | dbRef, |
| ItemCount * | itemCount, | ||
| CfgAreaID | areaID[], | ||
| Str255 | areaName[] | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database Outputs: ItemCount* itemCount Number of entities defined Returns: OSStatus *** list errors ***
Returns the number of areas currently defined. OTCfgGetAreasList()
| areaName | can be NULL |
| OSStatus OTCfgGetCurrentArea | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID * | areaID | ||
| ) |
can be NULL OTCfgGetAreasList()
Inputs: CfgDatabaseRef dbRef Reference to opened database ItemCount* itemCount Number of entities requested CfgAreaID areaID[] Pointer to array of itemCount area IDs Str255 areaName[] Pointer to array of *itemCount area names Outputs: ItemCount itemCount Number of entities defined CfgAreaID areaID[] Filled in array of area IDs Str255 areaName[] Filled in array of area names Returns: OSStatus *** list errors ***
Returns a list of area IDs and names. On entry, count should be set to whatever OTCfgGetAreasCount returned. On exit, count contains the actual number of areas found. This can be less than the initial count value if areas were deleted in the meantime. The id and name parameters are stored in arrays that should each be able to contain count values. OTCfgGetCurrentArea()
| Handle OTCfgGetDefault | ( | OSType | entityType, |
| OSType | entityClass, | ||
| OSType | prefsType | ||
| ) |
Inputs: OSType entityClass entityClass OSType entityType entityType OSType prefsType prefsType ByteCount* dataSize maximum length of buffer Outputs: void* data template for the preference class/type/prefsType ByteCount* dataSize actual length of template Returns: OSStatus *** list errors ***
This routine returns the template for the specified preference class, type, and prefsType. Due to a human error, OTCfgGetDefault was published with the entity type and class parameters reversed, with respect to the other calls that take these same parameters. Please, use OTCfgGetTemplate instead. CALL_NOT_IN_CARBON OTCfgGetDefault()
| OSStatus OTCfgGetEntitiesCount | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID, | ||
| CfgEntityClass | entityClass, | ||
| CfgEntityType | entityType, | ||
| ItemCount * | itemCount | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID readAreaID ID of area opened for reading Outputs: none Returns: OSStatus *** list errors ***
Closes an area opened for writing, discarding any modification. The areaID should be the id of the original area. If the area doesn©t exist or the wrong id is passed kCfgErrAreaNotFound is returned. Working with entities
Entities can be manipulated as soon as an area has been opened. The same calls work both for areas opened for reading or for modification. In the latter case, the calls can be used on the original or new area id to access the original data or the modified data. For everybody Count receives the actual number of entities OTCfgGetEntitiesCount()
| OSStatus OTCfgGetEntitiesList | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID, | ||
| CfgEntityClass | entityClass, | ||
| CfgEntityType | entityType, | ||
| ItemCount * | itemCount, | ||
| CfgEntityRef | entityRef[], | ||
| CfgEntityInfo | entityInfo[] | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area to count CfgEntityClass entityClass Class of entities to count CfgEntityType entityType Type of entities to count Outputs: ItemCount* itemCount Count of matching entities Returns: OSStatus *** list errors ***
Returns the number of entities of the specified class and type in the specified area. To obtain all entities regardless of their class or type pass kCfgClassAnyEntity or kCfgTypeAnyEntity. If the area doesn©t exist, kCfgErrAreaNotFound is returned. Count as input, is the number of entities to read; count as output, receives the actual number of entities or the number you specified. OTCfgGetEntitiesList()
| entityInfo | can be NULL |
| void OTCfgGetEntityArea | ( | const CfgEntityRef * | entityRef, |
| CfgAreaID * | areaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgEntityRef* entityRef Reference to entity to rename ConstStr255Param entityName New name for entity Outputs: CfgEntityRef* newEntityRef Reference to renamed entity Returns: OSStatus *** list errors ***
Renames the specified entity. If the entity doesn©t exist kCfgEntityNotfoundErr is returned. If there is already an entity with that name kCfgErrEntityAlreadyExists is returned. OTCfgGetEntityArea()
| OSStatus OTCfgGetEntityLogicalName | ( | CfgDatabaseRef | dbRef, |
| const CfgEntityRef * | entityRef, | ||
| Str255 | entityName | ||
| ) |
Inputs: CfgEntityRef *entityRef Reference to an entity Outputs: Str255 entityName Name of the entity Returns: none
Returns the entity name associated with the specified entity reference. CALL_NOT_IN_CARBON OTCfgGetEntityLogicalName()
| void OTCfgGetEntityName | ( | const CfgEntityRef * | entityRef, |
| Str255 | entityName | ||
| ) |
Inputs: CfgEntityRef *entityRef Reference to an entity Outputs: CfgAreaID *areaID ID of area that contains the entity Returns: none
Returns the area ID associated with the specified entity reference. OTCfgGetEntityName()
| OSStatus OTCfgGetPrefs | ( | CfgEntityAccessID | accessID, |
| OSType | prefsType, | ||
| void * | data, | ||
| ByteCount | length | ||
| ) |
Inputs: CfgEntityAccessID* accessID ID of entity to access OSType prefsType Preference type to get Outputs: none Returns: OSStatus *** list errors ***
Delete the specified preference. The preference is identified by the prefsType. CALL_NOT_IN_CARBON OTCfgGetPrefs()
| OSStatus OTCfgGetPrefsSize | ( | CfgEntityAccessID | accessID, |
| OSType | prefsType, | ||
| ByteCount * | length | ||
| ) |
Inputs: CfgEntityAccessID* accessID ID of entity to access OSType prefsType Preference type to get void* data Address for data ByteCount length Number of bytes of data requested Outputs: none Returns: OSStatus *** list errors ***
Read the data from the specified preference to the passed buffer. The preference is identified by the prefsType. If the passed buffer is too small, kCfgErrDataTruncated is returned, but will copy as many data as possible to the buffer. OTCfgGetPrefsSize()
| OSStatus OTCfgGetPrefsTOC | ( | CfgEntityAccessID | accessID, |
| ItemCount * | itemCount, | ||
| CfgPrefsHeader | prefsTOC[] | ||
| ) |
Inputs: CfgEntityAccessID* accessID ID of entity to access Outputs: ItemCount* itemCount Number of entries available Returns: OSStatus *** list errors ***
Get the count of all the preference in the entity. OTCfgGetPrefsTOC()
| OSStatus OTCfgGetPrefsTOCCount | ( | CfgEntityAccessID | accessID, |
| ItemCount * | itemCount | ||
| ) |
Inputs: OSType entityType entityType OSType entityClass entityClass OSType prefsType prefsType Outputs: none Returns: Handle default preference for the preference type/class/prefsType
This routine returns the default preference value for the specified preference type, class, and prefsType.
| OSStatus OTCfgGetTemplate | ( | CfgEntityClass | entityClass, |
| CfgEntityType | entityType, | ||
| OSType | prefsType, | ||
| void * | data, | ||
| ByteCount * | dataSize | ||
| ) |
Inputs: CfgEntityAccessID* accessID ID of entity to access OSType prefsType Preference type to get ByteCount length Number of bytes of data available Outputs: none Returns: OSStatus *** list errors ***
Returns the length, in bytes, of the specified preference. The preference is identified by the prefsType. CALL_NOT_IN_CARBON OTCfgGetTemplate()
| OSStatus OTCfgInstallNotifier | ( | CfgDatabaseRef | dbRef, |
| CfgEntityClass | theClass, | ||
| CfgEntityType | theType, | ||
| OTCfgNotifyProcPtr | notifier, | ||
| void * | contextPtr | ||
| ) |
| Boolean OTCfgIsSameAreaID | ( | CfgAreaID | areaID1, |
| CfgAreaID | areaID2 | ||
| ) |
Inputs: CfgEntityRef* entityRef1 Reference to an entity CfgEntityRef* entityRef2 Reference to another entity Boolean ignoreArea If true, ignore the area ID Outputs: none Returns: Boolean If true, entity references match
Compare two entity references. If ignoreArea is true, and the two entity names are the same, then return true. If ignoreArea is false, then the area IDs must be the same, as well as the entity names must be the same, then can return true. OTCfgIsSameAreaID()
| Boolean OTCfgIsSameEntityRef | ( | const CfgEntityRef * | entityRef1, |
| const CfgEntityRef * | entityRef2, | ||
| Boolean | ignoreArea | ||
| ) |
| OSStatus OTCfgOpenArea | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID areaID ID of area being queried Outputs: Str255 areaName Name of area Returns: OSStatus *** list errors ***
Gets the name of the specified area. If the area doesn©t exist kCfgErrAreaNotFound is returned.
Requires Network Setup 1.0.1 or higher.
Configuration Database API
| OSStatus OTCfgOpenDatabase | ( | CfgDatabaseRef * | dbRef | ) |
| OSStatus OTCfgOpenPrefs | ( | CfgDatabaseRef | dbRef, |
| const CfgEntityRef * | entityRef, | ||
| Boolean | writer, | ||
| CfgEntityAccessID * | accessID | ||
| ) |
Inputs: CfgAreaID areaID1 ID of an area CfgAreaID areaID2 ID of another area Outputs: none Returns: Boolean If true, area IDs match
Compare two area IDs. Return true for matching area IDs, and return false for the different area IDs.
Open Preferences if writer = true, GetPrefs and SetPrefs are allowed, else only GetPrefs is
| OSStatus OTCfgRemoveNotifier | ( | CfgDatabaseRef | dbRef, |
| CfgEntityClass | theClass, | ||
| CfgEntityType | theType | ||
| ) |
can be NULL OTCfgInstallNotifier()
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgEntityClass theClass receives notifications about changes to this class CfgEntityType theType receives notifications about changes to this type OTCfgNotifyProcPtr notifier address of callback routine void* contextPtr refCon for callback routine Outputs: none Returns: OSStatus *** list errors ***
Installs a notifier that Network Setup will call when interesting things happen.
Requires Network Setup 1.1 or higher. OTCfgRemoveNotifier()
| OSStatus OTCfgSetAreaName | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID, | ||
| ConstStr255Param | areaName, | ||
| CfgAreaID * | newAreaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgAreaID sourceAreaID Area to duplicate CfgAreaID destAreaID Area to contain duplicate Outputs: none Returns: OSStatus *** list errors ***
Duplicates the source area content into the destination area. Both areas should exist prior to making this call. If either area doesn©t exist kCfgErrAreaNotFound is returned. OTCfgSetAreaName()
| OSStatus OTCfgSetCurrentArea | ( | CfgDatabaseRef | dbRef, |
| CfgAreaID | areaID | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database Outputs: CfgAreaID* areaID ID of current area Returns: OSStatus *** list errors ***
Returns the id of the current area. OTCfgSetCurrentArea()
| OSStatus OTCfgSetEntityName | ( | CfgDatabaseRef | dbRef, |
| const CfgEntityRef * | entityRef, | ||
| ConstStr255Param | entityName, | ||
| CfgEntityRef * | newEntityRef | ||
| ) |
Inputs: CfgDatabaseRef dbRef Reference to opened database CfgEntityRef* entityRef Reference to entity to duplicate CfgEntityRef* newEntityRef Reference to destination entity Outputs: none Returns: OSStatus *** list errors ***
Copies the contents of entityRef into newEntityRef. Both entities must exit. If either entity doesn©t exist kCfgErrEntityNotFound is returned. OTCfgSetEntityName()
| OSStatus OTCfgSetPrefs | ( | CfgEntityAccessID | accessID, |
| OSType | prefsType, | ||
| const void * | data, | ||
| ByteCount | length | ||
| ) |
Inputs: CfgEntityAccessID* accessID ID for entity to close Outputs: none Returns: OSStatus *** list errors ***
Close the entity with the specified CfgEntityAccessID.
Get/Set Preferences
Accessing the content of an entity
These API calls are for the protocol developers. It supports multiple preferences per entity. Each preference is identified by an OSType (typically called prefsType). The structure of the preference data is protocol stack