It is easier from languages that dlopen libosmocore to have a function
to access this data than to poke at the bytes of the struct directly. Add
copyright for this method and the reset method I did earlier this year.
return msg;
}
+/* non inline functions to ease binding */
+uint8_t *msgb_data(const struct msgb *msg);
+uint16_t msgb_length(const struct msgb *msg);
+
+
#endif /* _MSGB_H */
/* (C) 2008 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
* All Rights Reserved
*
* This program is free software; you can redistribute it and/or modify
memset(&msg->cb, 0, sizeof(msg->cb));
}
+
+uint8_t *msgb_data(const struct msgb *msg)
+{
+ return msg->data;
+}
+
+uint16_t msgb_length(const struct msgb *msg)
+{
+ return msg->len;
+}