sjanc commented on code in PR #3542:
URL: https://github.com/apache/mynewt-core/pull/3542#discussion_r2798053227


##########
kernel/os/include/os/os_mbuf.h:
##########
@@ -440,6 +440,95 @@ struct os_mbuf *os_mbuf_off(const struct os_mbuf *om, int 
off,
  */
 int os_mbuf_copydata(const struct os_mbuf *om, int off, int len, void *dst);
 
+/**
+ * Extracts data from the beginning of an mbuf into a flat buffer, consuming 
it in the process.
+ *
+ * @param om The mbuf chain to extract data from
+ * @param len The length of the data to copy
+ * @param dst The destination buffer to copy into
+ *
+ * @return                      0 on success;
+ *                              -1 if the mbuf does not contain enough data.
+ */
+int os_mbuf_consume_data(struct os_mbuf *om, int len, void *dst);

Review Comment:
   name this (and others) _pull
   
   len could be size_t



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to