SLTA-10 Adapter User’s Guide 74
•
argdx
is a pointer to a caller-declared structure that will contain the direct entry points into
the driver. See the structure
direct_calls
in the file
NI_MSG.C
in the supplied example
host application for usage.
•
argcx
is the size of the structure.
Function code 2 is supported by network drivers for DOS to return three direct entry points into
the driver code. The network driver for the SLTA-10 Adapter supports an additional option to
function code 2, as well as function code 3, which is used to manage the modem control state of the
driver. These options are not used when the SLTA-10 Adapter is connected directly to a host.
They are provided primarily for use while establishing communications with a remote host. For
example, the host connect utility (HCU) described in Chapter 11 of this manual uses these
functions. Host applications that only communicate to the SLTA-10 Adapter via an already-
established telephone connection do not need to concern themselves with these functions. If you
wish to establish or take down telephone connections during the execution of your host
application, use the source code of HCU as a guide.
When function code 2 is used,
argdx
points to the
direct_calls
structure defined for all
L
ON
W
ORKS
standard network drivers for DOS. If
argcx
is 13, the size of the standard direct
calls structure, then three direct entry point addresses are returned as usual. If
argcx
is 4 (the
size of the structure
ioctl_get_dcd_s
), then the state of the modem's DCD line is returned as a
TRUE
or
FALSE
value. Note that the status field is 16 bits in this structure, but 8 bits in the direct
calls structure.
struct ioctl_get_dcd_s {
unsigned ioctl_stat; // 16 bit status
unsigned dcd_state; // Data Carrier Detect (TRUE or FALSE)
}
Function code 3 is used when the application wishes to write information to the driver. For the
SLTA-10 Adapter driver,
argdx
points to the following structure, and
argcx
is its size:
struct ioctl_o_info_s {
unsigned ioctl_stat; // 16 bit status
unsigned sub_command; // use enum sub_command
unsigned mode;
unsigned mode_aux;
}
enum sub_command {
SUBC_set_opt = 1, // set driver options
SUBC_set_DTR = 2, // set DTR line
SUBC_set_baud = 3, // set serial bit rate
};
There are three sub-commands, used to set the various modes of the driver, the state of the DTR
(Data Terminal Ready) line to the modem, and serial bit rate of the serial interface.
When sub-command 1 is used, the
mode
field in the structure is a bit mask defining which of the
driver modes is to be changed, and
the mode_aux
field specifies bits defining the new states of
those modes. It is possible to set more than one of the modes by OR'ing the following bit-masks
together:
0x0001 Enables modem support.
0x0002 Allows modem responses to host - same as the
/Q
option.