Protogate, Inc.12225-R World Trade DriveSan Diego, CA 92128Freeway®Server-Resident Application(SRA)Programmer GuideDC 900-1325IMarch 2011
10 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideOrganization of DocumentChapter 1 gives an overview of the software component
PrefaceDC 900-1325I 11• ICP2432B Hardware Description and Theory of OperationDC-900-2006• ICP2432B Hardware Installation GuideDC-900-2009Freeway Softw
12 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideOther ReferencesThe following documents provide additional information on wor
PrefaceDC 900-1325I 13The term “Freeway” refers to any of the Freeway models (Freeway 3110, 3112, 3210,3410, or 3610).Earlier Freeway terminology used
14 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideCustomer SupportIf you are having trouble with any Protogate product, call us
DC 900-1325I 15Chapter1IntroductionIn addition to offloading interrupt-intensive communications tasks from clients, a Pro-togate Freeway communication
16 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guideserver using software development tools which are installed on all Freeway se
1: IntroductionDC 900-1325I 17communications processor (ICP) device driver. In this fashion, data is moved from theclient to the WAN protocol software
18 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide1.2.1 Basic SRA ConfigurationWhen the client application resides within the F
1: IntroductionDC 900-1325I 19Figure 1–2: Example of a Basic SRAFreeway4014ICPsICP Device DriverLogin toFreeway MenuTSIDLISRAClientEthernetTSIMSGMUXLo
Protogate, Inc.12225 World Trade Drive, Suite RSan Diego, CA 92128(858) 451-0865Freeway Server-Resident Application (SRA) Programmer Guide© 2000 - 201
20 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideFigure 1–3: Example of an SRA Protocol ConverterFreeway4015ICP 0ICP Device Dr
1: IntroductionDC 900-1325I 211.2.3 NON-API Client InterfaceInstead of running an application on the client and using DLI/TSI to receive messagesfrom
22 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide1.2.4 Message Filtering SRAThe MSGMUX software on the Freeway server has an a
DC 900-1325I 23Chapter2Server-Resident Application Software DevelopmentThe Freeway server contains all the tools that allow you to edit, compile, link
24 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide2.1.1 Freeway Disk PartitionsThe Freeway server disk drive consists of either
2: Server-Resident Application Software DevelopmentDC 900-1325I 252.1.2 Software Development Directory StructureProtogate has provided a directory hie
26 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide/usr/local/freeway/client/bsd/binThis directory contains the executable files
2: Server-Resident Application Software DevelopmentDC 900-1325I 27able files. Since this directory is located in the RAM-disk partition, it isalways m
28 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideMakefileThis is the make file that compiles and links the filter.c file intoa
2: Server-Resident Application Software DevelopmentDC 900-1325I 29the three files created above and moves them to the bsd binarydirectory (/usr/local/
DC 900-1325I 3ContentsList of Figures 7Preface 91Introduction 151.1 Freeway Server-Resident Applications (SRAs)... 151.2 Overview of Exam
30 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide2.3 Creating a New SRA Development EnvironmentIn this section, we will go thr
2: Server-Resident Application Software DevelopmentDC 900-1325I 31Step 3: Create the new SRA development sub-directory by entering the followingcomman
32 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guidescp, or any other method to copy the files. If you choose to edit the files o
2: Server-Resident Application Software DevelopmentDC 900-1325I 33Note that the DLI and TSI log and trace files must be created on a partition which i
34 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideInput file: mysratcfgResult file: mysratcfg.binmysratcfg completed successfu
2: Server-Resident Application Software DevelopmentDC 900-1325I 35-rwxr-xr-x 1 root guest 237519 Mar 14 23:56 mysra-rw-r--r-- 1 root guest 7344
36 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideLoopback test completeStep 3: After the program completes, you can verify tha
2: Server-Resident Application Software DevelopmentDC 900-1325I 37• You need to increase the number of connections (NUM_CONNECTIONS) to the actualnumb
38 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guidecd /usr/local/freeway/client/bsd/binls -l mysra*-rwxr-xr-x 1 root guest 23
2: Server-Resident Application Software DevelopmentDC 900-1325I 39 Receive overrun errors 0 0 Block check erro
4 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide2.7.2 Secondary SRA Startup File (rc.startsra.local)... 413 Interfac
40 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideIf the file rc.startsra already exists on your system, then refer to Section
2: Server-Resident Application Software DevelopmentDC 900-1325I 41When the Freeway reboots, the rc.startsra file will be copied to the /tmp/boot direc
42 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideFigure 2–1: Example rc.startsra file from Protogate4019●●●●●●●●●●●●#!/bin/sh#
DC 900-1325I 43Chapter3Interfacing to DLI/TSI and Protocol SoftwareMost SRAs built to run on the Freeway server will need to access protocol software
44 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guideprocess, we will use an example SRA (simply named sra.c) along with its DLI a
3: Interfacing to DLI/TSI and Protocol SoftwareDC 900-1325I 45Figure 3–1: Connection between SRA and DLI configuration file4021●●●●●●●●●●●●/* SRA C So
46 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideFigure 3–2: Connection between DLI and TSI configuration files4018●●●●●●●●●●●
3: Interfacing to DLI/TSI and Protocol SoftwareDC 900-1325I 473.1.2 Binary FilesIn our example SRA, the binary files we use are as follows:sraThis is
48 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guidemount -u -o ro /usrUnless a specific path was specified in the source files,
3: Interfacing to DLI/TSI and Protocol SoftwareDC 900-1325I 49ent/bsd/bin, then the DLI and TSI binary files must be moved or copied to the samedirect
ContentsDC 900-1325I 55.2 Socket Interfaces... 745.3 NFS Mount ... 755.4 Web Browser Inter
50 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide3.2 DLI Normal Operation versus Raw OperationThe DLI interface can be program
3: Interfacing to DLI/TSI and Protocol SoftwareDC 900-1325I 51If you opened the same session in Normal operation, then all of the above actions couldb
52 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide3.2.2 Set Buffer SizeIf applicable to your protocol, you can set the buffer s
3: Interfacing to DLI/TSI and Protocol SoftwareDC 900-1325I 53NoteWhen using non-blocking I/O, a read request must be queued toreceive the Local Acks.
54 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guideparameters without having to go through the entire SRA make process. To do th
3: Interfacing to DLI/TSI and Protocol SoftwareDC 900-1325I 55Step 4: Set the new script file executable, copy it to the non-volatile storage area, an
56 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide
DC 900-1325I 57Chapter4SRA Design Tips and RestrictionsThis chapter describes some additional information that is useful to know when design-ing and r
58 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide4.1.2 TSI ConfigurationThe TSI buffer pool can also consume a large area of m
4: SRA Design Tips and RestrictionsDC 900-1325I 59want to save, consider using the BSD shell to create a separate directory in the read-only/usr parti
6 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide
60 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guidetion. Then press “Y” and “<enter>” to save the changes as shown in the
4: SRA Design Tips and RestrictionsDC 900-1325I 61What this menu item does is copy all of the files in the operational directory (/tmp/boot)back to th
62 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideThe following procedure is an example of updating the bootcfg file on the Fre
4: SRA Design Tips and RestrictionsDC 900-1325I 63This is especially true with the FreeBSD operating system on the Freeway server. Whentransferring te
64 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideAfter completing the above commands, when you open the file again with the vi
4: SRA Design Tips and RestrictionsDC 900-1325I 65The next parameter is a format string, equivalent to that which would be used in a printfstatement,
66 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guidecontains /var/log/, which is normally enough for several weeks of uptime. You
4: SRA Design Tips and RestrictionsDC 900-1325I 67much more disk storage space than the flash drive, making it ideal for storing largenumbers of messa
68 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideNoteSome Protogate-supplied SRA installations (such as the Monitor)will mount
4: SRA Design Tips and RestrictionsDC 900-1325I 694.4.2 Non-Blocking (Asynchronous) I/OAll DLI and TSI applications on the Freeway server must use non
DC 900-1325I 7List of FiguresFigure 1–1: Freeway Server Data Flow (Without an SRA)... 17Figure 1–2: Example of a Basic SRA...
70 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideVI-200-3243: FWSER 5.0-0 Apr 7 2008 FreeBSD Freeway ServerMain Menu---------
4: SRA Design Tips and RestrictionsDC 900-1325I 71This will display all the tasks running on the Freeway server. Look for your SRA nameand note the PI
72 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide
DC 900-1325I 73Chapter5Interfacing with the SRAChapter 3 discussed how the SRA interfaced with ICP protocol software using the DLIAPI. This chapter ou
74 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideFigure 5–1 shows an example of an SRA initialization text file. In this examp
5: Interfacing with the SRADC 900-1325I 75Since separate data packets in the TCP/IP stream may get sent as a single TCP/IP trans-mission, you would ne
76 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideThe NFS configuration consists of 1. a server containing directories and file
5: Interfacing with the SRADC 900-1325I 775.4 Web Browser InterfaceThe Freeway can easily be configured as a web server to allow a standard web browse
78 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide
DC 900-1325I 79Chapter6LAN Message FilteringThis chapter describes the recommended approach to implementing a server-residentfilter that edits message
8 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide
80 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideFigure 6–1: WAN Message Filtering ExampleFreeway3034ICPsICP Device DriverTSIT
6: LAN Message FilteringDC 900-1325I 81way's msgmux process. Once loaded, the msgmux process executes thefwymod_init() function in that library.2
82 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuidemuxFilterHook function can be called at any time, and any number of times, to
6: LAN Message FilteringDC 900-1325I 83The ICP header includes a field that specifies the number of bytes in the combined pro-tocol header and data ar
84 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide6.4 Filter RestrictionsFilters are limited in what they can and can’t do, and
6: LAN Message FilteringDC 900-1325I 85Support Department as described on page 14 for help in determining how to identify asession for a given protoco
86 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide6.5 Example SRA FiltersThe source code for two example filter functions (one
6: LAN Message FilteringDC 900-1325I 87Next, the function strips all carriage return characters from the data. Recall that one ofthe limitations on fi
88 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideNext, the function inserts carriage returns as needed, incrementing the data
DC 900-1325I 89IndexAAsynchronous I/O 69Attach command 69Audience 9BBlocking I/O 69Building the SRA 33files 27CCreating SRA directory 30Customer suppo
DC 900-1325I 9PrefacePurpose of DocumentThis document describes the design approaches to and constraints regarding the devel-opment of a Freeway serve
90 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer GuideIICPaccess to links 69iMaxBufSize 87Interfacing to DLI and TSI 43I/O, asynchr
IndexDC 900-1325I 91TTech n i c a l sup p o r t 14TraceSize parameter 57TSI configuration parametersmaxbuffers 58maxBufSize 85maxbufsize 58maxConns 58
92 DC 900-1325IFreeway Server-Resident Application (SRA) Programmer Guide
Freeway Server-Resident Application (SRA)Programmer GuideDC 900-1325ICustomer Report FormWe are constantly improving our products. If you have suggest
Protogate, Inc.Customer Service12225 World Trade Drive, Suite RSan Diego, CA 92128
Comments to this Manuals