Hi All,
We have a C# console application built on .Net core. We have requirement to parse SNMP trap in C#. My question is is there any method/class available in to parse below sample SNMP trap?
Sample SNMP trap:
2020-08-04 04:56:45
04:56:44 2020/08/04 PDU INFO:
notificationtype TRAP
version 0
receivedfrom UDP: [192.168.100.100]:38977->[192.168.100.20]:162
errorstatus 0
messageid 0
community admin
transactionid 1056
errorindex 0
requestid 0
VARBINDS:
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (57947996) 6 days, 16:57:59.96
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: IF-MIB::linkUp
IF-MIB::ifIndex.19 type=2 value=INTEGER: 19
IF-MIB::ifAdminStatus.19 type=2 value=INTEGER: 1
IF-MIB::ifOperStatus.19 type=2 value=INTEGER: 1
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 type=64 value=IpAddress: 192.168.100.100
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 type=4 value=STRING: "admin"
SNMPv2-MIB::snmpTrapEnterprise.0 type=6 value=OID: SNMPv2-SMI::enterprises.25506.11.1.219
Can anyone please let us know the best way to get this done!!
Any help is appreciated. Thank you in advance!!
Best Regards,
Hari