Debian Codegraph @

drivers/dahdi/xpp/xpp_dahdi.h

raw symbols SCIP
1 #ifndef XPP_DAHDI_H
2 #define XPP_DAHDI_H
3 /*
4 * Written by Oron Peled <[email protected]>
5 * Copyright (C) 2004-2006, Xorcom
6 *
7 * All rights reserved.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
25 #include "xpd.h"
26 #include "xproto.h"
27
28 void xpd_set_spanname(xpd_t *xpd);
29 int xpd_dahdi_preregister(xpd_t *xpd, unsigned offset);
30 int xpd_dahdi_postregister(xpd_t *xpd);
31 void xpd_dahdi_preunregister(xpd_t *xpd);
32 void xpd_dahdi_postunregister(xpd_t *xpd);
33 int create_xpd(xbus_t *xbus, const xproto_table_t *proto_table,
34 const struct unit_descriptor *unit_descriptor,
35 int unit,
36 int subunit, __u8 type);
37 xpd_t *xpd_alloc(xbus_t *xbus, int unit, int subunit,
38 size_t privsize, const xproto_table_t *proto_table,
39 const struct unit_descriptor *unit_descriptor,
40 int channels);
41 void xpd_free(xpd_t *xpd);
42 void xpd_remove(xpd_t *xpd);
43 int phonedev_alloc_channels(xpd_t *xpd, int channels);
44 void update_xpd_status(xpd_t *xpd, int alarm_flag);
45 const char *xpp_echocan_name(const struct dahdi_chan *chan);
46 int xpp_echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
47 struct dahdi_echocanparam *p,
48 struct dahdi_echocan_state **ec);
49 void hookstate_changed(xpd_t *xpd, int pos, bool good);
50 int xpp_open(struct dahdi_chan *chan);
51 int xpp_close(struct dahdi_chan *chan);
52 int xpp_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long arg);
53 int xpp_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig);
54 int xpp_maint(struct dahdi_span *span, int cmd);
55 int xpp_watchdog(struct dahdi_span *span, int cause);
56 void xpp_span_assigned(struct dahdi_span *span);
57 void report_bad_ioctl(const char *msg, xpd_t *xpd, int pos, unsigned int cmd);
58 int total_registered_spans(void);
59 void oht_pcm(xpd_t *xpd, int pos, bool pass);
60 void mark_offhook(xpd_t *xpd, int pos, bool to_offhook);
61 #define IS_OFFHOOK(xpd, pos) IS_SET((xpd)->phonedev.offhook_state, (pos))
62 void notify_rxsig(xpd_t *xpd, int pos, enum dahdi_rxsig rxsig);
63
64 #ifdef CONFIG_PROC_FS
65 #include <linux/proc_fs.h>
66
67 extern struct proc_dir_entry *xpp_proc_toplevel;
68 #endif
69
70 #define SPAN_REGISTERED(xpd) (atomic_read(&PHONEDEV(xpd).dahdi_registered) && \
71 test_bit(DAHDI_FLAGBIT_REGISTERED, &PHONEDEV(xpd).span.flags))
72
73 #endif /* XPP_DAHDI_H */