z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


IPV6_MULTICAST_HOPS

z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
SC27-3660-00

The IPV6_MULTICAST_HOPS socket option allows the application to primarily limit the lifetime of the packet in the Internet and prevent it from circulating indefinitely. The default value is 1, meaning multicast is available only to the local subnet.

Figure 1 illustrates the use of IPV6_MULTICAST_HOPS by the use of the SETSOCKOPT and GETSOCKOPT APIs.

Figure 1. IPV6_MULTICAST_HOPS
         ***********************************************************************
         *                                                                     *
         *        Issue SETSOCKOPT/GETSOCKOPT - IPV6_MULTICAST_HOPS            *
         *                                                                     *
         ***********************************************************************
         *
         * SET TTL TO SAME SITE    
         * 
                  EZASMI TYPE=SETSOCKOPT,  ISSUE SETSOCKOPT                     X
                        S=S,               SOCKET DESCRIPTOR                    X
                        OPTLEN=OPTLEN1,    OPTION LENGTH                        X
                        OPTNAME='IPV6_MULTICAST_HOPS', OPTION NAME              X
                        OPTVAL=SAMESITE,   OPTION VALUE                         X
                        RETCODE=RETCODE,   (SPECIFY RETCODE FIELD)              X
                        ERROR=ERROR        ABEND IF MACRO ERROR      
                  BAL   R14,RCCHECK         --> CHECK IT          
         * 
         * DISPLAY HOPS, SHOULD BE 32            
         *  
                  XC    OPTVAL4,OPTVAL4                    
                  EZASMI TYPE=GETSOCKOPT,  ISSUE GETSOCKOPT                     X
                        S=S,               SOCKET DESCRIPTOR                    X 
                        OPTLEN=OPTLEN1,    OPTION LENGTH                        X
                        OPTNAME='IPV6_MULTICAST_HOPS', OPTION NAME              X
                        OPTVAL=OPTVAL4,    OPTION VALUE                         X 
                        RETCODE=RETCODE,   (SPECIFY RETCODE FIELD)              X 
                        ERROR=ERROR        ABEND IF MACRO ERROR      
                  BAL   R14,RCCHECK         --> CHECK IT         

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014