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


Processing a GET request

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

The DPI packet is parsed to get the object ID of the requested variable. If the specified object ID of the requested variable is not supported by the subagent, the subagent returns an error indication of SNMP_NO_SUCH_NAME. Name, type, or value information is not returned. For example:
unsigned char *cp;
 
cp = mkDPIresponse(SNMP_NO_SUCH_NAME,0);
If the object ID of the variable is supported, an error is not returned and the name, type, and value of the object ID are returned using the mkDPIset() and mkDPIresponse() routines. The following example shows an object ID, whose type is string, being returned.
char *obj_id;
 
unsigned char *cp;
struct dpi_set_packet *ret_value;
char *data;
 
data = "a string to be returned";
ret_value = mkDPIset(obj_id,SNMP_TYPE_STRING,
                   strlen(data)+1,data);
cp = mkDPIresponse(0,ret_value);

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014