Modified version of NetServices. Fixes an issue where connections failed should the HTTP response status line be received in a packet on its own prior to any further headers. Changes are made to the HTTPClient.cpp file's readHeaders method.

Committer:
andrewbonney
Date:
Fri Apr 08 14:39:41 2011 +0000
Revision:
0:ec559500a63f

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewbonney 0:ec559500a63f 1 /**
andrewbonney 0:ec559500a63f 2 * @file
andrewbonney 0:ec559500a63f 3 * SNMP Agent message handling structures.
andrewbonney 0:ec559500a63f 4 */
andrewbonney 0:ec559500a63f 5
andrewbonney 0:ec559500a63f 6 /*
andrewbonney 0:ec559500a63f 7 * Copyright (c) 2006 Axon Digital Design B.V., The Netherlands.
andrewbonney 0:ec559500a63f 8 * All rights reserved.
andrewbonney 0:ec559500a63f 9 *
andrewbonney 0:ec559500a63f 10 * Redistribution and use in source and binary forms, with or without modification,
andrewbonney 0:ec559500a63f 11 * are permitted provided that the following conditions are met:
andrewbonney 0:ec559500a63f 12 *
andrewbonney 0:ec559500a63f 13 * 1. Redistributions of source code must retain the above copyright notice,
andrewbonney 0:ec559500a63f 14 * this list of conditions and the following disclaimer.
andrewbonney 0:ec559500a63f 15 * 2. Redistributions in binary form must reproduce the above copyright notice,
andrewbonney 0:ec559500a63f 16 * this list of conditions and the following disclaimer in the documentation
andrewbonney 0:ec559500a63f 17 * and/or other materials provided with the distribution.
andrewbonney 0:ec559500a63f 18 * 3. The name of the author may not be used to endorse or promote products
andrewbonney 0:ec559500a63f 19 * derived from this software without specific prior written permission.
andrewbonney 0:ec559500a63f 20 *
andrewbonney 0:ec559500a63f 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
andrewbonney 0:ec559500a63f 22 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
andrewbonney 0:ec559500a63f 23 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
andrewbonney 0:ec559500a63f 24 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
andrewbonney 0:ec559500a63f 25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
andrewbonney 0:ec559500a63f 26 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
andrewbonney 0:ec559500a63f 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
andrewbonney 0:ec559500a63f 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
andrewbonney 0:ec559500a63f 29 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
andrewbonney 0:ec559500a63f 30 * OF SUCH DAMAGE.
andrewbonney 0:ec559500a63f 31 *
andrewbonney 0:ec559500a63f 32 * Author: Christiaan Simons <christiaan.simons@axon.tv>
andrewbonney 0:ec559500a63f 33 */
andrewbonney 0:ec559500a63f 34
andrewbonney 0:ec559500a63f 35 #ifndef __LWIP_SNMP_MSG_H__
andrewbonney 0:ec559500a63f 36 #define __LWIP_SNMP_MSG_H__
andrewbonney 0:ec559500a63f 37
andrewbonney 0:ec559500a63f 38 #include "lwip/opt.h"
andrewbonney 0:ec559500a63f 39 #include "lwip/snmp.h"
andrewbonney 0:ec559500a63f 40 #include "lwip/snmp_structs.h"
andrewbonney 0:ec559500a63f 41 #include "lwip/ip_addr.h"
andrewbonney 0:ec559500a63f 42 #include "lwip/err.h"
andrewbonney 0:ec559500a63f 43
andrewbonney 0:ec559500a63f 44 #if LWIP_SNMP
andrewbonney 0:ec559500a63f 45
andrewbonney 0:ec559500a63f 46 #if SNMP_PRIVATE_MIB
andrewbonney 0:ec559500a63f 47 /* When using a private MIB, you have to create a file 'private_mib.h' that contains
andrewbonney 0:ec559500a63f 48 * a 'struct mib_array_node mib_private' which contains your MIB. */
andrewbonney 0:ec559500a63f 49 #include "private_mib.h"
andrewbonney 0:ec559500a63f 50 #endif
andrewbonney 0:ec559500a63f 51
andrewbonney 0:ec559500a63f 52 #ifdef __cplusplus
andrewbonney 0:ec559500a63f 53 extern "C" {
andrewbonney 0:ec559500a63f 54 #endif
andrewbonney 0:ec559500a63f 55
andrewbonney 0:ec559500a63f 56 /* The listen port of the SNMP agent. Clients have to make their requests to
andrewbonney 0:ec559500a63f 57 this port. Most standard clients won't work if you change this! */
andrewbonney 0:ec559500a63f 58 #ifndef SNMP_IN_PORT
andrewbonney 0:ec559500a63f 59 #define SNMP_IN_PORT 161
andrewbonney 0:ec559500a63f 60 #endif
andrewbonney 0:ec559500a63f 61 /* The remote port the SNMP agent sends traps to. Most standard trap sinks won't
andrewbonney 0:ec559500a63f 62 work if you change this! */
andrewbonney 0:ec559500a63f 63 #ifndef SNMP_TRAP_PORT
andrewbonney 0:ec559500a63f 64 #define SNMP_TRAP_PORT 162
andrewbonney 0:ec559500a63f 65 #endif
andrewbonney 0:ec559500a63f 66
andrewbonney 0:ec559500a63f 67 #define SNMP_ES_NOERROR 0
andrewbonney 0:ec559500a63f 68 #define SNMP_ES_TOOBIG 1
andrewbonney 0:ec559500a63f 69 #define SNMP_ES_NOSUCHNAME 2
andrewbonney 0:ec559500a63f 70 #define SNMP_ES_BADVALUE 3
andrewbonney 0:ec559500a63f 71 #define SNMP_ES_READONLY 4
andrewbonney 0:ec559500a63f 72 #define SNMP_ES_GENERROR 5
andrewbonney 0:ec559500a63f 73
andrewbonney 0:ec559500a63f 74 #define SNMP_GENTRAP_COLDSTART 0
andrewbonney 0:ec559500a63f 75 #define SNMP_GENTRAP_WARMSTART 1
andrewbonney 0:ec559500a63f 76 #define SNMP_GENTRAP_AUTHFAIL 4
andrewbonney 0:ec559500a63f 77 #define SNMP_GENTRAP_ENTERPRISESPC 6
andrewbonney 0:ec559500a63f 78
andrewbonney 0:ec559500a63f 79 struct snmp_varbind
andrewbonney 0:ec559500a63f 80 {
andrewbonney 0:ec559500a63f 81 /* next pointer, NULL for last in list */
andrewbonney 0:ec559500a63f 82 struct snmp_varbind *next;
andrewbonney 0:ec559500a63f 83 /* previous pointer, NULL for first in list */
andrewbonney 0:ec559500a63f 84 struct snmp_varbind *prev;
andrewbonney 0:ec559500a63f 85
andrewbonney 0:ec559500a63f 86 /* object identifier length (in s32_t) */
andrewbonney 0:ec559500a63f 87 u8_t ident_len;
andrewbonney 0:ec559500a63f 88 /* object identifier array */
andrewbonney 0:ec559500a63f 89 s32_t *ident;
andrewbonney 0:ec559500a63f 90
andrewbonney 0:ec559500a63f 91 /* object value ASN1 type */
andrewbonney 0:ec559500a63f 92 u8_t value_type;
andrewbonney 0:ec559500a63f 93 /* object value length (in u8_t) */
andrewbonney 0:ec559500a63f 94 u8_t value_len;
andrewbonney 0:ec559500a63f 95 /* object value */
andrewbonney 0:ec559500a63f 96 void *value;
andrewbonney 0:ec559500a63f 97
andrewbonney 0:ec559500a63f 98 /* encoding varbind seq length length */
andrewbonney 0:ec559500a63f 99 u8_t seqlenlen;
andrewbonney 0:ec559500a63f 100 /* encoding object identifier length length */
andrewbonney 0:ec559500a63f 101 u8_t olenlen;
andrewbonney 0:ec559500a63f 102 /* encoding object value length length */
andrewbonney 0:ec559500a63f 103 u8_t vlenlen;
andrewbonney 0:ec559500a63f 104 /* encoding varbind seq length */
andrewbonney 0:ec559500a63f 105 u16_t seqlen;
andrewbonney 0:ec559500a63f 106 /* encoding object identifier length */
andrewbonney 0:ec559500a63f 107 u16_t olen;
andrewbonney 0:ec559500a63f 108 /* encoding object value length */
andrewbonney 0:ec559500a63f 109 u16_t vlen;
andrewbonney 0:ec559500a63f 110 };
andrewbonney 0:ec559500a63f 111
andrewbonney 0:ec559500a63f 112 struct snmp_varbind_root
andrewbonney 0:ec559500a63f 113 {
andrewbonney 0:ec559500a63f 114 struct snmp_varbind *head;
andrewbonney 0:ec559500a63f 115 struct snmp_varbind *tail;
andrewbonney 0:ec559500a63f 116 /* number of variable bindings in list */
andrewbonney 0:ec559500a63f 117 u8_t count;
andrewbonney 0:ec559500a63f 118 /* encoding varbind-list seq length length */
andrewbonney 0:ec559500a63f 119 u8_t seqlenlen;
andrewbonney 0:ec559500a63f 120 /* encoding varbind-list seq length */
andrewbonney 0:ec559500a63f 121 u16_t seqlen;
andrewbonney 0:ec559500a63f 122 };
andrewbonney 0:ec559500a63f 123
andrewbonney 0:ec559500a63f 124 /** output response message header length fields */
andrewbonney 0:ec559500a63f 125 struct snmp_resp_header_lengths
andrewbonney 0:ec559500a63f 126 {
andrewbonney 0:ec559500a63f 127 /* encoding error-index length length */
andrewbonney 0:ec559500a63f 128 u8_t erridxlenlen;
andrewbonney 0:ec559500a63f 129 /* encoding error-status length length */
andrewbonney 0:ec559500a63f 130 u8_t errstatlenlen;
andrewbonney 0:ec559500a63f 131 /* encoding request id length length */
andrewbonney 0:ec559500a63f 132 u8_t ridlenlen;
andrewbonney 0:ec559500a63f 133 /* encoding pdu length length */
andrewbonney 0:ec559500a63f 134 u8_t pdulenlen;
andrewbonney 0:ec559500a63f 135 /* encoding community length length */
andrewbonney 0:ec559500a63f 136 u8_t comlenlen;
andrewbonney 0:ec559500a63f 137 /* encoding version length length */
andrewbonney 0:ec559500a63f 138 u8_t verlenlen;
andrewbonney 0:ec559500a63f 139 /* encoding sequence length length */
andrewbonney 0:ec559500a63f 140 u8_t seqlenlen;
andrewbonney 0:ec559500a63f 141
andrewbonney 0:ec559500a63f 142 /* encoding error-index length */
andrewbonney 0:ec559500a63f 143 u16_t erridxlen;
andrewbonney 0:ec559500a63f 144 /* encoding error-status length */
andrewbonney 0:ec559500a63f 145 u16_t errstatlen;
andrewbonney 0:ec559500a63f 146 /* encoding request id length */
andrewbonney 0:ec559500a63f 147 u16_t ridlen;
andrewbonney 0:ec559500a63f 148 /* encoding pdu length */
andrewbonney 0:ec559500a63f 149 u16_t pdulen;
andrewbonney 0:ec559500a63f 150 /* encoding community length */
andrewbonney 0:ec559500a63f 151 u16_t comlen;
andrewbonney 0:ec559500a63f 152 /* encoding version length */
andrewbonney 0:ec559500a63f 153 u16_t verlen;
andrewbonney 0:ec559500a63f 154 /* encoding sequence length */
andrewbonney 0:ec559500a63f 155 u16_t seqlen;
andrewbonney 0:ec559500a63f 156 };
andrewbonney 0:ec559500a63f 157
andrewbonney 0:ec559500a63f 158 /** output response message header length fields */
andrewbonney 0:ec559500a63f 159 struct snmp_trap_header_lengths
andrewbonney 0:ec559500a63f 160 {
andrewbonney 0:ec559500a63f 161 /* encoding timestamp length length */
andrewbonney 0:ec559500a63f 162 u8_t tslenlen;
andrewbonney 0:ec559500a63f 163 /* encoding specific-trap length length */
andrewbonney 0:ec559500a63f 164 u8_t strplenlen;
andrewbonney 0:ec559500a63f 165 /* encoding generic-trap length length */
andrewbonney 0:ec559500a63f 166 u8_t gtrplenlen;
andrewbonney 0:ec559500a63f 167 /* encoding agent-addr length length */
andrewbonney 0:ec559500a63f 168 u8_t aaddrlenlen;
andrewbonney 0:ec559500a63f 169 /* encoding enterprise-id length length */
andrewbonney 0:ec559500a63f 170 u8_t eidlenlen;
andrewbonney 0:ec559500a63f 171 /* encoding pdu length length */
andrewbonney 0:ec559500a63f 172 u8_t pdulenlen;
andrewbonney 0:ec559500a63f 173 /* encoding community length length */
andrewbonney 0:ec559500a63f 174 u8_t comlenlen;
andrewbonney 0:ec559500a63f 175 /* encoding version length length */
andrewbonney 0:ec559500a63f 176 u8_t verlenlen;
andrewbonney 0:ec559500a63f 177 /* encoding sequence length length */
andrewbonney 0:ec559500a63f 178 u8_t seqlenlen;
andrewbonney 0:ec559500a63f 179
andrewbonney 0:ec559500a63f 180 /* encoding timestamp length */
andrewbonney 0:ec559500a63f 181 u16_t tslen;
andrewbonney 0:ec559500a63f 182 /* encoding specific-trap length */
andrewbonney 0:ec559500a63f 183 u16_t strplen;
andrewbonney 0:ec559500a63f 184 /* encoding generic-trap length */
andrewbonney 0:ec559500a63f 185 u16_t gtrplen;
andrewbonney 0:ec559500a63f 186 /* encoding agent-addr length */
andrewbonney 0:ec559500a63f 187 u16_t aaddrlen;
andrewbonney 0:ec559500a63f 188 /* encoding enterprise-id length */
andrewbonney 0:ec559500a63f 189 u16_t eidlen;
andrewbonney 0:ec559500a63f 190 /* encoding pdu length */
andrewbonney 0:ec559500a63f 191 u16_t pdulen;
andrewbonney 0:ec559500a63f 192 /* encoding community length */
andrewbonney 0:ec559500a63f 193 u16_t comlen;
andrewbonney 0:ec559500a63f 194 /* encoding version length */
andrewbonney 0:ec559500a63f 195 u16_t verlen;
andrewbonney 0:ec559500a63f 196 /* encoding sequence length */
andrewbonney 0:ec559500a63f 197 u16_t seqlen;
andrewbonney 0:ec559500a63f 198 };
andrewbonney 0:ec559500a63f 199
andrewbonney 0:ec559500a63f 200 /* Accepting new SNMP messages. */
andrewbonney 0:ec559500a63f 201 #define SNMP_MSG_EMPTY 0
andrewbonney 0:ec559500a63f 202 /* Search for matching object for variable binding. */
andrewbonney 0:ec559500a63f 203 #define SNMP_MSG_SEARCH_OBJ 1
andrewbonney 0:ec559500a63f 204 /* Perform SNMP operation on in-memory object.
andrewbonney 0:ec559500a63f 205 Pass-through states, for symmetry only. */
andrewbonney 0:ec559500a63f 206 #define SNMP_MSG_INTERNAL_GET_OBJDEF 2
andrewbonney 0:ec559500a63f 207 #define SNMP_MSG_INTERNAL_GET_VALUE 3
andrewbonney 0:ec559500a63f 208 #define SNMP_MSG_INTERNAL_SET_TEST 4
andrewbonney 0:ec559500a63f 209 #define SNMP_MSG_INTERNAL_GET_OBJDEF_S 5
andrewbonney 0:ec559500a63f 210 #define SNMP_MSG_INTERNAL_SET_VALUE 6
andrewbonney 0:ec559500a63f 211 /* Perform SNMP operation on object located externally.
andrewbonney 0:ec559500a63f 212 In theory this could be used for building a proxy agent.
andrewbonney 0:ec559500a63f 213 Practical use is for an enterprise spc. app. gateway. */
andrewbonney 0:ec559500a63f 214 #define SNMP_MSG_EXTERNAL_GET_OBJDEF 7
andrewbonney 0:ec559500a63f 215 #define SNMP_MSG_EXTERNAL_GET_VALUE 8
andrewbonney 0:ec559500a63f 216 #define SNMP_MSG_EXTERNAL_SET_TEST 9
andrewbonney 0:ec559500a63f 217 #define SNMP_MSG_EXTERNAL_GET_OBJDEF_S 10
andrewbonney 0:ec559500a63f 218 #define SNMP_MSG_EXTERNAL_SET_VALUE 11
andrewbonney 0:ec559500a63f 219
andrewbonney 0:ec559500a63f 220 #define SNMP_COMMUNITY_STR_LEN 64
andrewbonney 0:ec559500a63f 221 struct snmp_msg_pstat
andrewbonney 0:ec559500a63f 222 {
andrewbonney 0:ec559500a63f 223 /* lwIP local port (161) binding */
andrewbonney 0:ec559500a63f 224 struct udp_pcb *pcb;
andrewbonney 0:ec559500a63f 225 /* source IP address */
andrewbonney 0:ec559500a63f 226 ip_addr_t sip;
andrewbonney 0:ec559500a63f 227 /* source UDP port */
andrewbonney 0:ec559500a63f 228 u16_t sp;
andrewbonney 0:ec559500a63f 229 /* request type */
andrewbonney 0:ec559500a63f 230 u8_t rt;
andrewbonney 0:ec559500a63f 231 /* request ID */
andrewbonney 0:ec559500a63f 232 s32_t rid;
andrewbonney 0:ec559500a63f 233 /* error status */
andrewbonney 0:ec559500a63f 234 s32_t error_status;
andrewbonney 0:ec559500a63f 235 /* error index */
andrewbonney 0:ec559500a63f 236 s32_t error_index;
andrewbonney 0:ec559500a63f 237 /* community name (zero terminated) */
andrewbonney 0:ec559500a63f 238 u8_t community[SNMP_COMMUNITY_STR_LEN + 1];
andrewbonney 0:ec559500a63f 239 /* community string length (exclusive zero term) */
andrewbonney 0:ec559500a63f 240 u8_t com_strlen;
andrewbonney 0:ec559500a63f 241 /* one out of MSG_EMPTY, MSG_DEMUX, MSG_INTERNAL, MSG_EXTERNAL_x */
andrewbonney 0:ec559500a63f 242 u8_t state;
andrewbonney 0:ec559500a63f 243 /* saved arguments for MSG_EXTERNAL_x */
andrewbonney 0:ec559500a63f 244 struct mib_external_node *ext_mib_node;
andrewbonney 0:ec559500a63f 245 struct snmp_name_ptr ext_name_ptr;
andrewbonney 0:ec559500a63f 246 struct obj_def ext_object_def;
andrewbonney 0:ec559500a63f 247 struct snmp_obj_id ext_oid;
andrewbonney 0:ec559500a63f 248 /* index into input variable binding list */
andrewbonney 0:ec559500a63f 249 u8_t vb_idx;
andrewbonney 0:ec559500a63f 250 /* ptr into input variable binding list */
andrewbonney 0:ec559500a63f 251 struct snmp_varbind *vb_ptr;
andrewbonney 0:ec559500a63f 252 /* list of variable bindings from input */
andrewbonney 0:ec559500a63f 253 struct snmp_varbind_root invb;
andrewbonney 0:ec559500a63f 254 /* list of variable bindings to output */
andrewbonney 0:ec559500a63f 255 struct snmp_varbind_root outvb;
andrewbonney 0:ec559500a63f 256 /* output response lengths used in ASN encoding */
andrewbonney 0:ec559500a63f 257 struct snmp_resp_header_lengths rhl;
andrewbonney 0:ec559500a63f 258 };
andrewbonney 0:ec559500a63f 259
andrewbonney 0:ec559500a63f 260 struct snmp_msg_trap
andrewbonney 0:ec559500a63f 261 {
andrewbonney 0:ec559500a63f 262 /* lwIP local port (161) binding */
andrewbonney 0:ec559500a63f 263 struct udp_pcb *pcb;
andrewbonney 0:ec559500a63f 264 /* destination IP address in network order */
andrewbonney 0:ec559500a63f 265 ip_addr_t dip;
andrewbonney 0:ec559500a63f 266
andrewbonney 0:ec559500a63f 267 /* source enterprise ID (sysObjectID) */
andrewbonney 0:ec559500a63f 268 struct snmp_obj_id *enterprise;
andrewbonney 0:ec559500a63f 269 /* source IP address, raw network order format */
andrewbonney 0:ec559500a63f 270 u8_t sip_raw[4];
andrewbonney 0:ec559500a63f 271 /* generic trap code */
andrewbonney 0:ec559500a63f 272 u32_t gen_trap;
andrewbonney 0:ec559500a63f 273 /* specific trap code */
andrewbonney 0:ec559500a63f 274 u32_t spc_trap;
andrewbonney 0:ec559500a63f 275 /* timestamp */
andrewbonney 0:ec559500a63f 276 u32_t ts;
andrewbonney 0:ec559500a63f 277 /* list of variable bindings to output */
andrewbonney 0:ec559500a63f 278 struct snmp_varbind_root outvb;
andrewbonney 0:ec559500a63f 279 /* output trap lengths used in ASN encoding */
andrewbonney 0:ec559500a63f 280 struct snmp_trap_header_lengths thl;
andrewbonney 0:ec559500a63f 281 };
andrewbonney 0:ec559500a63f 282
andrewbonney 0:ec559500a63f 283 /** Agent Version constant, 0 = v1 oddity */
andrewbonney 0:ec559500a63f 284 extern const s32_t snmp_version;
andrewbonney 0:ec559500a63f 285 /** Agent default "public" community string */
andrewbonney 0:ec559500a63f 286 extern const char snmp_publiccommunity[7];
andrewbonney 0:ec559500a63f 287
andrewbonney 0:ec559500a63f 288 extern struct snmp_msg_trap trap_msg;
andrewbonney 0:ec559500a63f 289
andrewbonney 0:ec559500a63f 290 /** Agent setup, start listening to port 161. */
andrewbonney 0:ec559500a63f 291 void snmp_init(void);
andrewbonney 0:ec559500a63f 292 void snmp_trap_dst_enable(u8_t dst_idx, u8_t enable);
andrewbonney 0:ec559500a63f 293 void snmp_trap_dst_ip_set(u8_t dst_idx, ip_addr_t *dst);
andrewbonney 0:ec559500a63f 294
andrewbonney 0:ec559500a63f 295 /** Varbind-list functions. */
andrewbonney 0:ec559500a63f 296 struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len);
andrewbonney 0:ec559500a63f 297 void snmp_varbind_free(struct snmp_varbind *vb);
andrewbonney 0:ec559500a63f 298 void snmp_varbind_list_free(struct snmp_varbind_root *root);
andrewbonney 0:ec559500a63f 299 void snmp_varbind_tail_add(struct snmp_varbind_root *root, struct snmp_varbind *vb);
andrewbonney 0:ec559500a63f 300 struct snmp_varbind* snmp_varbind_tail_remove(struct snmp_varbind_root *root);
andrewbonney 0:ec559500a63f 301
andrewbonney 0:ec559500a63f 302 /** Handle an internal (recv) or external (private response) event. */
andrewbonney 0:ec559500a63f 303 void snmp_msg_event(u8_t request_id);
andrewbonney 0:ec559500a63f 304 err_t snmp_send_response(struct snmp_msg_pstat *m_stat);
andrewbonney 0:ec559500a63f 305 err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap);
andrewbonney 0:ec559500a63f 306 void snmp_coldstart_trap(void);
andrewbonney 0:ec559500a63f 307 void snmp_authfail_trap(void);
andrewbonney 0:ec559500a63f 308
andrewbonney 0:ec559500a63f 309 #ifdef __cplusplus
andrewbonney 0:ec559500a63f 310 }
andrewbonney 0:ec559500a63f 311 #endif
andrewbonney 0:ec559500a63f 312
andrewbonney 0:ec559500a63f 313 #endif /* LWIP_SNMP */
andrewbonney 0:ec559500a63f 314
andrewbonney 0:ec559500a63f 315 #endif /* __LWIP_SNMP_MSG_H__ */