aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts/csd_v110.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmo-bts/csd_v110.h')
-rw-r--r--include/osmo-bts/csd_v110.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/osmo-bts/csd_v110.h b/include/osmo-bts/csd_v110.h
new file mode 100644
index 00000000..f6be0ae2
--- /dev/null
+++ b/include/osmo-bts/csd_v110.h
@@ -0,0 +1,23 @@
+#pragma once
+
+/* RFC4040 "clearmode" RTP payload length */
+#define RFC4040_RTP_PLEN 160
+
+struct gsm_lchan;
+
+struct csd_v110_frame_desc {
+ uint16_t num_blocks;
+ uint16_t num_bits;
+};
+
+struct csd_v110_lchan_desc {
+ struct csd_v110_frame_desc fr;
+ struct csd_v110_frame_desc hr;
+};
+
+extern const struct csd_v110_lchan_desc csd_v110_lchan_desc[256];
+
+int csd_v110_rtp_encode(const struct gsm_lchan *lchan, uint8_t *rtp,
+ const uint8_t *data, size_t data_len);
+int csd_v110_rtp_decode(const struct gsm_lchan *lchan, uint8_t *data,
+ const uint8_t *rtp, size_t rtp_len);