C H A P T E R 2

Using Network Setup

kOTCfgRemoteLogOptionsPref, which contains the “verbose logging” option. For details, see OTCfgRemoteLogOptions (page 135).

kOTCfgRemoteClientLocksPref, which is used by the Remote Access control panel to remember which preferences are locked. For details, see

OTCfgRemoteClientLocks (page 125).

To create the kOTCfgRemotePasswordPref, you must encrypt the user’s password. The code in Listing 2-17 shows a technique for doing this.

Listing 2-17Encrypting the user’s password

static void EncodeRemotePasswordNetworkSetup( ConstStr255Param userName, ConstStr255Param password, Str255 encodedPassword)

{

BlockZero(encodedPassword, sizeof(Str255)); BlockMoveData(password + 1, encodedPassword, password[0]);

(void) OTCfgEncrypt( (UInt8 *) userName, encodedPassword, sizeof(Str255));

}

Modem Notes

A Remote Access network connection entity has a class of kOTCfgClassNetworkConnection and a type of kOTCfgTypeModem. The entity typically contains the following preferences:

kOTCfgModemGeneralPrefs, which contains the core modem preferences. For details, see OTCfgModemGeneral (page 141).

kOTCfgModemLocksPref, which is used by the Modem control panel to remember which preferences are locked. For details, see OTCfgModemLocks (page 143).

When creating the kOTCfgModemGeneralPrefs preference, you have to supply the name of a serial port that is visible to Open Transport. For information about building a list of Open Transport serial ports and their user-visible names, see

54Protocol-specific Topics

Page 54
Image 54
Apple Network Setup manual Modem Notes, Listing 2-17Encrypting the user’s password