Example: Encoded SNMP Message - SNMP Tutorial
30.11 Example Encoded SNMP Message
The encoded form of ASN.1 uses variable-length fields to represent items. In general, each field begins with a header that specifies the type of object and its length in bytes. For example, each SEQUENCE begins with an octet containing 30 (hexadecimal); the next octet specifies the number of following octets that comprise the sequence.
Figure 30.11 contains an example SNMP message that illustrates how values are encoded into octets. The message is a get-request that specifies data item sysDescr (numeric object identifier 1.3.6.1.2.1.1.1.0).Because the example shows an actual message, it includes many details. In particular, the message contains a msgSecurityParameters section which has not been discussed above. This particular message uses the UsmSecurityParameters form of security parameters. It should be possible, however, to correlate other sections of the message with the definitions above.
As Figure 30.11 shows, the message starts with a code for SEQUENCE which has a length of 103 octets8. The first item in the sequence is a 1-octet integer that specifies the protocol version; the value 3 indicates that this is an SNMPV3 message. Successive fields define a message ID and the maximum message size the sender can accept in a reply. Security information, including the name of the user (ComerBook) follows the message header.
The GetRequest-PDU occupies the tail of the message. The sequence labeled ScopedPDU specifies a context in which to interpret the remainder of the message. The octet A0 specifies the operation as a get-Request. Because the high-order bit is turned on, the interpretation of the octet is context specific. That is, the hexadecimal value A0 only specifies a GetRequest-PDU when used in context; it is not a universally reserved value. Following the request octet, the length octet specifies the request is 26 octets long. The request ID is 2 octets, but each of the error-status and error-index are one octet. Finally, the sequence of pairs contains one binding, a single object identifier bound to a null value. The identifier is encoded as expected except that the fist two numeric labels are combined into a single octet.
8Sequence items occur frequently in an SNMPmessage because SNMP uses SEQUENCE instead of conventional
programming language constructs like arrayor struct
Abstract from Internetworking With TCP/IP Vol I: Principles, Protocols, and Architecture Fourth Edition,
DOUGLAS E. COMER,
Department of Computer Sciences Purdue University, West Lafayette, IN 47907,
PRENTICE HALL,
Upper Saddle River, New Jersey 07458
Example: Encoded SNMP Message - SNMP Tutorial的更多相关文章
- SNMP Message Format - SNMP Tutorial
30.10 SNMP Message Format Unlike most TCP/IP protocols, SNMP messages do not have fixed fields. Inst ...
- 【SNMP】SNMP概述
SNMP概述 SNMP(Simple Network Management Protocol,简单网络管理协议)是目前UDP/IP网络中应用最为广泛的网络管理协议,它提供了一个管理框架来监控和维护互联 ...
- SNMP: Simple? Network Management Protocol(转)
转自:http://www.rane.com/note161.html An SNMP Overview The Message Format The Actual Bytes Introductio ...
- SNMP Tutorial
Applications: Internet Management (SNMP) 30.1 Introduction 30.2 The Level Of Management Protocols 30 ...
- Simple Network Management Protocol - SNMP Tutorial
30.9 Simple Network Management Protocol Network management protocols specify communication between t ...
- SNMP 原理与实战详解
原文地址:http://freeloda.blog.51cto.com/2033581/1306743 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法 ...
- 浅议SNMP安全、SNMP协议、网络管理学习
相关学习资料 tcp-ip详解卷1:协议.pdf(重点看25章SNMP部分) http://www.rfc-editor.org/rfc/rfc1213.txt http://www.rfc-edit ...
- SNMP中MIB2所有主要节点
系统组:system组包含以下对象集(.1.3.6.1.2.1.1): 对象名:sysDescr(1) OID:system.1 对象类型:DisplayString[255] 访问模式:只读 描述: ...
- Snmp学习总结(七)——SNMP4J介绍
一.SNMP4J介绍 SNMP4J是一个用Java来实现SNMP(简单网络管理协议)协议的开源项目.它支持以命令行的形式进行管理与响应.SNMP4J是纯面向对象设计与SNMP++(用C++实现SNMP ...
随机推荐
- fdisk添加分区引起的Linux Error: 22: Invalid argument
在Linux服务器(虚拟机)上使用fdisk添加分区.格式化分区后,遇到了Linux Error: 22: Invalid argument错误,操作步骤如下所示 [root@oracle-serve ...
- 15天玩转redis —— 第十一篇 让你彻底了解RDB存储结构
接着上一篇说,这里我们来继续分析一下RDB文件存储结构,首先大家都知道RDB文件是在redis的“快照”的模式下才会产生,那么如果 我们理解了RDB文件的结构,是不是让我们对“快照”模式能做到一个心中 ...
- Sqoop:Could not load db driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
Sqoop version:1.4.6-cdh Hadoop version:2.6.0-cdh5.8.2 场景:使用Sqoop从MSSqlserver导数据 虽然1.4.6的官网说 Even if ...
- PyCharm创建virtualenv方法
Python的版本众多,在加上适用不同版本的Python Package.这导致在同时进行几个项目时,对库的依赖存在很大的问题.这个时候就牵涉到对Python以及依赖库的版本管理,方便进行开发,vir ...
- Fedora 23安装配置mysql数据库,修改初始密码及登陆
下载MySQL5.7.9 yum仓库 wget http://dev.mysql.com/get/mysql57-community-release-fc23-7-noarch.rpm rpm -iv ...
- 【转】js 关键字 in 的使用方法
js 关键字 in 的使用方法 原文地址:http://sunct.iteye.com/blog/1709017 1.For...In 声明用于对数组或者对象的属性进行循环/迭代操作. 对于数组 ...
- 穿越之旅之--android中如何执行java命令
android的程序基于java开发,当我们接上调试器,执行adb shell,就可以执行linux命令,但是却并不能执行java命令. 那么在android的shell中是否就不能执行java程序了 ...
- Web报表工具FineReport的JS API开发(二)
上次介绍FineReport的JS API中的第一类开发--FR,这次就来介绍一下FS和contentWindow类的开发. 1 FS FS是数据决策系统中的js接口,比如说FS.tabPane.ad ...
- PHP_Bibel阅读笔记(二)——脸黑的一天(?一年)
一早上起来把50包开了,一张橙卡...就问还有谁...........本命年啊,我去买红内裤还不行么.... 实时更新,老哥的号的30包什么都没有....不过中午又开了5包,皇帝,好评啊!!! 五.代 ...
- 洛谷P1101 单词方阵——S.B.S.
题目描述 给一nXn的字母方阵,内可能蕴含多个“yizhong”单词.单词在方阵中是沿着同一方向连续摆放的.摆放可沿着8个方向的任一方向,同一单词摆放时不再改变方向,单词与单词之间[color=red ...