/**
* @file
* Management Information Base II (RFC1213) objects and functions.
*
* @note the object identifiers for this MIB-2 and private MIB tree
* must be kept in sorted ascending order. This to ensure correct getnext operation.
*/
/*
* Copyright (c) 2006 Axon Digital Design B.V., The Netherlands.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*
* Author: Christiaan Simons <christiaan.simons@axon.tv>
*/
#include "arch/cc.h"
#include "lwip/opt.h"
#if LWIP_SNMP
#include "lwip/snmp.h"
#include "lwip/netif.h"
#include "netif/etharp.h"
#include "lwip/ip.h"
#include "lwip/ip_frag.h"
#include "lwip/tcp.h"
#include "lwip/udp.h"
#include "lwip/snmp_asn1.h"
#include "lwip/snmp_structs.h"
/**
* IANA assigned enterprise ID for lwIP is 26381
* @see http://www.iana.org/assignments/enterprise-numbers
*
* @note this enterprise ID is assigned to the lwIP project,
* all object identifiers living under this ID are assigned
* by the lwIP maintainers (contact Christiaan Simons)!
* @note don't change this define, use snmp_set_sysobjid()
*
* If you need to create your own private MIB you'll need
* to apply for your own enterprise ID with IANA:
* http://www.iana.org/numbers.html
*/
#define SNMP_ENTERPRISE_ID 26381
#define SNMP_SYSOBJID_LEN 7
#define SNMP_SYSOBJID {1, 3, 6, 1, 4, 1, SNMP_ENTERPRISE_ID}
#ifndef SNMP_SYSSERVICES
#define SNMP_SYSSERVICES ((1 << 6) | (1 << 3) | ((IP_FORWARD) << 2))
#endif
static void system_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void system_get_value(struct obj_def *od, u16_t len, void *value);
static u8_t system_set_test(struct obj_def *od, u16_t len, void *value);
static void system_set_value(struct obj_def *od, u16_t len, void *value);
static void interfaces_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void interfaces_get_value(struct obj_def *od, u16_t len, void *value);
static void ifentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void ifentry_get_value(struct obj_def *od, u16_t len, void *value);
static void atentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void atentry_get_value(struct obj_def *od, u16_t len, void *value);
static void ip_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void ip_get_value(struct obj_def *od, u16_t len, void *value);
static u8_t ip_set_test(struct obj_def *od, u16_t len, void *value);
static void ip_addrentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value);
static void ip_rteentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value);
static void ip_ntomentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value);
static void icmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void icmp_get_value(struct obj_def *od, u16_t len, void *value);
#if LWIP_TCP
static void tcp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void tcp_get_value(struct obj_def *od, u16_t len, void *value);
static void tcpconnentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void tcpconnentry_get_value(struct obj_def *od, u16_t len, void *value);
#endif
static void udp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void udp_get_value(struct obj_def *od, u16_t len, void *value);
static void udpentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void udpentry_get_value(struct obj_def *od, u16_t len, void *value);
static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od);
static void snmp_get_value(struct obj_def *od, u16_t len, void *value);
static u8_t snmp_set_test(struct obj_def *od, u16_t len, void *value);
static void snmp_set_value(struct obj_def *od, u16_t len, void *value);
/* snmp .1.3.6.1.2.1.11 */
const mib_scalar_node snmp_scalar = {
&snmp_get_object_def,
&snmp_get_value,
&snmp_set_test,
&snmp_set_value,
MIB_NODE_SC,
0
};
const s32_t snmp_ids[28] = {
1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30
};
struct mib_node* const snmp_nodes[28] = {
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar,
(struct mib_node* const)&snmp_scalar, (struct mib_node* const)&snmp_scalar
};
const struct mib_array_node snmp = {
&noleafs_get_object_def,
&noleafs_get_value,
&noleafs_set_test,
&noleafs_set_value,
MIB_NODE_AR,
28,
snmp_ids,
snmp_nodes
};
/* dot3 and EtherLike MIB not planned. (transmission .1.3.6.1.2.1.10) */
/* historical (some say hysterical). (cmot .1.3.6.1.2.1.9) */
/* lwIP has no EGP, thus may not implement it. (egp .1.3.6.1.2.1.8) */
/* udp .1.3.6.1.2.1.7 */
/** index root node for udpTable */
struct mib_list_rootnode udp_root = {
&noleafs_get_object_def,
&noleafs_get_value,
&noleafs_set_test,
&noleafs_set_value,
MIB_NODE_LR,
0,
NULL,
NULL,
0
};
const s32_t udpentry_ids[2] = { 1, 2 };
struct mib_node* const udpentry_nodes[2] = {
(struct mib_node* const)&udp_root, (struct mib_node* const)&udp_root,
};
const struct mib_array_node udpentry = {
&noleafs_get_object_def,
&noleafs_get_value,
&noleafs_set_test,
&noleafs_set_value,
MIB_NODE_AR,
2,
没有合适的资源?快使用搜索试试~ 我知道了~
UCOS+LWIP在LPC2378上成功运行
共280个文件
c:81个
h:81个
o:62个
5星 · 超过95%的资源 需积分: 9 80 下载量 65 浏览量
2009-09-17
17:09:38
上传
评论 3
收藏 1.83MB RAR 举报
温馨提示
基于UCOS+LWIP成功在LPC2378上运行,支持PHY型号为DM9161,带多种协议。在SMARTARM2300上调试通过。
资源推荐
资源详情
资源评论
收起资源包目录
UCOS+LWIP在LPC2378上成功运行 (280个子文件)
shiyan_int.axf 388KB
LPC23xx.h.bak 66KB
ethernetif.c.bak 26KB
opt.h.bak 19KB
EMAC.h.bak 18KB
DM9161.c.bak 16KB
Startup.s.bak 16KB
main.c.bak 14KB
Os_cpu_a.s.bak 14KB
IIC.c.bak 14KB
LPC2300CAN.c.bak 12KB
UART.c.bak 12KB
target.c.bak 11KB
os_cfg_r.h.bak 10KB
sys_arch.c.bak 10KB
Os_cpu_c.c.bak 9KB
LPC23XX_ADD_R.H.bak 9KB
VIC_Control.s.bak 8KB
LPC2300CAN.h.bak 8KB
RTC.c.bak 7KB
LwIPEntry.c.bak 6KB
VIC_Control.h.bak 5KB
IRQ.inc.bak 4KB
LCD.c.bak 4KB
uart0.h.bak 4KB
OS_CPU.H.bak 4KB
cc.h.bak 4KB
Timer0.c.bak 2KB
INCLUDES.H.bak 2KB
main.h.bak 2KB
init.h.bak 2KB
inchip.scf.bak 2KB
app_cfg.h.bak 2KB
UART.h.bak 1KB
sys_arch.h.bak 1KB
GPIO.c.bak 1KB
IIC.h.bak 686B
LCD.H.bak 288B
DM9161.h.bak 219B
Timer0.h.bak 131B
RTC.h.bak 58B
GPIO.h.bak 50B
mib2.c 102KB
os_core.c 86KB
os_flag.c 55KB
dhcp.c 54KB
lcp.c 52KB
os_task.c 51KB
ppp.c 49KB
os_tmr.c 46KB
tcp_in.c 44KB
msg_in.c 43KB
os_q.c 41KB
os_mutex.c 37KB
sockets.c 37KB
ipcp.c 36KB
pbuf.c 33KB
tcp.c 32KB
etharp.c 32KB
os_mbox.c 30KB
mib_structs.c 30KB
os_sem.c 29KB
ethernetif.c 26KB
auth.c 26KB
chap.c 24KB
tcp_out.c 23KB
msg_out.c 22KB
udp.c 22KB
fsm.c 21KB
api_msg.c 20KB
os_mem.c 19KB
handler_http.c 18KB
vj.c 17KB
ip.c 17KB
asn1_dec.c 16KB
DM9161.c 16KB
api_lib.c 16KB
pap.c 15KB
asn1_enc.c 14KB
main.c 14KB
IIC.c 14KB
inet.c 13KB
ip_frag.c 13KB
os_dbg.c 13KB
LPC2300CAN.c 12KB
luminaryif.c 12KB
os_dbg_r.c 12KB
md5.c 12KB
mem.c 11KB
UART.c 11KB
chpms.c 11KB
os_time.c 11KB
target.c 11KB
ip6.c 11KB
sys_arch.c 10KB
netif.c 10KB
raw.c 10KB
Os_cpu_c.c 9KB
randm.c 8KB
sys.c 8KB
共 280 条
- 1
- 2
- 3
pigeon0411
- 粉丝: 5
- 资源: 22
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页