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


SNMP DPI: Processing a CLOSE request

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

An agent can send a CLOSE packet if it encounters an error or for some other reason. It can also do so if an SNMP MANAGER tells it to make the subagent connection not valid.

Here is an example of how to handle such a packet.

static int do_close(snmp_dpi_hdr *hdr_p, snmp_dpi_close_packet *pack_p) 
{                                                                       
       printf("DPI CLOSE received from agent, reason=%d\n",             
              pack_p->reason_code);                                     
                                                                        
       DPIdisconnect_from_agent(handle);                                
       return(-1); /* causes exit in main loop */                       
} /* end of do_close() */                                               

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014