# Class TSNMPSend

Description | Hierarchy | Fields | Methods | Properties

## Unit

snmpsend

## Declaration

`type TSNMPSend = class(TSynaClient)`

## Description

Implementation of SNMP protocol.

Note: Are you missing properties for specify server address and port? Look to parent TSynaClient too!

## Hierarchy

- TObject
- TSynaClient
- TSNMPSend

## Overview

### Methods

| `constructor Create;`
| `destructor Destroy; override;`
| `function SendRequest: Boolean;`
| `function SendTrap: Boolean;`
| `function RecvTrap: Boolean;`
| `function DoIt: Boolean;`

### Properties

| `property Buffer: AnsiString read FBuffer write FBuffer;`
| `property HostIP: AnsiString read FHostIP;`
| `property Query: TSNMPRec read FQuery;`
| `property Reply: TSNMPRec read FReply;`
| `property Sock: TUDPBlockSocket read FSock;`

## Description

### Methods

| `constructor Create;`

| `destructor Destroy; override;`

| `function SendRequest: Boolean;`

Connects to a Host and send there query. If in timeout SNMP server send back query, result is `True`. If is used SNMPv3, then it synchronize self with SNMPv3 agent first. (It is needed for SNMPv3 auhorization!)

| `function SendTrap: Boolean;`

Send SNMP packet only, but not waits for reply. Good for sending traps.

| `function RecvTrap: Boolean;`

Receive SNMP packet only. Good for receiving traps.

| `function DoIt: Boolean;`

Mapped to SendRequest internally. This function is only for backward compatibility.

### Properties

| `property Buffer: AnsiString read FBuffer write FBuffer;`

contains raw binary form of SNMP packet. Good for debugging.

| `property HostIP: AnsiString read FHostIP;`

After SNMP operation hold IP address of remote side.

| `property Query: TSNMPRec read FQuery;`

Data object contains SNMP query.

| `property Reply: TSNMPRec read FReply;`

Data object contains SNMP reply.

| `property Sock: TUDPBlockSocket read FSock;`

Socket object used for TCP/IP operation. Good for seting OnStatus hook, etc.

Generated by PasDoc 0.9.0 on 2012-04-23 21:38:51