Hi there,
i have a question regarding the isnmpdata interface when you try to send a trap.
Starting point is the call of this method
Messenger.SendTrapV1(new IPEndPoint(targetip, 162), IPAddress.Loopback, new OctetString("public"), oid, GenericCode.ColdStart, 0, 0,variables );
I want to give this trap a data string like "this is a test trap".
My idead was using the CreateSNMPData Method from the DataFactory, but i always get exceptions.
For example this code:
List<Variable> variables = new List<Variable>();
oid = new ObjectIdentifier(txt_oid.Text.Trim());
string test = "Test trap from .......";
byte[] content = StringToByteArray(test);
variables.Add(new Variable(oid,DataFactory.CreateSnmpData(content)));
But i only get an exception "unsupported data type: 84"
Anyone has a good example for actually sending data with "text" information?
Thank you in advance :)
i have a question regarding the isnmpdata interface when you try to send a trap.
Starting point is the call of this method
Messenger.SendTrapV1(new IPEndPoint(targetip, 162), IPAddress.Loopback, new OctetString("public"), oid, GenericCode.ColdStart, 0, 0,variables );
I want to give this trap a data string like "this is a test trap".
My idead was using the CreateSNMPData Method from the DataFactory, but i always get exceptions.
For example this code:
List<Variable> variables = new List<Variable>();
oid = new ObjectIdentifier(txt_oid.Text.Trim());
string test = "Test trap from .......";
byte[] content = StringToByteArray(test);
variables.Add(new Variable(oid,DataFactory.CreateSnmpData(content)));
But i only get an exception "unsupported data type: 84"
Anyone has a good example for actually sending data with "text" information?
Thank you in advance :)