oid_to_ip( )

NAME

oid_to_ip( ) - convert an object identifier to an IP address

SYNOPSIS

int oid_to_ip 
    ( 
    int          count,      /* length of ip address components  */ 
    OIDC_T *     object_id,  /* pointer to ip address components */ 
    UINT_32_T *  addr        /* pointer to ip address            */ 
    );

DESCRIPTION

This routine converts an IP address encoded in the instance section of an object identifier to an IP address. The parameter count contains the number of octets that corresponds to the IP address in the object identifier. This is usually 4, but may be less, in which case this routine fills the rest of the IP-address portion with zeroes. The routine puts the IP address in addr.

RETURNS

0 if successful, otherwise 1. If the instance contains a component that is larger than is legal for an IP address (greater than 255), the routine returns 1.

SEE ALSO

snmpAuxLib