masterIpcSend( )

NAME

masterIpcSend( ) - send a message to a subagent

SYNOPSIS

INT_32_T masterIpcSend 
    ( 
    EBUFFER_T *  pBuf,      /* message to be sent  */ 
    PTR_T        ipchandle  /* address of subagent */ 
    )

DESCRIPTION

The SNMP master agent calls when it needs to send a query in buf to the subagent at the ipchandle address. If this routine is used with snmpMasterHandlerAsync( ), you must rewrite the function according to the prototype of IPCSEND_AS_T (see subagent.h). The additional parameter reqid in this prototype is the request ID of the message being sent. Use reqid to call snmpMasterCleanup( ) if the IPC layer times out.

Internally, this function calls masterIoWrite( ) to put a message on the subagent's message queue. If you have rewritten masterIoWrite( ) to use different IPC mechanism, such as sockets, you should take care that your rewrite of masterIoWrite( ) is compatible with its use in masterIpcSend( ).

RETURNS

0, if the packet has been sent successfully; 1, if an error has been detected that caused the objects to be marked inactive and possibly removed; 2, if the processing of the current packet is allowed to continue without freeing up objects.

SEE ALSO

masterIoLib