masterIoWrite( )

NAME

masterIoWrite( ) - send the encoded buffer to the subagent

SYNOPSIS

STATUS masterIoWrite 
    ( 
    EBUFFER_T *  pBuf,  /* reply message to be sent */ 
    PTR_T        saId,  /* subagent address         */ 
    INT_32_T     flg    /* type of message          */ 
    )

DESCRIPTION

This routine transmits the byte array at pBuf to the subagent at saId. This routine is called from a wide variety of functions in the master agent. For example, masterIpcSend( ) calls this routine when it needs to query the subagent about one of the MIB variables it manages. Likewise, the masterIpcAyt( ) function calls this routine when needs to check the IPC link status. Similarly, snmpQueMonitor( ) calls this routine to tell the agent the results of a registration or deregistration request.

The master agent uses the value flg to specify the general nature of the message it is writing to the subagent, which partially determines how the subagent responds. For example, when the master agent is responding to the subagent after successfully handling its registration request, the master agent uses a flg value of REG_COMPLETE. When the master agent does an "are you there" check, it specifies a flg value of IPC_AYT. REG_COMPLETE and IPC_AYT are the only currently valid flg values.

RETURNS

OK or ERROR.

SEE ALSO

masterIoLib