# Confd\_value\_t conversion

**URL:** <https://dmap-community.ductus.global/t/confd-value-t-conversion/705>\
**Category:** Core Engine and APIs\
**Created:** [September 18, 2016, 10:07am UTC](https://dmap-community.ductus.global/t/confd-value-t-conversion/705 "2016-09-18T10:07:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![InbalAmram](https://avatars.discourse-cdn.com/v4/letter/i/0ea827/32.png) [@InbalAmram](https://dmap-community.ductus.global/u/InbalAmram)\
**Post date:** [September 18, 2016, 10:07am UTC](https://dmap-community.ductus.global/t/confd-value-t-conversion/705/1 "2016-09-18T10:07:18Z")

</div>

Hi,

I wonder if there is a confd API to translate from confd\_value\_t \*v to string/IP/int/…  
Similar to confd\_svcmp which compares between a string to value, if there is a conversion to/from the value.

thanks  
Inbal

---

<div class="post-metadata">

**Author:** ![InbalAmram](https://avatars.discourse-cdn.com/v4/letter/i/0ea827/32.png) [@InbalAmram](https://dmap-community.ductus.global/u/InbalAmram)\
**Post date:** [September 19, 2016, 11:33am UTC](https://dmap-community.ductus.global/t/confd-value-t-conversion/705/2 "2016-09-19T11:33:40Z")

</div>

I found the CONFD\_GET\_IPV4, but could not find the same for string.  
please explain how to convert from confd\_value\_t to string.

thanks.  
Inbal

---

<div class="post-metadata">

**Author:** ![jjohansson](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jjohansson](https://dmap-community.ductus.global/u/jjohansson)\
**Post date:** [September 19, 2016, 1:15pm UTC](https://dmap-community.ductus.global/t/confd-value-t-conversion/705/3 "2016-09-19T13:15:28Z")

</div>

CONFD\_GET\_BUFPTR() gives you the pointer to the string, CONFD\_GET\_BUFSIZE() gives you it’s size.

---

<div class="post-metadata">

**Author:** ![per](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@per](https://dmap-community.ductus.global/u/per)\
**Post date:** [September 19, 2016, 3:11pm UTC](https://dmap-community.ductus.global/t/confd-value-t-conversion/705/4 "2016-09-19T15:11:15Z")

</div>

> [@InbalAmram](#):
>
> I found the CONFD\_GET\_IPV4, but could not find the same for string. please explain how to convert from confd\_value\_t to string.

See confd\_val2str() (and confd\_str2val() for the other direction) in the confd\_lib\_lib(3) and confd\_types(3) man pages.
