aboutsummaryrefslogtreecommitdiffstats
path: root/include/openbsc/gprs_utils.h
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-07-13 02:03:50 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-30 14:14:58 +0200
commitee6cfdc0d9710e3a69c8e1939eb21c8f2b759885 (patch)
treeed5aeb0979a1838778649078847a1ed6caa6b1a4 /include/openbsc/gprs_utils.h
parent6c809185ee86d318d10205756bb6d91914d11fdf (diff)
split off osmo-sgsn: remove files, apply build1.1.0
Diffstat (limited to 'include/openbsc/gprs_utils.h')
-rw-r--r--include/openbsc/gprs_utils.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/openbsc/gprs_utils.h b/include/openbsc/gprs_utils.h
index 574f5c50c..e06364dad 100644
--- a/include/openbsc/gprs_utils.h
+++ b/include/openbsc/gprs_utils.h
@@ -24,6 +24,8 @@
#include <stdint.h>
#include <sys/types.h>
+#include <osmocom/core/msgb.h>
+
struct msgb;
struct gprs_ra_id;
@@ -42,3 +44,12 @@ int gprs_parse_mi_tmsi(const uint8_t *value, size_t value_len, uint32_t *tmsi);
void gprs_parse_tmsi(const uint8_t *value, uint32_t *tmsi);
int gprs_ra_id_equals(const struct gprs_ra_id *id1, const struct gprs_ra_id *id2);
+
+#define GSM48_ALLOC_SIZE 2048
+#define GSM48_ALLOC_HEADROOM 256
+
+static inline struct msgb *gsm48_msgb_alloc_name(const char *name)
+{
+ return msgb_alloc_headroom(GSM48_ALLOC_SIZE, GSM48_ALLOC_HEADROOM,
+ name);
+}