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