From 3d90c062fd2a4be72bfcbbbef8f62d6cf38ed2ea Mon Sep 17 00:00:00 2001 From: likewise Date: Thu, 11 Mar 2004 20:01:26 +0000 Subject: [PATCH] Added udp_sendto() docs. Fixed udp_send() docs. --- src/core/udp.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/core/udp.c b/src/core/udp.c index 5eb32246..13c65042 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -332,6 +332,25 @@ udp_input(struct pbuf *p, struct netif *inp) PERF_STOP("udp_input"); } +/** + * Send data to a specified address using UDP. + * + * @param pcb UDP PCB used to send the data. + * @param pbuf chain of pbuf's to be sent. + * @param dst_ip Destination IP address. + * @param dst_port Destination UDP port. + * + * If the PCB already has a remote address association, it will + * be restored after the data is sent. + * + * @return lwIP error code. + * @return lwIP error code. + * - ERR_OK. Successful. No error occured. + * - ERR_MEM. Out of memory. + * - ERR_RTE. Could not find route to destination address. + * + * @see udp_disconnect() + */ err_t udp_sendto(struct udp_pcb *pcb, struct pbuf *p, struct ip_addr *dst_ip, u16_t dst_port) @@ -362,8 +381,7 @@ udp_sendto(struct udp_pcb *pcb, struct pbuf *p, * @return lwIP error code. * - ERR_OK. Successful. No error occured. * - ERR_MEM. Out of memory. - * - ERR_USE. The specified ipaddr and port are already bound to by - * another UDP PCB. + * - ERR_RTE. Could not find route to destination address. * * @see udp_disconnect() */