Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
How socket structures are represented z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|
Instead of using binary-based data structures, the REXX socket library represents all data structures as strings of space-delimited values, where each value represents a field in the data structure. The REXX language is a type-independent language. All data is manipulated and represented using a character format. When an application passes data into the REXX socket library, the data must be a space-delimited string. When the REXX socket library returns socket information, it returns the information as a space-delimited string on the return value. Rules:
Tip: When you specify a NAME string as an
input parameter to a command, you can specify the ipaddress field either as an IP address or as a host name to be resolved by
a name server. For example, you can code NAME=”AF_INET 1049
MYHOST”, where AF_INET is the address family, 1049 is the
port number, and MYHOST is the host name to be resolved to an IP address.
struct sockaddr_inThis structure represents
an IPv4 socket address. In the REXX socket library, this structure is represented
by the NAME string. The NAME string has the following format:
where:
The following string is an example of an
IPv4 NAME string:
struct sockaddr_in6This structure represents
an IPv6 socket address. In the REXX socket library, this structure is represented
by the NAME string. The NAME string has the following format:
where:
The following string is an example of an
IPv6 NAME string:
struct ip_mreqThis structure represents
the mapping between an IPv4 multicast address and an IPv4 interface.
In the REXX socket library, this structure is represented by the ipmreq string. The ipmreq string has the following format:
where:
The following string is an example of an
IPv4 ipmreq string:
struct ipv6_mreqThis structure represents
the mapping between an IPv6 multicast address and an interface index.
In the REXX socket library, this structure is represented by the ipmreq string. The ipmreq string has the following format:
where:
The following string is an example of an
IPv6 ipmreq string:
struct ip_mreq_sourceThis structure represents
a multicast source filter. It is used with the IOCTL command to filter
the multicast packets that an application wants to receive; it also
defines the remote host from which the packets are sent. In the REXX socket library,
this structure is represented by the ip_mreq_source string. The ip_mreq_source string has the following
format:
where:
The following string is an example of an ip_mreq_source string:
Restriction: This structure supports IPv4 addresses
only.
struct group_reqThis structure represents
a protocol-independent mapping between a multicast IP address and
an interface index. It is used with the IOCTL command to join and
leave multicast groups. In the REXX socket library, this structure is represented
by the groupreq string. The groupreq string has the following format:
where:
The following strings are examples of groupreq strings:
struct group_req_sourceThis structure represents
a protocol-independent mapping between a multicast IP address, an
interface index, and a source address for a remote host. It is used
with the IOCTL command to filter the multicast packets that an application
wants to receive; it also defines the remote host from which the packets
are sent. In the REXX socket library, this structure is represented by the groupreqsource string. The groupreqsource string has the following format:
where:
The following strings are examples of groupreqsource strings:
|
Copyright IBM Corporation 1990, 2014
|