Following this documentation, I was expecting 0 to be returned on success, while in fact, 0 is returned on error (NULL being 0). Looking at the header, one realizes that it's not an int at all, but rather a pointer that is expected in return (hence quite different from the IPv4 API).
Here below is a screenshot of the page 28 from the documentation, as fetched from http://docs.picotcp.com/user_doc.pdf today.
Following this documentation, I was expecting 0 to be returned on success, while in fact, 0 is returned on error (
NULL
being 0). Looking at the header, one realizes that it's not anint
at all, but rather a pointer that is expected in return (hence quite different from the IPv4 API).It's unclear however, what the programmer should do with this pointer afterwards... does it need to be freed manually? Link to relevant header below.
https://github.com/tass-belgium/picotcp/blob/master/modules/pico_ipv6.h#L148