summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-06-29 21:21:17 +0200
committerHarald Welte <laforge@gnumonks.org>2012-06-29 21:21:17 +0200
commit4b505d85e35c3ff366eb983feaf01da2c47c33b3 (patch)
treec747fc1263a521faa3fb34b74e20971d1bcb1d6b
parenta01b6ded75a1426bf64eb6146a874120dc5c95a2 (diff)
ganc: add (currently unused) functions for PAGING REQ and DL XFER
-rw-r--r--openbsc/src/osmo-ganc/ganc_server.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/openbsc/src/osmo-ganc/ganc_server.c b/openbsc/src/osmo-ganc/ganc_server.c
index 67b00f6..100ad8c 100644
--- a/openbsc/src/osmo-ganc/ganc_server.c
+++ b/openbsc/src/osmo-ganc/ganc_server.c
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
+#include <assert.h>
#include <arpa/inet.h>
@@ -192,6 +193,38 @@ static int tx_unc_disco_acc(struct gan_peer *peer, const char *segw_host,
return unc_peer_tx(peer, msg);
}
+/* 10.1.25 GA-CSR DOWNLINK DIRECT TRANSFER */
+static int tx_csr_dl_direct_xfer(struct gan_peer *peer, struct msgb *msg)
+{
+ printf("<- GA-CSR DL DIRECT TRANSFER\n");
+
+ /* tag and length of L3 info */
+ assert(msgb_l3len(msg) <= 255);
+ msgb_tv_push(msg, GA_IE_L3_MSG, msgb_l3len(msg));
+
+ push_rc_csr_hdr(msg, GA_PDISC_CSR, GA_MT_CSR_DL_DIRECT_XFER);
+
+ return unc_peer_tx(peer, msg);
+}
+
+/* 10.1.21 GA-CSR PAGING REQUEST */
+static int tx_csr_paging_req(struct gan_peer *peer, uint8_t mi_len,
+ uint8_t *mi, uint8_t chan_needed)
+{
+ struct msgb *msg = unc_msgb_alloc();
+
+ printf("<- GA-CSR PAGING REQ\n");
+
+ if (!msg)
+ return -ENOMEM;
+
+ push_rc_csr_hdr(msg, GA_PDISC_CSR, GA_MT_CSR_PAGING_REQ);
+ msgb_tlv_put(msg, GA_IE_CHAN_NEEDED, 1, &chan_needed);
+ msgb_tlv_put(msg, GA_IE_MI, mi_len, mi);
+
+ return unc_peer_tx(peer, msg);
+}
+
/* 10.1.13 GA-CSR REQUEST ACCEPT */
static int tx_csr_request_acc(struct gan_peer *peer)
{