Depending on the CYGPKG_MODBUS and user application configuration, the ModbusTCP transport layer may provide support for an Access Control Mechanism (ACM) based on client (remote host) network addresses. This function allows addresses to be registered, so that subsequent connections from the remote host will be allowed.
ptype defines which of the
ModbusTCP ACM pools the supplied client address will be
The priority pool is for addresses for which the server should never close the socket connection.
The non-priority pool is for addresses where the server may close the socket connection.
describe either a
AF_INET (for IPv4)
AF_INET6 (for IPv6) family address,
addrlen being the size of the relevant
Cyg_ErrNo error code is returned,
with ENOERR indicating success. If the ModbusTCP
ACM is not provided by the attached transport layer
then ENOENT is returned. The
error EIO indicates a failure to communicate with
the server control thread. The transport specific implementation may
return further error indications as appropriate.