BPX4POE (__poe) example

The following code registers a socket (SOCKDESC) as the process scope port of entry. SOCKDESC was returned previously from a call to either BPX4SOC or BPX4ACP. For the callable service, see __poe() (BPX1POE, BPX4POE) — Port of entry information. For the data structure, see BPXYPOE — Map poe syscall parameters. AMODE 31 callers use BPX1POE (__poe) example.
                                              
         MVC   POEOPTIONS,=A(POE#SCOPEPROCESS)                          
         MVC   POEENTRYTYPE,=A(POE#ENTRYSOCKET)                         
         MVC   POEENTRYLEN,=A(POE#ENTRYSOCKETLEN)                       
         LA    R15,SOCKDESC                                             
         STG   R15,POEENTRYPTR64                                        
         CALL  BPX4POE,              Port of Entry registration        +
               (=A(POE#LEN),         Input: Length of poe structure    +
               POE,                  Input: mapped by BPXYPOE          +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               MF=(E,PLIST)          ----------------------------------