C#中的SNMP代理和客户端 [英] SNMP agent and client in C#

查看:122
本文介绍了C#中的SNMP代理和客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我做了很多谷歌搜索,还没有找到答案.

我需要用C ++编写SNMP代理(实际上将其添加到atl dcom服务器),该代理通过SNMP陷阱消息广播状态信息.然后,我需要编写一个C#应用程序来监视已广播的这些SNMP陷阱(状态)消息.

有谁知道我该如何编写一个简单的代理程序以在SNMP中广播陷阱消息?
我已经找到了一些有关此的信息,但似乎很令人困惑.

有谁知道我如何在C#应用程序中读取/监视这些SNMP陷阱消息?我根本找不到C#示例,或者它们只是让我难以理解.

任何帮助将不胜感激.

谢谢,
doug@tankoxious.com

Hello, I''ve done a bunch of googling and have not found an answer to this.

I need to write a SNMP agent in C++ (actually add it to an atl dcom server) that broadcasts status information via SNMP trap messages. Then I need to write a C# application to monitor these SNMP trap (status) messages that have been broadcasted.

Does anyone know how I can write a simple agent to broadcast trap messages in SNMP?
I have found some info on this but it seems very confusing.
and
Does anyone know how I can read / monitor these SNMP trap messages in a C# application? I can find no C# examples at all, or they just elude me.

Any help would be greatly appreciated.

Thanks,
doug@tankoxious.com

推荐答案

您的设计无法扩展.
IP网络无法支持面向世界的广播.
陷阱应发送到(少数)可配置地址,可以通过DNS查询获得.
这些地址应该属于服务器,该服务器最终可以将数据公开给任何可能需要的客户端.
没有任何东西-当时-禁止您指定子网定向广播,但是...我不会是存在此类设备的网络的管理员!
Your design doesn''t scale.
An IP network cannot support world-directed broadcasts.
Traps should be sent to a (few) configurable addresses, possible obtained by a DNS query.
Those addresses should belong to server that can eventually expose the data to whatever client may need it.
Nothing - at that point- prohibits you to specify a subnet directed broadcast, but ... I wouldn''t be the administrator of a network where such devices are present!


这篇关于C#中的SNMP代理和客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