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 ...
随机推荐
- 使用Navicat连接Oracle数据时的一些问题,连接时错误:ORA-28547,新建用户后连接时错误:ORA-01017
发现Navicat作为一款连接数据库的工具确实很好用,可视化的界面看着舒服很多,下面说说我今天在连接Oracle数据库时的一些问题: 1.安装好Oracle后直接用Navicat是连接不上的,会出现如 ...
- 删除Windows中隐藏的物理网卡和网络虚拟化失败后的虚拟网卡
Windows环境下,在更换硬件服务器主板和网卡等硬件.恢复操作系统或者网络虚拟化失败后,可能会出现网卡方面的问题.例如,设备管理器中多了不应该存在的网卡:因命名冲突无法重命名当前网络连接:IP地址冲 ...
- jmeter接口自动化集成
接口自动化集成 一.jmeter基础学习 1.博客 :http://www.cnblogs.com/fnng/category/345478.html 2.博客 http://www.cnblo ...
- Centos7中systemctl命令详解
Linux Systemctl是一个系统管理守护进程.工具和库的集合,用于取代System V.service和chkconfig命令,初始进程主要负责控制systemd系统和服务管理器.通过Syst ...
- .NET 响应式自动缩略图服务器
做互联网网站,总是会涉及到缩略图问题,之前一直是在上传图片时生成不同尺寸的缩略图,一直感觉又费力又不好管理,之后就写子 ThumbnailServer 用于部署一个图片服务器,在使用图片时才将图片转为 ...
- hdoj 2075 A|B?
A|B? Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
- iOS关于NSUserDefaults存,写, 删的问题
我们知道NSUserDefaults可以保存某些信息在本地,例如登录的账号,密码等等,当我们使用NSUserDefaults时,它是将信息写入到本地的一个plist文件里,我们都知道 删除plis ...
- SharePoint 2013技巧分享系列 - 同步Exchange显示高清用户照片
在“SharePoint 2013技巧分享系列 - Active Directory同步显示用户照片”文中介绍了如何同步Active Directory显示用户照片,但是同步完成后,用户照片尺寸和清晰 ...
- mysql 加锁测试
今天研究cobar,做执行时间测试,需要对表记录加锁.用了以下两种方式为表记录加锁. 第一种方式: begin; //开始事务 select * from 表名 ( where ……) for ...
- MVC之前的那点事儿系列(8):UrlRouting的理解
文章内容 根据对Http Runtime和Http Pipeline的分析,我们知道一个ASP.NET应用程序可以有多个HttpModuel,但是只能有一个HttpHandler,并且通过这个Http ...