---
name: "RTE_UUID_STRLEN"
section: "3"
platform: "linux"
package: "dpdk-doc"
version: "24.11.4-0+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rte_uuid.h"
---

# RTE\_UUID\_STRLEN(3)

Part of [rte\_uuid.h(3)](/rte_uuid.h/3.md).

## NAME

rte\_uuid.h

## SYNOPSIS

`#include <stdbool.h>`\
 `#include <stddef.h>`\
 `#include <string.h>`\

### Macros

\#define **RTE\_UUID\_INIT**(a,  b,  c,  d,  e)\
 \#define **RTE\_UUID\_STRLEN**   (36 + 1)\

### Typedefs

**typedef** unsigned char **rte\_uuid\_t**\[16\]\

### Functions

bool **rte\_uuid\_is\_null** (const **rte\_uuid\_t** uu)\
 static void **rte\_uuid\_copy** (**rte\_uuid\_t** dst, const **rte\_uuid\_t** src)\
 int **rte\_uuid\_compare** (const **rte\_uuid\_t** a, const **rte\_uuid\_t** b)\
 int **rte\_uuid\_parse** (const char \*in, **rte\_uuid\_t** uu)\
 void **rte\_uuid\_unparse** (const **rte\_uuid\_t** uu, char \*out, size\_t len)\

## Detailed Description

UUID related functions originally from libuuid

Definition in file **rte\_uuid.h**.

## Macro Definition Documentation

### #define RTE\_UUID\_INIT(a, b, c, d, e)

**Value:**.PP

```
    {       \
    ((a) >> 24) & 0xff, ((a) >> 16) & 0xff, \
    ((a) >> 8) & 0xff, (a) & 0xff,      \
    ((b) >> 8) & 0xff, (b) & 0xff,      \
    ((c) >> 8) & 0xff, (c) & 0xff,      \
    ((d) >> 8) & 0xff, (d) & 0xff,      \
    ((e) >> 40) & 0xff, ((e) >> 32) & 0xff, \
    ((e) >> 24) & 0xff, ((e) >> 16) & 0xff, \
    ((e) >> 8) & 0xff, (e) & 0xff       \
}
```

Helper for defining UUID values for id tables.

Definition at line **29** of file **rte\_uuid.h**.

### #define RTE\_UUID\_STRLEN (36 + 1)

UUID string length

Definition at line **41** of file **rte\_uuid.h**.

## Typedef Documentation

### typedef unsigned char rte\_uuid\_t\[16\]

Struct describing a Universal Unique Identifier

Definition at line **24** of file **rte\_uuid.h**.

## Function Documentation

### bool rte\_uuid\_is\_null (const rte\_uuid\_t uu)

Test if UUID is all zeros.

**Parameters**

*uu* The uuid to check.

**Returns**

true if uuid is NULL value, false otherwise

### static void rte\_uuid\_copy (rte\_uuid\_t dst, const rte\_uuid\_t src)` [inline]`, ` [static]`

Copy uuid.

**Parameters**

*dst* Destination uuid \
 *src* Source uuid

Definition at line **61** of file **rte\_uuid.h**.

### int rte\_uuid\_compare (const rte\_uuid\_t a, const rte\_uuid\_t b)

Compare two UUID's

**Parameters**

*a* A UUID to compare \
 *b* A UUID to compare

**Returns**

returns an integer less than, equal to, or greater than zero if UUID a is is less than, equal, or greater than UUID b.

### int rte\_uuid\_parse (const char \* in, rte\_uuid\_t uu)

Extract UUID from string

**Parameters**

*in* Pointer to string of characters to convert \
 *uu* Destination UUID

**Returns**

Returns 0 on success, and -1 if string is not a valid UUID.

### void rte\_uuid\_unparse (const rte\_uuid\_t uu, char \* out, size\_t len)

Convert UUID to string

**Parameters**

*uu* UUID to format \
 *out* Resulting string buffer \
 *len* Sizeof the available string buffer

## Author

Generated automatically by Doxygen for DPDK from the source code.
