aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2021-01-26 12:57:13 +0100
committerlaforge <laforge@osmocom.org>2021-01-29 21:27:18 +0000
commit4d40047c50ef916e6b1a38bd77567bc1b4857122 (patch)
treee891fe92fa3ec223e5861289ff4441a102cfc661 /include/osmocom
parent3e3f3777493530bf086c791a19bb6face43e40cd (diff)
gprs_bssgp: agregate RIM related code in gprs_bssgp_rim.c
gprs_bssgp and gprs_bssgp_util.c also contains code related to send and receive RIM PDUs via BSSGP and also code to encode and decode RAN INFORMATION PDUs. Lets move this to gprs_bssgp_rim.c Change-Id: Icda279452962b06e552cb1361d2a27b7dc8a6b04 Related: SYS#5103
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/gprs/gprs_bssgp.h33
-rw-r--r--include/osmocom/gprs/gprs_bssgp_rim.h34
2 files changed, 34 insertions, 33 deletions
diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h
index a7b363bd..e55fa527 100644
--- a/include/osmocom/gprs/gprs_bssgp.h
+++ b/include/osmocom/gprs/gprs_bssgp.h
@@ -42,39 +42,6 @@ int bssgp_tx_simple_bvci(uint8_t pdu_type, uint16_t nsei,
/* Chapter 10.4.14: Status */
int bssgp_tx_status(uint8_t cause, uint16_t *bvci, struct msgb *orig_msg);
-/* Chapter 10.6.1: RAN-INFORMATION-REQUEST */
-struct bssgp_ran_information_pdu {
- struct bssgp_rim_routing_info routing_info_dest;
- struct bssgp_rim_routing_info routing_info_src;
-
- /* Encoded variant of the RIM container */
- uint8_t rim_cont_iei;
- const uint8_t *rim_cont;
- unsigned int rim_cont_len;
-
- /* Decoded variant of the RIM container */
- bool decoded_present;
- union {
- struct bssgp_ran_inf_req_rim_cont req_rim_cont;
- struct bssgp_ran_inf_rim_cont rim_cont;
- struct bssgp_ran_inf_ack_rim_cont ack_rim_cont;
- struct bssgp_ran_inf_err_rim_cont err_rim_cont;
- struct bssgp_ran_inf_app_err_rim_cont app_err_rim_cont;
- } decoded;
-
- /* When receiving a PDU from BSSGP the encoded variant of the RIM
- * container will always be present. The decoded variant will be
- * present in addition whenever BSSGP was able to decode the container.
- *
- * When sending a PDU to BSSGP, then the decoded variant is used when
- * it is available. The encoded variant (if present) will be ignored
- * then. */
-};
-int bssgp_tx_rim(const struct bssgp_ran_information_pdu *pdu, uint16_t nsei);
-
-int bssgp_parse_rim_pdu(struct bssgp_ran_information_pdu *pdu, const struct msgb *msg);
-struct msgb *bssgp_encode_rim_pdu(const struct bssgp_ran_information_pdu *pdu);
-
enum bssgp_prim {
PRIM_BSSGP_DL_UD,
PRIM_BSSGP_UL_UD,
diff --git a/include/osmocom/gprs/gprs_bssgp_rim.h b/include/osmocom/gprs/gprs_bssgp_rim.h
index 418c1bd2..5f397c98 100644
--- a/include/osmocom/gprs/gprs_bssgp_rim.h
+++ b/include/osmocom/gprs/gprs_bssgp_rim.h
@@ -236,3 +236,37 @@ struct bssgp_ran_inf_app_err_rim_cont {
int bssgp_dec_ran_inf_app_err_rim_cont(struct bssgp_ran_inf_app_err_rim_cont *cont, const uint8_t *buf, size_t len);
int bssgp_enc_ran_inf_app_err_rim_cont(uint8_t *buf, size_t len, const struct bssgp_ran_inf_app_err_rim_cont *cont);
+
+/* Chapter 10.6.1: RAN-INFORMATION-REQUEST */
+struct bssgp_ran_information_pdu {
+ struct bssgp_rim_routing_info routing_info_dest;
+ struct bssgp_rim_routing_info routing_info_src;
+
+ /* Encoded variant of the RIM container */
+ uint8_t rim_cont_iei;
+ const uint8_t *rim_cont;
+ unsigned int rim_cont_len;
+
+ /* Decoded variant of the RIM container */
+ bool decoded_present;
+ union {
+ struct bssgp_ran_inf_req_rim_cont req_rim_cont;
+ struct bssgp_ran_inf_rim_cont rim_cont;
+ struct bssgp_ran_inf_ack_rim_cont ack_rim_cont;
+ struct bssgp_ran_inf_err_rim_cont err_rim_cont;
+ struct bssgp_ran_inf_app_err_rim_cont app_err_rim_cont;
+ } decoded;
+
+ /* When receiving a PDU from BSSGP the encoded variant of the RIM
+ * container will always be present. The decoded variant will be
+ * present in addition whenever BSSGP was able to decode the container.
+ *
+ * When sending a PDU to BSSGP, then the decoded variant is used when
+ * it is available. The encoded variant (if present) will be ignored
+ * then. */
+};
+
+int bssgp_parse_rim_pdu(struct bssgp_ran_information_pdu *pdu, const struct msgb *msg);
+struct msgb *bssgp_encode_rim_pdu(const struct bssgp_ran_information_pdu *pdu);
+
+int bssgp_tx_rim(const struct bssgp_ran_information_pdu *pdu, uint16_t nsei);