Mac OS 9
NetworkSetup.h File Reference

Network Setup Interfaces. More...

#include <MacTypes.h>
#include <Files.h>

Go to the source code of this file.

Data Structures

struct  CfgEntityRef
 
struct  CfgResourceLocator
 
struct  CfgEntityInfo
 
struct  CfgPrefsHeader
 
struct  OTCfgNotifierEntry
 
struct  CfgSetsStruct
 
struct  CfgSetsElement
 
struct  CfgSetsVector
 
struct  OTCfgFlagRecord
 
struct  OTCfgATalkGeneralAARP
 
struct  OTCfgATalkGeneralDDP
 
struct  OTCfgATalkGeneralNBP
 
struct  OTCfgATalkGeneralZIP
 
struct  OTCfgATalkGeneralATP
 
struct  OTCfgATalkGeneralADSP
 
struct  OTCfgATalkGeneralPAP
 
struct  OTCfgATalkGeneralASP
 
struct  OTCfgATalkGeneral
 
struct  OTCfgATalkLocks
 
struct  OTCfgATalkPortDeviceType
 
struct  OTCfgATalkNetworkArchitecture
 
struct  OTCfgIRGeneral
 
struct  OTCfgTCPInterfacesPackedPart
 
struct  OTCfgTCPInterfacesPacked
 
struct  OTCfgTCPInterfacesUnpacked
 
struct  OTCfgTCPRoutersListEntry
 
struct  OTCfgTCPRoutersList
 
struct  OTCfgTCPSearchList
 
struct  OTCfgTCPDNSServersList
 
struct  OTCfgTCPSearchDomains
 
struct  OTCfgTCPDHCPLeaseInfo
 
struct  OTCfgTCPLocks
 
struct  OTCfgModemGeneral
 
struct  OTCfgModemLocks
 
struct  OTCfgModemApplication
 
struct  OTCfgRemoteARAP
 
struct  OTCfgRemoteDialing
 
struct  OTCfgRemoteAlternateAddress
 
struct  OTCfgRemoteClientLocks
 
struct  OTCfgRemoteClientMisc
 
struct  OTCfgRemoteConnect
 
struct  OTCfgRemoteDialAssist
 
struct  OTCfgRemoteIPCP
 
struct  OTCfgRemoteLCP
 
struct  OTCfgRemoteLogOptions
 
struct  OTCfgRemotePassword
 
struct  OTCfgRemoteTerminal
 
struct  OTCfgRemoteUserMode
 
struct  OTCfgRemoteX25
 
struct  OTCfgRemoteServer
 
struct  OTCfgRemoteServerPort
 
struct  OTCfgRemoteApplication
 

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)
 

Detailed Description

Network Setup Interfaces.

Introduced In: 1.3.0
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1998-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ OTCfgTCPInterfacesPackedPartPointer

#define OTCfgTCPInterfacesPackedPartPointer (   h)
Value:
.fAppleTalkZone \
[(**((OTCfgTCPInterfacesPacked **)h)).fAppleTalkZone[0] + 1]))
Definition: NetworkSetup.h:1856
Definition: NetworkSetup.h:1870

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 Documentation

◆ OTCfgATalkUnloadOptions

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.

◆ OTCfgModemDialogToneMode

typedef UInt32 OTCfgModemDialogToneMode

OTCfgModemDialogToneMode specifies the handling of the dial tone within a OTCfgModemGeneral preference.

◆ OTCfgRemoteAnswerMode

typedef UInt32 OTCfgRemoteAnswerMode

The following types are used in the OTCfgRemoteServerPort preference.

◆ OTCfgRemoteLogLevel

typedef UInt32 OTCfgRemoteLogLevel

OTCfgRemoteLogLevel is used as a field in OTCfgRemoteLogOptions.

◆ OTCfgRemotePPPConnectScript

The following types are used by the OTCfgRemoteConnect preference.

◆ OTCfgRemoteRedialMode

typedef UInt32 OTCfgRemoteRedialMode

OTCfgRemoteRedialMode specifies the handling of redial within a OTCfgRemoteDialing preference.

◆ OTCfgTCPConfigMethod

typedef UInt8 OTCfgTCPConfigMethod

OTCfgTCPConfigMethod is used as a field of OTCfgTCPInterfacesUnpacked to denote how TCP/IP should acquire an address.

◆ OTCfgTCPUnloadAttr

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.

◆ OTCfgUserMode

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.

◆ OTCfgUserMode32

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.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Error codes

Enumerator
kCfgErrAreaNotFound 

