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


mkDPIregister()

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

#include <snmp_dpx.h>
#include <bsdtypes.h>
 
unsigned char *mkDPIregister(oid_name)
char *oid_name;

Parameters

oid_name
Specifies the object identifier of the variable to be registered. Object identifiers are registered with a trailing period (.).

Description

The mkDPIregister() routine creates a register request packet and returns a pointer to a static buffer, which holds the packet contents. The length of the remaining packet is stored in the first 2 bytes of the packet.

Return Values

If successful, returns a pointer to a static buffer containing the packet contents. A NULL pointer is returned if an error is detected during the creation of the packet.

Example

The following example shows the mkDPIregister() call.
unsigned char *packet;
int len;
 
packet = mkDPIregister(“1.3.6.1.2.1.1.1.“);
 
len = *packet * 256 + *(packet + 1);

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014