45#define LOG_MODULE "SNMP [mib]"
46#define LOG_LEVEL LOG_LEVEL_SNMP
65 while(i < oid1->length && i < oid2->length) {
80 if(i < oid1->length &&
95 resource; resource = resource->
next) {
112 resource; resource = resource->
next) {
129 resource; resource = resource->
next) {
135 if(resource == NULL) {
141 if(LOG_DBG_ENABLED) {
145 LOG_DBG(
"Table after insert.\n");
147 resource; resource = resource->
next) {
151 while(i < resource->oid.length) {
152 LOG_DBG_(
"%lu", (
unsigned long)resource->
oid.
data[i]);
154 if(i < resource->oid.length) {
snmp_mib_resource_t * snmp_mib_find_next(snmp_oid_t *oid)
Finds the next MIB Resource after this OID.
snmp_mib_resource_t * snmp_mib_find(snmp_oid_t *oid)
Finds the MIB Resource for this OID.
void snmp_mib_init(void)
Initialize the MIB resources list.
void snmp_mib_add(snmp_mib_resource_t *new_resource)
Adds a resource into the linked list.
static void list_init(list_t list)
Initialize a list.
#define LIST(name)
Declare a linked list.
void list_add(list_t list, void *item)
Add an item at the end of a list.
void list_insert(list_t list, void *previtem, void *newitem)
Insert an item after a specified item on the list.
static void * list_head(const_list_t list)
Get a pointer to the first element of a list.
Linked list manipulation routines.
static int snmp_mib_cmp_oid(snmp_oid_t *oid1, snmp_oid_t *oid2)
Compares to oids.
SNMP Implementation of the MIB.
snmp_oid_t oid
A OID struct.
struct snmp_mib_resource_s * next
A pointer to the next element in the linked list.
uint8_t length
The OID length.
uint32_t data[16]
The OID.