snmpUnregisterTrap (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

All NX devices

Firmware version:

1.50.00


This function will remove a trap registered with the snmpRegisterTrap function.

After a trap is removed, no new trap events will be added to the event buffer.

 

Input:

OID : STRING

The OID of the trap.

 

Returns: INT

1

- Success.

0

- This function is not supported.

-5

- The trap is not found.

-10

- Illegal OID.

-20

- Manager not running.

 

Declaration

FUNCTION snmpUnregisterTrap : INT;
VAR_INPUT
  OID : STRING;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc       : INT;
END_VAR;
...
// Remove listener for some trap OID.
rc := snmpUnregisterTrap(oid := "1.3.6.1.4.1.6101.1.8.8.2.6");
DebugFmt(message := "snmpUnregisterTrap (rc=\1)", v1 := rc);
...
BEGIN
  ...
END;
END_PROGRAM;