VxWorks Reference Manual : Libraries

snmpProcLib

NAME

snmpProcLib - manipulate variable-bindings in an SNMP packet

ROUTINES

getproc_started( ) - indicate that a getproc operation has begun
getproc_good( ) - indicate successful completion of a getproc procedure
getproc_error( ) - indicate that a getproc operation encountered an error
nextproc_started( ) - indicate that a nextproc operation has begun
nextproc_good( ) - indicate successful completion of a nextproc procedure
nextproc_no_next( ) - indicate that there exists no next instance
nextproc_error( ) - indicate that a nextproc operation encountered an error
getproc_got_int32( ) - indicate retrieval of a 32-bit integer
getproc_got_uint32( ) - indicate retrieval of a 32-bit unsigned integer
getproc_got_ip_address( ) - indicate retrieval of an IP address
getproc_got_empty( ) - indicate retrieval of a null value
getproc_got_string( ) - indicate retrieval of a string
testproc_started( ) - indicate that a testproc operation has begun
testproc_good( ) - indicate successful completion of a testproc procedure
testproc_error( ) - indicate that a testproc operation encountered an error
setproc_started( ) - indicate that a setproc operation has begun
setproc_good( ) - indicates successful completion of a setproc procedure
setproc_error( ) - indicate that a setproc operation encountered an error
undoproc_started( ) - indicate that an undoproc operation has begun
undoproc_good( ) - indicates successful completion of an undoproc operation
undoproc_error( ) - indicate that an undproc operation encountered an error
getproc_got_uint64( ) - indicate retrieval of a 64-bit unsigned integer
getproc_got_uint64_high_low( ) - indicate retrieval of a 64-bit unsigned
getproc_nosuchins( ) - indicates that no such instance exists
getproc_got_object_id( ) - indicate retrieval of an object identifier
nextproc_next_instance( ) - install instance part of next instance

DESCRIPTION

This module defines routines used to manipulate variable bindings in an SNMP packet. These are equivalents for macros defined in snmpdefs.h.

INCLUDE FILES

snmpdefs.h

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_started( )

NAME

getproc_started( ) - indicate that a getproc operation has begun

SYNOPSIS

void getproc_started
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine indicates that getproc for the specified SNMP variable binding has been started and should not be started again.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_good( )

NAME

getproc_good( ) - indicate successful completion of a getproc procedure

SYNOPSIS

void getproc_good
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine is called when getproc successfully retrieves the value for an SNMP variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_error( )

NAME

getproc_error( ) - indicate that a getproc operation encountered an error

SYNOPSIS

void getproc_error
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    INT_32_T     error     /* error code */
    )

DESCRIPTION

This routine indicates that getproc encountered an error and cannot retrieve the requested value.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

nextproc_started( )

NAME

nextproc_started( ) - indicate that a nextproc operation has begun

SYNOPSIS

void nextproc_started
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine indicates that nextproc has begun for the specified variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

nextproc_good( )

NAME

nextproc_good( ) - indicate successful completion of a nextproc procedure

SYNOPSIS

void nextproc_good
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine indicates that nextproc for the specified variable binding has completed successfully.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

nextproc_no_next( )

NAME

nextproc_no_next( ) - indicate that there exists no next instance

SYNOPSIS

void nextproc_no_next
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine is called from within nextproc if there is no next instance for the requested variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

nextproc_error( )

NAME

nextproc_error( ) - indicate that a nextproc operation encountered an error

SYNOPSIS

void nextproc_error
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    INT_32_T     error     /* error code */
    )

DESCRIPTION

This routine is called when nextproc encounters an error and cannot retreive a next instance for the requested variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_got_int32( )

NAME

getproc_got_int32( ) - indicate retrieval of a 32-bit integer

SYNOPSIS

void getproc_got_int32
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    INT_32_T     data      /* 32 bit integer value for varbind */
    )

DESCRIPTION

This routine is called from getproc or nextproc when a 32-bit integer value is retreived for a variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_got_uint32( )

NAME

getproc_got_uint32( ) - indicate retrieval of a 32-bit unsigned integer

SYNOPSIS

void getproc_got_uint32
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    UINT_32_T    data,     /* unsigned 32 bit integer value for varbind */
    OCTET_T      type      /* SNMP type of value */
    )

DESCRIPTION

This routine is called from getproc or nextproc when a 32-bit unsigned integer value is retrieved for a variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_got_ip_address( )

NAME

getproc_got_ip_address( ) - indicate retrieval of an IP address

SYNOPSIS

void getproc_got_ip_address
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    UINT_32_T    addrData  /* ip address value */
    )

DESCRIPTION

This routine is called from getproc or nextproc when an IP address is retrieved for a variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_got_empty( )

NAME

getproc_got_empty( ) - indicate retrieval of a null value

SYNOPSIS

void getproc_got_empty
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine is called from getproc or nextproc when a null value is retrieved for a variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_got_string( )

NAME

getproc_got_string( ) - indicate retrieval of a string

SYNOPSIS

void getproc_got_string
    (
    SNMP_PKT_T * pPkt,       /* internal representation of the snmp packet */
    VB_T *       pVarBind,   /* var bind being processed */
    ALENGTH_T    size,       /* size of string in octets */
    OCTET_T *    data,       /* string data */
    int          dynamicFlg, /* storage type - dynamic or static */
    OCTET_T      type        /* SNMP type of string data */
    )

DESCRIPTION

This routine is called from getproc or nextproc when a string is retrieved for a variable binding. The string data is stored in an extended buffer in the variable-binding structure. Tha parameter dynamicFlg indicates the storage type used by the extended buffer; if dynamicFlg is non-zero, then the buffer is assumed to have been allocated dynamically via snmpdMemoryAlloc( ) and will be freed later with snmpdMemoryFree( ). Otherwise, the buffer is assumed to be static.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

testproc_started( )

NAME

testproc_started( ) - indicate that a testproc operation has begun

SYNOPSIS

void testproc_started
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine indicates that testproc for the specified variable binding has been started by the user.

pPkt is the internal representation of the SNMP packet. pvarBind is a pointer to the variable-binding being processed.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

testproc_good( )

NAME

testproc_good( ) - indicate successful completion of a testproc procedure

SYNOPSIS

void testproc_good
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine indicates that testproc has successfully completed the checks to be performed prior to carrying out a set operation for a given variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

testproc_error( )

NAME

testproc_error( ) - indicate that a testproc operation encountered an error

SYNOPSIS

void testproc_error
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    INT_32_T     error     /* error code */
    )

DESCRIPTION

This routine indicates that testproc encountered an error which will prevent a set operation from being successful.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

setproc_started( )

NAME

setproc_started( ) - indicate that a setproc operation has begun

SYNOPSIS

void setproc_started
    (
    SNMP_PKT_T * pPkt,
    VB_T *       pVarBind
    )

DESCRIPTION

This routine indicates that setproc has been started by the user for the specified variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

setproc_good( )

NAME

setproc_good( ) - indicates successful completion of a setproc procedure

SYNOPSIS

void setproc_good
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine indicate that setproc has successfully completed the set operation for a variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

setproc_error( )

NAME

setproc_error( ) - indicate that a setproc operation encountered an error

SYNOPSIS

void setproc_error
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    INT_32_T     error     /* error code */
    )

DESCRIPTION

This routine indicates that setproc encountered an error while perorming a set operation for a variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

undoproc_started( )

NAME

undoproc_started( ) - indicate that an undoproc operation has begun

SYNOPSIS

void undoproc_started
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine indicates that undoproc has been started by the user for the specified variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

undoproc_good( )

NAME

undoproc_good( ) - indicates successful completion of an undoproc operation

SYNOPSIS

void undoproc_good
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine indicates that an undoproc operation completed successfully.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

undoproc_error( )

NAME

undoproc_error( ) - indicate that an undproc operation encountered an error

SYNOPSIS

void undoproc_error
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    INT_32_T     error     /* error value */
    )

DESCRIPTION

This routine indicates that undoproc encountered an error for a specified variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_got_uint64( )

NAME

getproc_got_uint64( ) - indicate retrieval of a 64-bit unsigned integer

SYNOPSIS

void getproc_got_uint64
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    UINT_64_T *  data      /* 64 bit data */
    )

DESCRIPTION

This routine is called from getproc or nextproc when a 64-bit unsigned integer value is retrieved for a variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_got_uint64_high_low( )

NAME

getproc_got_uint64_high_low( ) - indicate retrieval of a 64-bit unsigned

SYNOPSIS

void getproc_got_uint64_high_low
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    UINT_32_T    high,     /* high half of data */
    UINT_32_T    low       /* lower half of data */
    )

DESCRIPTION

integer with high and low halves

This routine is called from getproc or nextproc when a 64-bit unsigned integer value with both high and low halves is retrieved for a variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_nosuchins( )

NAME

getproc_nosuchins( ) - indicates that no such instance exists

SYNOPSIS

void getproc_nosuchins
    (
    SNMP_PKT_T * pPkt,    /* internal representation of the snmp packet */
    VB_T *       pVarBind /* var bind being processed */
    )

DESCRIPTION

This routine is called from getproc if the requested instance does not exist.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

getproc_got_object_id( )

NAME

getproc_got_object_id( ) - indicate retrieval of an object identifier

SYNOPSIS

void getproc_got_object_id
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    int          length,   /* The length of the oid */
    OIDC_T *     pOid,     /* The oid to attach */
    int          flag      /* The dynamic flag static (0), dynamic (1) */
    )

DESCRIPTION

This routine is called from getproc or nextproc when an object identifier is retrieved for a variable binding. If flag is 1, then pOid is assumed to point to dynamic memory which will be later freed by the agent.

RETURNS

N/A

SEE ALSO

snmpProcLib


Libraries : Routines

nextproc_next_instance( )

NAME

nextproc_next_instance( ) - install instance part of next instance

SYNOPSIS

void nextproc_next_instance
    (
    SNMP_PKT_T * pPkt,     /* internal representation of the snmp packet */
    VB_T *       pVarBind, /* var bind being processed */
    int          length,   /* The length of the instance part */
    OIDC_T *     pOid      /* The instance part */
    )

DESCRIPTION

This routine is called from nextproc to install into the variable-binding list the instance part (pOid) of the next instance that it is going to place into the variable binding.

RETURNS

N/A

SEE ALSO

snmpProcLib