| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
fmms
12年前发布

C# 实现的SNMP库 SNMP#NET

     <p>这是用 C# 语言实现的简单网络管理协议SNMP 库,支持的版本包括1/2/3</p>    <p>示例代码:<br /> </p>    <pre class="brush:c#; toolbar: true; auto-links: false;">string host = "localhost"; string community = "public"; SimpleSnmp snmp = new SimpleSnmp(host, community);  if (!snmp.Valid) {  Console.WriteLine("SNMP agent host name/ip address is invalid.");  return; } Dictionary result = snmp.Get(SnmpVersion.Ver1, new string[] { ".1.3.6.1.2.1.1.1.0"} ); if (result == null) {  Console.WriteLine("No results received.");  return; } foreach (KeyValuePair kvp in result) {  Console.WriteLine("{0}: {1} {2}", kvp.Key.ToString(),               SnmpConstants.GetTypeName(kvp.Value.Type), kvp.Value.ToString()); }</pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1325830713406" target="_blank">http://www.open-open.com/lib/view/home/1325830713406</a></p>    <p></p>     
 本文由用户 fmms 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1325830713406.html
C# 网络工具包