KKopyscinski commented on a change in pull request #872:
URL: https://github.com/apache/mynewt-nimble/pull/872#discussion_r505477920
##########
File path: porting/nimble/include/os/os_mbuf.h
##########
@@ -413,6 +413,21 @@ struct os_mbuf *os_mbuf_off(const struct os_mbuf *om, int
off,
*/
int os_mbuf_copydata(const struct os_mbuf *m, int off, int len, void *dst);
+/**
+ * @brief Calculates the length of an mbuf chain.
+ *
+ * Calculates the length of an mbuf chain. If the mbuf contains a packet
+ * header, you should use `OS_MBUF_PKTLEN()` as a more efficient alternative to
+ * this function.
+ *
+ * @param om The mbuf to measure.
+ *
+ * @return The length, in bytes, of the provided mbuf
+ * chain.
+ */
+uint16_t os_mbuf_len(const struct os_mbuf *om);
+/**
Review comment:
so before copying I was checking diff, to see what is added and what
might cause errors
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]