Difference between revisions of "Template:FAQ:Coding 23"

From Net-SNMP Wiki
Jump to: navigation, search
 
m (5.4 release synchronisation)
 
Line 1: Line 1:
 +
<!-- NB:
 +
  There is a mismatch between the template numbering
 +
  for this entry, and the FAQ entries that refer to it.
 +
  This follows a review of the entries in the
 +
  Coding section.
 +
-->
 
The two versions of the trap API calls are concerned with how
 
The two versions of the trap API calls are concerned with how
 
the trap is represented when it is passed '''in''' to the API, not
 
the trap is represented when it is passed '''in''' to the API, not

Latest revision as of 14:26, 29 December 2006

The two versions of the trap API calls are concerned with how the trap is represented when it is passed in to the API, not the version of the trap PDU that will actually be generated by the agent. That is determined by the configuration token used to set up the trap destination.

Remember that in general, all traps are sent to all destinations. This means that a trap specified using the SNMPv1 trap syntax needs to be converted to the SNMPv2 format before it can be sent to an SNMPv2 (or SNMPv3) destination. Similarly, a trap specified using the SNMPv2 syntax needs to be converted to the SNMPv1 format before it can be sent to an SNMPv1 sink.

Essentially, the API call to use depends on what you asking for, which is not necessarily what the recipients will actually get! See 'snmp_trap_api(3)' for a fuller explanation.