[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] SNMP read, write communities

From: address@hidden
Subject: Re: [lwip-users] SNMP read, write communities
Date: Tue, 10 Feb 2015 21:37:13 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]