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


mkDPIlist()

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

#include <snmp_dpx.h>
#include <types.h>
 
struct dpi_set_packet *mkDPIlist(packet, oid_name, type, len, value)
struct dpi_set_packet *packet;
char  *oid_name;
int    type;
int    len;
char  *value;
Parameters:
 
packet
A pointer to a structure dpi_set_packet, or NULL
oid_name
The object identifier of the variable
type
The type of the value
len
The length of the value
value
A pointer to the value
Description: The mkDPIlist() routine can be used to create the portion of the parse tree that represents a list of name and value pairs. Each entry in the list represents a name and value pair (as would normally be returned in a response packet). If the pointer packet is NULL, a new dpi_set_packet structure is dynamically allocated and the pointer to that structure is returned. The structure will contain the new name and value pair. If the pointer packet is not NULL, a new dpi_set_packet structure is dynamically allocated and chained to the list. The new structure will contain the new name and value pair. The pointer packet will be returned to the caller. If an error is detected, a NULL pointer is returned.

The value of type can be the same as for mkDPIset(). These are defined in the snmp_dpi.h header file.

The dpi_set_packet structure has a next pointer [0 in case of a mkDPIset() call and is also 0 upon the first mkDPIlist() call]. The structure looks like this:
struct dpi_set_packet {
  char                 *object_id;
  unsigned char         type;
  unsigned short        value_len;
  char                  *value;
  struct dpi_set_packet *next;
};

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014