Modem notes, Listing 2-17 – Apple Network Setup User Manual
Page 54

C H A P T E R 2
Using Network Setup
54
Protocol-specific Topics
■
kOTCfgRemoteLogOptionsPref
, which contains the “verbose logging” option.
■
kOTCfgRemoteClientLocksPref
, which is used by the Remote Access control
panel to remember which preferences are locked. For details, see
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-17
Encrypting 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
2
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
■
kOTCfgModemLocksPref
, which is used by the Modem control panel to
remember which preferences are locked. For details, see
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