You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/10/15 11:48:25 UTC

[GitHub] [mynewt-nimble] KKopyscinski commented on a change in pull request #872: nimble/porting: sync with core

KKopyscinski commented on a change in pull request #872:
URL: https://github.com/apache/mynewt-nimble/pull/872#discussion_r505477367



##########
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:
       I copied whole contents of corresponding files, except of includes and adjusted some defined values to match.
   
   This method is here:
   https://github.com/apache/mynewt-core/blob/c5d9068cd472f32f0afd89594038a188d9ddf50d/kernel/os/include/os/os_mbuf.h#L429




----------------------------------------------------------------
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:
users@infra.apache.org