From 4b505d85e35c3ff366eb983feaf01da2c47c33b3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 29 Jun 2012 21:21:17 +0200 Subject: ganc: add (currently unused) functions for PAGING REQ and DL XFER --- openbsc/src/osmo-ganc/ganc_server.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/openbsc/src/osmo-ganc/ganc_server.c b/openbsc/src/osmo-ganc/ganc_server.c index 67b00f6de..100ad8cf9 100644 --- a/openbsc/src/osmo-ganc/ganc_server.c +++ b/openbsc/src/osmo-ganc/ganc_server.c @@ -21,6 +21,7 @@ #include #include #include +#include #include @@ -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) { -- cgit v1.2.3