dft, bsc
Purpose
Provides 3270 Distributed Function Terminal (DFT) and
Binary Synchronous Communications (BSC) capabilities.
Synopsis
#include <sys/3270.h>
Description
The 3270 AIX device driver is a multiplexed device driver
that supports an independent logical 3270 session on each
of its channels. It can access multiple VRM device
drivers, depending on the special file name used.
OPEN
The open system call initializes a path to a host
session. The oflag parameter to open should be set to
O_RDWR; all other values are ignored.
The specific adapter and port to be used is specified by
the path name that is passed to open. The special files
named /dev/dftn use a 3278/79 Emulation Adapter. The
special files named /dev/bscn use the Logical Link
Control from NETWORK 3270-PLUS (BSC), which uses a Multi-
protocol Adapter. To use any /dev/bscn, you must have
NETWORK 3270-PLUS (BSC) or NETWORK RJE-PLUS (BSC)
installed on your system. More than one 3278/79 Emu-
lation Adapter or Multiprotocol Adapter can be installed
in your system.
A specific session on one of the ports can be addressed
by following the special file name with a slash and the
device address. For example, "/dev/bsc2/5" identifies
device address "5" on a specific port of one of the
Multiprotocol Adapters. The path name specified to the
open system call can specify this device address or not;
if it is not specified, then an available device address
is used.
The exact correlation between special file names and spe-
cific Multiprotocol Adapter ports is established when
NETWORK 3270-PLUS (BSC) is installed.
Device address 0 is used to provide profile information
for the NETWORK 3270-PLUS (BSC) Logical Link Control and
to establish the connection. This applies to BSC only.
READING AND WRITING
The ext parameter of the readx and writex extended I/O
system calls is used as a pointer to an io3270 structure
that contains additional information. However, some
simple applications may not need to supply the ext param-
eter and can use the read and write system calls.
The io3270 structure is defined in the sys/3270.h header
file, and it contains the following members:
uint io_flags; /* Information Flags */
uint status; /* Status Codes */
The value of io_flags is formed by logically OR-ing
values from the following list:
LOCK Lock or unlock: Lock is set when a write or
writex system call is issued. It is reset
(unlocked) when ready for the next write opera-
tion.
DATA Data is available to be read.
TRANS Transparent: Indicates that this buffer should
be sent in transparent mode, or that it was
received in transparent mode. This bit applies
only to NETWORK RJE-PLUS (BSC).
COMM Communication check: A communication error was
detected.
PROG Program check: A program error was detected.
MACH Machine check: A machine error was detected.
Notes:
1. The application read and write buffers are formatted
as 3270 data streams.
2. A write or writex request fails if the adapter is
currently sending outbound data, or if the host
issued anything other than a READ BUFFER 3270 command
in response to an ATTENTION sent by the VRM device
driver.
3. Use the SND_STATUS ioctl operation to send status to
the host, not write or writex.
SELECT SUPPORT
The 3270 device driver supports the select system call in
the following manner:
o Read selects are satisfied when input data is avail-
able.
o Write selects are always satisfied immediately.
o Exception selects are never satisfied, or hang indef-
initely if no timeout value is specified.
See "select" for more information about this system call.
IOCTL OPERATIONS
The 3270 device driver performs the following ioctl oper-
ations. See "ioctl" for a complete description of the
ioctl system call.
int ioctl (fildes, IOCTYPE)
int fildes;
Returns a character that identifies the device type.
This character is the value given for the appt
keyword in the /etc/system file.
int ioctl (fildes, IOCINFO, arg)
int fildes;
struct devinfo *arg;
Stores information about the device into the devinfo
structure, which is defined in the sys/devinfo.h
header file.
int ioctl (fildes, GET_STATUS, arg)
int fildes;
struct io3270 *arg;
Gets the device driver status and stores it in the
io3270 structure pointed to by the arg parameter.
See "Reading and Writing" for a description of the
io3270 structure.
int ioctl (fildes, SND_STATUS, arg)
int fildes;
struct nsddsstat *arg;
Sends status and sense data to the host, as speci-
fied in the structure pointed to by the arg param-
eter. The nsddsstat structure is defined in the
sys/3270.h header file, and it contains the fol-
lowing members:
struct code co_de
struct status sta_tus
The code structure contains the following members:
unsigned bit0 : 1;
unsigned bit1 : 1;
unsigned db : 1; /* Device Busy */
unsigned us : 1;
unsigned de : 1; /* Device End */
The status structure contains the following members:
unsigned bit0 : 1;
unsigned bit1 : 1;
unsigned cr : 1;
unsigned ir : 1; /* Intervention Required */
unsigned ec : 1;
unsigned dc : 1;
unsigned oc : 1;
Files
/dev/dft0 First 3278/79 Emulation Adapter
/dev/dft1 Second 3278/79 Emulation Adapter
/dev/dft2 Third 3278/79 Emulation Adapter
/dev/dft3 Fourth 3278/79 Emulation Adapter
/dev/bsc0 Identifies a Multiprotocol Adapter port to
the BSC LLC
/dev/bsc1 Identifies a Multiprotocol Adapter port to
the BSC LLC
/dev/bsc2 Identifies a Multiprotocol Adapter port to
the BSC LLC
/dev/bsc3 Identifies a Multiprotocol Adapter port to
the BSC LLC.
Related Information
In this book: "ioctl," "read, readx," "write, writex,"
and "devinfo."
NETWORK 3270-PLUS (BSC) User Guide.
NETWORK RJE-PLUS (BSC) User Guide.