tass-belgium / picotcp

PicoTCP is a free TCP/IP stack implementation
Other
1.19k stars 219 forks source link

ipv6 documentation inconsistent with source code headers #337

Open mateuszviste opened 8 years ago

mateuszviste commented 8 years ago

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

fcapurso commented 8 years ago

Related to #234.