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

Tcp/ip services for openvms
Table of Contents

Advertisement

eSNMP API Routines
cmp_oid_prefix
cmp_oid_prefix
Compares an OID against a prefix.
Format
int cmp_oid_prefix ( oid *q,
Description
A prefix could be the OID on an object in the object table. The elements beyond
the prefix are the instance information.
This routine does an element-by-element comparison, from the most significant
element (element 0) to the least significant element. If all elements of the prefix
OID match exactly with corresponding elements of the
considered an even match if the
The
OID q
element is larger. It is considered smaller if the first nonmatching element is less.
Return Values
-1
0
1
Example
#include <esnmp.h>
OID *q;
OBJECT *object;
if (cmp_oid_prefix(q, &object->oid) == 0)
printf("matches prefix\n");
5–48 eSNMP API Routines
oid *prefix );
OID q
structure is considered greater than the prefix if the first nonmatching
The OID is less than the prefix.
The OID is in prefix.
The OID is greater than the prefix.
structure, it is
OID q
structure contains additional elements.

Advertisement

Table of Contents
loading

Table of Contents