z/OS Communications Server: IP Programmer's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


PL/I example – SIOCGPARTNERINFO ioctl call

z/OS Communications Server: IP Programmer's Guide and Reference
SC27-3659-02

The following sample PL/I code builds and issues the SIOCGPARTNERINFO ioctl. The SIOCGPARTNERINFO ioctl retrieves the connection routing information and the security credentials of a partner.

⋮
 /* SIOCGPartnerInfo ioctl mapping and constants                      */
 % include EZBPINF1; 
⋮
 dcl 1 IoctlBuffer Based,                            
    3 data char(PI_FIXED_SIZE + PI_UTOKEN_EXT_SIZE); 
⋮
 /*********************************************************************/
 /* Allocate the IOCTL buffer for SIOCGPARTNERINFO and issue ioctl.   */
 /*********************************************************************/
 allocate ioctlBuffer set(piPtr);                                      
                                                                       
 piPtr->PI_Version  = PI_VERSION_1;                              
 piPtr->PI_ReqType  = PI_REQTYPE_PARTNER_USERID                        
                      + PI_REQTYPE_PARTNER_UTOKEN;                     
 piPtr->PI_TimeOut  = PI_TIMEOUT_MAXIMUM;                              
 piPtr->PI_BufLen   = PI_FIXED_SIZE + PI_UTOKEN_EXT_SIZE;              
                                                                       
 call ezasoket(IOCTL,                                                  
               SOCK_STREAM,                                            
               SIOCGPARTNERINFO,      /* SIOCGPARTNERINFO ioctl      */
               piPtr->IoctlBuffer,    /* input buffer                */
               piPtr->IoctlBuffer,    /* output buffer               */
               ERRNO,                                                  
               RETCODE);               

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014