PowerSNMP for .NET | Send Inform Code Example

See all PowerSNMP for .NET Code Examples

Send Inform Example

This example demonstrates sending an Inform and receiving the response.

 

//Create Agent, and Socket to send Inform from
Agent agent1 = new Agent();
SnmpSocket agentSocket = new SnmpSocket(agent1);

//Create an inform message, the 2nd value should be changed to the relevant OID
InformMessage inform = new InformMessage(agent1.SysUpTime, "1.3.6.1.4.42.3.1");
ResponseMessage response = agentSocket.GetResponse(inform, new Dart.Snmp.IPEndPoint("myManagerAddress", Manager.DefaultPort));

Console.WriteLine("Received response to inform: " + response.ToString());

 

To download a trial please visit the PowerSNMP for .NET product page.