
                                 Programmers Guide
                                     for the
                              IP/Application Gateway
                                    Revision 2


                                  June 27, 1994
			    Revised: September 29, 1995


                                    Fulko Hew
                             Westinghouse Canada Inc.

                                  (annotated)


    Any information contained herein is proprietary to Westinghouse
    Canada Inc. and cannot be disclosed without prior written consent.

    This programming guide is publically distributed by Northrup
    Grumman, which bought the division of Westinghouse that original
    performed this work.  As of February 1997, the original version
    of this guide can be accessed at 
    http://www.wecan.com/netprod/ipgw_prog.guide

    Purpose
    -------
    This document describes the software aspects of the W9600 IP Gateway
    product (refered to as a 'gateway').  It can be used to provide
    bi-directional information flow between an airline host and one
    or more application servers on a TCP/IP network.

    Components
    ----------
    A gateway consists of two major components:

        - Network Interface
        - Gateway Application

    The Network Interface consists of one or more W915 concentrators
    within a W9600.  The function of the W915 is to provide the physical
    interface point for network communications.  It extracts messages
    send to and from a configured set of addresses to the gateway
    application.

    The Gateway Application provides the transport mechanism between the
    Network Interface and any programs running on the W9600 and other
    IP connected application servers.

    Programmers Interface
    ---------------------
    The programer may send and receive messages from the DPM using the
    standard UNIX open, close, read and write routines.  The device
    used for these activities is: "/dev/dpma13".  This specifies the first
    W915 card within a W9600 chassis.  Should there be multiple cards,
    each card should have its own application attached using the convention:

        /dev/dpma13     /dev/dpmb13     ...     /dev/dpmf13


    All standard UNIX programming techniques apply.

    All messages read from and written to a dpm device must be of the
    form described in the next section "DPM Message Format".
    Refer to Appendix A for a sample program which transfers messages
    from the airline side to another IP connected host, and from that
    IP connected host back to the airline side.

    DPM Message Format
    ------------------
    Messages are send to and from W915 cards via a dual ported memory
    system.  The messages sent across that interface are of the form:

        -------------------------------------------------------------------
        | Protocol Type | Src HLD | Dst HLD | A1 | A2 | A3 | User Data... |
        -------------------------------------------------------------------

    Protocol Type - Used to designate the protocol used.  This field
                    determines the interpretation of the remaining
                    fields.  (1 byte, P1024B = 0x05)

                    (P1024B is also known in the industry as "IPARSALC")

    Src HLD - The 'high level designator' of the originator of the
              message.  For Ahost bound messages it is the HLD of
              the application or the application host.  For Uhost
              bound messages it is the HLD of the concentrator
              node that first received the message.  (2 bytes,
              most significant byte first)

    Dst HLD - The 'high level designator' of the 'consumer' of the
              message.  For Uhost bound messages it is the HLD of
              the application or the application host.  For Ahost
              bound messages it is the HLD of the concentrator
              node that first received the message.  (2 bytes,
              most significant byte first)

    A1 -      The number of the line in the originating or destination
              A-host within the W9600 network.
    A2 -      The first level of protocol addressing used for this
              connection. (IA in IPARS)
    A3 -      The second level of protocol addressing used for this
              connection. (TA in IPARS)

    User Data - The remainder is user traffic as per conventions
                used by the protocol used.

    ASCII to IPARS to ASCII Character Set Translation Tables
    --------------------------------------------------------

    Any gateway application must translate its data from the incomming
    IPARS character set into ASCII and back between the application and
    the W915 card.

    Any character designated as "N/A" should not be translated.
    Refer to Appendix A for an include file that can be used by "C"
    programmers to perform this translation.


