ImageVerifierCode 换一换
格式:DOC , 页数:40 ,大小:275.82KB ,
资源ID:9311931      下载积分:10 金币
快捷注册下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

开通VIP
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.zixin.com.cn/docdown/9311931.html】到电脑端继续下载(重复下载【60天内】不扣币)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

开通VIP折扣优惠下载文档

            查看会员权益                  [ 下载后找不到文档?]

填表反馈(24小时):  下载求助     关注领币    退款申请

开具发票请登录PC端进行申请

   平台协调中心        【在线客服】        免费申请共赢上传

权利声明

1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

注意事项

本文(Agent--中文译文.doc)为本站上传会员【仙人****88】主动上传,咨信网仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知咨信网(发送邮件至1219186828@qq.com、拔打电话4009-655-100或【 微信客服】、【 QQ客服】),核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载【60天内】不扣币。 服务填表

Agent--中文译文.doc

1、Contents 0 Agent++ 总体说明: (1)Snmp++     Snmp++是为网络管理应用程序开发者提供的具有SNMP服务的一套C++类的集合。它具有基于面向对象模型建立的SNMP应用程序接口,在最小化的范围内使用已经存在的SNMP库,保证了程序的高效和可移植性。对于使用TCP/IP协议的Internet来说,Snmp++封装了底层的Socket操作,提供了简单的API供开发者使用。 (2)Agent++     Agent++是在Snmp++的基础上,扩展了Snmp++中的概念,它是用来开发SNMP代理的一套C++类的集合。它继承了Snmp++的优点,封装了

2、绝大部分的SNMP的标准操作,并且利用面向对象的特性,使开发者能够通过派生的子类,重载其中的虚函数,根据应用程序的需要灵活控制程序。 在Agent++类库,定义和实现了在SMI和MIB中的文本语法规定,如:Group,Table,TableEntry,Index等。主要的类与文本语法规定的对应关系如表1所示。 SNMP 协议与 Agent ++类 的表示的对应关系 SNMP 协议 Agent ++类 网关代理 Mib 用户MIB MibGroup Table MibTable TableEntry MibTableEntry Instance Miblea

3、f Snmp 会话 Snmpx PDU Pdux 变量绑定 VB Vbx 对象标志符(OID) Oidx 按照功能划分,Agent++软件开发包由4个模块组成,如图3所示。通 信 模 块 消 息 处 理 模 块 操 作 定 位 模 块 MIB 管 理 模 块 消息接收处理 消息接收处理 图3 Agent ++ 功能模块图 通信模块负责接收和发送SNMP消息,它在指定端口(通常是161)接收到来的请求消息,并发送响应消息;在指定端口(通常是162)接收和发送陷阱、信息通知消息。同时,它还要给消息处理模块提供接收到消息、发送

4、消息的工具函数。在Agent++中,属于通信模块的类主要有Snmpx、RequestList、Request等。 消息处理模块负责解析输入的请求消息,进行安全验证。它对通信模块传来的SNMP消息进行解析,判断解析结果是否合法,同时,也要把解析出来的社团名(community)与规定的社团名进行比较验证。如果解析结果合法且社团名验证通过,才能进行下一步操作。在Agent++中,属于消息处理模块的类主要有Request等。 操作定位模块负责根据消息处理模块解析的结果,在MIB库中查找管理对象。它按照消息中包含的管理对象的对象标志符(OID),查找需要访问的管理对象。在Agent++中,属于

5、操作定位模块的类有Request、Mib、MibGroup、MibTable等。 MIB管理模块负责SNMP操作的具体实现。它按照操作类型(读或写),首先判断能否对管理对象进行操作,然后访问MIB库,按照要求读取数据或更新数据。在Agent++中,属于MIB管理模块的类有Request、MibTable、MibTableRow、Mibleaf等。     通信模块消息处理模块和操作定位模块对所有的MIB(包括私有的MIB)都是相同的,开发具体设备的代理时可以直接利用这些模块。MIB管理模块只提供了基本的操作,还需要根据具体的MIB文件,重新定制MIB管理模块。 1.Introduc

6、tion 介绍 Various Simple Network Management Protocol (SNMP) Application Programmers Interfaces (APIs) exist which allow the creation of network management applications. SNMP++ is such an API but in contrast to many others it offers the advantages of object oriented programming. An object oriented app

