Author | Forum: PowerSNMP for .NET Topic: trap handling |
tgrharris aharris@harris.com From: Palm Bay, FL USA Posts: 25 Member Since: 06/22/09 |
posted September 7, 2010 5:06 PM I am using the Manager.Start(SlaveThreadStart worker, object state) method to send get/set requests to agents. I call ManagerSlave calls from there to parse returned messages. Everything works great for gets and sets using that paradigm. I also want to process trap messages. I tried calling Manager.Start(ManagerMessageReceived worker, object state) and I get an exception of: "Only one usage of each socket address (protocol/network address/port) is normally permitted". When I look at the Manager example it appears that is what the sample is doing. Am I missing something? Thanks. |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted September 7, 2010 5:13 PM Hi, The most likely explanation is that another trap service is already running on your machine. Hope it helps, -ken ------ |
tgrharris aharris@harris.com From: Palm Bay, FL USA Posts: 25 Member Since: 06/22/09 |
posted September 7, 2010 5:15 PM You are correct, as always. Thanks for the ultra fast response:-) |
tgrharris aharris@harris.com From: Palm Bay, FL USA Posts: 25 Member Since: 06/22/09 |
posted September 7, 2010 5:28 PM Follow up question. I create separate Manager objects for classes of devices (each with their own parsed MIBs). Each of those Managers would need to process specific traps for each device type (based on their specific traps defined in their MIBs). Can I not have more than one trap handler? Or do I need to have a global trap handler Manager that somehow sends the messages through some application protocol to these individually instantiated Manager objects? |
K M Drake![]() From: Utica, NY USA Posts: 3406 Member Since: 07/14/00 |
posted September 8, 2010 8:54 AM Hi, You can have multiple managers listening for traps, but only if they have unique address/port combinations. You can probably do what you want with a single manager to receive the trap messages, and multiple MibNodes objects to process the traps. Actually, you can probably do it with just the single MibNodes collection (your Manager's Mib field), but I'm just guessing without knowing the specifics of what you are doing. -ken ------ |
Reply | PowerSNMP for .NET Topics | Forums |
This site is powered by
![]() |