📄 networksetuptypes.h
字号:
/* ***** BEGIN LICENSE BLOCK ***** * Source last modified: $Id: NetworkSetupTypes.h,v 1.3.36.1 2004/07/09 02:06:52 hubbe Exp $ * * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. * * The contents of this file, and the files included with this file, * are subject to the current version of the RealNetworks Public * Source License (the "RPSL") available at * http://www.helixcommunity.org/content/rpsl unless you have licensed * the file under the current version of the RealNetworks Community * Source License (the "RCSL") available at * http://www.helixcommunity.org/content/rcsl, in which case the RCSL * will apply. You may also obtain the license terms directly from * RealNetworks. You may not use this file except in compliance with * the RPSL or, if you have a valid RCSL with RealNetworks applicable * to this file, the RCSL. Please see the applicable RPSL or RCSL for * the rights, obligations and limitations governing use of the * contents of the file. * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License Version 2 or later (the * "GPL") in which case the provisions of the GPL are applicable * instead of those above. If you wish to allow use of your version of * this file only under the terms of the GPL, and not to allow others * to use your version of this file under the terms of either the RPSL * or RCSL, indicate your decision by deleting the provisions above * and replace them with the notice and other provisions required by * the GPL. If you do not delete the provisions above, a recipient may * use your version of this file under the terms of any one of the * RPSL, the RCSL or the GPL. * * This file is part of the Helix DNA Technology. RealNetworks is the * developer of the Original Code and owns the copyrights in the * portions it created. * * This file, and the files included with this file, is distributed * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET * ENJOYMENT OR NON-INFRINGEMENT. * * Technology Compatibility Kit Test Suite(s) Location: * http://www.helixcommunity.org/content/tck * * Contributor(s): * * ***** END LICENSE BLOCK ***** */#ifndef __NETWORKSETUPTYPES__#define __NETWORKSETUPTYPES__#ifndef __MACTYPES__#include <MacTypes.h>#endif#ifndef __FILES__#include <Files.h>#endif#ifndef _MAC_MACHO#ifndef __TYPES__#include <Types.h>#endif#endif#if PRAGMA_ONCE#pragma once#endif#ifdef __cplusplusextern "C" {#endif#if PRAGMA_IMPORT#pragma import on#endif#if PRAGMA_STRUCT_ALIGN #pragma options align=mac68k#elif PRAGMA_STRUCT_PACKPUSH #pragma pack(push, 2)#elif PRAGMA_STRUCT_PACK #pragma pack(2)#endif#ifndef _MAC_MACHO#include <OpenTransport.h>#include <OpenTptInternet.h>#endiftypedef UInt16 IRPortSetting;enum { kPrefsTypeStruct = FOUR_CHAR_CODE('stru'), kPrefsTypeElement = FOUR_CHAR_CODE('elem'), kPrefsTypeVector = FOUR_CHAR_CODE('vect')};/* ------------------------------------------------------------------------- Error codes ------------------------------------------------------------------------- */enum { kCfgDatabaseChangedErr = -3290, /* database has changed since last call - close and reopen DB*/ kCfgAreaNotFoundErr = -3291, /* Area doesn't exist*/ kCfgAreaAlreadyExistsErr = -3292, /* Area already exists*/ kCfgAreaNotOpenErr = -3293, /* Area needs to open first*/ kCfgConfigLockedErr = -3294, /* Access conflict - retry later*/ kCfgEntityNotFoundErr = -3295, /* An entity with this name doesn't exist*/ kCfgEntityAlreadyExistsErr = -3296, /* An entity with this name already exists*/ kCfgPrefsTypeNotFoundErr = -3297, /* An record with this PrefsType doesn't exist*/ kCfgDataTruncatedErr = -3298, /* Data truncated when read buffer too small*/ kCfgFileCorruptedErr = -3299 /* The database format appears to be corrupted.*/};typedef struct OpaqueCfgDatabaseRef* CfgDatabaseRef;typedef UInt32 CfgAreaID;typedef void * CfgEntityAccessID;struct CfgPrefsHeader { UInt16 fSize; /* size includes this header*/ UInt16 fVersion; OSType fType;};typedef struct CfgPrefsHeader CfgPrefsHeader;/* ------------------------------------------------------------------------- CfgEntityRef Identifies an object within the database ------------------------------------------------------------------------- */struct CfgEntityRef { CfgAreaID fLoc; UInt32 fReserved; Str255 fID;};typedef struct CfgEntityRef CfgEntityRef;/* ------------------------------------------------------------------------- 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) ------------------------------------------------------------------------- */enum { kCfgAnyEntityClass = FOUR_CHAR_CODE('****'), kCfgUnknownEntityClass = FOUR_CHAR_CODE('????'), kCfgAnyEntityType = FOUR_CHAR_CODE('****'), kCfgUnknownEntityType = FOUR_CHAR_CODE('????'), kOTNetworkConnectionClass = FOUR_CHAR_CODE('otnc'), kOTGlobalProtocolSettingsClass = FOUR_CHAR_CODE('otgl'), kOTAppleTalkNetworkConnection = FOUR_CHAR_CODE('atlk'), kOTTCPv4NetworkConnection = FOUR_CHAR_CODE('tcp4'), kOTTCPv6NetworkConnection = FOUR_CHAR_CODE('tcp6'), kOTRemoteNetworkConnection = FOUR_CHAR_CODE('ara '), kOTDialNetworkConnection = FOUR_CHAR_CODE('dial'), kOTModemNetworkConnection = FOUR_CHAR_CODE('modm'), kOTInfraredNetworkConnection = FOUR_CHAR_CODE('infr'), kOTSetOfSettingsClass = FOUR_CHAR_CODE('otsc'), kOTSetOfSettingsType = FOUR_CHAR_CODE('otst'), kOTGenericNetworkConnection = FOUR_CHAR_CODE('otan')};/* ------------------------------------------------------------------------- CfgEntityClass & CfgEntityType ------------------------------------------------------------------------- */typedef OSType CfgEntityClass;typedef OSType CfgEntityType;struct CfgResourceLocator { FSSpec fFile; UInt16 fResID;};typedef struct CfgResourceLocator CfgResourceLocator;struct CfgEntityInfo { CfgEntityClass fClass; CfgEntityType fType; Str255 fName; CfgResourceLocator fIcon;};typedef struct CfgEntityInfo CfgEntityInfo;/* reserve a 'free' tag for free blocks*/enum { kFREEPrefsType = FOUR_CHAR_CODE('free')};/********************************************************************************* Preferences Structures********************************************************************************/enum { kSetsIndexActive = 0, kSetsIndexEdit = 1, kSetsIndexLimit = 2 /* last value, no comma*/};struct CfgSetsStruct { UInt32 fFlags; UInt32 fTimes[2];};typedef struct CfgSetsStruct CfgSetsStruct;struct CfgSetsElement { CfgEntityRef fEntityRef; CfgEntityInfo fEntityInfo;};typedef struct CfgSetsElement CfgSetsElement;struct CfgSetsVector { UInt32 fCount; CfgSetsElement fElements[1];};typedef struct CfgSetsVector CfgSetsVector;/* AppleTalk */enum { /* connection */ kATResourceCount = FOUR_CHAR_CODE('cnam'), kATPrefsAttr = FOUR_CHAR_CODE('atpf'), kPrefsVersionAttr = FOUR_CHAR_CODE('cvrs'), kLocksAttr = FOUR_CHAR_CODE('lcks'), kPortAttr = FOUR_CHAR_CODE('port'), kProtocolAttr = FOUR_CHAR_CODE('prot'), kPasswordAttr = FOUR_CHAR_CODE('pwrd'), kPortFamilyAttr = FOUR_CHAR_CODE('ptfm'), /* transport options */ kUserLevelAttr = FOUR_CHAR_CODE('ulvl'), kWindowPositionAttr = FOUR_CHAR_CODE('wpos')};enum { k11AARPPrefsIndex = 0, k11DDPPrefsIndex = 1, k11NBPPrefsIndex = 2, k11ZIPPrefsIndex = 3, k11ATPPrefsIndex = 4, k11ADSPPrefsIndex = 5, k11PAPPrefsIndex = 6, k11ASPPrefsIndex = 7, k11ATLastPrefsIndex = 7};struct AppleTalk11Preferences { UInt16 fVersion; UInt16 fNumPrefs; OTPortRef fPort; OTLink fLink; void * fPrefs[8];};typedef struct AppleTalk11Preferences AppleTalk11Preferences;struct AARP11Preferences { UInt16 fVersion; UInt16 fSize; UInt32 fAgingCount; UInt32 fAgingInterval; size_t fProtAddrLen; size_t fHWAddrLen; UInt32 fMaxEntries; size_t fProbeInterval; size_t fProbeRetryCount; size_t fRequestInterval; size_t fRequestRetryCount;};typedef struct AARP11Preferences AARP11Preferences;struct DDP11Preferences { UInt16 fVersion; UInt16 fSize; UInt32 fTSDUSize; UInt8 fLoadType; UInt8 fNode; UInt16 fNetwork; UInt16 fRTMPRequestLimit; UInt16 fRTMPRequestInterval; UInt32 fAddressGenLimit; UInt32 fBRCAgingInterval; UInt32 fRTMPAgingInterval; UInt32 fMaxAddrTries; Boolean fDefaultChecksum; Boolean fIsFixedNode; UInt8 fMyZone[33];};typedef struct DDP11Preferences DDP11Preferences;struct atpfPreferences { AppleTalk11Preferences fAT; AARP11Preferences fAARP; DDP11Preferences fDDP; char fFill[122]; /* Flawfinder: ignore */};typedef struct atpfPreferences atpfPreferences;/* Infrared */enum { kInfraredPrefsAttr = FOUR_CHAR_CODE('atpf'), kInfraredGlobalPrefsType = FOUR_CHAR_CODE('irgo'), kInfraredWindowPosAttr = FOUR_CHAR_CODE('wpos')};struct IrPreferences { CfgPrefsHeader fHdr; OTPortRef fPort; /* OT port id*/ IRPortSetting fPortSetting; /* Ir protocol, irda or irtalk*/ Boolean fNotifyOnDisconnect; /* notify user on irda disconnect?*/ Boolean fDisplayIRControlStrip; /* show ir control strip?*/ Point fWindowPosition; /* The position of the editor window*/};typedef struct IrPreferences IrPreferences;struct InfraredGlobalPreferences { CfgPrefsHeader fHdr; /* standard prefererences header*/ UInt32 fOptions; /* options bitmask*/ UInt32 fNotifyMask; /* Notification options.*/ UInt32 fUnloadTimeout; /* Unload timeout (in milliseconds)*/};typedef struct InfraredGlobalPreferences InfraredGlobalPreferences;/* TCP/IP v4 */enum { /* connection */ kALISResType = FOUR_CHAR_CODE('alis'), kCVRSResType = FOUR_CHAR_CODE('cvrs'), kDCIDResType = FOUR_CHAR_CODE('dcid'), kDTYPResType = FOUR_CHAR_CODE('dtyp'), kIDNSResType = FOUR_CHAR_CODE('idns'), kIHSTResType = FOUR_CHAR_CODE('ihst'), kIITFResType = FOUR_CHAR_CODE('iitf'), kARAResType = FOUR_CHAR_CODE('ipcp'), kIRTEResType = FOUR_CHAR_CODE('irte'), kISDMResType = FOUR_CHAR_CODE('isdm'), kSTNGResType = FOUR_CHAR_CODE('stng'), kUNLDResType = FOUR_CHAR_CODE('unld'), kPORTResType = FOUR_CHAR_CODE('port'), kTCPResourceCount = FOUR_CHAR_CODE('cnam'), /* No. of resources */ kTCPSelectedConfigType = FOUR_CHAR_CODE('ccfg'), /* id of current selected CCL configuration */ kTCPVersionAttr = FOUR_CHAR_CODE('cvrs'), /* Version */ kTCPDevTypeAtrr = FOUR_CHAR_CODE('dvty'), kTCPPrefsAttr = FOUR_CHAR_CODE('iitf'), kTCPServersListAttr = FOUR_CHAR_CODE('idns'), kTCPSearchListAttr = FOUR_CHAR_CODE('ihst'), kTCPRoutersListAttr = FOUR_CHAR_CODE('irte'), kTCPDomainsListAttr = FOUR_CHAR_CODE('isdm'), kTCPPortAttr = FOUR_CHAR_CODE('port'), /* Ports */ kTCPProtocolAttr = FOUR_CHAR_CODE('prot'), kTCPPasswordAttr = FOUR_CHAR_CODE('pwrd'), /* Password */ kTCPLocksAttr = FOUR_CHAR_CODE('stng'), /* locks */ kTCPUnloadTypeAtrr = FOUR_CHAR_CODE('unld'), /* transport options */ kUserModeResType = FOUR_CHAR_CODE('ulvl'), kTCPUserLevelAttr = FOUR_CHAR_CODE('ulvl'), /* UserLevel */ kTCPWindowPositionAttr = FOUR_CHAR_CODE('wpos') /* Window Position */};#pragma options align=packedstruct IDNS11Preferences { short fCount; InetHost fAddressesList;};typedef struct IDNS11Preferences IDNS11Preferences;struct HSTF11Preferences { char fPrimaryInterfaceIndex; /* always 1 in OT 1.0 / 1.1*/ /* this structure IS packed!*/ Str255 fLocalDomainName; /* followed by */ Str255 admindomain;};typedef struct HSTF11Preferences HSTF11Preferences;/* This is your worst case, a fixed size structure, tacked on after a variable length string.*/// Use the macro to help access the movable beast.#define kIITFPartP( h ) ( (IITF11PreferencesPart*) &( (**( (IITF11Preferences**) h )).fAppleTalkZone[ (**( (IITF11Preferences**) h )).fAppleTalkZone[0] + 1 ] ) )struct IITF11PreferencesPart { char path[36]; /* Flawfinder: ignore */ char module[32]; /* Flawfinder: ignore */ unsigned long framing;};typedef struct IITF11PreferencesPart IITF11PreferencesPart;struct IITF11Preferences { short fCount; UInt8 fConfigMethod; /* this structure IS packed!*/ /* Followed by:*/ InetHost fIPAddress; InetHost fSubnetMask; unsigned char fAppleTalkZone[1]; /* Flawfinder: ignore */ /* this structure IS packed!*/ IITF11PreferencesPart part;};typedef struct IITF11Preferences IITF11Preferences;struct IRTE11Entry { InetHost fToHost; /* always 0;*/ InetHost fViaHost; /* router address;*/ short fLocal; /* always 0*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -