VxWorks Reference Manual : Libraries

snmpBindLib

NAME

snmpBindLib - routines for binding values to variables in SNMP packets

ROUTINES

SNMP_Bind_Unsigned_Integer( ) - bind an unsigned-integer variable
SNMP_Bind_Integer( ) - bind an integer variable
SNMP_Bind_IP_Address( ) - bind an IP address variable
SNMP_Bind_Object_ID( ) - bind an object-identifier variable
SNMP_Bind_String( ) - bind a string variable
SNMP_Bind_64_Unsigned_Integer( ) - bind a 64-bit unsigned-integer variable
SNMP_Bind_Null( ) - bind a null-valued variable

DESCRIPTION

This module defines the routines used to bind variables to their respective values in an SNMP packet.

INCLUDE FILES

snmpdefs.h

SEE ALSO

snmpBindLib


Libraries : Routines

SNMP_Bind_Unsigned_Integer( )

NAME

SNMP_Bind_Unsigned_Integer( ) - bind an unsigned-integer variable

SYNOPSIS

int SNMP_Bind_Unsigned_Integer
    (
    SNMP_PKT_T * pktp,      /* internal representation of snmp packet */
    int          index,     /* index of varbind entry */
    int          compc,     /* component count */
    OIDC_T *     compl,     /* component length */
    OCTET_T      typeFlags, /* type flags */
    UINT_32_T    value      /* value for varbind */
    )

DESCRIPTION

This routine binds an unsigned-integer variable in the variable-binding list of an SNMP packet structure.

pktp references the packet structure.

index is a zero-based index indicating which variable-binding entry is to be used.

compc and compl are the component count and components, respectively, of the object identifier of the variable being bound.

typeFlags is one of the following manifest constants: VT_COUNTER, VT_GAUGE or VT_TIMETICKS.

value is the unsigned-integer value to be bound.

Macro forms of this procedure may be more convenient: SNMP_Bind_Gauge( ), SNMP_Bind_Timeticks( ), and SNMP_Bind_Counter( ).

RETURNS

0 if successful, otherwise -1.

SEE ALSO

snmpBindLib


Libraries : Routines

SNMP_Bind_Integer( )

NAME

SNMP_Bind_Integer( ) - bind an integer variable

SYNOPSIS

int SNMP_Bind_Integer
    (
    SNMP_PKT_T * pktp,  /* internal representation of snmp packet */
    int          index, /* index of varbind entry */
    int          compc, /* component count */
    OIDC_T *     compl, /* component length */
    INT_32_T     value  /* value for varbind */
    )

DESCRIPTION

This routine binds an integer variable in the variable-binding list of an SNMP packet structure.

Parameter pktp references the packet structure.

index is a zero-based index indicating which variable-binding entry is to be used.

compc and compl are the component count and components, respectively, of the object identifier of the variable being bound.

value is the integer value to be bound.

RETURNS

0 if successful, otherwise -1.

SEE ALSO

snmpBindLib


Libraries : Routines

SNMP_Bind_IP_Address( )

NAME

SNMP_Bind_IP_Address( ) - bind an IP address variable

SYNOPSIS

int SNMP_Bind_IP_Address
    (
    SNMP_PKT_T * pktp,   /* internal representation of snmp packet */
    int          index,  /* index of varbind entry */
    int          compc,  /* component count */
    OIDC_T *     compl,  /* component length */
    OCTET_T *    pIpAddr /* ip address */
    )

DESCRIPTION

This routine binds an IP address variable in the variable-binding list of an SNMP packet structure

Parameter pktp references the packet structure.

index is a zero-based index indicating which variable-binding entry is to be used.

compc and compl are the component count and components, respectively, of the object identifier of the variable being bound.

pIpAddr is a pointer to a four-byte area containing the IP address to be bound.

The four bytes contain the network address in standard TCP/IP network-byte order.

RETURNS

0 if successful, otherwise -1.

SEE ALSO

snmpBindLib


Libraries : Routines

SNMP_Bind_Object_ID( )

NAME

SNMP_Bind_Object_ID( ) - bind an object-identifier variable

SYNOPSIS

int SNMP_Bind_Object_ID
    (
    SNMP_PKT_T * pktp,  /* internal representation of snmp packet */
    int          index, /* index of varbind entry */
    int          compc, /* component count */
    OIDC_T *     compl, /* component length */
    int          valc,  /* varbind value count */
    OIDC_T *     vall   /* varbind value length */
    )

DESCRIPTION

This routine binds an object-identifier variable in the variable-binding list of an SNMP packet structure.

Parameter pktp references the packet structure.

index is a zero-based index indicating which variable-binding entry is to be used.

compc and compl are the component count and components, respectively, of the object identifier of the variable being bound.

valc and vall are the component count and components, respectively, of the value being bound.

RETURN

0 if successful, otherwise -1.

SEE ALSO

snmpBindLib


Libraries : Routines

SNMP_Bind_String( )

NAME

SNMP_Bind_String( ) - bind a string variable

SYNOPSIS

int SNMP_Bind_String
    (
    SNMP_PKT_T * pktp,      /* internal representation of snmp packet */
    int          index,     /* index of varbind entry */
    int          compc,     /* component count */
    OIDC_T *     compl,     /* component length */
    OCTET_T      typeFlags, /* type flags */
    int          leng,      /* string length */
    OCTET_T *    strp,      /* pointer to string */
    int          statflg    /* static memory flag */
    )

DESCRIPTION

This routine binds an octet-string variable in the variable-binding list of an SNMP packet structure.

Parameter pktp references the packet structure.

index is a zero-based index indicating which variable-binding entry is to be used.

compc and compl are the component count and components, respectively, of the object identifier of the variable being bound.

typeFlags is one of the following manifest constants: VT_STRING or VT_OPAQUE.

leng and strp are the length and address, respectively, of the string to be bound.

statflg indicates whether the string must be copied or whether it may be used in its current location. A value of 0 means copy, 1 means "use as is".

A macro form of this routine may be more convenient: SNMP_Bind_Opaque( ).

RETURNS

0 if successful, otherwise -1.

SEE ALSO

snmpBindLib


Libraries : Routines

SNMP_Bind_64_Unsigned_Integer( )

NAME

SNMP_Bind_64_Unsigned_Integer( ) - bind a 64-bit unsigned-integer variable

SYNOPSIS

int SNMP_Bind_64_Unsigned_Integer
    (
    SNMP_PKT_T * pktp,      /* internal representation of snmp packet */
    int          index,     /* index of varbind entry */
    int          compc,     /* component count */
    OIDC_T *     compl,     /* component length */
    OCTET_T      typeFlags, /* type flags */
    UINT_32_T    high,      /* high 32 bits of value */
    UINT_32_T    low        /* low 32 bits of value */
    )

DESCRIPTION

This routine binds a 64-bit unsigned-integer variable in the variable-binding list of an SNMP packet structure.

Parameter pktp references the packet structure.

index is a zero-based index indicating which variable-binding entry is to be used.

compc and compl are the component count and components, respectively, of the object identifier of the variable being bound.

typeFlags is the manifest constant VT_COUNTER64.

high and low are the high and low 32-bit sections of the 64-bit value to
 be bound.

A macro form of this procedure may be more convenient: SNMP_Bind_Counter64( ).

RETURNS

0 if successful, otherwise -1.

SEE ALSO

snmpBindLib


Libraries : Routines

SNMP_Bind_Null( )

NAME

SNMP_Bind_Null( ) - bind a null-valued variable

SYNOPSIS

int SNMP_Bind_Null
    (
    SNMP_PKT_T * pktp,  /* internal representation of snmp packet */
    int          index, /* index of varbind entry */
    int          compc, /* component count */
    OIDC_T *     compl  /* component length */
    )

DESCRIPTION

This routine binds a null-valued variable in the variable-binding list of an SNMP packet structure.

Parameter pktp references the packet structure.

index is a zero-based index indicating which variable-binding entry is to be used.

compc and compl are the component count and components, respectively, of the object identifier of the variable being bound.

RETURNS

0 if successful, otherwise -1.

SEE ALSO

snmpBindLib