picotcp
picotcp copied to clipboard
ipv6 documentation inconsistent with source code headers
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 an int
at all, but rather a pointer that is expected in return (hence quite different from the IPv4 API).
struct pico_ipv6_link *pico_ipv6_link_add(struct pico_device *dev,
struct pico_ip6 address,
struct pico_ip6 netmask);
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
Related to #234.