This document is an introduction to the new CVLAN. It is not an by moti


									                       Release Notes for CV/LAN
                                      Special Note: CV/PC Programmers
                      Even if you don’t use CV/LAN, make the build environment changes
                                  described below since they apply to you, too!

This document is an introduction to the new CV/LAN. It is not an attempt to teach you CV/PC
programming. If you are a new CV/PC developer, you should start with the CV/PC Installation and
Reference manual. This document will discuss the following:

1.     What CV/LAN is (and Why there is a new and incompatible version)?
2.     How to change an old CV/PC or CV/LAN program into a new CV/LAN program? 1
3.     How the build environment will change?

What is CV/LAN
CV/LAN was originally intended to divide the CTI processing between several processors. Today,
however, its most common use is to allow developers to work in their native environment. CV/LAN clients
are available for UNIXWare, Solaris(x86 and SPARC) and Windows/NT. The clients are connected to
servers by TCP/IP. The Servers can run on UNIXWare or x86 Solaris.

CV/LAN clients would package API function calls, and send them to the server. The server would execute
them and send the results, i.e., data, return code, asai_errno and errno, back to the client. The function calls
were packaged in a machine independent manner, i.e., XDR.

This implementation had three limitations. First, it could not be made thread safe without developing a
message multiplexor which would reduce throughput and add complexity. Second, the protocol was
inherently half duplex in that every API call had send a message and wait for a response. This caused even
more throughput problems. Third, the client library version had to match the server or the program would
not work. As companies sold into a variety of client environments, this became a problem.

The new CV/LAN was built to address these problems. It supports multi-threading, has an independent
send and receive path, and does error checking and most of the message processing locally. As a result, the
library is “thread safe,” the performance is several times better than the original CV/LAN and it is “upward
compatible” in some interesting ways. If you have a new client, new switch and an old server, then all new
fields in existing messages will be sent to the client. If the client attempts to use new messages, an error is
returned. If you have an old client, new switch and new server, then new fields in existing messages will
not be received by the client. The client can not request a new message because it never knew about it to
begin with.

How to Change to the New CV/LAN
If you have a CV/PC program, change the path argument from “/dev/asai/asai” to the machine name or IP
address of your CV/LAN server. If you have an old CV/LAN program, the connection was specified on the
asai_set _env call, e.g., asai_set_env(fd, C_NODE, “”). In the new CV/LAN, the
calls would look like this:

                             fd= asai_open(“”, 0);
                                      .       .

    This should be a very short section.
                                    .        .
                                    .        .
                           asai_set_env(fd, C_NODE, “signal01”);

Note that if you defined asai_errno yourself, e.g., extern int asai_errno; then you will need to change and
pick it up from the standard header files, i.e., asai_def.h, asai_str.h and asai_err.h. Furthermore, you must
not use it before it is set. In the past, you would just get bad data. Now, the program may crash.

How the Build Environment Changed
Basically, client applications are multi-threaded and require sockets. In UNIXWare, this means that    -
Kthread, -lsocket, -lnsl and -DMTHREAD must be specified. In Solaris, this means that -lthread,      -
lsocket, -lnsl and -DMTHREAD must be specified. In Windows/NT, the multi-thread or debug multi-
thread run time libraries must be specified in the “code generation” category of the “C/C++” tab and
wsock32.lib should be included in the list of libraries in the “Link” tab.

UnixWare Link Order is Important
Building your CVLAN application on UnixWare 7 requires a very specific order for the linker. Your
application could fail in the asai_open() command, on UnixWare 7, if the link order stated below is not

Proper Link Order for UnixWare CVLAN Applications

Please use the following link order when building CVLAN applications on UnixWare. This problem was
first seen on UnixWare Release 7. The following link order should also be used on UnixWare Release

cc -DMTHREAD -Kthread -lsocket –lnsl -lasai

Building for AIX
On AIX, the application will have to be compiled as a POSIX multithreaded application. This can be
accomplished by using the “xlc_r” compiler, which compiles multithreaded AIX applications. The
following compile options must be specified


To top