Mem2Oct - Compaq TCP/IP Services for OpenVMS Programming And Reference Manual

Tcp/ip services for openvms
Table of Contents

Advertisement

eSNMP API Routines

mem2oct

mem2oct
Converts a string (a buffer and length) to an
address and length.
Format
oct *mem2oct ( oct *new,
Arguments
new
A pointer to the
buffer
Pointer to the buffer to be converted.
len
Length of buffer to be converted.
Description
The
mem2oct
the
oct
This routine does not allocate an
pointed to in the
Return Values
Null
Example
#include <esnmp.h>
char buffer;
int len;
OCT abc;
...buffer and len are initialized to something...
memset(&abc, 0, sizeof(OCT));
if (mem2oct(&abc, buffer, len) == NULL)
5–52 eSNMP API Routines
char *buffer,
int *len );
oct
structure receiving the data.
routine dynamically allocates the buffer and inserts its pointer into
structure. The caller must explicitly free this buffer.
structure before making the assignment.
oct
DPRINTF((WARNING,"It did not work...\n"));
structure with the new buffer's
oct
structure and does not free data previously
oct
An error occurred. Otherwise, the pointer to the
structure (the first argument) is returned.
oct

Advertisement

Table of Contents
loading

Table of Contents