hdrBlkBuild( )

NAME

hdrBlkBuild( ) - create the header block and the demuxer information

SYNOPSIS

void hdrBlkBuild 
    ( 
    SA_HEADER_T *  pHdr,     /* header block                    */ 
    VBL_T *        pVblist,  /* vblist that was built           */ 
    int            opt,      /* reg_option suggesting reg/dereg */ 
    int            group,    /* group ID                        */ 
    PTR_T          saId     /* ipchandle                       */ 
    )

DESCRIPTION

This routine is called to start a process that encodes a message and transmits it to the master agent. Internally, this routine first prepares a header block and demuxer information. These are then passed in to a saMsgBuild( ) call, along with a varbind list, and a pointer to the IPC mechanism that the master agent can use to respond to this message. As input, hdrBlkBuild( ) expects:

pHdr
Expects a pointer to a previously allocated SA_HEADER_T structure. The hdrBlkBuild( ) routine uses this structure as a storage place within which to build the header block for the message to the master agent.

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

opt
Expects an operation code that indicates the type of this message. Valid operation codes are as follows:

SA_REG_OBJ_REQUEST registers an object with the master agent's MIB tree. The response from the master agent will contain an SA_REG_OBJ_REPLY code.

SA_REM_OBJ_REQUEST removes (deregisters) an object from the master agent's MIB tree. The response from the master agent will contain an SA_REM_OBJ_REPLY code.

SA_REG_INST_REQUEST registers an instance with the master agent's MIB tree. The response from the master agent will contain an SA_REG_INST_REPLY code.

SA_REM_INST_REQUEST removes (deregisters) an instance from the master agent's MIB tree. The response from the master agent will contain an SA_REG_OBJ_REPLY code.

SA_QUERY_REQUEST requests SNMP operations. The response from the master agent will contain an SA_QUERY_REPLY code.

SA_TRAP_REQUEST tells the master agent that this message should be handled as a trap. The response from the master agent (if any) will contain an SA_TRAP_REPLY code.

group
Expects the group ID that the master agent has assigned to the objects or instances referenced in pVblist. This group ID was returned in an If SA_REG_OBJ_REPLY or an SA_REG_INST_REPLY from the master agent. This is an object registration request, you can supply a NULL pointer here.

saId
Expects a pointer to the IPC mechanism that the master agent can use to respond to the message.

RETURNS

N/A

SEE ALSO

saIoLib