---
name: "vrb_data_ptr"
section: "3"
platform: "linux"
package: "libvrb0-dev"
version: "0.5.1-5.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/vrb_data_ptr"
---

# vrb\_data\_ptr(3)

return pointer to data

## NAME

vrb\_data\_ptr - return pointer to data

## LIBRARY

**-lvrb**

## SYNOPSIS

**#include \<vrb.h\>**

*size\_t* **vrb\_data\_ptr***(vrb\_p* **vrb***);*

## DESCRIPTION

**vrb\_data\_ptr** returns the pointer to the beginning of the contiguous block of data within the virtual ring buffer. The pointer has meaning only if there is data in the buffer. If there is no data in the buffer, an arbitrary pointer is returned and must not be used. Use **[vrb\_data\_len(3)](/vrb_data_len/3.md)** or **[vrb\_is\_empty(3)](/vrb_is_empty/3.md)** to determine if **[vrb\_data\_ptr(3)](/vrb_data_ptr/3.md)** has a meaningful pointer.

The caller may access all of this data, and should call **[vrb\_take(3)](/vrb_take/3.md)** to indicate how much data has been removed from the buffer.

## ARGUMENTS

*vrb\_p* **vrb**\
 specifies the virtual ring buffer to obtain the data pointer from. If a NULL or invalid pointer is given, results are unpredictable and are likely to be disasterous.

## RETURN VALUE

*size\_t*\
 The pointer to the data in the virtual ring buffer is returned.

## SEE ALSO

[**vrb**(3)](/vrb/3.md), [**vrb\_capacity**(3)](/vrb_capacity/3.md), [**vrb\_data\_len**(3)](/vrb_data_len/3.md), [**vrb\_destroy**(3)](/vrb_destroy/3.md), [**vrb\_get**(3)](/vrb_get/3.md), [**vrb\_get\_min**(3)](/vrb_get_min/3.md), [**vrb\_give**(3)](/vrb_give/3.md), [**vrb\_init**(3)](/vrb_init/3.md), [**vrb\_init\_opt**(3)](/vrb_init_opt/3.md), [**vrb\_is\_empty**(3)](/vrb_is_empty/3.md), [**vrb\_is\_full**(3)](/vrb_is_full/3.md), [**vrb\_is\_not\_empty**(3)](/vrb_is_not_empty/3.md), [**vrb\_is\_not\_full**(3)](/vrb_is_not_full/3.md), [**vrb\_move**(3)](/vrb_move/3.md), [**vrb\_new**(3)](/vrb_new/3.md), [**vrb\_new\_opt**(3)](/vrb_new_opt/3.md), [**vrb\_put**(3)](/vrb_put/3.md), [**vrb\_put\_all**(3)](/vrb_put_all/3.md), [**vrb\_read**(3)](/vrb_read/3.md), [**vrb\_read\_min**(3)](/vrb_read_min/3.md), [**vrb\_resize**(3)](/vrb_resize/3.md), [**vrb\_space\_len**(3)](/vrb_space_len/3.md), [**vrb\_space\_ptr**(3)](/vrb_space_ptr/3.md), [**vrb\_take**(3)](/vrb_take/3.md), [**vrb\_uninit**(3)](/vrb_uninit/3.md), [**vrb\_write**(3)](/vrb_write/3.md), [**vrb\_write\_min**(3)](/vrb_write_min/3.md)
