lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Lwip SNMP support: adding LWIP_IPSTACK_MIB2 Compile-Time co


From: Yigal Hochberg
Subject: [lwip-users] Lwip SNMP support: adding LWIP_IPSTACK_MIB2 Compile-Time configuration
Date: Mon, 15 Feb 2010 15:07:45 -0500

Hello Simon,

Thank you for your response.

I would like to clarify the goal and purpose of my thoughts. I will be
happy to to make the code change in lwip if I can get a cvs permission
or if I can work with someone who can commit changes.

My suggestion is to separate between a specific SNMP-Agent and the
access to Ipstack MIB2 information maintained by the lwip Ipstack.

This is kind to separation and functional breakdown already exists
very nicely in the lwip implementation.

The suggestion: 

Adding Compile-Time configuration for the support Ipstack MIB2 access
functions and structures.

(1) In op.h 

Add Compile-Time configuration for Ipstack MIB2 access functions

Something like this:

example:

/**
 * LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP
 * transport.
 */
#ifndef LWIP_SNMP
#define LWIP_SNMP                       0
#endif

/**
 * \def LWIP_IPSTACK_MIB2==1: Compile-Time configuration to turn on
 * SNMP Ipstack MIB-2 Access functions (counters and internal tables)
 *
 * This Compile-Time configuration maybe independent of LWIP_SNMP
 * above.
 */
#ifndef LWIP_IPSTACK_MIB2
#define LWIP_IPSTACK_MIB2               0
#endif

(2) In all relevant Ipstack mib-2 were LWIP_SNMP is used
add 

#if defined(LWIP_SNMP) || defined(LWIP_IPSTACK_MIB2)
... some code..
#endif

example:

/**
 * Bring an interface up, available for processing
 * traffic.
 * 
 * @note: Enabling DHCP on a down interface will make it come
 * up once configured.
 * 
 * @see dhcp_start()
 */ 
void netif_set_up(struct netif *netif)
{
  if ( !(netif->flags & NETIF_FLAG_UP )) {
    netif->flags |= NETIF_FLAG_UP;
    
#if defined(LWIP_SNMP) || defined(LWIP_IPSTACK_MIB2)
    snmp_get_sysuptime(&netif->ts);
#endif /* LWIP_SNMP || LWIP_IPSTACK_MIB2 */



-- 
- Yigal

Yigal Hochberg wrote:

> > Unfortunately no response from from Christiaan Simons
> 
> I didn't hear (or see an email) from Christiaan for nearly 3 years
> now, he might well not be working at axon any more by now...
> 
> > I would appreciate if anyone can "connect" me to the SNMP of Lwip.
> 
> I'm not sure I understand you here...
> 
> I guess that your agent is not open source or for free. Personally,
> I'm against changing the lwIP code to adapt to 3rd party closed source
> software - if I understood you correctly, this is what you want. lwIP
> already has an snmp agent and if you'd like to improve it to support
> snmp v2(c) or v3, that's of course welcome!
> 
> Simon
> 




reply via email to

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