man makeoid () - convert ObjectID strings to format usable by BER routines
NAME
makeoid - convert ObjectID strings to format usable by BER routines
LIBRARIES
Abz Library (-labz), Debug Library (-ldebug)
SYNOPSIS
#include <ber/ber.h> uint32_t *makeoid(const char *oid");
DESCRIPTION
makeoid() takes an object identifier (dot-delimited string) as input and convert it into an object identifier used by the BER library routines.
RETURN VALUES
The function returns the newly created object identifier if successful, or NULL if some error occurred. Call abz_get_error(3) to retrieve the error message.
EXAMPLES
uint32_t *oid = make_oid ("1.3.6.1.2.1.2.2.1.10.1");
Unless the function failed, oid should now be:
oid == { 11, 1, 3, 6, 1, 2, 1, 2, 2, 1, 10, 1 }
Notice that the first integer specify how many integers will follow (i.e. 11 for that particular object identifier).
NOTES
None of the libdebug routines are thread-safe. I'm not planning to change this either! For more information, please see http://threading.2038bug.com/
SEE ALSO
ber_decode_oid(3), ber_encode_oid(3), abz_get_error(3), mem_free(3)
AUTHOR
Written by Abraham vd Merwe <abz@blio.com>