X.25 Incoming Call Control
The X.25 server daemon, x25daemon, links together X.25 modules and
drivers. It also listens for incoming calls on the X.25 links, and
disposes of them in accordance with the table entries in
/etc/x25incalls. Applications invoked by x25daemon use the X.25
library application program interface (API).
When a call from the network arrives, the daemon examines the Call User
Data (CUD), the subnet address (SNA), and the Calling address (CA)
fields. Based on the contents of these fields, the daemon disposes of the
call as defined by /etc/x25tab. The contents of the Call
User Data, subnet Address, and the Calling Address fields are
referred to as the call identification or Call ID.
The daemon reads /etc/x25tab when it starts, and
every 5 minutes after that. It also reads the file before processing
each incoming call.
The daemon may do one of the following with a call:
- Clear the call.
- Pass the call to an application without accepting or clearing it.
The following sections describe how to build /etc/x25tab,
and the kind of control the program exerts over incoming calls.
The x25tab file consists of comment lines and call ID
lines. Comment lines start with #. All other lines are call ID lines.
If the daemon detects any errors in the file, it reports them immediately
on stderr and exits. A valid call identification line has
colon separated fields
followed by a line feed. The fields are:
Call ID : Disposition : reverse : function
Call ID is coded as some combination of Call User Data,
subnet Address, and Calling Address, separated by commas. If more than
one entry is found in the Call ID, then all conditions must be true to
select a call. For example, the entry:
SNA=03,CA=12345678
would only match calls that have both a subnet Address of "03" and a
Calling Address of "12345678". Note that the subnet Address is part of
the Called Address as controlled by called_length.
Binary Values in the Call ID
Binary values in Call User Data may be specified as a string of numeric
decimal constants preceded by \. For example, the standard ITI call user
data begins with a byte containing a binary 1, followed by 3 null
bytes (1 0 0 0). This may be specified as \1\0\0\0. All digits after a `\'
are considered to be part of a decimal constant less than 255. Therefore
the daemon treats \1000 as 1000, which is greater than 255 and causes an
error exit. \100 on the other hand, is valid and is taken as decimal
100. Any non-digit ends the number and is processed as the next ASCII
byte. For example, \1\0\0\0B would match a Call User Data field that
contains binary one followed by 3 zeros, followed by the letter B.
Wild Card Characters in the Call ID
The data field of Call ID strings may contain '?' characters to match any
legal character for the field. For example, the Call ID "SNA=1?1" will
match subnet Addresses of 101, 111, 121, 131, and so on up to 191.
Using ANY as a Call ID
The daemon also recognizes the special Call ID, ANY. This
specifies the
action to take on all unrecognized Call IDs. If there is no entry for
ANY, then X25daemon clears all
unrecognized incoming calls with a diagnostic code of 0xB0.
The disposition field may have one of:
PASS
or CLEAR:
- PASS
Control of this call is passed to the function specified without being
accepted. Only programs using the programming interface can issue a
driver command to accept an incoming call
(X25getcall).
- CLEAR
The call is cleared. The remaining fields are ignored.
The reverse field must be either YES or NO. If the reverse field
is NO, the daemon clears calls which otherwise match the call ID but
request reverse charging.
The function field contains the complete path name and calling
sequence to the program that will handle this call. The program will be
called by X25daemon just like it would be started from a UNIX
command line. A few parameters may be passed to the application that are
determined at call request time:
- $dev
If disposition is PASS, $dev is a character string.
This string is the name of the network device to use when
accepting the call
(/dev/x25pkt).
- $index
Each incoming call request is assigned a unique number (referred to as the
call index). This number is used to distinguish between two or more calls
that may arrive at the machine simultaneously. This call index is required
for some X.25 library functions.
- $netid
The network ID number from /etc/packetnets which identifies the
physical link on which the call arrived.
Comments (that is, text beginning with a "#") may also be included.
Characters after the # through the end of the line are not interpreted
by routines that use this file.
If you know the X.121 address of all the locations which might call your
system, you can identify each of them in
/etc/x25tab, and specify
CLEAR for the ANY Call ID. Since the daemon matches each
call with a table entry, your system never connects to locations it has not
been programmed to recognize.
If you have a large terminal population, and do not want your UNIX system to
spend time reading and searching /etc/x25tab, you can use
password protection instead of specific addresses. The password approach is
the only one you can use if your terminals are using public PADs, as their
network address varies from call to call under those circumstances.
To use password protection, you simply use CUD=\1\0\0\0SomeWord in
the Call ID field for the passwords you wish to authorize. Note that the
protocol selection field of the Call User Data precedes the Call User Data
that a user might supply. In the example above, although an X.3, X.28,
X.29 PAD user only supplies SomeWord, the PAD in use has prepended
the four-byte string that identifies the call as one from an X.3, X.28,
X.29 PAD device.
#
# Lines in this file consist of 4 fields separated by colons.
#
# call_id: disposition: reverse: function
#
# The ANY entry. We are accepting all unrecognized calls as
# possible login attempts. Ensure that these people
# pay for their traffic charges and clear any calls with reverse
# charging specified.
#
ANY:PASS:NO:/etc/padd -d $dev -v $index
#
# Check for a Sub network address of 03. If we find it, then pass
# it to a local switching function that makes a call out on link 1.
# Link 1 is a dedicated link to a secondary in house machine.
# We will not accept reverse charging calls here.
#
SNA=03:PASS:NO:/usr/lbin/switchout $dev
#
# If the call user data contains "S", pass it to a data sink program.
#
CUD=\1\0\0\0S:PASS:YES:/usr/lib/x25/sink $dev $netid $index
#
# Accounting has discovered that the user at net address 10002000 is
# a malicious hacker. Clear all calls from this address.
#
CA=10002000:CLEAR::
#
The X25daemon sets up environment variables for TTY and X.29 mode
applications to allow them to obtain information about incoming
calls. These are described in the Programmer's Guide.
Revision 6.1.0 (February 2003)
Copyright © 1997-2003 The Software Group Limited. All Rights Reserved.
® Netcom is a registered trademark of The Software Group Limited.