snmpdInitFinish( )

NAME

snmpdInitFinish( ) - complete the initialization of the agent

SYNOPSIS

void snmpdInitFinish 
    ( 
    VOIDFUNCPTR  pPrivRlse,    /* user's privare release routine  */ 
    FUNCPTR      pSetPduVldt,  /* user's set pdu validate routine */ 
    FUNCPTR      pPreSet,      /* user's pre set routine          */ 
    FUNCPTR      pPostSet,     /* user's post set routine         */ 
    FUNCPTR      pSetFailed    /* user's set failed routine       */ 
    )

DESCRIPTION

This routine is required to be called by the user to complete the initialization of the SNMP agent after the transport endpoint has been initialized. This routine must be called after the endpoint has been established, since it depends on that endpoint to function correctly.

This routine also installs any user-supplied hooks for customizing the agent. If a hook is not required, a NULL pointer should be passed in that position. The function snmpIoTrapSend( ) is invoked by this routine, so any configuration required by that routine should be done prior to calling snmpdInitFinish( ).

The hook routines are as follows:

pPrivRlse
This routine is used by the agent to free any memory attached to the private field of the SNMP_PKT_T structure.

pSetPduVldt
This routine is called before any processing of a set request has taken place. It can be used to perform global validation of the request, if needed. The return values for this routine must meet the following requirements:

0 - indicates that the set PDU is valid, and processing should continue.

1 - indicates that the set PDU is valid, and that this routine has already completed all the required set operations.

-1 - indicates that the set PDU is invalid and should be rejected.

pPreSet
This routine is called after all testproc operations have completed successfully, but before any setproc operation is begun. Return value requirements are as follows

0 - indicates that the set PDU is valid, and processing should continue.

1 - indicates that the set PDU is valid, and that this routine has already completed all the required set operations.

-1 - indicates that the set PDU is invalid and should be rejected.

pPostSet
This routine is called after all setproc have completed successfully. This routine can be used to free resources allocated during set processing.

pSetFailed
This routine is possibly called under two sets of circumstances: after all testproc operations have returned and some of them have failed, and/or after all undoproc operations have returned and some setproc operations have failed. It can be used to do any required cleanup.

RETURNS

N/A

SEE ALSO

snmpdLib