lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5788] Make local SNMP ports configurable


From: Frédéric Bernon
Subject: [lwip-devel] [patch #5788] Make local SNMP ports configurable
Date: Wed, 07 Mar 2007 18:56:37 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2

Follow-up Comment #3, patch #5788 (project lwip):

I'm agree with Kieran: with your solution, you can only change SNMP ports at
build time. If you really want to do that, and you don't want to change each
time to snmp_msg.h, to can redefine them like this in snmp_msg.h:

#ifndef SNMP_IN_PORT
#define SNMP_IN_PORT   161
#endif

#ifndef SNMP_TRAP_PORT
#define SNMP_TRAP_PORT 162
#endif

All configurations options don't have to be in opt.h. Very specific options
can be "masked" if they stay in any other header file. But, an "expert" can
change them within its lwipopts.h (because he knows what he do). You just
have to be sure that all .c files using them included opt.h (directly or not)
before snmp_msg.h.

That what I have proposed for TCP_TMR_INTERVAL, TCP_FAST_INTERVAL, etc..
(only change in tcp.h, but not moved into opt.h), in "Tunning TCP KeepAlives
values" (but this solution doesn't seems to be good for Kieran).

But if you have to configure "on the field" differents ports for SNMP, the
solution will be to use a static variable for SNMP_IN_PORT in the msg_in.c,
and another one for SNMP_TRAP_PORT in msg_out.c. These variables have to be
initialized with default values, but you can to provide new functions to
change them (like snmp_set_sysdesr, snmp_set_syscontact, etc...).

Hoping help you...
 

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5788>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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