diff --git a/include/net/zoap.h b/include/net/zoap.h index 8ccba5bc097..472143f2f99 100644 --- a/include/net/zoap.h +++ b/include/net/zoap.h @@ -494,16 +494,6 @@ bool zoap_request_is_observe(const struct zoap_packet *request); */ uint8_t *zoap_packet_get_payload(struct zoap_packet *pkt, uint16_t *len); -/** - * @brief Returns the internal buffer of the CoAP packet, appending - * the COAP_MARKER to the buffer if necessary. - * - * @param pkt Packet to get (or insert) the payload - * - * @return pointer to the net_buf storing the payload. - */ -struct net_buf *zoap_packet_get_buf(struct zoap_packet *pkt); - /** * @brief Sets how much space was used by the payload. * diff --git a/subsys/net/lib/zoap/zoap.c b/subsys/net/lib/zoap/zoap.c index cfe6afb9003..8197c55486a 100644 --- a/subsys/net/lib/zoap/zoap.c +++ b/subsys/net/lib/zoap/zoap.c @@ -834,19 +834,6 @@ int zoap_packet_set_used(struct zoap_packet *pkt, uint16_t len) return 0; } -struct net_buf *zoap_packet_get_buf(struct zoap_packet *pkt) -{ - uint8_t *str; - - if (!pkt->start) { - str = net_buf_add(pkt->buf->frags, 1); - *str = COAP_MARKER; - pkt->start = str + 1; - } - - return pkt->buf->frags; -} - int zoap_add_option(struct zoap_packet *pkt, uint16_t code, const void *value, uint16_t len) {