[En-Nut-Discussion] UdpGetError() is only conditionally defined

Harald Kipp harald.kipp at egnite.de
Sat Feb 9 11:31:26 CET 2013


Hi Philipp,

On 04.02.2013 20:17, Philipp Burch wrote:
> just found this in sys/socket.h:
> 
> #ifdef NUT_UDP_ICMP_SUPPORT
> extern int NutUdpSetSocketError(UDPSOCKET * sock, uint32_t remote_addr,
> uint16_t remote_port, uint16_t error);
> extern int NutUdpError(UDPSOCKET * sock, uint32_t * addr, uint16_t * port);
> #endif
> 
> Why is there an #ifdef with ICMP for these basic functions? It is not
> present in the source, so the functions will always be compiled anyway.
> 
> Additionally, the doc still says "Todo: There is no similar call like
> NutTcpError() available for UDP."
> Is something wrong with these functions or is this only a relict?

As far as I remember, this feature had been implemented by Ole. May be
we should let him have a look first. I'll forward this post to his
private email in case he overlooked it. Please be patient, Ole is a busy
guy.

Regards,

Harald




More information about the En-Nut-Discussion mailing list