Installation guide

36 DC 900-1325I
Freeway Server-Resident Application (SRA) Programmer Guide
Loopback test complete
Step 3: After the program completes, you can verify that the program created the DLI
and TSI trace and log files by looking in the /tmp directory which is a read-write parti-
tion in memory. These files will be overwritten each time the SRA is run. Also, these files
will be deleted when the Freeway is rebooted:
cd /tmp
ls -l mysra*
-rw-r--r-- 1 root wheel 152 Mar 15 01:15 mysradli.log
-rw-r--r-- 1 root wheel 0 Mar 15 01:14 mysratsi.log
-rw-r--r-- 1 root wheel 31993 Mar 15 01:15 mysratsi.trc
2.5 Customizing the SRA
After completing the steps in the previous sections, you now have a working SRA that
interfaces with the AWS protocol (or whatever protocol you are using). However, the
SRA is still only a copy of the loopback program. At this point, you may begin to modify
the SRA in order to customize it to fit your own needs. Since you are starting from a
working program, you may want to rebuild the SRA between editing sessions to make
sure the SRA still compiles and runs.
The following are some starting suggestions for modifying the SRA source code
(mysra.c):
Change the names of the internal comments and routines to reflect the new name
of your SRA. Also, start a new “revision history” section in the comments to keep
track of future changes to the SRA source code.
The loopback programs use the symbols LINK0 and LINK1 as “shortcuts” to address
the two DLI sessions for each link. This is not a good programming practice when
interfacing with more than two links. You should replace all the occurrences of
LINK0 and LINK1 with the actual session ID returned from the dlOpen call. This ID
is stored in the
SESS_TBL_ENTRY structure (SessTbl[].iSessID).