Matthias Dübon wrote:
I have seen the SNMP example in lwip-contrib. As far as I understand
there is only one community right now. I am wondering if it's a big
effort to add SNMP read, write communities to this SNMP stack.
Any hints/thoughts are very appreciated.

This shouldn't be too much of an effort. The only community for now is stored in 'snmp_publiccommunity'. For incoming messages, this is checked in snmp_pdu_header_check(). A bit below the check, you can find a 'switch(type)' that checks the incoming message type. I guess just adding a 2nd community to check + 'write allowed' and then checking this 'write allowed' in the SET case should be enough.

However, the 'snmp_publiccommunity' variable seems to be used for sending traps, too, so you might want to change snmp_send_trap() and/or snmp_trap_header_enc(), too.


Simon

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to