7、roach to SNMP network programming provides many benefits including ease of use, safety, portability and extensibility. The SNNP++ source code (C++) is freely available from the Hewlett Packard Company WWW server[+] as long as their copyright notice is preserved. SNMP++ is designed to support the dev

8、elopment of SNMP manager entities in the first place. AGENT++ extends the basic concepts of SNMP++ to support the development of SNMP agents and SNMP entities playing a dual role. Agent++ 扩展了 SNMP++ 的基本概念,支持 SNMP AGENT++ 和 SNMP 的双面角色。 If you are looking for an introduction to SNMP and SNMP MIBs,

9、 I recommend [Perkins97]. 1.Objectives of AGENT++ Ease of Use AGENT++ has been designed to make the development of simple network management protocol agents simple. Using the AGENT++ API the programmer does not need to be concerned with details about SNMP protocol engine and dispatch table. The

10、programmer can focus on implementing method routines and management instrumentation. The OO approach encapsulates and hides many internals like management of incoming SNMP requests, looking up mappings in the dispatch table, calling the appropriate method routines, sending responses and traps. Detai

11、ls concerning the simple network protocol itself are encapsulated by SNMP++ (see the SNMP++ specification for details). Rapidity of Implementation The AGENT++ API undertakes nearly any task of a SNMP agent implementation that can be generalised. Therefore the implementation of SNMP agents with AG

12、ENT++ saves a lot of time and money. The OO approach of AGENT++ supports the generalisation of the key tasks of a SNMP agent efficiently without making the API difficult to use. Extensibility Extensions to the AGENT++ API can be done in many ways. This includes supporting new versions of SNMP (e.

13、g. version 3) and their administrative framework, base classes for additional types of managed objects, and adding new features. Through C++ class derivation, users of AGENT++ can inherit what they like and override what they wish to overload: · A key concept of AGENT++ is the sub-classing of mana

14、ged object base classes by the user. The user overrides virtual member functions of these base classes when she or he needs a specialisation to the default behaviour of the respective class member function. Portability//方便性 AGENT++ offers a maximum of portability due to the use of pure C++ without

15、 any operating system specific calls. So its only portability limitation is SNMP++ which is available for many Unix derivates and Microsoft Windows. Nevertheless if you want to implement a multi-threaded SNMP agent AGENT++ is limited to POSIX threads compatible UNIX operating systems, e.g. Solaris,

16、Digital Unix, and Linux. The public interface of the AGENT++ API remains the same across any platform. A programmer who codes to AGENT++ does not have to make changes to move it to another platform. Extensibility 扩展性 Extensions to the AGENT++ API can be done in many ways. This includes supporting

17、 new versions of SNMP (e.g. version 3) and their administrative framework, base classes for additional types of managed objects, and adding new features. Through C++ class derivation, users of AGENT++ can inherit what they like and override what they wish to overload: · A key concept of AGENT++ is

18、 the sub-classing of managed object base classes by the user. The user overrides virtual member functions of these base classes when she or he needs a specialisation to the default behaviour of the respective class member function. · Agent++ 一个重要的概念就是由用户管理的子类积累。 An Introductory Example To get an

19、idea of what benefits AGENT++ offers to a SNMP agent programmer, here is an example that shows the implementation of an agent for a coffee-percolator. For now, a single scalar managed object which represents the temperature of the coffee in the coffee-pot will do. Additional managed objects e.g. tho

20、se that demonstrate how SNMP tables can be implemented with AGENT++ will follow later on. 简单标量管理对象。 2.Explanation of Introductory Example 一个介绍性的例子。 The main procedure of an AGENT++ SNMP agent (shown in figure 1) can be divided into three sections: 1. Setting up the SNMP protocol engine 设置SN

21、MP 协议驱动 First of all an extended version of the SNMP++ Snmp class ( Snmpx) is used to create a SNMP session that will be used for incoming SNMP requests. The example uses the standard SNMP port 161 to listen on, although any (available) UDP port can be chosen. If the session has been created succes

