home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
IE3802.ZIP
/
IEEE8022
/
IEEE8022.DOC
< prev
Wrap
Text File
|
1991-12-10
|
8KB
|
243 lines
IBM EXTENDED SERVICES FOR OS/2
COMMUNICATIONS MANAGER API SAMPLE PROGRAMS SUPPORT
(c) Copyright International Business Machines Corp., 1989, 1990,
1991
IEEE 802.2 SAMPLE PROGRAM
The IEEE 802.2 sample program is an example of an application
program written to the dynamic link interface of IEEE 802.2.
The function of the sample program is to communicate on a
Local Area Network using IEEE 802.2 protocol. In the sample
scenario communication is set up between two IEEE 802.2
partners on the Local Area Network; one partner sends data
while the other receives the data.
The sample program is designed to run only in protected
mode of IBM Extended Services for OS/2. The sample program
source code and supporting files are provided for C. The
sample program can be compiled as a 16 bit application or
a 32 bit application. The 16 bit program is compiled with
the Microsoft C Compiler Version 6.0 and runs on OS/2 SE Version
1.30.1 or higher. The 32 bit program is compiled with the
the IBM C Set/2 Compiler and runs on OS/2 Standard Edition
Version 2.0.
PREREQUISITES
To run the sample program, a user must obtain and be familiar
with the following:
1. OS/2 installation and program execution
2. TOOLKIT installation
3. IBM Extended Services for OS/2 including Communications
Manager Installation and Configuration
5. Microsoft C Compiler Version 6.0 (for 16-bit programs) or
IBM C Set/2 Compiler (for 32-bit programs)
HARDWARE REQUIREMENTS
Two PS/2 or AT machines which are connected to the same Local
Area Network. The network adapter must be one supported by
IBM Extended Services for OS/2. The adapter should be configured
as adapter 0 or adapter 1.
INSTALLATION
The installation for running IEEE 802.2 sample programs consists of the
following:
1. Installing IBM Extended Services for OS/2 including
Communications Manager.
2. Creating the LAN Adapter and Protocol Support configuration file
for the network adapter installed and IBM OS/2 IEEE 802.2 protocol
for the sample program
3. Installing TOOLKIT
4. Installing the compiler selected
ASSUMPTIONS
The INSTALLATION DETAIL section explains the installation procedure.
It is assumed that Extended Services, TOOLKIT and the compiler
are installed on the same drive. For ease of discussion the C drive
is used as the default.
INSTALLATION DETAIL
1. INSTALLING IBM EXTENDED SERVICES FOR OS/2
Install IBM Extended Services for OS/2 according to the
installation documentation provided with the product.
When you install make sure you install LAN Adapter
and Protocol Support.
To build the IEEE 802.2 sample program, the Communications
Manager API data structures must be installed on the build
machine. The API data structures are high level language
include files. To install the API data structures select them
from the "Install Additional Features" panel.
2. CREATING IEEE 802.2 SAMPLE PROGRAM CONFIGURATION FILE
Use Communications Manager Advanced Configuration and
select LAN Adapter and Protocol Support to configure
the workstation. Configure the network adapter
driver for the network adapter installed and configure
the IEEE 802.2 protocol driver for adapter 0 or 1. The
default configuration parameters for the network adapter
driver are sufficient to run the sample program. The
SYSTEM KEY for IEEE 802.2 should be configured to 0xCFB0.
The netaddress is used an input parameter to the sample
program and can be configured for ease of recall. It
also can be discovered with a sample program option.
4. INSTALLING TOOLKIT
Install TOOLKIT using its installation procedure.
5. INSTALLING THE COMPILER
For the 16-bit application install Microsoft C Compiler
Version 6.0 using the installation procedure for the compiler.
For the 32-bit application install IBM C Set/2 Compiler
using the installation procedure for the compiler.
C SAMPLE PROGRAM 16 BIT APPLICATION
The C sample program and the following instructions are
for Microsoft C version 6.0.
Set up the environment for the Microsoft C Compiler according
to the compiler documentation. Create a subdirectory for the
sample program. Make sure the include path accesses the
files in the toolkit.
Copy the following into the sample program subdirectory from
the sample program diskette:
DLCSAMPO.C - sample program source code
DIRINTF.H - sample program header file
DLCERROR.H - sample program header file
DLCGBLV.H - sample program header file
DLCINTF.H - sample program header file
DLCSAM16 - 16 bit sample program make file
DLCSAMPO.DEF - sample program module definition file
Copy the following Extended Services LAN Adapter and Protocol
Support header files into the sample program subdirectory:
LAN_1_C.H
LAN_2_C.H
LAN_3_C.H
LAN_4_C.H
LAN_6_C.H
LAN_7_C.H
These header files are installed during Extended Services
installation. To install the API header files select them
from the "Install Additional Features" panel.
To compile and link make sure the current directory is the sample
program subdirectory. Rename the file DLCSAM16 as DLCSAM16.MAK.
Type the following at the OS/2 command prompt:
nmake dlcsam16.mak
The file dlcsampo.exe will be created.
C SAMPLE PROGRAM 32 BIT APPLICATION
The C sample program and the following instructions are
for the IBM C Set/2 Compiler.
Set up the environment for the IBM C Set/2 Compiler according
to the compiler documentation. Create a subdirectory for the
sample program. Make sure the include path accesses files
in the toolkit. The nmake utility used to compile and link
the sample program is in the toolkit. Be sure to include the
path to nmake in the path statement when setting the work
environment.
Copy the following into the sample program subdirectory from
the sample program diskette:
DLCSAMPO.C - sample program source code
DIRINTF.H - sample program header file
DLCERROR.H - sample program header file
DLCGBLV.H - sample program header file
DLCINTF.H - sample program header file
DLCSAMPO - 32 bit sample program make file
DLCSAMPO.DEF - sample program module definition file
Copy the following Extended Services LAN Adapter and Protocol
Support header files into the sample program subdirectory:
LAN_1_C.H
LAN_2_C.H
LAN_3_C.H
LAN_4_C.H
LAN_6_C.H
LAN_7_C.H
These header files are installed during Extended Services
installation. To install the API header files select them
from the "Install Additional Features" panel.
Add the following to the source program DLCSAMPO.C
#define E32TO16
This will cause the 32-bit versions of the .H files to be expanded
when compiling.
To compile and link make sure the current directory is the sample
program subdirectory. Rename the file DLCSAMPO as DLCSAMPO.MAK.
Type the following at the OS/2 command prompt:
nmake dlcsampo.mak
The file dlcsampo.exe will be created.
RUNNING THE SAMPLE PROGRAM
Set up one OS/2 session per machine. Change the current
directory to the directory containing DLCSAMPO.EXE.
The sample program has a sender and receiver. Start the
receiver first. At the command prompt enter:
dlcsampo r a=adapter_num
To start the sender, at the command prompt enter:
dlcsampo s n=netaddress a=adapter_num
The default for adapter_num is 0. If you are running on adapter 0
the a= parameter can be ignored. The n=netaddress parameter is the
netaddress of the receiving adapter, the partner. To display the
netaddress enter:
dlcsampo d a=adapter_num