beautypg.com

Cmp_oid – Compaq AAR04BCTE User Manual

Page 105

background image

eSNMP API Routines

cmp_oid

cmp_oid

Compares two OID structures.

Format

int cmp_oid ( oid *q,

oid *p );

Description

This routine does an element-by-element comparison, from the most significant

element (element 0) to the least significant element. If all other elements are
equal, the OID with the least number of elements is considered less.

Return Values

-1

The

OID q

is less than

OID p

.

0

The

OID q

is in

OID p

.

1

The

OID q

is greater than

OID p

.

eSNMP API Routines 5–47