mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
Renamed the private mib node from 'private' to 'mib_private' to *not* use reserved C/C++ keywords, added comments, added init-define for private MIB
This commit is contained in:
parent
9dd6c28523
commit
ef31aa12e2
@ -731,8 +731,10 @@ const struct mib_array_node mgmt = {
|
||||
|
||||
/* internet .1.3.6.1 */
|
||||
#if SNMP_PRIVATE_MIB
|
||||
/* When using a private MIB, you have to create a file 'private_mib.h' that contains
|
||||
* a 'struct mib_array_node mib_private' which contains your MIB. */
|
||||
s32_t internet_ids[2] = { 2, 4 };
|
||||
struct mib_node* const internet_nodes[2] = { (struct mib_node* const)&mgmt, (struct mib_node* const)&private };
|
||||
struct mib_node* const internet_nodes[2] = { (struct mib_node* const)&mgmt, (struct mib_node* const)&mib_private };
|
||||
const struct mib_array_node internet = {
|
||||
&noleafs_get_object_def,
|
||||
&noleafs_get_value,
|
||||
|
@ -88,6 +88,15 @@ snmp_init(void)
|
||||
msg_ps++;
|
||||
}
|
||||
trap_msg.pcb = snmp1_pcb;
|
||||
|
||||
#ifdef SNMP_PRIVATE_MIB_INIT
|
||||
/* If defined, rhis must be a function-like define to initialize the
|
||||
* private MIB after the stack has been initialized.
|
||||
* The private MIB can also be initialized in tcpip_callback (or after
|
||||
* the stack is initialized), this define is only for convenience. */
|
||||
SNMP_PRIVATE_MIB_INIT();
|
||||
#endif /* SNMP_PRIVATE_MIB_INIT */
|
||||
|
||||
/* The coldstart trap will only be output
|
||||
if our outgoing interface is up & configured */
|
||||
snmp_coldstart_trap();
|
||||
|
@ -627,6 +627,8 @@
|
||||
|
||||
/**
|
||||
* SNMP_PRIVATE_MIB:
|
||||
* When using a private MIB, you have to create a file 'private_mib.h' that contains
|
||||
* a 'struct mib_array_node mib_private' which contains your MIB.
|
||||
*/
|
||||
#ifndef SNMP_PRIVATE_MIB
|
||||
#define SNMP_PRIVATE_MIB 0
|
||||
|
@ -44,6 +44,8 @@
|
||||
#if LWIP_SNMP
|
||||
|
||||
#if SNMP_PRIVATE_MIB
|
||||
/* When using a private MIB, you have to create a file 'private_mib.h' that contains
|
||||
* a 'struct mib_array_node mib_private' which contains your MIB. */
|
||||
#include "private_mib.h"
|
||||
#endif
|
||||
|
||||
|
@ -44,6 +44,8 @@
|
||||
#include "lwip/snmp.h"
|
||||
|
||||
#if SNMP_PRIVATE_MIB
|
||||
/* When using a private MIB, you have to create a file 'private_mib.h' that contains
|
||||
* a 'struct mib_array_node mib_private' which contains your MIB. */
|
||||
#include "private_mib.h"
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user