smux_response Subroutine

Purpose

Sends a response to a Simple Network Management Protocol (SNMP) agent.

Library

SNMP Library (libsnmp.a)

Syntax

#include <isode/snmp/smux.h>

int smux_response ( event)
struct type_SNMP_GetResponse__PDU *event;

Description

The smux_response subroutine sends a protocol data unit (PDU), also called an event, to the SNMP agent. The subroutine does not check whether the Management Information Base (MIB) tree is properly registered. The subroutine checks only to see whether a Transmission Control Protocol (TCP) connection to the SNMP agent exists and ensures that the event parameter is not null.

This subroutine is part of the SNMP Application Programming Interface in the TCP/IP facility.

Parameters

Item Description
event Specifies a type_SNMP_GetResponse__PDU variable that contains the response PDU to send to the SNMP agent.

Return Values

If the subroutine is successful, OK is returned. Otherwise, NOTOK is returned.

Error Codes

If the subroutine is unsuccessful, the smux_errno global variable is set to one of the following values:

Value Description
parameterMissing Indicates the parameter was null. When the parameter is fixed, the subroutine can be reissued.
invalidOperation Indicates the subroutine was attempted before the smux_init subroutine successfully completed. Start over with the smux_init subroutine.
youLoseBig Indicates a SNMP code problem has occurred and the TCP connection is closed. Start over with the smux_init subroutine.