/**
* @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 "lwip/opt.h"
#if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */
#include "lwip/snmp.h"
#include "lwip/netif.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"
#include "netif/etharp.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
#ifndef SNMP_GET_SYSUPTIME
#define SNMP_GET_SYSUPTIME(sysuptime)
#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);
#if !SNMP_SAFE_REQUESTS
static u8_t ifentry_set_test (struct obj_def *od, u16_t len, void *value);
static void ifentry_set_value (struct obj_def *od, u16_t len, void *value);
#endif /* SNMP_SAFE_REQUESTS */
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);
#ifdef THIS_SEEMS_UNUSED
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
#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*
没有合适的资源?快使用搜索试试~ 我知道了~
LWIP LPC2378 移植 实现UDP功能,中断触发.zip
共190个文件
h:77个
c:66个
scc:15个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 144 浏览量
2023-03-29
10:31:06
上传
评论
收藏 858KB ZIP 举报
温馨提示
LWIP LPC2378 移植 实现UDP功能,中断触发.zip
资源推荐
资源详情
资源评论
收起资源包目录
LWIP LPC2378 移植 实现UDP功能,中断触发.zip (190个子文件)
slipif.__i 361B
dp83848vif.__i 356B
LwIP_RAW.uvgui_wang_jingke.bak 144KB
LwIP_RAW_uvopt.bak 32KB
LwIP_RAW_uvproj.bak 23KB
mib2.c 101KB
dhcp.c 57KB
lcp.c 55KB
ppp.c 54KB
sockets.c 54KB
tcp_in.c 50KB
etharp.c 43KB
tcp.c 43KB
msg_in.c 42KB
ipcp.c 38KB
ppp_oe.c 37KB
api_msg.c 32KB
tcp_out.c 32KB
mib_structs.c 29KB
udp.c 28KB
igmp.c 27KB
pbuf.c 27KB
ip_frag.c 26KB
auth.c 25KB
dns.c 25KB
chap.c 24KB
fsm.c 23KB
msg_out.c 22KB
ip.c 21KB
dp83848vif.c 21KB
mem.c 19KB
vj.c 18KB
api_lib.c 16KB
asn1_dec.c 16KB
lwiplib.c 15KB
pap.c 15KB
autoip.c 15KB
netif.c 14KB
asn1_enc.c 14KB
EMAC.c 14KB
tcpip.c 14KB
inet_chksum.c 12KB
md5.c 11KB
ethernetif.c 11KB
chpms.c 11KB
memp.c 11KB
netdb.c 11KB
icmp.c 11KB
ip6.c 11KB
init.c 10KB
raw.c 10KB
sys.c 10KB
randm.c 8KB
slipif.c 8KB
inet.c 7KB
loopif.c 7KB
main.c 6KB
netbuf.c 6KB
icmp6.c 6KB
target.c 6KB
stats.c 5KB
inet6.c 4KB
netifapi.c 4KB
lwiptest.c 4KB
ip_addr.c 3KB
sys_arch.c 3KB
magic.c 3KB
err.c 3KB
ip6_addr.c 3KB
irq.c 3KB
perf.c 2KB
dp83848vif.crf 55KB
slipif.crf 30KB
dp83848vif.d 1KB
slipif.d 1KB
LPC23xx.h 75KB
opt.h 43KB
tcp.h 25KB
EMAC.h 20KB
ppp.h 16KB
lwipopts.h 14KB
sockets.h 13KB
snmp.h 12KB
type.h 10KB
arch.h 10KB
snmp_structs.h 9KB
snmp_msg.h 9KB
sys.h 9KB
netif.h 9KB
api.h 8KB
dhcp.h 8KB
fsm.h 8KB
chap.h 7KB
ip_addr.h 6KB
lcp.h 6KB
ip.h 6KB
ppp_oe.h 6KB
vj.h 6KB
etharp.h 6KB
igmp.h 5KB
共 190 条
- 1
- 2
资源评论
- 范圣豪2023-07-07支持这个资源,内容详细,主要是能解决当下的问题,感谢大佬分享~
GZM888888
- 粉丝: 121
- 资源: 2902
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功