TCP/IP Management Programming Manual

HP NonStop TCP/IP Management Programming Manual529636-001
4-1
4
SPI Programming Considerations
The SPI Common Extensions Manual discusses general programming considerations
for writing applications that use the SPI to communicate with data communications
subsystems like the TCP/IP subsystem. This section discusses SPI programming
considerations specific to the TCP/IP subsystem.
Building the Command Buffer
The following programming considerations apply when an application builds the
command buffer for a TCP/IP command.
The recommended buffer length (in bytes) for a command is a predefined value with
the symbolic name ZTCI-VAL-BUFLEN.
The subsystem does not support multiple commands in a single request message.
However, many of the commands either accept more than one object name in one
command or can contain an object-name template. Therefore, one command can
affect multiple objects. All the objects whose names appear in a command must be of
the same object type. The subsystem does not support continuation of a command
across multiple messages, but it does support the special case of receiving multiple
reply messages using the context token, as described in the SPI Programming Manual.
The command buffers for all commands can contain extensible structured tokens. An
extensible structured token that is to appear in a command should always be initialized
by the SPI procedure SSNULL to ensure that every field of the token is initialized to its
null value. This action is important because an operation will be performed if a field
contains a value other than its null value. For example, in the ALTER SUBNET
command, if a field of the extensible structured token that describes the subnet
attributes contains a value other than its null value, that value is assigned to the
attribute corresponding to that field. Using SSNULL is important even when every field
of an extensible structured token will have a value assigned to it: that way, the
application will continue to work if it is compiled with new definition files that add new
fields to the token.
The only tokens that can appear more than once in a command are
ZSPI-TKN-COMMENT and ZCOM-TKN-TRACE-OPT. The comment token,
ZSPI-TKN-COMMENT is described in the SPI Programming Manual.
ZCOM-TKN-TRACE-OPT, a token used in the TRACE command, is described under
TRACE Command on page 6-110.
If any of the other tokens in a command appear more than once, an error is returned.