snmpStartListen (Function) |
Top Previous Next |
This function will start a listening operation for incoming traps on the specified port number.
To receive traps using SNMPv3, the security must be configured first. When using the USM method, the list of users must be configured on all connecting devices (Using the snmpUserSet and snmpUserGet functions). When using the TSM method, the list of certificates must be configured on all connecting devices (Using the snmpCertSet and snmpCertGet functions). If a managed device cannot be identified by one of these lists, then traps will not be received.
Input: Port : DINT [1..65535] (default 162) The port to listen on.
TCP : BOOL (default FALSE) Set to TRUE if a TCP connection is required, otherwise an UDP connection is used. The protocol uses UDP connections as default.
Version : SINT (default _SNMP_VER_2C) The SNMP version to use. (obsoleted from firmware version 1.52.00, as all versions are accepted)
Community : STRING The community string. Used in Version 1 and 2c.
Security : SINT (default _SNMP_SEC_USM) The type of security to use. Used in version 3.
Output: Handle : SYSHANDLE The handle to the connection.
Returns: INT
Declaration FUNCTION snmpStartListen : INT;
Example: Please see the example at Examples - SNMP Mananger |