Re: v1 trap + agent address
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
2008/6/18 mahesh anasuri <[email protected]>: > While generating V1 traps. If Agent runs on a box which has multiple > interfaces (ie. IP addresses). How to select active interface IP address > value in Trap (Agent Address) ? >From agent/agent_trap.c:netsnmp_send_traps(): /* * Ensure that the v1 trap PDU includes the local IP address */ pdu_in_addr_t = (in_addr_t *) template_v1pdu->agent_addr; *pdu_in_addr_t = get_myaddr(); The routine 'get_myaddr()' is defined in snmplib/system.c It's not the easiest code to follow, but it appears to look through the available interfaces, and return the first IP address that it finds. There are a couple of entries in the Patches tracker (#1916840 & #1926542) which might be of interest to you, as they would allow you to specify the agent address to use. Dave ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users