database has changed since last call - close and reopen DB

kCfgErrAreaAlreadyExists 

Area doesn't exist

kCfgErrAreaNotOpen 

Area already exists

kCfgErrConfigLocked 

Area needs to open first

kCfgErrEntityNotFound 

Access conflict - retry later

kCfgErrEntityAlreadyExists 

An entity with this name doesn't exist

kCfgErrPrefsTypeNotFound 

An entity with this name already exists

kCfgErrDataTruncated 

A preference with this prefsType doesn't exist

kCfgErrFileCorrupted 

Data truncated when read buffer too small

kCfgErrFirst 

The database format appears to be corrupted.

◆ anonymous enum

anonymous enum

reserve a 'free' tag for free blocks

◆ anonymous enum

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.

they should be unique and registered with Developer Tech Support (DTS)

◆ anonymous enum

anonymous enum

For CfgIsSameEntityRef

◆ anonymous enum

anonymous enum

OTCfgChangeEntityArea()

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.


These API calls are for the protocol developers to compare the IDs.


For OTCfgIsSameEntityRef

CALL_NOT_IN_CARBON

◆ anonymous enum

anonymous enum

OTCfgRemoveNotifier()

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

anonymous enum

OTCfgDecrypt()

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.

they should be unique and registered with Developer Tech Support (DTS)

CALL_NOT_IN_CARBON

◆ anonymous enum

anonymous enum

Preference Structures *************** ---------------— Network Setup ---------------—

Enumerator
kOTCfgSetsElementPref 

CfgSetsStruct

kOTCfgSetsVectorPref 

CfgSetsElement

◆ anonymous enum

anonymous enum

Bits and masks for the fFlags field of CfgSetsStruct. Second line.

◆ anonymous enum

anonymous enum

Indexes for the fTimes field of CfgSetsStruct.

◆ anonymous enum

anonymous enum

---------------— Common ---------------—
Per-connection preference types

Enumerator
kOTCfgVersionPref 

Pascal string

kOTCfgPortUserVisibleNamePref 

UInt16, values should be 1

kOTCfgPortUIName 

Pascal string

kOTCfgProtocolUserVisibleNamePref 

Pascal String

kOTCfgAdminPasswordPref 

C string (TCP/IP = "tcp", AppleTalk = "ddp", n/a for others)

kOTCfgProtocolOptionsPref 

not to be documented

◆ anonymous enum

anonymous enum

Global preference types

Enumerator
kOTCfgPrefWindowPositionPref 

OTCfgUserMode, TCP/IP and AppleTalk only

◆ anonymous enum

anonymous enum

Per-connection backward compatibility preference types

◆ anonymous enum

anonymous enum

Global backward compatibility preference types

◆ anonymous enum

anonymous enum

---------------— AppleTalk ---------------— Per-connection preference types

Enumerator
kOTCfgATalkLocksPref 

OTCfgATalkGeneral

kOTCfgATalkPortDeviceTypePref 

OTCfgATalkLocks

◆ anonymous enum

anonymous enum

Global preference types

◆ anonymous enum

anonymous enum

Masks for the kOTCfgProtocolOptionsPref preference.

◆ anonymous enum

anonymous enum

---------------— Infrared ---------------—
Per-connection preference types

◆ anonymous enum

anonymous enum

---------------— TCP/IP (v4) ---------------—
Per-connection preference types

Enumerator
kOTCfgTCPDeviceTypePref 

OTCfgTCPInterfaces (packed)

kOTCfgTCPRoutersListPref 

UInt16 (device type)

kOTCfgTCPSearchListPref 

OTCfgTCPRoutersList

kOTCfgTCPDNSServersListPref 

OTCfgTCPSearchList (packed)

kOTCfgTCPSearchDomainsPref 

OTCfgTCPDNSServersList

kOTCfgTCPDHCPLeaseInfoPref 

OTCfgTCPSearchDomains

kOTCfgTCPDHCPClientIDPref 

OTCfgTCPDHCPLeaseInfo

kOTCfgTCPUnloadAttrPref 

DHCP client ID, Pascal string

kOTCfgTCPLocksPref 

OTCfgTCPUnloadAttr

kOTCfgTCPPushBelowIPPref 

OTCfgTCPLocks

kOTCfgTCPPushBelowIPListPref 

single module to push below IP, Pascal string

◆ anonymous enum

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

anonymous enum

Masks for the kOTCfgProtocolOptionsPref preference.

Enumerator
kOTCfgDontShutDownOnARPCollisionMask 

