SYNAPSE - Synchronous TCP/IP Library for Delphi
Other related information can be found at http://www.ararat.cz/synapse/
Class: TTrapPDU (data object abstracts Trap PDU data packet)
- Properties:
- TrapPort: integer
Port for Trap management. Default value is 162.
- Version: integer
SNMP packet version. Default is 0 (SNMP ver.1).
- PDUType: integer
SNMP operation type. Default value for TRAP is PDU_TRAP ($A4).
- Community: string
Community string to access SNMP services (case sensitive).
- Enterprise: string
MIB value to identify the object that sent the trap.
- TrapHost: string
Address of TRAP sender (IP address).
- GenTrap: integer
Generic trap identification.
- SpecTrap: integer
Specific trap identification.
- TimeTicks: integer
Number of 1/100th of seconds since last reboot or power up.
- SNMPMibList: TList
List of TSNMPMib objects.
- Methods:
- Procedure Clear
Clears all object properties to default values.
- Procedure MIBAdd(MIB, Value: string; ValueType:integer)
Add entry to SNMPMibList. For query use value as empty string, and ValueType as ASN1_NULL.
- Procedure MIBdelete(Index: integer)
Delete entry from SNMPMibList.
- Function MIBGet(MIB: string): string
Search SNMPMibList list for MIB and return correspond value.
- Function EncodeTrap: integer
Encode object properties to a SNMP Trap buffer to send.
- Function DecodeTrap: integer
Decode SNMP trap buffer into object properties.
Class: TTrapSNMP
- Properties:
- Trap: TTrapPDU
Data object that generate or receive traps.
- SNMPHost: string
Address of Trap SNMP receiver (IP address or domain name) where you want to send a trap.
- Timeout: integer
Define timeout in millisecond for all SNMP operations. Default value is 5 seconds.
- Methods:
- Function Send: integer
Send a Trap data to SNMPHost.
- Function Recv: integer
Look for a Trap, and if it found it, assign to Trap the information.
- Not class (but cohere) functions:
- Function function SendTrap(Dest, Source, Enterprise, Community: string; Generic, Specific, Seconds: integer; MIBName, MIBValue: string; MIBType: integer): integer
This is a useful function and example for TTrapSNMP object. It implements a Trap to send with all data in the parameters.
- Function function RecvTrap(var Dest, Source, Enterprise, Community: string; var Generic, Specific, Seconds: integer; var MIBName, MIBValue: TStringList): integer
This is a useful function and example for TTrapSNMP object. It receives a Trap and return all the data that comes with it.