diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-18 18:22:31 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-18 18:22:31 +0200 |
commit | acffb60c1af6a30a99c969483ab46920d2fd966f (patch) | |
tree | dd5d085b421a98baf45e6ba833c276c40dccf419 /include | |
parent | c64970ede515eb615d969bb5107b145f3f4d3a1f (diff) |
msgb: Add non-inlined helper functions to ease with language bindings
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocore/msgb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocore/msgb.h b/include/osmocore/msgb.h index 354c5d88..395c7c2c 100644 --- a/include/osmocore/msgb.h +++ b/include/osmocore/msgb.h @@ -187,4 +187,9 @@ static inline struct msgb *msgb_alloc_headroom(int size, int headroom, 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 */ |