z/OS Communications Server: IPv6 Network and Application Design Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Socket option to support ICMPv6 (IPPROTO_ICMPV6 level)

z/OS Communications Server: IPv6 Network and Application Design Guide
SC27-3663-00

Table 1. Sockets options at the IPPROTO_ICMPV6 level
Socket options getsockopt() setsockopt() Assembler Callable Services C/C++ using Language Environment® REXX Sockets Extended macro/call
ICMP6_FILTER N Y N N

Use the following socket option to support ICMPv6 (IPPROTO_ICMPV6 level):

ICMP6_FILTER (used with RAW applications)
The ICMP6_FILTER socket option can be used by a RAW application to filter out ICMPv6 message types that it does not need to receive. There are many more ICMPv6 message types than ICMPv4 message types. ICMPv6 provides function comparable to ICMPv4 plus IGMPv4 and ARPv4 functionality. An application might be interested in receiving only a subset of the messages received for ICMPv6.

This option is enabled or disabled with a setsockopt(). The option value provides a 256-bit array of message types that should be filtered. To disable the option, the setsockopt() should be issued with an option length of 0. This causes the TCP/IP protocol stack's default filter to be in effect.

A getsockopt() with this option returns the value set by a setsockopt(). If a setsockopt() has not been done, the TCP/IP protocol stack's default filter is returned. For more information about default filtering, see ICMP considerations.

Table 2 lists the macros that are provided in the Language Environment C/C++ environment to manipulate the filter value.

Table 2. Macros used to manipulate filter value
Macro Description
void ICMP6_FILTER_SETPASSALL(struct icmp6_filter *); Specifies that all ICMPv6 messages are passed to the application.
void ICMP6_FILTER_SETBLOCKALL(struct icmp6_filter *); Specifies that all ICMPv6 messages are blocked from being passed to the application.
void ICMP6_FILTER_SETPASS(int, struct icmp6_filter *); ICMPv6 messages of type specified in int should be passed to the application.
void ICMP6_FILTER_SETBLOCK(int, struct icmp6_filter *); ICMPv6 messages of type specified in int should not be passed to the application.
void ICMP6_FILTER_WILLPASS(int, const struct icmp6_filter *); Returns true if the message type specified in int is passed to the application by the filter pointed to by the second argument.
void ICMP6_FILTER_WILLBLOCK(int, const struct icmp6_filter *); Returns true if the message type specified in int is not passed to the application by the filter pointed to by the second argument.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014