| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far each and every main() scope creates a msgb talloc context and either
passes it to msgb_set_talloc_ctx() or sets tall_msgb_ctx directly (by defining
it extern first).
Remove some code duplication: add one central function that creates the "msgb"
talloc context for all.
Most users of msgb employ a talloc_named_const(), but osmo-bts uses a
talloc_pool() instead. Offer both ways by means of the pool_size argument, and
for both ways make sure the context is called "msgb".
Suggest that msgb users should move to this new function: deprecate
msgb_set_talloc_ctx(). To be able to do so, include core/defs.h in msgb.h.
There's a tradeoff between hiding the msgb talloc context behind API that tries
to guess all use cases versus avoiding code dup. This patch opts against code
dup and boldly assumes that all future use is covered.
Also, the new function suggests to not access tall_msgb_ctx directly, which can
be considered a style improvement.
It seems that not all main scopes that use msgb actually initialize the msgb
ctx. As a fallback for these, explicitly initialize tall_msgb_ctx to NULL.
Change-Id: I747fbbf977c4d2c868c8dead64cfc5fd86eb8d4c
|
|
|
|
| |
Change-Id: I06e9c5ba3e00c73a4e52d2583ce3492f236275ce
|
|
|
|
|
| |
This adds and improves doxygen API descriptions all over libosmocore,
reducing the 'white spots' that don't have any documentation.
|
|
|
|
|
| |
86ec311896dd5d4 adds compiler warnings on 64bit. The build is clean otherwise,
so let's keep it that way.
|
|
|
|
|
|
|
| |
This patch makes msgb_hexdump accept out of range lXh pointers and
shows info about them instead of aborting the dump entirely.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions originate from openbsc/src/gprs but are generic
msgb helper functions.
msgb_copy: This function allocates a new msgb, copies the data
buffer of msg, and adjusts the pointers (incl. l1h-l4h)
accordingly.
msgb_resize_area:
This resizes a sub area of the msgb data and adjusts the
pointers (incl. l1h-l4h) accordingly.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function works like osmo_hexdump() and returns a static buffer
containing hex bytes along with markers for the layers.
Note that it uses osmo_hexdump() internally, thus a call to
msgb_hexdump() invalidates the buffer that has been returned by an
earlier call to osmo_hexdump(). In short: don't mix them in a single
call printf().
Sponsored-by: On-Waves ehf
|
|
|
|
|
| |
Doxygen generates quite a lot of warnings on libosmocore. Some of them
are obvious typos - this patch aims to fix such low-hanging fruit.
|
|
|
|
| |
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
| |
|
| |
|
|
|
|
|
| |
We used this include for the u_int{8,16,32}_t types but we do
not need this anymore.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves all GSM-specific definitions to include/osmocom/gsm.
Moreover, the headers in include/osmocore/ have been moved to
include/osmocom/core.
This has been proposed by Harald Welte and Sylvain Munaunt.
Tested with `make distcheck'.
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This is a lot of GSM/GPRS specific stuff in struct msgb which we want
to avoid. The 'control buffer' will replace them.
|
| |
|
|
|
|
| |
Don't assign the same var twice & init all from the same source.
|
|
|