SNMP Trap

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

SNMP Trap

Trampas Stern
Does anyone have an example of how to setup and send an SNMP trap message? 

Thanks
Trampas

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: SNMP Trap

Mario Luzeiro
Hi Trampas,

I guess there is in one example code:
lwip/contrib/examples/snmp/snmp_example.c

they are using trap functions.

I didn't test it but I will need SNMP trap too, so let me know if you get it work ;)

Mario Luzeiro

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of Trampas Stern <[hidden email]>
Sent: 29 October 2019 17:51
To: Mailing list for lwIP users
Subject: [lwip-users] SNMP Trap

Does anyone have an example of how to setup and send an SNMP trap message?

Thanks
Trampas

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: SNMP Trap

Trampas Stern
The snmp_example.c I have does not seem to have trap functions:


void
snmp_example_init(void)
{
#if LWIP_SNMP
  lwip_privmib_init();
#if SNMP_LWIP_MIB2
#if SNMP_USE_NETCONN
  snmp_threadsync_init(&snmp_mib2_lwip_locks, snmp_mib2_lwip_synchronizer);
#endif /* SNMP_USE_NETCONN */
  snmp_mib2_set_syscontact_readonly((const u8_t*)"root"NULL);
  snmp_mib2_set_syslocation_readonly((const u8_t*)"lwIP development PC"NULL);
  snmp_mib2_set_sysdescr((const u8_t*)"simhost"NULL);
#endif /* SNMP_LWIP_MIB2 */

#if LWIP_SNMP_V3
  snmpv3_dummy_init();
#endif

  snmp_set_mibs(mibs, LWIP_ARRAYSIZE(mibs));
  snmp_init();
#endif /* LWIP_SNMP */
}


On Wed, Oct 30, 2019 at 5:09 AM Mário Luzeiro <[hidden email]> wrote:
Hi Trampas,

I guess there is in one example code:
lwip/contrib/examples/snmp/snmp_example.c

they are using trap functions.

I didn't test it but I will need SNMP trap too, so let me know if you get it work ;)

Mario Luzeiro

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of Trampas Stern <[hidden email]>
Sent: 29 October 2019 17:51
To: Mailing list for lwIP users
Subject: [lwip-users] SNMP Trap

Does anyone have an example of how to setup and send an SNMP trap message?

Thanks
Trampas

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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: SNMP Trap

Mario Luzeiro
Its on master branch ;)
http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/examples/snmp/snmp_example.c

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of Trampas Stern <[hidden email]>
Sent: 30 October 2019 10:19
To: Mailing list for lwIP users
Subject: Re: [lwip-users] SNMP Trap

The snmp_example.c I have does not seem to have trap functions:


void
snmp_example_init(void)
{
#if LWIP_SNMP
  lwip_privmib_init();
#if SNMP_LWIP_MIB2
#if SNMP_USE_NETCONN
  snmp_threadsync_init(&snmp_mib2_lwip_locks, snmp_mib2_lwip_synchronizer);
#endif /* SNMP_USE_NETCONN */
  snmp_mib2_set_syscontact_readonly((const u8_t*)"root", NULL);
  snmp_mib2_set_syslocation_readonly((const u8_t*)"lwIP development PC", NULL);
  snmp_mib2_set_sysdescr((const u8_t*)"simhost", NULL);
#endif /* SNMP_LWIP_MIB2 */

#if LWIP_SNMP_V3
  snmpv3_dummy_init();
#endif

  snmp_set_mibs(mibs, LWIP_ARRAYSIZE(mibs));
  snmp_init();
#endif /* LWIP_SNMP */
}


On Wed, Oct 30, 2019 at 5:09 AM Mário Luzeiro <[hidden email]<mailto:[hidden email]>> wrote:
Hi Trampas,

I guess there is in one example code:
lwip/contrib/examples/snmp/snmp_example.c

they are using trap functions.

I didn't test it but I will need SNMP trap too, so let me know if you get it work ;)

Mario Luzeiro

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]<mailto:[hidden email]>> on behalf of Trampas Stern <[hidden email]<mailto:[hidden email]>>
Sent: 29 October 2019 17:51
To: Mailing list for lwIP users
Subject: [lwip-users] SNMP Trap

Does anyone have an example of how to setup and send an SNMP trap message?

Thanks
Trampas

_______________________________________________
lwip-users mailing list
[hidden email]<mailto:[hidden email]>
https://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: SNMP Trap

Trampas Stern
Thanks!! 


On Wed, Oct 30, 2019 at 6:24 AM Mário Luzeiro <[hidden email]> wrote:
Its on master branch ;)
http://git.savannah.nongnu.org/cgit/lwip.git/tree/contrib/examples/snmp/snmp_example.c

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]> on behalf of Trampas Stern <[hidden email]>
Sent: 30 October 2019 10:19
To: Mailing list for lwIP users
Subject: Re: [lwip-users] SNMP Trap

The snmp_example.c I have does not seem to have trap functions:


void
snmp_example_init(void)
{
#if LWIP_SNMP
  lwip_privmib_init();
#if SNMP_LWIP_MIB2
#if SNMP_USE_NETCONN
  snmp_threadsync_init(&snmp_mib2_lwip_locks, snmp_mib2_lwip_synchronizer);
#endif /* SNMP_USE_NETCONN */
  snmp_mib2_set_syscontact_readonly((const u8_t*)"root", NULL);
  snmp_mib2_set_syslocation_readonly((const u8_t*)"lwIP development PC", NULL);
  snmp_mib2_set_sysdescr((const u8_t*)"simhost", NULL);
#endif /* SNMP_LWIP_MIB2 */

#if LWIP_SNMP_V3
  snmpv3_dummy_init();
#endif

  snmp_set_mibs(mibs, LWIP_ARRAYSIZE(mibs));
  snmp_init();
#endif /* LWIP_SNMP */
}


On Wed, Oct 30, 2019 at 5:09 AM Mário Luzeiro <[hidden email]<mailto:[hidden email]>> wrote:
Hi Trampas,

I guess there is in one example code:
lwip/contrib/examples/snmp/snmp_example.c

they are using trap functions.

I didn't test it but I will need SNMP trap too, so let me know if you get it work ;)

Mario Luzeiro

________________________________________
From: lwip-users <lwip-users-bounces+mrluzeiro=[hidden email]<mailto:[hidden email]>> on behalf of Trampas Stern <[hidden email]<mailto:[hidden email]>>
Sent: 29 October 2019 17:51
To: Mailing list for lwIP users
Subject: [lwip-users] SNMP Trap

Does anyone have an example of how to setup and send an SNMP trap message?

Thanks
Trampas

_______________________________________________
lwip-users mailing list
[hidden email]<mailto:[hidden email]>
https://lists.nongnu.org/mailman/listinfo/lwip-users

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

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