picotcp icon indicating copy to clipboard operation
picotcp copied to clipboard

ipv6 documentation inconsistent with source code headers

Open mateuszviste opened this issue 9 years ago • 1 comments

Here below is a screenshot of the page 28 from the documentation, as fetched from http://docs.picotcp.com/user_doc.pdf today.

doc

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

mateuszviste avatar Nov 24 '15 14:11 mateuszviste

Related to #234.

fcapurso avatar Jan 15 '16 15:01 fcapurso