rexec_af() — Execute commands one at a time on a remote host
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
RCF2292 | both | z/OS V1R4 |
Format
#define _OPEN_SYS_SOCK_IPV6
#include <rexec.h>
int rexec_af(char **ahost, unsigned short rport,
const char *name, const char *pass, const char *cmd,
int *fd2p, int af);
General description
The rexec_af() function behaves the same as the rexec() function. Instead of creating an AF_INET socket, rexec_af can also create an AF_INET6 socket. The af argument specifies the address family. It is set to either AF_INET or AF_INET6.
Note: The rexec_af() function has a dependency on the
level of the Enhanced ASCII Extensions. See Enhanced ASCII support for
details.
Returned value
When successful, rexec_af() returns a socket to the remote command.
If unsuccessful, rexec_af() returns -1 and may set errno to one of
the following:
- EAFNOSUPPORT
- The specified address family is not supported.