aboutsummaryrefslogtreecommitdiffstats
path: root/pcu_l1_if.h
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2012-03-18 15:48:51 +0400
committerIvan Kluchnikov <kluchnikovi@gmail.com>2012-03-18 15:48:51 +0400
commite3a059656f6bf0dd338889b8bd742089e628df70 (patch)
tree686929df9ddc25d9699fc116b13944a87918c40c /pcu_l1_if.h
parentc320d86052645ec1fd083a422909572bf80bdee5 (diff)
Added L1 interface between PCU and OpenBTS for communication (PCU side).
Diffstat (limited to 'pcu_l1_if.h')
-rw-r--r--pcu_l1_if.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/pcu_l1_if.h b/pcu_l1_if.h
index e618cba9..ec56a951 100644
--- a/pcu_l1_if.h
+++ b/pcu_l1_if.h
@@ -20,11 +20,48 @@
#ifndef PCU_L1_IF_H
#define PCU_L1_IF_H
+
#include <BitVector.h>
+#include <gsmL1prim.h>
+extern "C" {
+#include <osmocom/core/write_queue.h>
+#include <osmocom/core/socket.h>
+#include <osmocom/core/timer.h>
+#include <osmocom/gsm/gsm_utils.h>
+}
+
+#define msgb_l1prim(msg) ((GsmL1_Prim_t *)(msg)->l1h)
+
+struct femtol1_hdl {
+ struct gsm_time gsm_time;
+ uint32_t hLayer1; /* handle to the L1 instance in the DSP */
+ uint32_t dsp_trace_f;
+ uint16_t clk_cal;
+ struct llist_head wlc_list;
+
+ void *priv; /* user reference */
+
+ struct osmo_timer_list alive_timer;
+ unsigned int alive_prim_cnt;
+
+ struct osmo_fd read_ofd; /* osmo file descriptors */
+ struct osmo_wqueue write_q;
+};
+
+struct l1fwd_hdl {
+ struct sockaddr_storage remote_sa;
+ socklen_t remote_sa_len;
+
+ struct osmo_wqueue udp_wq;
+
+ struct femtol1_hdl *fl1h;
+};
+
+extern struct l1fwd_hdl *l1fh;
void pcu_l1if_tx(BitVector * block);
-void *pcu_l1if_rx(void *);
+int pcu_l1if_handle_l1prim(struct femtol1_hdl *fl1h, struct msgb *msg);
void gsmtap_send_llc(uint8_t * data, unsigned len);