Quantcast
Channel: C# Based Open Source SNMP Library for .NET and Mono
Viewing all articles
Browse latest Browse all 576

New Post: Using a Sequence datatype with SendTrapV2

$
0
0
We have an application that is using your Messenger namespace and is working fine with basic data types (OctetString) with an oid being used to construct a Variable, added to the List<Variable>and then being used with the Messenger.SendTrapV2 method. We need to include a Sequence type of OctetStrings to the Variable list, but it is not clear on how to accomplish this. I have tinkered around with getting as far as adding a list of ISnmpData types to a Sequence, but that is as far as I can go.. What am I missing?
  List<ISnmpData> snmpData = new List<ISnmpData>();
  snmpData.Add(new OctetString("Key"));
  snmpData.Add(new OctetString("Value"));
  Sequence seq = new Sequence(snmpData);
...
  Messenger.SendTrapV2(,,,,List<Variable>); ...How to include a Sequence???);

Viewing all articles
Browse latest Browse all 576

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>