home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / IE3802.ZIP / IEEE8022 / IEEE8022.DOC < prev   
Text File  |  1991-12-10  |  8KB  |  243 lines

  1.  
  2.  
  3.                  IBM EXTENDED SERVICES FOR OS/2
  4.         COMMUNICATIONS MANAGER API SAMPLE PROGRAMS SUPPORT
  5.  
  6.    (c) Copyright International Business Machines Corp., 1989, 1990,
  7.    1991
  8.  
  9.  
  10.  
  11.  
  12.    IEEE 802.2 SAMPLE PROGRAM
  13.  
  14.  
  15.    The IEEE 802.2 sample program is an example of an application
  16.    program written to the dynamic link interface of IEEE 802.2.
  17.    The function of the sample program is to communicate on a
  18.    Local Area Network using IEEE 802.2 protocol.  In the sample
  19.    scenario communication is set up between two IEEE 802.2
  20.    partners on the Local Area Network; one partner sends data
  21.    while the other receives the data.
  22.  
  23.    The sample program is designed to run only in protected
  24.    mode of IBM Extended Services for OS/2.  The sample program
  25.    source code and supporting files are provided for C.  The
  26.    sample program can be compiled as a 16 bit application or
  27.    a 32 bit application.  The 16 bit program is compiled with
  28.    the Microsoft C Compiler Version 6.0 and runs on OS/2 SE Version
  29.    1.30.1 or higher.  The 32 bit program is compiled with the
  30.    the IBM C Set/2 Compiler and runs on OS/2 Standard Edition
  31.    Version 2.0.
  32.  
  33.  
  34.    PREREQUISITES
  35.  
  36.    To run the sample program, a user must obtain and be familiar
  37.    with the following:
  38.  
  39.    1.  OS/2 installation and program execution
  40.  
  41.    2.  TOOLKIT installation
  42.  
  43.    3.  IBM Extended Services for OS/2 including Communications
  44.        Manager Installation and Configuration
  45.  
  46.    5.  Microsoft C Compiler Version 6.0 (for 16-bit programs) or
  47.        IBM C Set/2 Compiler (for 32-bit programs)
  48.  
  49.  
  50.    HARDWARE REQUIREMENTS
  51.  
  52.    Two PS/2 or AT machines which are connected to the same Local
  53.    Area Network.  The network adapter must be one supported by
  54.    IBM Extended Services for OS/2.  The adapter should be configured
  55.    as adapter 0 or adapter 1.
  56.  
  57.  
  58.    INSTALLATION
  59.  
  60.    The installation for running IEEE 802.2 sample programs consists of the
  61.    following:
  62.  
  63.    1. Installing IBM Extended Services for OS/2 including
  64.       Communications Manager.
  65.  
  66.    2. Creating the LAN Adapter and Protocol Support configuration file
  67.       for the network adapter installed and IBM OS/2 IEEE 802.2 protocol
  68.       for the sample program
  69.  
  70.    3. Installing TOOLKIT
  71.  
  72.    4. Installing the compiler selected
  73.  
  74.  
  75.    ASSUMPTIONS
  76.  
  77.    The INSTALLATION DETAIL section explains the installation procedure.
  78.    It is assumed that Extended Services, TOOLKIT and the compiler
  79.    are installed on the same drive. For ease of discussion the C drive
  80.    is used as the default.
  81.  
  82.    INSTALLATION DETAIL
  83.  
  84.    1. INSTALLING IBM EXTENDED SERVICES FOR OS/2
  85.  
  86.    Install IBM Extended Services for OS/2 according to the
  87.    installation documentation provided with the product.
  88.    When you install make sure you install LAN Adapter
  89.    and Protocol Support.
  90.  
  91.    To build the IEEE 802.2 sample program, the Communications
  92.    Manager API data structures must be installed on the build
  93.    machine.  The API data structures are high level language
  94.    include files.  To install the API data structures select them
  95.    from the "Install Additional Features" panel.
  96.  
  97.    2. CREATING IEEE 802.2 SAMPLE PROGRAM CONFIGURATION FILE
  98.  
  99.    Use Communications Manager Advanced Configuration and
  100.    select LAN Adapter and Protocol Support to configure
  101.    the workstation.  Configure the network adapter
  102.    driver for the network adapter installed and configure
  103.    the IEEE 802.2 protocol driver for adapter 0 or 1.  The
  104.    default configuration parameters for the network adapter
  105.    driver are sufficient to run the sample program.  The
  106.    SYSTEM KEY for IEEE 802.2 should be configured to 0xCFB0.
  107.    The netaddress is used an input parameter to the sample
  108.    program and can be configured for ease of recall.  It
  109.    also can be discovered with a sample program option.
  110.  
  111.  
  112.    4. INSTALLING TOOLKIT
  113.  
  114.    Install TOOLKIT using its installation procedure.
  115.  
  116.  
  117.    5. INSTALLING THE COMPILER
  118.  
  119.    For the 16-bit application install Microsoft C Compiler
  120.    Version 6.0 using the installation procedure for the compiler.
  121.    For the 32-bit application install IBM C Set/2 Compiler
  122.    using the installation procedure for the compiler.
  123.  
  124.  
  125.  
  126.  
  127.    C SAMPLE PROGRAM 16 BIT APPLICATION
  128.  
  129.    The C sample program and the following instructions are
  130.    for Microsoft C version 6.0.
  131.  
  132.    Set up the environment for the Microsoft C Compiler according
  133.    to the compiler documentation. Create a subdirectory for the
  134.    sample program.  Make sure the include path accesses the
  135.    files in the toolkit.
  136.  
  137.    Copy the following into the sample program subdirectory from
  138.    the sample program diskette:
  139.  
  140.         DLCSAMPO.C    - sample program source code
  141.         DIRINTF.H     - sample program header file
  142.         DLCERROR.H    - sample program header file
  143.         DLCGBLV.H     - sample program header file
  144.         DLCINTF.H     - sample program header file
  145.         DLCSAM16      - 16 bit sample program make file
  146.         DLCSAMPO.DEF  - sample program module definition file
  147.  
  148.    Copy the following Extended Services LAN Adapter and Protocol
  149.    Support header files into the sample program subdirectory:
  150.  
  151.         LAN_1_C.H
  152.         LAN_2_C.H
  153.         LAN_3_C.H
  154.         LAN_4_C.H
  155.         LAN_6_C.H
  156.         LAN_7_C.H
  157.  
  158.    These header files are installed during Extended Services
  159.    installation.  To install the API header files select them
  160.    from the "Install  Additional Features" panel.
  161.  
  162.    To compile and link make sure the current directory is the sample
  163.    program subdirectory.  Rename the file DLCSAM16 as DLCSAM16.MAK.
  164.    Type the following at the OS/2 command prompt:
  165.            nmake dlcsam16.mak
  166.    The file dlcsampo.exe will be created.
  167.  
  168.  
  169.    C SAMPLE PROGRAM 32 BIT APPLICATION
  170.  
  171.    The C sample program and the following instructions are
  172.    for the IBM C Set/2 Compiler.
  173.  
  174.    Set up the environment for the IBM C Set/2 Compiler according
  175.    to the compiler documentation. Create a subdirectory for the
  176.    sample program.  Make sure the include path accesses files
  177.    in the toolkit.  The nmake utility used to compile and link
  178.    the sample program is in the toolkit.  Be sure to include the
  179.    path to nmake in the path statement when setting the work
  180.    environment.
  181.  
  182.    Copy the following into the sample program subdirectory from
  183.    the sample program diskette:
  184.  
  185.         DLCSAMPO.C    - sample program source code
  186.         DIRINTF.H     - sample program header file
  187.         DLCERROR.H    - sample program header file
  188.         DLCGBLV.H     - sample program header file
  189.         DLCINTF.H     - sample program header file
  190.         DLCSAMPO      - 32 bit sample program make file
  191.         DLCSAMPO.DEF  - sample program module definition file
  192.  
  193.    Copy the following Extended Services LAN Adapter and Protocol
  194.    Support header files into the sample program subdirectory:
  195.  
  196.         LAN_1_C.H
  197.         LAN_2_C.H
  198.         LAN_3_C.H
  199.         LAN_4_C.H
  200.         LAN_6_C.H
  201.         LAN_7_C.H
  202.  
  203.    These header files are installed during Extended Services
  204.    installation.  To install the API header files select them
  205.    from the "Install  Additional Features" panel.
  206.  
  207.    Add the following to the source program DLCSAMPO.C
  208.  
  209.         #define E32TO16
  210.  
  211.    This will cause the 32-bit versions of the .H files to be expanded
  212.    when compiling.
  213.  
  214.    To compile and link make sure the current directory is the sample
  215.    program subdirectory.  Rename the file DLCSAMPO as DLCSAMPO.MAK.
  216.    Type the following at the OS/2 command prompt:
  217.            nmake dlcsampo.mak
  218.    The file dlcsampo.exe will be created.
  219.  
  220.  
  221.    RUNNING THE SAMPLE PROGRAM
  222.  
  223.  
  224.    Set up one OS/2 session per machine.  Change the current
  225.    directory to the directory containing DLCSAMPO.EXE.
  226.  
  227.    The sample program has a sender and receiver.  Start the
  228.    receiver first.  At the command prompt enter:
  229.  
  230.        dlcsampo r a=adapter_num
  231.  
  232.    To start the sender, at the command prompt enter:
  233.  
  234.        dlcsampo s n=netaddress a=adapter_num
  235.  
  236.    The default for adapter_num is 0.  If you are running on adapter 0
  237.    the a= parameter can be ignored.  The n=netaddress parameter is the
  238.    netaddress of the receiving adapter, the partner.  To display the
  239.    netaddress enter:
  240.  
  241.        dlcsampo d a=adapter_num
  242.  
  243.