diff options
Diffstat (limited to 'include/osmocom/gsm/cbsp.h')
-rw-r--r-- | include/osmocom/gsm/cbsp.h | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/include/osmocom/gsm/cbsp.h b/include/osmocom/gsm/cbsp.h index 90516cb7..efa4ce6f 100644 --- a/include/osmocom/gsm/cbsp.h +++ b/include/osmocom/gsm/cbsp.h @@ -6,8 +6,8 @@ #include <osmocom/gsm/gsm0808_utils.h> /* Definitions for parsed / abstract representation of messages in the - * CBSP (Cell Broadcast Service Protocol). Data here is *not* formatted - * like the * on-the-wire format. Any similarities are coincidetial ;) */ + * CBSP (Cell Broadcast Service Protocol, 3GPP TS 48.049). Data here is *not* formatted + * like the on-the-wire format. Any similarities are coincidential ;) */ /* Copyright (C) 2019 Harald Welte <laforge@gnumonks.org> * @@ -24,10 +24,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* Decoded 8.2.3 Message Content */ @@ -75,7 +71,7 @@ struct osmo_cbsp_fail_ent { struct llist_head list; /* entry in a fail_list below */ enum CELL_IDENT id_discr; union gsm0808_cell_id_u cell_id; - uint8_t cause; + uint8_t cause; /* enum osmo_cbsp_cause */ }; @@ -245,6 +241,30 @@ struct osmo_cbsp_error_ind { enum cbsp_channel_ind *channel_ind; }; +/* 8.2.13 Cause */ +enum osmo_cbsp_cause { + OSMO_CBSP_CAUSE_PARAM_NOT_RECOGNISED = 0, + OSMO_CBSP_CAUSE_PARAM_VALUE_INVALID, + OSMO_CBSP_CAUSE_MSG_REF_NOT_IDENTIFIED, + OSMO_CBSP_CAUSE_CELL_ID_NOT_VALID, + OSMO_CBSP_CAUSE_UNRECOGNISED_MESSAGE, + OSMO_CBSP_CAUSE_MISSING_MANDATORY_ELEMENT, + OSMO_CBSP_CAUSE_BSC_CAPACITY_EXCEEDED, + OSMO_CBSP_CAUSE_CELL_MEMORY_EXCEEDED, + OSMO_CBSP_CAUSE_BSC_MEMORY_EXCEEDED, + OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_SUPPORTED, + OSMO_CBSP_CAUSE_CELL_BROADCAST_NOT_OPERATIONAL, + OSMO_CBSP_CAUSE_INCOMPATIBLE_DRX_PARAM, + OSMO_CBSP_CAUSE_EXT_CHAN_NOT_SUPPORTED, + OSMO_CBSP_CAUSE_MSG_REF_ALREADY_USED, + OSMO_CBSP_CAUSE_UNSPECIFIED_ERROR, + OSMO_CBSP_CAUSE_LAI_OR_LAC_NOT_VALID, +}; +extern const struct value_string osmo_cbsp_cause_names[]; +static inline const char *osmo_cbsp_cause_name(enum osmo_cbsp_cause cause) +{ + return get_value_string(osmo_cbsp_cause_names, cause); +} /* decoded CBSP message */ struct osmo_cbsp_decoded { @@ -283,7 +303,7 @@ struct osmo_cbsp_decoded { } u; }; -extern const __thread char *osmo_cbsp_errstr; +extern __thread const char *osmo_cbsp_errstr; struct msgb *osmo_cbsp_msgb_alloc(void *ctx, const char *name); struct msgb *osmo_cbsp_encode(void *ctx, const struct osmo_cbsp_decoded *in); @@ -292,3 +312,4 @@ void osmo_cbsp_init_struct(struct osmo_cbsp_decoded *cbsp, enum cbsp_msg_type ms struct osmo_cbsp_decoded *osmo_cbsp_decoded_alloc(void *ctx, enum cbsp_msg_type msg_type); int osmo_cbsp_recv_buffered(void *ctx, int fd, struct msgb **rmsg, struct msgb **tmp_msg); +int osmo_cbsp_segmentation_cb(struct msgb *msg); |