Pass the port number to an extension command in snmpd.conf
Vere Chappell <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, I have snmpd listening on multiple ports, and I am using a pass_persist directive in the snmpd.conf file to handle requests for a certain subtree using a custom application. My application needs to know what port the request came in on. My snmpd.conf looks like this: agentaddress TCP:5200, TCP:5201, TCP:5202, TCP:5203 rocommunity public rwcommunity administrator pass_persist .1.3.6.1.4.1.1206 /usr/bin/custom_app 5200 What I want to do is pass the port number that the request came in on to custom_app as a parameter, instead of "5200" above. In other words, if the request came in on port 5200, invoke /usr/bin/custom_app 5200, but if it came in on 5202, invoke /usr/bin/custom_app 5202. I'm sure there must be a way to do this, I've spent hours searching the net but haven't found it. Thanks! Vere ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ 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