Turns off Path MTU Discovery

kOTCfgDHCPInformMask 

To be able to Disable ARP Collision ShutDown

kOTCfgOversizeOffNetPacketsMask 

Enables DHCPINFORM instead of DHCPREQUEST

kOTCfgDHCPDontPreserveLeaseMask 

With PMTU off, don't limit off-net packet to 576 bytes

◆ anonymous enum

anonymous enum

---------------— DNS ---------------—
Per-connection preference types

◆ anonymous enum

anonymous enum

---------------— Modem ---------------— Per-connection preference types

Enumerator
kOTCfgModemLocksPref 

OTCfgModemGeneral

kOTCfgModemAdminPasswordPref 

OTCfgModemLocks

◆ anonymous enum

anonymous enum

Global preference types

◆ anonymous enum

anonymous enum

---------------— Remote Access ---------------—

Remote Access Versions

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

anonymous enum

Per-connection preference types

Enumerator
kOTCfgRemoteAddressPref 

OTCfgRemoteARAP

kOTCfgRemoteChatPref 

'TEXT' format, max 255 characters, see also OTCfgRemoteConnect

kOTCfgRemoteDialingPref 

'TEXT', see also OTCfgRemoteConnect

kOTCfgRemoteAlternateAddressPref 

OTCfgRemoteDialing

kOTCfgRemoteClientLocksPref 

OTCfgRemoteAlternateAddress

kOTCfgRemoteClientMiscPref 

OTCfgRemoteClientLocks

kOTCfgRemoteConnectPref 

OTCfgRemoteClientMisc

kOTCfgRemoteUserPref 

OTCfgRemoteConnect

kOTCfgRemoteDialAssistPref 

user name, Pascal string

kOTCfgRemoteIPCPPref 

OTCfgRemoteDialAssist

kOTCfgRemoteLCPPref 

OTCfgRemoteIPCP

kOTCfgRemoteLogOptionsPref 

OTCfgRemoteLCP

kOTCfgRemotePasswordPref 

OTCfgRemoteLogOptions

kOTCfgRemoteTerminalPref 

OTCfgRemotePassword

kOTCfgRemoteUserModePref 

OTCfgRemoteTerminal

kOTCfgRemoteSecurityDataPref 

OTCfgRemoteUserMode

kOTCfgRemoteX25Pref 

untyped data for external security modules

◆ anonymous enum

anonymous enum

Global preference types

Enumerator
kOTCfgRemoteServerPref 

OTCfgRemoteServerPort

kOTCfgRemoteApplicationPref 

OTCfgRemoteServer

◆ anonymous enum

anonymous enum
Enumerator
kOTCfgRemotePPPConnectScriptTerminalWindow 

no chat script

kOTCfgRemotePPPConnectScriptScript 

use a terminal window

◆ anonymous enum

anonymous enum
Enumerator
kOTCfgRemoteProtocolARAP 

PPP only

kOTCfgRemoteProtocolAuto 

ARAP only

◆ anonymous enum

anonymous enum
Enumerator
kOTCfgAnswerModeNormal 

answering disabled

kOTCfgAnswerModeTransfer 

answering enabled

kOTCfgAnswerModeCallback 

answering as a callback server, not valid for personal server

◆ anonymous enum

anonymous enum
Enumerator
kOTCfgNetProtoAT 

allow IPCP connections

kOTCfgNetProtoAny 

allow AppleTalk connections (ATCP, ARAP)

◆ anonymous enum

anonymous enum
Enumerator
kOTCfgNetAccessModeThisMacOnly 

connected client can see things on server and things on server's network

Function Documentation

◆ CALLBACK_API()

typedef CALLBACK_API ( void  ,
OTCfgNotifyProcPtr   
)

OTCfgGetPrefsTOC()

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


Database Change Notification

CALL_NOT_IN_CARBON

◆ OTCfgAbortAreaModifications()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgBeginAreaModifications()

OSStatus OTCfgBeginAreaModifications ( CfgDatabaseRef  dbRef,
CfgAreaID  readAreaID,
CfgAreaID *  writeAreaID 
)

OTCfgCloseArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgChangeEntityArea()

void OTCfgChangeEntityArea ( CfgEntityRef entityRef,
CfgAreaID  newAreaID 
)

OTCfgGetEntityName()

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()

Non-Carbon CFM: in CfgOpenTpt 1.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgCloseArea()

OSStatus OTCfgCloseArea ( CfgDatabaseRef  dbRef,
CfgAreaID  areaID 
)

OTCfgOpenArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgCloseDatabase()

OSStatus OTCfgCloseDatabase ( CfgDatabaseRef *  dbRef)

OTCfgOpenDatabase()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgClosePrefs()

OSStatus OTCfgClosePrefs ( CfgEntityAccessID  accessID)

OTCfgOpenPrefs()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgCommitAreaModifications()

OSStatus OTCfgCommitAreaModifications ( CfgDatabaseRef  dbRef,
CfgAreaID  readAreaID,
CfgAreaID  writeAreaID 
)

OTCfgBeginAreaModifications()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgCreateArea()

OSStatus OTCfgCreateArea ( CfgDatabaseRef  dbRef,
ConstStr255Param  areaName,
CfgAreaID *  areaID 
)

OTCfgSetCurrentArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgCreateEntity()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgDecrypt()

SInt16 OTCfgDecrypt ( UInt8 *  key,
UInt8 *  data,
SInt16  dataLen 
)

OTCfgEncrypt()

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()

Non-Carbon CFM: in CfgOpenTpt 1.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgDeleteArea()

OSStatus OTCfgDeleteArea ( CfgDatabaseRef  dbRef,
CfgAreaID  areaID 
)

OTCfgCreateArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgDeleteEntity()

OSStatus OTCfgDeleteEntity ( CfgDatabaseRef  dbRef,
const CfgEntityRef entityRef 
)

OTCfgCreateEntity()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgDeletePrefs()

OSStatus OTCfgDeletePrefs ( CfgEntityAccessID  accessID,
OSType  prefsType 
)

OTCfgSetPrefs()

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()

Non-Carbon CFM: in CfgOpenTpt 1.2 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgDuplicateArea()

OSStatus OTCfgDuplicateArea ( CfgDatabaseRef  dbRef,
CfgAreaID  sourceAreaID,
CfgAreaID  destAreaID 
)

OTCfgDeleteArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgDuplicateEntity()

OSStatus OTCfgDuplicateEntity ( CfgDatabaseRef  dbRef,
const CfgEntityRef entityRef,
const CfgEntityRef newEntityRef 
)

OTCfgDeleteEntity()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgEncrypt()

SInt16 OTCfgEncrypt ( UInt8 *  key,
UInt8 *  data,
SInt16  dataLen 
)

Remote Access Preference Utilities

OTCfgEncrypt()

Non-Carbon CFM: in CfgOpenTpt 1.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetAreaName()

OSStatus OTCfgGetAreaName ( CfgDatabaseRef  dbRef,
CfgAreaID  areaID,
Str255  areaName 
)

OTCfgSetAreaName()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetAreasCount()

OSStatus OTCfgGetAreasCount ( CfgDatabaseRef  dbRef,
ItemCount *  itemCount 
)

OTCfgCloseDatabase()

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.


Area management

OTCfgGetAreasCount()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetAreasList()

OSStatus OTCfgGetAreasList ( CfgDatabaseRef  dbRef,
ItemCount *  itemCount,
CfgAreaID  areaID[],
Str255  areaName[] 
)

OTCfgGetAreasCount()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available
Parameters
areaNamecan be NULL

◆ OTCfgGetCurrentArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetDefault()

Handle OTCfgGetDefault ( OSType  entityType,
OSType  entityClass,
OSType  prefsType 
)

OTCfgGetDefault()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetEntitiesCount()

OSStatus OTCfgGetEntitiesCount ( CfgDatabaseRef  dbRef,
CfgAreaID  areaID,
CfgEntityClass  entityClass,
CfgEntityType  entityType,
ItemCount *  itemCount 
)

OTCfgAbortAreaModifications()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetEntitiesList()

OSStatus OTCfgGetEntitiesList ( CfgDatabaseRef  dbRef,
CfgAreaID  areaID,
CfgEntityClass  entityClass,
CfgEntityType  entityType,
ItemCount *  itemCount,
CfgEntityRef  entityRef[],
CfgEntityInfo  entityInfo[] 
)

OTCfgGetEntitiesCount()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available
Parameters
entityInfocan be NULL

◆ OTCfgGetEntityArea()

void OTCfgGetEntityArea ( const CfgEntityRef entityRef,
CfgAreaID *  areaID 
)

OTCfgSetEntityName()

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()

Non-Carbon CFM: in CfgOpenTpt 1.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetEntityLogicalName()

OSStatus OTCfgGetEntityLogicalName ( CfgDatabaseRef  dbRef,
const CfgEntityRef entityRef,
Str255  entityName 
)

