---
name: "makeoid"
section: "3ber"
platform: "linux"
package: "libber0-dev"
version: "0.4.1"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/makeoid"
---

# makeoid(3ber)

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\>