22、sfully the session object snmp has to be registered to the static class RequestList which queues and manages SNMP requests. SNMPX 类 用来产生一个 SNMP 线程,使用标准的 SNMP 口 161 监听,snmp 线程注册到 RequestList 类中,RequestList 能够管理 SNMP 的请求。 2. Create and register the MIB objects 产生和注册MIB 对象。 The mib object is crea

23、ted which represents the conceptual database containing the management information of the agent (Management Information Base). MIB 对象代表了 Agent 的管理信息。 Then all objects that should be supported by the agent MIB are added. Each such object contains one or more instances of managed objects related to

24、 a subtree of the management information tree. The classes systemGroup, snmpGroup, and trapDestGroup are provided by AGENT++, which include the managed objects of the MIB II system and snmp group, as well as managed objects needed for trap destination registration. systemGroup, snmpGroup, and trap

25、DestGroup 类 包含了 MIB II 系统和snmp 组 的管理信息。也包含了 trap 目的的注册信息。 3. Loop forever for incoming SNMP requests 循环等待到来的 snmp 请求。 The receive method of the RequestList object is used to wait for incoming SNMP request. The method takes as argument the maximum time to wait for a request in seconds. Note: If t

26、he agent uses multi-threading the RequestList can contain more than one request. A SNMP request is processed through the process_request method which propagates each sub-request to the appropriate MIB object. RequestList 对象用来等待到来的 snmp 请求。使用process_request 方法来处理子需求。 How a simple managed object l

27、ike coffeeTemperature can be implemented using the AGENT++ API is shown by figures 2 and 3. The class coffeeTemperature is derived from MibLeaf which is itself derived from MibEntry. MibLeaf is the base class for all instances of managed objects that are leafs of the management information tree, als

28、o called scalar managed objects. The constructor of coffeeTemperature calls the constructor of its base class MibLeaf with three arguments: coffeeTemperature 是一个简单的管理类,源于 MibLeaf 类,而MibLeaf 类又源自 MibEntry。MibLeaf 是所有管理控制类的基类,是管理信息树的叶子,也称作标量控制对象。 coffeeTemperature 的构造 调用了MibLeaf的构造,在以下3点需要说明: · th

29、e object identifier of the managed object instance the MIB object is representing. · 实例化MIB对象,表示 · the access rights to be used (coffeeTemperature is read only) · 使用的入口权限(coffeeTemperature 是只读) the syntax in form of a from SnmpSyntax derived object that represents an object oriented view of St

30、ructure of Management Information (SMI) Abstract Syntax Notation (ASN.1) data types which are used by SNMP (see figure 4 or the SNMP++ specification for sub-classes of SnmpSyntax). 源自SnmpSyntax 类的对象的语法组成,代表了面向对象的ASN.1规范的 SMI 管理信息,由 SNMP 使用。 Because coffeeTemperature has not a constant value, we ne

31、ed to redefine the virtual member function get_request inherited from MibLeaf to get the actual temperature of the coffee from the management instrumentation. To translate between the different management information representations used by the management instrumentation (temperature measured in Fah

32、renheit) and the SNMP MIB definition (Celsius) the method get_coffee_temperature is used. 因为 coffeeTemperature 没有常量,我们需要重新定义从MibLeaf 继承而来的get_request 函数,以便从管理机制中得到实际的coffee的温度。 The coffeeTemperature::get_request method first gets the actual temperature and stores it in value which is a pointer to

33、 the SnmpSyntax object that has been given as third parameter to the MibLeaf constructor. Then MibLeaf::get_request is called to actually answer the SNMP request using the value of value. That’S all! Everything else is done by AGENT++. coffeeTemperature::get_request 方法第一次得到实际的温度把它存到了value ,这是一个指向S

34、nmpSyntax 对象的指针,构造的时候采用了MibLeaf 的第三个参数。然后MibLeaf::get_request 被调用,使用value 值来应答SNMP 的请求, 其它事情都由 AGENT++处理了。 · Figure 1: An example for a main routine of a SNMP agent to manage a coffee-percolator. Figure 2: Class definition for the managed object representing the coffee temperature 图2 :代表 cof

35、fee temperature 类定义 Figure 3: Class implementation of the managed object representing the coffee temperature 图3:代表 coffee temperature 类的执行 3.AGENT++ Features · Power and Flexibility AGENT++ (in conjunction with SNMP++) provides a power and flexibility which would otherwise be difficult to

