blob: 93137fccd5f2be9f28b4a339bbe618dbd25ef0aa [file] [log] [blame]
Harald Welteb68899d2009-01-06 21:47:18 +00001/* Paging helper and manager.... */
2/* (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.org>
3 * All Rights Reserved
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20
21#ifndef PAGING_H
22#define PAGING_H
23
24#include <malloc.h>
25#include <string.h>
26
27#include "linuxlist.h"
28#include "gsm_data.h"
29#include "gsm_subscriber.h"
30
31/**
32 * A pending paging request
33 */
34struct paging_request {
35 struct llist_head entry;
36 struct gsm_subscriber *subscr;
37 struct gsm_bts *bts;
38};
39
40/*
41 * struct for each bts we serve...
42 */
43struct paging_bts {
44 /* public callbacks */
45 void (*channel_allocated)(struct gsm_lchan *lchan);
46
47 /* list for each bts */
48 struct llist_head bts_list;
49
50 /* pending requests */
51 struct llist_head pending_requests;
52 struct gsm_bts *bts;
53};
54
55/* call once for every gsm_bts... */
56struct paging_bts* page_allocate(struct gsm_bts *bts);
57
58/* schedule paging request */
59void page_request(struct gsm_bts *bts, struct gsm_subscriber *subscr);
60
61#endif