diff --git a/sys/include/net/gcoap.h b/sys/include/net/gcoap.h index 752c4e56db..9f0c62217d 100644 --- a/sys/include/net/gcoap.h +++ b/sys/include/net/gcoap.h @@ -596,23 +596,6 @@ size_t gcoap_req_send2(const uint8_t *buf, size_t len, const sock_udp_ep_t *remote, gcoap_resp_handler_t resp_handler); -/** - * @brief Sends a buffer containing a CoAP request to the provided host/port - * - * @deprecated Please use @ref gcoap_req_send2() instead - * - * @param[in] buf Buffer containing the PDU - * @param[in] len Length of the buffer - * @param[in] addr Destination for the packet - * @param[in] port Port at the destination - * @param[in] resp_handler Callback when response received, may be NULL - * - * @return length of the packet - * @return 0 if cannot send - */ -size_t gcoap_req_send(const uint8_t *buf, size_t len, const ipv6_addr_t *addr, - uint16_t port, gcoap_resp_handler_t resp_handler); - /** * @brief Initializes a CoAP response packet on a buffer * diff --git a/sys/net/application_layer/gcoap/gcoap.c b/sys/net/application_layer/gcoap/gcoap.c index dfac7649af..1d58151643 100644 --- a/sys/net/application_layer/gcoap/gcoap.c +++ b/sys/net/application_layer/gcoap/gcoap.c @@ -707,20 +707,6 @@ ssize_t gcoap_finish(coap_pkt_t *pdu, size_t payload_len, unsigned format) return pdu->payload_len + (pdu->payload - (uint8_t *)pdu->hdr); } -size_t gcoap_req_send(const uint8_t *buf, size_t len, const ipv6_addr_t *addr, - uint16_t port, gcoap_resp_handler_t resp_handler) -{ - sock_udp_ep_t remote; - - remote.family = AF_INET6; - remote.netif = SOCK_ADDR_ANY_NETIF; - remote.port = port; - - memcpy(&remote.addr.ipv6[0], &addr->u8[0], sizeof(addr->u8)); - - return gcoap_req_send2(buf, len, &remote, resp_handler); -} - size_t gcoap_req_send2(const uint8_t *buf, size_t len, const sock_udp_ep_t *remote, gcoap_resp_handler_t resp_handler)