OTCfgGetEntityName()

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()

Non-Carbon CFM: in CfgOpenTpt 1.2 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetEntityName()

void OTCfgGetEntityName ( const CfgEntityRef entityRef,
Str255  entityName 
)

OTCfgGetEntityArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetPrefs()

OSStatus OTCfgGetPrefs ( CfgEntityAccessID  accessID,
OSType  prefsType,
void *  data,
ByteCount  length 
)

OTCfgDeletePrefs()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetPrefsSize()

OSStatus OTCfgGetPrefsSize ( CfgEntityAccessID  accessID,
OSType  prefsType,
ByteCount *  length 
)

OTCfgGetPrefs()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetPrefsTOC()

OSStatus OTCfgGetPrefsTOC ( CfgEntityAccessID  accessID,
ItemCount *  itemCount,
CfgPrefsHeader  prefsTOC[] 
)

OTCfgGetPrefsTOCCount()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetPrefsTOCCount()

OSStatus OTCfgGetPrefsTOCCount ( CfgEntityAccessID  accessID,
ItemCount *  itemCount 
)

OTCfgGetDefault()

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.


Get table of contents for prefs

OTCfgGetPrefsTOCCount()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgGetTemplate()

OSStatus OTCfgGetTemplate ( CfgEntityClass  entityClass,
CfgEntityType  entityType,
OSType  prefsType,
void *  data,
ByteCount *  dataSize 
)

OTCfgGetPrefsSize()

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()

Non-Carbon CFM: in CfgOpenTpt 1.2 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgInstallNotifier()

OSStatus OTCfgInstallNotifier ( CfgDatabaseRef  dbRef,
CfgEntityClass  theClass,
CfgEntityType  theType,
OTCfgNotifyProcPtr  notifier,
void *  contextPtr 
)

OTCfgInstallNotifier()

Non-Carbon CFM: in CfgOpenTpt 1.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgIsSameAreaID()

Boolean OTCfgIsSameAreaID ( CfgAreaID  areaID1,
CfgAreaID  areaID2 
)

OTCfgIsSameEntityRef()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgIsSameEntityRef()

Boolean OTCfgIsSameEntityRef ( const CfgEntityRef entityRef1,
const CfgEntityRef entityRef2,
Boolean  ignoreArea 
)

OTCfgIsSameEntityRef()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgOpenArea()

OSStatus OTCfgOpenArea ( CfgDatabaseRef  dbRef,
CfgAreaID  areaID 
)

OTCfgGetAreaName()

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

Single Writer ONLY!!!


Opening an area for reading

OTCfgOpenArea()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgOpenDatabase()

OSStatus OTCfgOpenDatabase ( CfgDatabaseRef *  dbRef)

NETWORKSETUPTYPES


Database access

OTCfgOpenDatabase()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgOpenPrefs()

OSStatus OTCfgOpenPrefs ( CfgDatabaseRef  dbRef,
const CfgEntityRef entityRef,
Boolean  writer,
CfgEntityAccessID *  accessID 
)

OTCfgIsSameAreaID()

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.


Dealing with individual preferences


Open Preferences if writer = true, GetPrefs and SetPrefs are allowed, else only GetPrefs is

allowed.

OTCfgOpenPrefs()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgRemoveNotifier()

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()

Non-Carbon CFM: in CfgOpenTpt 1.1 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgSetAreaName()

OSStatus OTCfgSetAreaName ( CfgDatabaseRef  dbRef,
CfgAreaID  areaID,
ConstStr255Param  areaName,
CfgAreaID *  newAreaID 
)

OTCfgDuplicateArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgSetCurrentArea()

OSStatus OTCfgSetCurrentArea ( CfgDatabaseRef  dbRef,
CfgAreaID  areaID 
)

OTCfgGetCurrentArea()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgSetEntityName()

OSStatus OTCfgSetEntityName ( CfgDatabaseRef  dbRef,
const CfgEntityRef entityRef,
ConstStr255Param  entityName,
CfgEntityRef newEntityRef 
)

OTCfgDuplicateEntity()

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()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available

◆ OTCfgSetPrefs()

OSStatus OTCfgSetPrefs ( CfgEntityAccessID  accessID,
OSType  prefsType,
const void *  data,
ByteCount  length 
)

OTCfgClosePrefs()

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

dependent.

OTCfgSetPrefs()

Non-Carbon CFM: in CfgOpenTpt 1.0 and later
Carbon Lib: not available
Mac OS X: not available