libosmogb  0.12.0.47-7c74
Osmocom Gb library
gprs_msgb.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <stdint.h>
6 /* the data structure stored in msgb->cb for libgb apps */
7 struct libgb_msgb_cb {
8  unsigned char *bssgph;
9  unsigned char *llch;
10 
11  /* Cell Identifier */
12  unsigned char *bssgp_cell_id;
13 
14  /* Identifiers of a BTS, equal to 'struct bssgp_bts_ctx' */
15  uint16_t nsei;
16  uint16_t bvci;
17 
18  /* Identifier of a MS (inside BTS), equal to 'struct sgsn_mm_ctx' */
19  uint32_t tlli;
20 } __attribute__((packed, may_alias));
21 #define LIBGB_MSGB_CB(__msgb) ((struct libgb_msgb_cb *)&((__msgb)->cb[0]))
22 #define msgb_tlli(__x) LIBGB_MSGB_CB(__x)->tlli
23 #define msgb_nsei(__x) LIBGB_MSGB_CB(__x)->nsei
24 #define msgb_bvci(__x) LIBGB_MSGB_CB(__x)->bvci
25 #define msgb_gmmh(__x) (__x)->l3h
26 #define msgb_bssgph(__x) LIBGB_MSGB_CB(__x)->bssgph
27 #define msgb_bssgp_len(__x) ((__x)->tail - (uint8_t *)msgb_bssgph(__x))
28 #define msgb_bcid(__x) LIBGB_MSGB_CB(__x)->bssgp_cell_id
29 #define msgb_llch(__x) LIBGB_MSGB_CB(__x)->llch
30 
31 #include <osmocom/core/logging.h>
32 int gprs_log_filter_fn(const struct log_context *ctx,
33  struct log_target *tar);
unsigned char * bssgp_cell_id
Definition: gprs_msgb.h:12
Definition: gprs_msgb.h:7
uint32_t tlli
Definition: gprs_msgb.h:19
unsigned char * bssgph
Definition: gprs_msgb.h:8
unsigned char * llch
Definition: gprs_msgb.h:9
uint16_t bvci
Definition: gprs_msgb.h:16
int gprs_log_filter_fn(const struct log_context *ctx, struct log_target *tar)
Definition: common_vty.c:40
struct libgb_msgb_cb __attribute__((packed, may_alias))
uint16_t nsei
Definition: gprs_msgb.h:15