RTES FTP, HTTP and SMTP Interface
EQFTP

Overview

EQFTP is a memory resident driver that allow RTES to communicate over TCP/IP with devices using HTTP (browsers) and FTP and to send emails via SMTP.

EXNET or EQNET must be installed before loading EQFTP.

EQFTP includes an interpreter for special tags within HTML files to obtain dynamic data from RTES and execute RTES commands.

Configuration file

EQFTP uses one the RTES ports (PORT1, PORT2, PORT3 or PORT4).
The command line EQFTP n loads QFTP on port n
For example:
EQFTP 2
loads EQFTP on PORT2

The corresponding configuration file (PORTn.CNF) contains some configuration parameters.

In this file, we define the following parameters. Typically, you define a parameter by typing a key letter, followed by the = sign, followed by the value - or list of values - you assign to that parameter. Values are separated by a comma, a decimal point, a space, or a line feed.

Parameter

Key letter

Description

Default value

Adapter number

A

A value of 0 associates this driver with XNET. A value of 1 associates this driver with the second copy of XNET (loaded as XNET 1).

A=0

Interactive registers

E

The index of the first of 11 RTES registers used for information and command. The registers are:
(click for details):

none

Userid and password

R

The index of the first of 2 RTES registers that contains, in the text area, the alphanumeric strings for the user id and pass word to be used by an FTP client.
Both strings are case sensitive.

none

Drive letter

V

Files requested by an HTTP clients must be located in a directory named HOST in the root directory of drives defined by this parameter as follows:

  • 0 for A:\
  • 1 for B:\
  • 2 for C:\
  • 3 for D:\
  • .etc..

This allows the files to be located in a virtual drive (such as RAMDRIVE)

V=0
for A:\HOST\

Protocol Analyzer
Selector

X

With X=0, the protocol analyzer (Command Ln) causes the local data traffic (HTML/FTP) to be displayed.
With X=1, the protocol analyzer causes all data to/from the packet driver to be displayed.

X=0
for local

Using HTML

HTML files used to interface with RTES must

As RTES delivers your HTML files to the browser, it looks for the following special "tags".

@@variable definition@

The text contained between @@ and @ uses the same format as the report generator.

[[condition]text]

The expression between the second [ and the first ] is evaluated as a boolean. "text" is included if the result of the evaluation is true. (Click here for more details.)

||command|

The text between the second and last | is assumed to be an RTES command.

Example : ||LET HITS=HITS+1|

Use of the POST method

When defining the FORM, ACTION="page.htm" causes page.htm to be displayed when the form is submitted.
A pair of NAME and VALUE define the RTES command to be executed.

Examples :

(1) Start/stop:

(2) Set to a numeric value:

(3) Select value - Radio button style:

(4) Select value - Menu style:

(5) X-Y Graph. Draw a line made of several segments (using VML):

HTTP Authorization Scheme. (back to top)

When the authorization scheme switch is set to 1 (or odd value), access to the HTTP contents is protected by the basic authorization scheme.
The user id and password are as defined by the R parameter.
You must supply in the html directory ([V]:\HOST) a file named 401.htm that will be used by the client to notify the user that access is restricted, after 3 failed attempts. Here is a suggested 401.htm:

Number of sockets. (back to top)

The second register of the E group indicates how many sockets are currently active. A client may utilize one or more sockets depending on the activity. There is a total of 16 sockets. You may use this register to prevent another client to join in if your system is too busy.

The message area shows the full pathname of the file that was most recently uploaded or downloaded using the FTP facility.

Last IP (back to top)

These 4 register contain the IP of the current caller. They may be used to for logging and to decide whether or not to grant access to some/all controls.

E-mail facility. (back to top)

The email facility must find, in the default directory, a file name "MAIL.TXT". This file may be created by the RTES report generator and must contain the following:

Here is an example of MAIL.TXT

Operation of the e-mail facility

To initiate sending an email, you set the 'email switch' register on. The system looks for MAIL.TXT and starts the connection and resets the switch. When the operation is completed, the 'error code' register indicates 221 if the operation was succesful or and error code that identifies the problem.

The most common error codes are:

      450 Requested mail action not taken: mailbox unavailable
         (e.g., mailbox busy)
      451 Requested action aborted: local error in processing
      452 Requested action not taken: insufficient system storage
      500 Syntax error, command unrecognized
         (This may include errors such as command line too long)
      501 Syntax error in parameters or arguments
      503 Bad sequence of commands
      550 Requested action not taken: mailbox unavailable
         (e.g., mailbox not found, no access, or command rejected
         for policy reasons)
      552 Requested mail action aborted: exceeded storage allocation
      553 Requested action not taken: mailbox name not allowed
         (e.g., mailbox syntax incorrect)
      554 Transaction failed  (Or, in the case of a connection-opening
          response, "No SMTP service here")
Note: Click here for an example of event notification by email.
back to top

SMB Workstation facility

SMB stands for 'Server Message Block', a common protocol transported by TCP/IP and used to exchange files between computers on a network. This protocol is also known as CIFS.

These registers are associated with the operation of the connection to a server. The server is defined in XNET.CFG. (see Extended TCP/IP). When the connection is established, this system can read files from the server and write files to the server.

During the connection and log on process, the current activity register will show a number between 0 and 9 (used for debugging when there are difficulties with the connection). Once the connection is established, the current activity will show "255".

After each transaction (read/write/create/delete), the SMB error code is returned. A normal return (no error) is zero.

The SMB also returns the number of files that are currently open. This information is useful if you need to shutdown RTES or the server. You would normally wait until no files are open so that there is no data lost.

back to top

Current IP address

Since you may need to know what the current IP of this system is, in case it was obtained automatically, it is returned in these 4 registers. You may use this information to compose an email that will allow you to find the new ip remotely.

back to top