Open ZaneXo opened 4 years ago
How about creating multiple instances in different communities (but same agent address) and using them?
ro, err := snmpgo.NewSNMP(snmpgo.SNMPArguments{
Version: snmpgo.V2c,
Address: "192.168.1.1:161",
Community: "public",
})
...
rw, err := snmpgo.NewSNMP(snmpgo.SNMPArguments{
Version: snmpgo.V2c,
Address: "192.168.1.1:161",
Community: "private",
})
First,Thanks!But Sorry, there is a problem with my statement. What I want to say is that when I create a V2C server, I want the read-write community to be different. And when clinet comes to visit me, the community is different. For example,now I'm Snmp Server,When Client GetRequest will use the community is public, and SetRequest will use the community is private!
When I read and write nodes, I need to configure the read and write communities to different values, but in this package, only the read-write communities can be set to the same value. Is there a solution?