[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c
From: |
Frédéric Bernon |
Subject: |
[lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c |
Date: |
Tue, 06 Mar 2007 19:50:14 +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 |
URL:
<http://savannah.nongnu.org/patch/?5785>
Summary: Integrate SNMP initialization in tcpip.c
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: fbernon
Submitted on: mardi 06.03.2007 à 20:50
Category: None
Priority: 5 - Normal
Status: In Progress
Privacy: Public
Assigned to: fbernon
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
With the very useful Christiaan Simons's SNMP Agent, we can add this protocol
to our products.
I propose to help SNMP integration for new users like this :
#if LWIP_SNMP
static void
snmp_timer(void *arg)
{ snmp_inc_sysuptime();
sys_timeout( SNMP_TMR_INTERVAL, snmp_timer, arg);
}
#endif /* LWIP_SNMP */
static void
tcpip_thread(void *arg)
{
struct tcpip_msg *msg;
#if LWIP_SNMP
snmp_init();
#endif /* LWIP_SNMP */
#if IP_REASSEMBLY
sys_timeout( IP_TMR_INTERVAL, ip_timer, NULL);
#endif
sys_timeout( ARP_TMR_INTERVAL, arp_timer, NULL);
#if LWIP_SNMP
sys_timeout( SNMP_TMR_INTERVAL, snmp_timer, NULL);
#endif // LWIP_SNMP
//...
So, before call tcpip_init(), new users just have to call :
#if LWIP_SNMP
snmp_set_sysdesr(sysdescr_default,&sysdescr_len_default);
snmp_set_syscontact(syscontact_default,&syscontact_len_default);
snmp_set_sysname(sysname_default,&sysname_len_default);
snmp_set_syslocation(syslocation_default,&syslocation_len_default);
//etc...
#endif
More, why don't integrate in tcpip.c a new "tool" function (with a name like
"lwip_init" or other) which do :
void lwip_init()
{ #if LWIP_STATS
stats_init ();
#endif /* STATS */
#if (NO_SYS == 0)
sys_init ();
#endif /* (NO_SYS == 0) */
mem_init ();
memp_init ();
pbuf_init ();
etharp_init ();
netif_init ();
lwip_socket_init();
}
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?5785>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c,
Frédéric Bernon <=
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Simon Goldschmidt, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Kieran Mansley, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Kieran Mansley, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/07
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/11
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Simon Goldschmidt, 2007/03/11
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Frédéric Bernon, 2007/03/11
- [lwip-devel] [patch #5785] Integrate SNMP initialization in tcpip.c, Simon Goldschmidt, 2007/03/11