SNMP agent attached to SPI slave

Dependencies:   mbed

Committer:
lorcansmith
Date:
Mon Aug 13 15:07:40 2012 +0000
Revision:
0:2a53a4c3238c
Child:
2:25e12a7fe0aa
v1.1 release includes ioAlarm traps

Who changed what in which revision?

UserRevisionLine numberNew contents of line
lorcansmith 0:2a53a4c3238c 1 /*****************************************************************************
lorcansmith 0:2a53a4c3238c 2 * Copyright Field Electronics Ltd
lorcansmith 0:2a53a4c3238c 3 * File: snmp_structs.H
lorcansmith 0:2a53a4c3238c 4 * Reference: 3000-A3600-HDR-snmp_structs
lorcansmith 0:2a53a4c3238c 5 * Content: Header file for SNMP messages
lorcansmith 0:2a53a4c3238c 6 * Version: 0.2
lorcansmith 0:2a53a4c3238c 7 * System: mbed gnu compiler
lorcansmith 0:2a53a4c3238c 8 * Target Hardware: mbed LPC1768
lorcansmith 0:2a53a4c3238c 9 * Amendment Record:
lorcansmith 0:2a53a4c3238c 10 * Author: L. Smith for all versions unless otherwise specified
lorcansmith 0:2a53a4c3238c 11 * Initial release
lorcansmith 0:2a53a4c3238c 12 * 0.1 21/11/11: L. Smith
lorcansmith 0:2a53a4c3238c 13 Derived from snmp_structs.h by Christiaan Simons <christiaan.simons@axon.tv>
lorcansmith 0:2a53a4c3238c 14 * 0.2 03/05/12: L. Smith
lorcansmith 0:2a53a4c3238c 15 Publish syslocation_default[] for use in main.cpp
lorcansmith 0:2a53a4c3238c 16 *******************************************************************************/
lorcansmith 0:2a53a4c3238c 17 /**
lorcansmith 0:2a53a4c3238c 18 * @file
lorcansmith 0:2a53a4c3238c 19 * Generic MIB tree structures.
lorcansmith 0:2a53a4c3238c 20 *
lorcansmith 0:2a53a4c3238c 21 * @todo namespace prefixes
lorcansmith 0:2a53a4c3238c 22 */
lorcansmith 0:2a53a4c3238c 23
lorcansmith 0:2a53a4c3238c 24 /*
lorcansmith 0:2a53a4c3238c 25 * Copyright (c) 2006 Axon Digital Design B.V., The Netherlands.
lorcansmith 0:2a53a4c3238c 26 * All rights reserved.
lorcansmith 0:2a53a4c3238c 27 *
lorcansmith 0:2a53a4c3238c 28 * Redistribution and use in source and binary forms, with or without modification,
lorcansmith 0:2a53a4c3238c 29 * are permitted provided that the following conditions are met:
lorcansmith 0:2a53a4c3238c 30 *
lorcansmith 0:2a53a4c3238c 31 * 1. Redistributions of source code must retain the above copyright notice,
lorcansmith 0:2a53a4c3238c 32 * this list of conditions and the following disclaimer.
lorcansmith 0:2a53a4c3238c 33 * 2. Redistributions in binary form must reproduce the above copyright notice,
lorcansmith 0:2a53a4c3238c 34 * this list of conditions and the following disclaimer in the documentation
lorcansmith 0:2a53a4c3238c 35 * and/or other materials provided with the distribution.
lorcansmith 0:2a53a4c3238c 36 * 3. The name of the author may not be used to endorse or promote products
lorcansmith 0:2a53a4c3238c 37 * derived from this software without specific prior written permission.
lorcansmith 0:2a53a4c3238c 38 *
lorcansmith 0:2a53a4c3238c 39 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
lorcansmith 0:2a53a4c3238c 40 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
lorcansmith 0:2a53a4c3238c 41 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
lorcansmith 0:2a53a4c3238c 42 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
lorcansmith 0:2a53a4c3238c 43 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
lorcansmith 0:2a53a4c3238c 44 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
lorcansmith 0:2a53a4c3238c 45 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
lorcansmith 0:2a53a4c3238c 46 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
lorcansmith 0:2a53a4c3238c 47 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
lorcansmith 0:2a53a4c3238c 48 * OF SUCH DAMAGE.
lorcansmith 0:2a53a4c3238c 49 *
lorcansmith 0:2a53a4c3238c 50 * Author: Christiaan Simons <christiaan.simons@axon.tv>
lorcansmith 0:2a53a4c3238c 51 */
lorcansmith 0:2a53a4c3238c 52
lorcansmith 0:2a53a4c3238c 53 #ifndef __LWIP_SNMP_STRUCTS_H__
lorcansmith 0:2a53a4c3238c 54 #define __LWIP_SNMP_STRUCTS_H__
lorcansmith 0:2a53a4c3238c 55
lorcansmith 0:2a53a4c3238c 56 #include "lwip/opt.h"
lorcansmith 0:2a53a4c3238c 57
lorcansmith 0:2a53a4c3238c 58 #if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
lorcansmith 0:2a53a4c3238c 59
lorcansmith 0:2a53a4c3238c 60 #include "lwip/snmp.h"
lorcansmith 0:2a53a4c3238c 61
lorcansmith 0:2a53a4c3238c 62 #if SNMP_PRIVATE_MIB
lorcansmith 0:2a53a4c3238c 63 /* When using a private MIB, you have to create a file 'private_mib.h' that contains
lorcansmith 0:2a53a4c3238c 64 * a 'struct mib_array_node mib_private' which contains your MIB. */
lorcansmith 0:2a53a4c3238c 65 #include "private_mib.h"
lorcansmith 0:2a53a4c3238c 66 #endif
lorcansmith 0:2a53a4c3238c 67
lorcansmith 0:2a53a4c3238c 68 #ifdef __cplusplus
lorcansmith 0:2a53a4c3238c 69 extern "C" {
lorcansmith 0:2a53a4c3238c 70 #endif
lorcansmith 0:2a53a4c3238c 71
lorcansmith 0:2a53a4c3238c 72 /* MIB object instance */
lorcansmith 0:2a53a4c3238c 73 #define MIB_OBJECT_NONE 0
lorcansmith 0:2a53a4c3238c 74 #define MIB_OBJECT_SCALAR 1
lorcansmith 0:2a53a4c3238c 75 #define MIB_OBJECT_TAB 2
lorcansmith 0:2a53a4c3238c 76
lorcansmith 0:2a53a4c3238c 77 /* MIB access types */
lorcansmith 0:2a53a4c3238c 78 #define MIB_ACCESS_READ 1
lorcansmith 0:2a53a4c3238c 79 #define MIB_ACCESS_WRITE 2
lorcansmith 0:2a53a4c3238c 80
lorcansmith 0:2a53a4c3238c 81 /* MIB object access */
lorcansmith 0:2a53a4c3238c 82 #define MIB_OBJECT_READ_ONLY MIB_ACCESS_READ
lorcansmith 0:2a53a4c3238c 83 #define MIB_OBJECT_READ_WRITE (MIB_ACCESS_READ | MIB_ACCESS_WRITE)
lorcansmith 0:2a53a4c3238c 84 #define MIB_OBJECT_WRITE_ONLY MIB_ACCESS_WRITE
lorcansmith 0:2a53a4c3238c 85 #define MIB_OBJECT_NOT_ACCESSIBLE 0
lorcansmith 0:2a53a4c3238c 86
lorcansmith 0:2a53a4c3238c 87 /** object definition returned by (get_object_def)() */
lorcansmith 0:2a53a4c3238c 88 struct obj_def
lorcansmith 0:2a53a4c3238c 89 {
lorcansmith 0:2a53a4c3238c 90 /* MIB_OBJECT_NONE (0), MIB_OBJECT_SCALAR (1), MIB_OBJECT_TAB (2) */
lorcansmith 0:2a53a4c3238c 91 u8_t instance;
lorcansmith 0:2a53a4c3238c 92 /* 0 read-only, 1 read-write, 2 write-only, 3 not-accessible */
lorcansmith 0:2a53a4c3238c 93 u8_t access;
lorcansmith 0:2a53a4c3238c 94 /* ASN type for this object */
lorcansmith 0:2a53a4c3238c 95 u8_t asn_type;
lorcansmith 0:2a53a4c3238c 96 /* value length (host length) */
lorcansmith 0:2a53a4c3238c 97 u16_t v_len;
lorcansmith 0:2a53a4c3238c 98 /* length of instance part of supplied object identifier */
lorcansmith 0:2a53a4c3238c 99 u8_t id_inst_len;
lorcansmith 0:2a53a4c3238c 100 /* instance part of supplied object identifier */
lorcansmith 0:2a53a4c3238c 101 s32_t *id_inst_ptr;
lorcansmith 0:2a53a4c3238c 102 };
lorcansmith 0:2a53a4c3238c 103
lorcansmith 0:2a53a4c3238c 104 struct snmp_name_ptr
lorcansmith 0:2a53a4c3238c 105 {
lorcansmith 0:2a53a4c3238c 106 u8_t ident_len;
lorcansmith 0:2a53a4c3238c 107 s32_t *ident;
lorcansmith 0:2a53a4c3238c 108 };
lorcansmith 0:2a53a4c3238c 109
lorcansmith 0:2a53a4c3238c 110 /** MIB const scalar (.0) node */
lorcansmith 0:2a53a4c3238c 111 #define MIB_NODE_SC 0x01
lorcansmith 0:2a53a4c3238c 112 /** MIB const array node */
lorcansmith 0:2a53a4c3238c 113 #define MIB_NODE_AR 0x02
lorcansmith 0:2a53a4c3238c 114 /** MIB array node (mem_malloced from RAM) */
lorcansmith 0:2a53a4c3238c 115 #define MIB_NODE_RA 0x03
lorcansmith 0:2a53a4c3238c 116 /** MIB list root node (mem_malloced from RAM) */
lorcansmith 0:2a53a4c3238c 117 #define MIB_NODE_LR 0x04
lorcansmith 0:2a53a4c3238c 118 /** MIB node for external objects */
lorcansmith 0:2a53a4c3238c 119 #define MIB_NODE_EX 0x05
lorcansmith 0:2a53a4c3238c 120
lorcansmith 0:2a53a4c3238c 121 /** node "base class" layout, the mandatory fields for a node */
lorcansmith 0:2a53a4c3238c 122 struct mib_node
lorcansmith 0:2a53a4c3238c 123 {
lorcansmith 0:2a53a4c3238c 124 /** returns struct obj_def for the given object identifier */
lorcansmith 0:2a53a4c3238c 125 void (*get_object_def)(u8_t ident_len, s32_t *ident, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 126 /** returns object value for the given object identifier,
lorcansmith 0:2a53a4c3238c 127 @note the caller must allocate at least len bytes for the value */
lorcansmith 0:2a53a4c3238c 128 void (*get_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 129 /** tests length and/or range BEFORE setting */
lorcansmith 0:2a53a4c3238c 130 u8_t (*set_test)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 131 /** sets object value, only to be called when set_test() */
lorcansmith 0:2a53a4c3238c 132 void (*set_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 133 /** One out of MIB_NODE_AR, MIB_NODE_LR or MIB_NODE_EX */
lorcansmith 0:2a53a4c3238c 134 u8_t node_type;
lorcansmith 0:2a53a4c3238c 135 /* array or max list length */
lorcansmith 0:2a53a4c3238c 136 u16_t maxlength;
lorcansmith 0:2a53a4c3238c 137 };
lorcansmith 0:2a53a4c3238c 138
lorcansmith 0:2a53a4c3238c 139 /** derived node for scalars .0 index */
lorcansmith 0:2a53a4c3238c 140 typedef struct mib_node mib_scalar_node;
lorcansmith 0:2a53a4c3238c 141
lorcansmith 0:2a53a4c3238c 142 /** derived node, points to a fixed size const array
lorcansmith 0:2a53a4c3238c 143 of sub-identifiers plus a 'child' pointer */
lorcansmith 0:2a53a4c3238c 144 struct mib_array_node
lorcansmith 0:2a53a4c3238c 145 {
lorcansmith 0:2a53a4c3238c 146 /* inherited "base class" members */
lorcansmith 0:2a53a4c3238c 147 void (*get_object_def)(u8_t ident_len, s32_t *ident, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 148 void (*get_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 149 u8_t (*set_test)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 150 void (*set_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 151
lorcansmith 0:2a53a4c3238c 152 u8_t node_type;
lorcansmith 0:2a53a4c3238c 153 u16_t maxlength;
lorcansmith 0:2a53a4c3238c 154
lorcansmith 0:2a53a4c3238c 155 /* additional struct members */
lorcansmith 0:2a53a4c3238c 156 const s32_t *objid;
lorcansmith 0:2a53a4c3238c 157 struct mib_node* const *nptr;
lorcansmith 0:2a53a4c3238c 158 };
lorcansmith 0:2a53a4c3238c 159
lorcansmith 0:2a53a4c3238c 160 /** derived node, points to a fixed size mem_malloced array
lorcansmith 0:2a53a4c3238c 161 of sub-identifiers plus a 'child' pointer */
lorcansmith 0:2a53a4c3238c 162 struct mib_ram_array_node
lorcansmith 0:2a53a4c3238c 163 {
lorcansmith 0:2a53a4c3238c 164 /* inherited "base class" members */
lorcansmith 0:2a53a4c3238c 165 void (*get_object_def)(u8_t ident_len, s32_t *ident, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 166 void (*get_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 167 u8_t (*set_test)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 168 void (*set_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 169
lorcansmith 0:2a53a4c3238c 170 u8_t node_type;
lorcansmith 0:2a53a4c3238c 171 u16_t maxlength;
lorcansmith 0:2a53a4c3238c 172
lorcansmith 0:2a53a4c3238c 173 /* aditional struct members */
lorcansmith 0:2a53a4c3238c 174 s32_t *objid;
lorcansmith 0:2a53a4c3238c 175 struct mib_node **nptr;
lorcansmith 0:2a53a4c3238c 176 };
lorcansmith 0:2a53a4c3238c 177
lorcansmith 0:2a53a4c3238c 178 struct mib_list_node
lorcansmith 0:2a53a4c3238c 179 {
lorcansmith 0:2a53a4c3238c 180 struct mib_list_node *prev;
lorcansmith 0:2a53a4c3238c 181 struct mib_list_node *next;
lorcansmith 0:2a53a4c3238c 182 s32_t objid;
lorcansmith 0:2a53a4c3238c 183 struct mib_node *nptr;
lorcansmith 0:2a53a4c3238c 184 };
lorcansmith 0:2a53a4c3238c 185
lorcansmith 0:2a53a4c3238c 186 /** derived node, points to a doubly linked list
lorcansmith 0:2a53a4c3238c 187 of sub-identifiers plus a 'child' pointer */
lorcansmith 0:2a53a4c3238c 188 struct mib_list_rootnode
lorcansmith 0:2a53a4c3238c 189 {
lorcansmith 0:2a53a4c3238c 190 /* inherited "base class" members */
lorcansmith 0:2a53a4c3238c 191 void (*get_object_def)(u8_t ident_len, s32_t *ident, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 192 void (*get_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 193 u8_t (*set_test)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 194 void (*set_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 195
lorcansmith 0:2a53a4c3238c 196 u8_t node_type;
lorcansmith 0:2a53a4c3238c 197 u16_t maxlength;
lorcansmith 0:2a53a4c3238c 198
lorcansmith 0:2a53a4c3238c 199 /* additional struct members */
lorcansmith 0:2a53a4c3238c 200 struct mib_list_node *head;
lorcansmith 0:2a53a4c3238c 201 struct mib_list_node *tail;
lorcansmith 0:2a53a4c3238c 202 /* counts list nodes in list */
lorcansmith 0:2a53a4c3238c 203 u16_t count;
lorcansmith 0:2a53a4c3238c 204 };
lorcansmith 0:2a53a4c3238c 205
lorcansmith 0:2a53a4c3238c 206 /** derived node, has access functions for mib object in external memory or device
lorcansmith 0:2a53a4c3238c 207 using 'tree_level' and 'idx', with a range 0 .. (level_length() - 1) */
lorcansmith 0:2a53a4c3238c 208 struct mib_external_node
lorcansmith 0:2a53a4c3238c 209 {
lorcansmith 0:2a53a4c3238c 210 /* inherited "base class" members */
lorcansmith 0:2a53a4c3238c 211 void (*get_object_def)(u8_t ident_len, s32_t *ident, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 212 void (*get_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 213 u8_t (*set_test)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 214 void (*set_value)(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 215
lorcansmith 0:2a53a4c3238c 216 u8_t node_type;
lorcansmith 0:2a53a4c3238c 217 u16_t maxlength;
lorcansmith 0:2a53a4c3238c 218
lorcansmith 0:2a53a4c3238c 219 /* additional struct members */
lorcansmith 0:2a53a4c3238c 220 /** points to an external (in memory) record of some sort of addressing
lorcansmith 0:2a53a4c3238c 221 information, passed to and interpreted by the funtions below */
lorcansmith 0:2a53a4c3238c 222 void* addr_inf;
lorcansmith 0:2a53a4c3238c 223 /** tree levels under this node */
lorcansmith 0:2a53a4c3238c 224 u8_t tree_levels;
lorcansmith 0:2a53a4c3238c 225 /** number of objects at this level */
lorcansmith 0:2a53a4c3238c 226 u16_t (*level_length)(void* addr_inf, u8_t level);
lorcansmith 0:2a53a4c3238c 227 /** compares object sub identifier with external id
lorcansmith 0:2a53a4c3238c 228 return zero when equal, nonzero when unequal */
lorcansmith 0:2a53a4c3238c 229 s32_t (*ident_cmp)(void* addr_inf, u8_t level, u16_t idx, s32_t sub_id);
lorcansmith 0:2a53a4c3238c 230 void (*get_objid)(void* addr_inf, u8_t level, u16_t idx, s32_t *sub_id);
lorcansmith 0:2a53a4c3238c 231
lorcansmith 0:2a53a4c3238c 232 /** async Questions */
lorcansmith 0:2a53a4c3238c 233 void (*get_object_def_q)(void* addr_inf, u8_t rid, u8_t ident_len, s32_t *ident);
lorcansmith 0:2a53a4c3238c 234 void (*get_value_q)(u8_t rid, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 235 void (*set_test_q)(u8_t rid, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 236 void (*set_value_q)(u8_t rid, struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 237 /** async Answers */
lorcansmith 0:2a53a4c3238c 238 void (*get_object_def_a)(u8_t rid, u8_t ident_len, s32_t *ident, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 239 void (*get_value_a)(u8_t rid, struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 240 u8_t (*set_test_a)(u8_t rid, struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 241 void (*set_value_a)(u8_t rid, struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 242 /** async Panic Close (agent returns error reply,
lorcansmith 0:2a53a4c3238c 243 e.g. used for external transaction cleanup) */
lorcansmith 0:2a53a4c3238c 244 void (*get_object_def_pc)(u8_t rid, u8_t ident_len, s32_t *ident);
lorcansmith 0:2a53a4c3238c 245 void (*get_value_pc)(u8_t rid, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 246 void (*set_test_pc)(u8_t rid, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 247 void (*set_value_pc)(u8_t rid, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 248 };
lorcansmith 0:2a53a4c3238c 249
lorcansmith 0:2a53a4c3238c 250 extern const u8_t syslocation_default[]; // v0.2 publish for use in main.cpp
lorcansmith 0:2a53a4c3238c 251
lorcansmith 0:2a53a4c3238c 252 /** export MIB tree from mib2.c */
lorcansmith 0:2a53a4c3238c 253 extern const struct mib_array_node internet;
lorcansmith 0:2a53a4c3238c 254
lorcansmith 0:2a53a4c3238c 255 /** dummy function pointers for non-leaf MIB nodes from mib2.c */
lorcansmith 0:2a53a4c3238c 256 void noleafs_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
lorcansmith 0:2a53a4c3238c 257 void noleafs_get_value(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 258 u8_t noleafs_set_test(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 259 void noleafs_set_value(struct obj_def *od, u16_t len, void *value);
lorcansmith 0:2a53a4c3238c 260
lorcansmith 0:2a53a4c3238c 261 void snmp_oidtoip(s32_t *ident, ip_addr_t *ip);
lorcansmith 0:2a53a4c3238c 262 void snmp_iptooid(ip_addr_t *ip, s32_t *ident);
lorcansmith 0:2a53a4c3238c 263 void snmp_ifindextonetif(s32_t ifindex, struct netif **netif);
lorcansmith 0:2a53a4c3238c 264 void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx);
lorcansmith 0:2a53a4c3238c 265
lorcansmith 0:2a53a4c3238c 266 struct mib_list_node* snmp_mib_ln_alloc(s32_t id);
lorcansmith 0:2a53a4c3238c 267 void snmp_mib_ln_free(struct mib_list_node *ln);
lorcansmith 0:2a53a4c3238c 268 struct mib_list_rootnode* snmp_mib_lrn_alloc(void);
lorcansmith 0:2a53a4c3238c 269 void snmp_mib_lrn_free(struct mib_list_rootnode *lrn);
lorcansmith 0:2a53a4c3238c 270
lorcansmith 0:2a53a4c3238c 271 s8_t snmp_mib_node_insert(struct mib_list_rootnode *rn, s32_t objid, struct mib_list_node **insn);
lorcansmith 0:2a53a4c3238c 272 s8_t snmp_mib_node_find(struct mib_list_rootnode *rn, s32_t objid, struct mib_list_node **fn);
lorcansmith 0:2a53a4c3238c 273 struct mib_list_rootnode *snmp_mib_node_delete(struct mib_list_rootnode *rn, struct mib_list_node *n);
lorcansmith 0:2a53a4c3238c 274
lorcansmith 0:2a53a4c3238c 275 struct mib_node* snmp_search_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_name_ptr *np);
lorcansmith 0:2a53a4c3238c 276 struct mib_node* snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret);
lorcansmith 0:2a53a4c3238c 277 u8_t snmp_iso_prefix_tst(u8_t ident_len, s32_t *ident);
lorcansmith 0:2a53a4c3238c 278 u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret);
lorcansmith 0:2a53a4c3238c 279
lorcansmith 0:2a53a4c3238c 280 #ifdef __cplusplus
lorcansmith 0:2a53a4c3238c 281 }
lorcansmith 0:2a53a4c3238c 282 #endif
lorcansmith 0:2a53a4c3238c 283
lorcansmith 0:2a53a4c3238c 284 #endif /* LWIP_SNMP */
lorcansmith 0:2a53a4c3238c 285
lorcansmith 0:2a53a4c3238c 286 #endif /* __LWIP_SNMP_STRUCTS_H__ */