来自netsnmp_trap_api(3)
:
send_v2trap() uses the supplied list of variable bindings to form an
SNMPv2 trap, which is sent to SNMPv2-capable sinks on the configured
list. An equivalent INFORM is sent to the configuredq list of inform
sinks. Sinks that can only handle SNMPv1 traps are skipped.
这似乎表明相同的函数也应该能够发送 v3 陷阱(因为 v3 陷阱与 v2 陷阱相同)。
此外,查看代码(特别是agent/agent_trap.c
),确实可以看到您最初的猜测是正确的并且该send_v3trap()
函数存在。定义上方有一条评论,说:
Similar to send_v2trap(), with the added ability to specify a context. If
the last parameter is NULL, then this call is equivalent to send_v2trap().
希望这可以帮助。