| # ITK Programmer's Guide
Table of contents | Intro | General | TCP Low Level | TCP High Level | UDP | DNS | PPP Encoding/Decoding | Internet Config | Goodies | Cryptography & SSL | Appendix
Chapter 1 : Installing ITK
Chapter contents: | Installing ITK Tips on using ITK Asynchronous vs. synchronous Default values Multihoming Using ITK in demo mode Y2K compliance
About this chapter... | This chapter describes the installation of Internet ToolKit, some tips and the restrictions of the demo mode.

##
Installing ITK

> First of all, you need 4D 3.2.5 International or 4D 5.2.5 French or above to use ITK.

> Starting with this version of 4D, external package can be FAT (containing old 68K code and native PowerPC code) and can be a stand-alone icon instead of resources that need to be installed usinf some "mover" app into the structure file.

> To use these "new style external packages", you must put their icon or an alias of it in a MAC4DX folder (or WIN4DX folder under Windows) located in the same folder as your database structure file.

> So, create a folder called "MAC4DX" (or WIN4DX) in your database folder if it does not already exist and put ITK's icon (or an alias of it) into that folder.

> ITK is now ready to be used in your database.

> For more information about the new style external packages and the MAC4DX/WIN4DX folder, see 4D/4D Server manuals and addendums.

> The MacOS version of ITK is also provided as Windows "transported" files named "ITKxxx.4DX" , "ITKxxx.4CX" and "ITKxxx.RSR", these files can be used on a Windows version of 4D Server with MacOS version of 4D Client and should go into the MAC4DX folder.

> Do not confuse these MacOS version files with the real Windows version files.

### Windows users:

> ITK is composed of 2 files "ITKxxx.4DX" (the package's code) and "ITKxxx.RSR" (the package's resources).

> You must put these two files in a directory named "WIN4DX", located in the same directory as your database structure file. If a directory named "WIN4DX" does not already exist, you must create it.

> ITK has been tested on Windows 95/98/Me and Windows NT/2000/XP.
> ITK is not supported with previous versions of Windows (eg. Windows 3.x).

> Note: To avoid any conflict with 4D Compiler when compiling for both MacOS and Windows, you should use the same names for all your packages in both the MAC4DX and WIN4DX folders.

> For example, if you named a package "PACK.4DX" and "PACK.RSR" in the WIN4DX folder, you should name the MacOS version "PACK.4DX" in the MAC4DX folder.

##
ITK under MacOS X

> MacOS X allows to run 4D applications in 2 different modes: Carbon native apps and Classic apps.

> ITK v2.6 and above supports both modes.

> 4D versions prior to 6.8 will only run in the "classic" mode. 4D version 6.8 and above will run as native Carbon apps or under Classic.

> ITK package files are provided for Classic and for Carbon. The files named "ITKxxx.4DX" and the Classic version, and the files named "ITKxxx.4CX" are the Carbon versions. The Classic version of ITK will run under MacOS 8.x or 9.x as well as in "Classic" mode under MacOS X. The Carbon version of ITK will run only under MacOS X in "Carbon" mode.

> The ITK_MakeCSR tool has been "carbonized" and can be run in both Classic and Carbon modes.

##
Tips for using ITK

###

Asynchronous vs. synchronous

> In order to get the best performances with ITK, here are the rules we followed while implementing ITK:
> - ITK routines tries to let 4D's multiprocessing work as fast as possible by calling 4D's Idle entry point when needed,
> - all TCP/IP layers are called asynchronously to get the best performances.

### Default values

> Any missing parameter is considered equal to 0 for numeric data or empty string for string or text data (this is automatically handled by 4D and 4D Compiler).

> Ex: ITK_TCPSend($c) equals ITK_TCPSend($c;"";0)

### Multihoming

> ITK 1.1 and further versions provide some new features that support multihoming when running under Windows NT. Multihoming is also supported in ITKv2 and above on the MacOS with OpenTransport 1.3 or above installed.
> Some routines like ITK_TCPOpen, ITK_TCPListen and ITK_TCPStrmInfo have some parameters to support multihoming.

> ITK_TCPOpen has a parameter used to specify the local IP address of the stream.

> ITK_TCPListen has a parameter to restrict listening on a specific local IP address.
> By default, ITK_TCPListen listens on all local IP addresses.

> ITK_TCPStrmInfo returns the local IP address of a connected stream.

##
Using ITK in demo mode

> ITK automatically runs in demo mode unless you provide its license number using the ITK_Init routine.

> In demo mode, ITK is fully functional (like the "Pro" version) for 30 minutes.
> After that delay, ITK will only return error codes or empty results.

> License numbers are different for the MacOS and Windows versions of ITK.
> ITK_Init can accept two licence numbers so that a multiplatform application does not have to store different license numbers.

> To get your license number, you can use the order form which is available on ITK's Web site ( http://www.internet-toolkit.com/ ).

##
Internet ToolKit Y2K compliance

> Year 2000 compliance is related to dates. Dates are only used in Internet ToolKit in date conversion routines (ITK_Date2Secs, ITK_Secs2Date, ITK_Secs2RFC and ITK_RFC2Secs).

> The first two routines ( ITK_Date2Secs and ITK_Secs2Date ) are using dates in 4D format which is Y2K compliant, so, these routines are also Y2K compliant.

> For the last two routine, Y2K compliance depends on RFC#822 and RFC#1123 which are defining date formatting. RFC#822 defines a format were the year uses only 2 digits. RFC#822 formatted string are not Y2K compliant.

> RFC#1123 updates RFC#822 format to use 4 digits for the year (see RFC#1123 page 55). This makes RFC#1123 formatted dates Y2K compliant.

> ITK_Secs2RFC converts a date/time value into an RFC#1123 formatted string, so, this routine is Y2K compliant.

> ITK_RFC2Secs converts an RFC#822 or RFC#1123 formatted string into a date/time value.So there are two cases:

> - If the string is formatted according to RFC#1123 (4 digits for the year), this routine is Y2K compliant.
> - If the date is formatted according to RFC#822 (2 digits for the year), this routine is not Y2K compliant.
>   To reduce the effect of RFC#822 formatted dates, all years below 40 and considered after year 2000 and all years above 39 are considered before 2000.
>   Example:
>   - "Fri, 28-Jul-95 22:50:10" -> will be considered as 1995
>   - "Sat, 01-Jan-00 00:00:00" -> will be considered as 2000
>   - "Fri, 25-Dec-20 00:00:00" -> will be considered as 2020

#####

CQ/29-Aug-2002