SendSecureTrap Method

Sends an authenticated and/or encrypted SNMPv3 trap.

Syntax

int SendSecureTrap(const QString& qsRemoteHost, const QString& qsTrapOID, const QString& qsUser, int iAuthenticationProtocol, const QString& qsAuthenticationPassword, int iEncryptionAlgorithm, const QString& qsEncryptionPassword);

Remarks

Similar to the SendTrap method except that User, AuthenticationPassword, and Authentication Protocol are used to authenticate the trap. EncryptionPassword (if not empty) and EncryptionAlgorithm are used to encrypt the message.

The user and password arguments used to send the trap will be added to the internal user cache. If the user is already in the cache, its passwords will be updated with those supplied.

Valid Authentication Protocols are:

HMAC-MD5-96 (1)Message-Digest algorithm 5.
HMAC-SHA-96 (2)Secure Hash Algorithm.
HMAC-192-SHA-256 (3)Secure Hash Algorithm.
HMAC-384-SHA-512 (4)Secure Hash Algorithm.

Valid Encryption Algorithms are:

DES (1)Data Encryption Standard.
AES (2)Advanced Encryption Standard with key length of 128.
3DES (3)Triple Data Encryption Standard.
AES192 (4)Advanced Encryption Standard with key length of 192.
AES256 (5)Advanced Encryption Standard with key length of 256.

Error Handling

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks SNMP 2020 Qt Edition - Version 20.0 [Build 8202]