36、implement and manage. A programmer using the AGENT++ API can concentrate his affords on the management instrumentation and method routines. He or she needs nothing to know about a SNMP protocol engine or dispatch table. Even the tricky task to manage dynamic SNMP tables that follow the SMIv2 row sta

37、tus textual convention is undertaken by AGENT++. · Multi-Threaded Request Processing (New!) A MIB object method routines and thus its management instrumentation can run in an extra thread (pseudo) parallel executed to the agent main process. So time intensive calculations or information retrieva

38、ls do not block the agent. This could increase the availability and reliability of the agent. Version 1.x of AGENT++ supported multi-processing. The use of multi-processing has had the following disadvantages: o Multi-processing needs a significant larger amount of system resources (i.e., memory

39、 and CPU) than multi-threading. o Processes need to communicate with each other. For this purpose System V Inter Process Communication (IPC) has been used by AGENT++ 1.x. A lot of coding had to be done to get this communication working, nevertheless the IPC could not completely hidden. As a result

40、 the user interface was not as simple as it could have been. Consequently, AGENT++v2.0 user interface, as well as its code, is much easier to understand. o Multi-threading offers a (pseudo) parallel working management instrumentation access to the memory of the whole agent and its MIB. A child

41、process has only a copy of the agents memory at the child's birth time, so it cannot recognise intermediate updates to the agent MIB. What is new: Agent++ Version 2.0 and greater supports the execution of the management instrumentation[+] as multiple threads. Each SNMP request can be separately ex

42、ecuted as a thread. For each instance of a MIB object (MibLeaf or MibTable) there can be only a single thread executing one of its method routines at the same time. Thus, you do not have to worry about synchronising memory reads/writes within your instrumentation methods. 新内容:Agent++ 2.0版本 支持管理控制作

43、为多线程。每个snmp请求都可以分做 单线程。对每一个mib 对象(MibLeaf or MibTable)来说,在同一时间仅仅有一个单线程执行它的一个方法,因此,不需要担心执行方法的读写同步问题。 As multi-processing is no longer supported, the methods MibEntry::update, MibEntry::result, Mib::busy, and Mib:process_updates known from version 1.0x have been removed. · MIB II System and SNMP Gr

44、oup For the programmer convenience an implementation of the MIB II’S system and snmp group is provided with AGENT++. 提供了MIB II’S 系统和snmp group。 · Proxy Support for Arbitrary Management Information Subtrees An arbitrary subtree of another agent’S management information tree can be included in

45、 an agent’S MIB simply be give the other agent’S management transport address and the subtree’S object identifier when defining such an proxy MIB object. As long as the proxy subtrees are disjunctive any combination of such proxy MIB objects can be used at the same time with local MIB objects. · S

46、upport for Persistent MIB Objects Scalar and table managed objects can be saved to disk and reloaded from it. This enables a user to easily save management information persistently. · Support for SNMPv1 and SNMPv2c SNMP++ supports SNMPv1 and SNMPv2c thus AGENT++ likewise supports both versions

47、 A support for SNMPv3 and its user and view based administrative model will follow in the near future. · Detailed Logging // 详细的日志 AGENT++ has a detailed logging mechanism supporting five log classes (error, warning, info, debug, event) with each supporting up to 16 levels. This makes debugging

48、of your agent very easy and gives you full control about what is happening when your agent is running. 4.An Introduction to SNMP++ SNMP++ is a set of C++ classes which provide SNMP services to a network management application developer. An overview over these C++ classes gives figure 4. For furth

49、er documentation about SNMP++ please read the corresponding specification which is freely available[+] from the Hewlett Packard company. AGENT++ comes with a set of subclasses for some classes of SNMP++ which are shown in figure 4. Those subclasses provide extended functionality to their SNMP++ ba

50、se classes, so their class names contain an appended ``x''. Significant extensions and improvements have been made to Snmp by Snmpx, to Vb by Vbx, and to Oid by Oidx. AGENT++ 提供了一系列的snmp++的子类集,这些子类集由 snmp++ 扩展而来,因此类名后包含了x。 Figure 4: Object Modelling Technique (OMT) view of the SNMP++ Framework

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服