SnmpUtilOctetsNCmp

[This is preliminary documentation and subject to change.]

The SnmpUtilOctetsNCmp function compares two octet strings. The function compares the subidentifiers in the strings until it reaches the number of subidentifiers specified by the nChars parameter. SnmpUtilOctetsNCmp is an element of the SNMP Utility API.

SNMPAPI SnmpUtilOctetsNCmp(
  AsnOctetString *pOctets1,  // first octet string
  AsnOctetString *pOctets2,  // second octet string
  UINT nChars                // maximum length to compare
);
 

Parameters

pOctets1
Pointer to an AsnOctetString structure to compare.
pOctets2
Pointer to a second AsnOctetString structure to compare.
nChars
Specifies the number of subidentifiers to compare.

Return Values

The function returns a value greater than zero if pOctets1 is greater than pOctets2, zero if pOctets1 equals pOctets2, and less than zero if pOctets1 is less than pOctets2.

Remarks

The SnmpUtilOctetsCmp function calls the SnmpUtilOctetsNCmp function.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in snmp.h.
  Import Library: Use snmpapi.lib.

See Also

Simple Network Management Protocol (SNMP) Overview, SNMP Functions, AsnOctetString, SnmpUtilOctetsCmp