2626#include "debug.h"
2727#include "private.h"
2828
29- #define UDP_DEBUG (...) _UNICOAP_PREFIX_DEBUG(".transport.udp", __VA_ARGS__)
29+ #define _UDP_DEBUG (...) _UNICOAP_PREFIX_DEBUG(".transport.udp", __VA_ARGS__)
3030
3131UNICOAP_DECL_RECEIVER_STORAGE_EXTERN ;
3232
@@ -58,7 +58,7 @@ static void _udp_on_event(sock_udp_t* sock, sock_async_flags_t type, void* arg)
5858 unicoap_endpoint_get_udp (& remote ), & aux_rx );
5959
6060 if (received < 0 ) {
61- UDP_DEBUG ("recv failure: %" PRIdSIZE "\n" , received );
61+ _UDP_DEBUG ("recv failure: %" PRIdSIZE "\n" , received );
6262 return ;
6363 }
6464 if (received == 0 ) {
@@ -73,7 +73,7 @@ static void _udp_on_event(sock_udp_t* sock, sock_async_flags_t type, void* arg)
7373 ssize_t chunk_size = sock_udp_recv_buf_aux (
7474 sock , & stackbuf , & buffer_ctx , 0 , unicoap_endpoint_get_udp (& remote ), & aux_rx );
7575 if (chunk_size < 0 ) {
76- UDP_DEBUG ("recv failure: %" PRIdSIZE "\n" , chunk_size );
76+ _UDP_DEBUG ("recv failure: %" PRIdSIZE "\n" , chunk_size );
7777 return ;
7878 }
7979 if (chunk_size == 0 ) {
@@ -119,7 +119,7 @@ int unicoap_transport_sendv_udp(iolist_t* iolist, const sock_udp_ep_t* remote,
119119 assert (remote );
120120 assert (iolist );
121121
122- UDP_DEBUG ("sendv: %" PRIuSIZE " bytes\n" , iolist_size (iolist ));
122+ _UDP_DEBUG ("sendv: %" PRIuSIZE " bytes\n" , iolist_size (iolist ));
123123
124124 int res = 0 ;
125125 if (unlikely (local )) {
@@ -131,22 +131,22 @@ int unicoap_transport_sendv_udp(iolist_t* iolist, const sock_udp_ep_t* remote,
131131 }
132132
133133 if (res < 0 ) {
134- UDP_DEBUG ("udp_sendv_aux failed: %i\n" , res );
134+ _UDP_DEBUG ("udp_sendv_aux failed: %i\n" , res );
135135 }
136136
137137 return res ;
138138}
139139
140140static int _add_socket (event_queue_t * queue , sock_udp_t * socket , sock_udp_ep_t * local )
141141{
142- UDP_DEBUG ("zero_copy_guarantees=%u creating UDP sock, port=%" PRIu16 " if=%" PRIu16
142+ _UDP_DEBUG ("zero_copy_guarantees=%u creating UDP sock, port=%" PRIu16 " if=%" PRIu16
143143 " family=%s\n" ,
144144 CONFIG_UNICOAP_SOCK_ZERO_COPY_GUARANTEES , local -> port , local -> netif ,
145145 local -> family == AF_INET6 ? "inet6" : (local -> family == AF_INET ? "inet" : "?" ));
146146
147147 int res = sock_udp_create (socket , local , NULL , 0 );
148148 if (res < 0 ) {
149- UDP_DEBUG ("cannot create sock: %d (%s)\n" , res , strerror (- res ));
149+ _UDP_DEBUG ("cannot create sock: %d (%s)\n" , res , strerror (- res ));
150150 return res ;
151151 }
152152
0 commit comments