Configure the Maximum Message Size using SNMP Component
In SNMP, the maximum supported message size is dynamic. The default max message size is 16384 bytes, but you can manually adjust it using the MsgMaxSize configuration option. For instance, the following code snippet sets the maximum supported message size to 4096 bytes:
snmpmgr.Config("MsgMaxSize=4096");
snmpmgr.SendGetNextRequest();
The MsgMaxSize configuration option is present in the following components:
- SNMPAgent
- SNMPTCPAgent
- SNMPMgr
- SNMPTCPMgr
This is only applicable when SNMPVersion is set to 3.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@nsoftware.com.