This is lwip library for WlanBP3595 library. We forked lwip library. We extended TCP/IP thread stack size.
Fork of lwip by
include/lwip/snmp_asn1.h@0:51ac1d130fd4, 2012-06-22 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Jun 22 09:25:39 2012 +0000
- Revision:
- 0:51ac1d130fd4
Initial import from lwip-1.4.0: http://download.savannah.gnu.org/releases/lwip/lwip-1.4.0.zip
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 0:51ac1d130fd4 | 1 | /** |
mbed_official | 0:51ac1d130fd4 | 2 | * @file |
mbed_official | 0:51ac1d130fd4 | 3 | * Abstract Syntax Notation One (ISO 8824, 8825) codec. |
mbed_official | 0:51ac1d130fd4 | 4 | */ |
mbed_official | 0:51ac1d130fd4 | 5 | |
mbed_official | 0:51ac1d130fd4 | 6 | /* |
mbed_official | 0:51ac1d130fd4 | 7 | * Copyright (c) 2006 Axon Digital Design B.V., The Netherlands. |
mbed_official | 0:51ac1d130fd4 | 8 | * All rights reserved. |
mbed_official | 0:51ac1d130fd4 | 9 | * |
mbed_official | 0:51ac1d130fd4 | 10 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 0:51ac1d130fd4 | 11 | * are permitted provided that the following conditions are met: |
mbed_official | 0:51ac1d130fd4 | 12 | * |
mbed_official | 0:51ac1d130fd4 | 13 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 0:51ac1d130fd4 | 14 | * this list of conditions and the following disclaimer. |
mbed_official | 0:51ac1d130fd4 | 15 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 0:51ac1d130fd4 | 16 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 0:51ac1d130fd4 | 17 | * and/or other materials provided with the distribution. |
mbed_official | 0:51ac1d130fd4 | 18 | * 3. The name of the author may not be used to endorse or promote products |
mbed_official | 0:51ac1d130fd4 | 19 | * derived from this software without specific prior written permission. |
mbed_official | 0:51ac1d130fd4 | 20 | * |
mbed_official | 0:51ac1d130fd4 | 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED |
mbed_official | 0:51ac1d130fd4 | 22 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
mbed_official | 0:51ac1d130fd4 | 23 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT |
mbed_official | 0:51ac1d130fd4 | 24 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
mbed_official | 0:51ac1d130fd4 | 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
mbed_official | 0:51ac1d130fd4 | 26 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
mbed_official | 0:51ac1d130fd4 | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
mbed_official | 0:51ac1d130fd4 | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
mbed_official | 0:51ac1d130fd4 | 29 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY |
mbed_official | 0:51ac1d130fd4 | 30 | * OF SUCH DAMAGE. |
mbed_official | 0:51ac1d130fd4 | 31 | * |
mbed_official | 0:51ac1d130fd4 | 32 | * Author: Christiaan Simons <christiaan.simons@axon.tv> |
mbed_official | 0:51ac1d130fd4 | 33 | */ |
mbed_official | 0:51ac1d130fd4 | 34 | |
mbed_official | 0:51ac1d130fd4 | 35 | #ifndef __LWIP_SNMP_ASN1_H__ |
mbed_official | 0:51ac1d130fd4 | 36 | #define __LWIP_SNMP_ASN1_H__ |
mbed_official | 0:51ac1d130fd4 | 37 | |
mbed_official | 0:51ac1d130fd4 | 38 | #include "lwip/opt.h" |
mbed_official | 0:51ac1d130fd4 | 39 | #include "lwip/err.h" |
mbed_official | 0:51ac1d130fd4 | 40 | #include "lwip/pbuf.h" |
mbed_official | 0:51ac1d130fd4 | 41 | #include "lwip/snmp.h" |
mbed_official | 0:51ac1d130fd4 | 42 | |
mbed_official | 0:51ac1d130fd4 | 43 | #if LWIP_SNMP |
mbed_official | 0:51ac1d130fd4 | 44 | |
mbed_official | 0:51ac1d130fd4 | 45 | #ifdef __cplusplus |
mbed_official | 0:51ac1d130fd4 | 46 | extern "C" { |
mbed_official | 0:51ac1d130fd4 | 47 | #endif |
mbed_official | 0:51ac1d130fd4 | 48 | |
mbed_official | 0:51ac1d130fd4 | 49 | #define SNMP_ASN1_UNIV (0) /* (!0x80 | !0x40) */ |
mbed_official | 0:51ac1d130fd4 | 50 | #define SNMP_ASN1_APPLIC (0x40) /* (!0x80 | 0x40) */ |
mbed_official | 0:51ac1d130fd4 | 51 | #define SNMP_ASN1_CONTXT (0x80) /* ( 0x80 | !0x40) */ |
mbed_official | 0:51ac1d130fd4 | 52 | |
mbed_official | 0:51ac1d130fd4 | 53 | #define SNMP_ASN1_CONSTR (0x20) /* ( 0x20) */ |
mbed_official | 0:51ac1d130fd4 | 54 | #define SNMP_ASN1_PRIMIT (0) /* (!0x20) */ |
mbed_official | 0:51ac1d130fd4 | 55 | |
mbed_official | 0:51ac1d130fd4 | 56 | /* universal tags */ |
mbed_official | 0:51ac1d130fd4 | 57 | #define SNMP_ASN1_INTEG 2 |
mbed_official | 0:51ac1d130fd4 | 58 | #define SNMP_ASN1_OC_STR 4 |
mbed_official | 0:51ac1d130fd4 | 59 | #define SNMP_ASN1_NUL 5 |
mbed_official | 0:51ac1d130fd4 | 60 | #define SNMP_ASN1_OBJ_ID 6 |
mbed_official | 0:51ac1d130fd4 | 61 | #define SNMP_ASN1_SEQ 16 |
mbed_official | 0:51ac1d130fd4 | 62 | |
mbed_official | 0:51ac1d130fd4 | 63 | /* application specific (SNMP) tags */ |
mbed_official | 0:51ac1d130fd4 | 64 | #define SNMP_ASN1_IPADDR 0 /* octet string size(4) */ |
mbed_official | 0:51ac1d130fd4 | 65 | #define SNMP_ASN1_COUNTER 1 /* u32_t */ |
mbed_official | 0:51ac1d130fd4 | 66 | #define SNMP_ASN1_GAUGE 2 /* u32_t */ |
mbed_official | 0:51ac1d130fd4 | 67 | #define SNMP_ASN1_TIMETICKS 3 /* u32_t */ |
mbed_official | 0:51ac1d130fd4 | 68 | #define SNMP_ASN1_OPAQUE 4 /* octet string */ |
mbed_official | 0:51ac1d130fd4 | 69 | |
mbed_official | 0:51ac1d130fd4 | 70 | /* context specific (SNMP) tags */ |
mbed_official | 0:51ac1d130fd4 | 71 | #define SNMP_ASN1_PDU_GET_REQ 0 |
mbed_official | 0:51ac1d130fd4 | 72 | #define SNMP_ASN1_PDU_GET_NEXT_REQ 1 |
mbed_official | 0:51ac1d130fd4 | 73 | #define SNMP_ASN1_PDU_GET_RESP 2 |
mbed_official | 0:51ac1d130fd4 | 74 | #define SNMP_ASN1_PDU_SET_REQ 3 |
mbed_official | 0:51ac1d130fd4 | 75 | #define SNMP_ASN1_PDU_TRAP 4 |
mbed_official | 0:51ac1d130fd4 | 76 | |
mbed_official | 0:51ac1d130fd4 | 77 | err_t snmp_asn1_dec_type(struct pbuf *p, u16_t ofs, u8_t *type); |
mbed_official | 0:51ac1d130fd4 | 78 | err_t snmp_asn1_dec_length(struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length); |
mbed_official | 0:51ac1d130fd4 | 79 | err_t snmp_asn1_dec_u32t(struct pbuf *p, u16_t ofs, u16_t len, u32_t *value); |
mbed_official | 0:51ac1d130fd4 | 80 | err_t snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value); |
mbed_official | 0:51ac1d130fd4 | 81 | err_t snmp_asn1_dec_oid(struct pbuf *p, u16_t ofs, u16_t len, struct snmp_obj_id *oid); |
mbed_official | 0:51ac1d130fd4 | 82 | err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw); |
mbed_official | 0:51ac1d130fd4 | 83 | |
mbed_official | 0:51ac1d130fd4 | 84 | void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed); |
mbed_official | 0:51ac1d130fd4 | 85 | void snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed); |
mbed_official | 0:51ac1d130fd4 | 86 | void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed); |
mbed_official | 0:51ac1d130fd4 | 87 | void snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed); |
mbed_official | 0:51ac1d130fd4 | 88 | err_t snmp_asn1_enc_type(struct pbuf *p, u16_t ofs, u8_t type); |
mbed_official | 0:51ac1d130fd4 | 89 | err_t snmp_asn1_enc_length(struct pbuf *p, u16_t ofs, u16_t length); |
mbed_official | 0:51ac1d130fd4 | 90 | err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value); |
mbed_official | 0:51ac1d130fd4 | 91 | err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value); |
mbed_official | 0:51ac1d130fd4 | 92 | err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident); |
mbed_official | 0:51ac1d130fd4 | 93 | err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw); |
mbed_official | 0:51ac1d130fd4 | 94 | |
mbed_official | 0:51ac1d130fd4 | 95 | #ifdef __cplusplus |
mbed_official | 0:51ac1d130fd4 | 96 | } |
mbed_official | 0:51ac1d130fd4 | 97 | #endif |
mbed_official | 0:51ac1d130fd4 | 98 | |
mbed_official | 0:51ac1d130fd4 | 99 | #endif /* LWIP_SNMP */ |
mbed_official | 0:51ac1d130fd4 | 100 | |
mbed_official | 0:51ac1d130fd4 | 101 | #endif /* __LWIP_SNMP_ASN1_H__ */ |