saMsgBuild( )

NAME

saMsgBuild( ) - build and encode a message and send it to the master agent

SYNOPSIS

void saMsgBuild 
    ( 
    VBL_T *        pVblist,   /* pointer to varbind list */ 
    SA_HEADER_T *  pHdr,      /* pointer to header block */ 
    SA_DEMUX_T *   pDemuxer,  /* pointer to demuxer      */ 
    PTR_T          saId       /* IPC handle              */ 
    )

DESCRIPTION

The hdrBlkCreate( ) routine calls saMsgBuild( ) to build a message, encode it, and transmit it to the master agent. The message is built up from the information provided in the input parameters:

pVblist
Expects a pointer to the VBL_T structure containing the varbind list you want to include in the message.

pHdr
Expects a pointer to the header for this message.

pDemuxer
Expects a pointer to the demuxer information for this message. The demuxer information consists of a string and an object ID. In a message dealing with a version 1 request, the string is the community string and the object ID is unused. In a message dealing with a version 2 request, the string is the local entity string from the context and the object ID is the local time object ID from the context.

saId
Expects a pointer to the IPC mechanism (a message queue ID) that the master agent can use to respond to this message.

To encode the message, this routine calls snmpSubEncode( ). To send the message to the master agent, this routine calls saIoWrite( ).

RETURNS

N/A

SEE ALSO

saIoLib