Jump to main content

##

# TCPIP_SNMP_TRAPv1Notify Function

## C

    bool TCPIP_SNMP_TRAPv1Notify(
        SNMP_ID var,
        SNMP_VAL val,
        SNMP_INDEX index,
        SNMP_TRAP_IP_ADDRESS_TYPE eTrapMultiAddressType
    );

## Description

This function creates SNMP trap PDU and sends it to previously specified remoteHost. snmpv1 trap pdu: | PDU-type | enterprise | agent-addr | generic-trap | specific-trap | | time-stamp | varbind-list |

The v1 enterprise is mapped directly to SNMPv2TrapOID.0.

## Preconditions

TCPIP_SNMP_NotifyIsReady() is already called and returned true.

## Parameters

Parameters | Description
--- | ---
var | SNMP var ID that is to be used in notification.
val | Value of var. Only value of uint8_t, uint16_t or uint32_t can be sent.
index | Index of var. If this var is a single,index would be 0, or else if this var Is a sequence, index could be any value from 0 to 127.
eTrapMultiAddressType | Trap address type.

## Remarks

This would fail if there were not UDP socket to open.