Ejemplo n.º 1
0
 private static void WatcherTrapV1Received(object sender, TrapV1MessageReceivedEventArgs e)
 {
     Console.WriteLine("TRAP version {0}; {1}", e.TrapV1Message.Version, e.TrapV1Message);
     foreach (var variable in e.TrapV1Message.Variables())
     {
         Console.WriteLine(variable);
     }
 }
Ejemplo n.º 2
0
 private static void TrapV1Received(object sender, TrapV1MessageReceivedEventArgs e)
 {
     _context.Post(delegate
     {
         if (!_closed)
         {
             var pdu = e.TrapV1Message.Pdu();
             if (pdu.ErrorStatus.ToInt32() == 0)
             {
                 foreach (var v in pdu.Variables)
                 {
                     TrapReceived(v.Id.ToString(), v.Data, e.Sender);
                 }
             }
         }
     }, "SnmpAgent.TrapV1Received");
 }
Ejemplo n.º 3
0
 private static void WatcherTrapV1Received(object sender, TrapV1MessageReceivedEventArgs e)
 {
     Console.WriteLine(e.TrapV1Message);
 }
Ejemplo n.º 4
0
 private void ListenerTrapV1Received(object sender, TrapV1MessageReceivedEventArgs e)
 {
     LogMessage(string.Format(CultureInfo.InvariantCulture, StrSends, DateTime.Now, e.Sender, e.TrapV1Message.ToString(Objects)));
 }