aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/pcbit/capi.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/isdn/pcbit/capi.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/isdn/pcbit/capi.h')
-rw-r--r--drivers/isdn/pcbit/capi.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/drivers/isdn/pcbit/capi.h b/drivers/isdn/pcbit/capi.h
new file mode 100644
index 000000000000..18e6aa360a8f
--- /dev/null
+++ b/drivers/isdn/pcbit/capi.h
@@ -0,0 +1,88 @@
1/*
2 * CAPI encode/decode prototypes and defines
3 *
4 * Copyright (C) 1996 Universidade de Lisboa
5 *
6 * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
7 *
8 * This software may be used and distributed according to the terms of
9 * the GNU General Public License, incorporated herein by reference.
10 */
11
12#ifndef CAPI_H
13#define CAPI_H
14
15
16#define REQ_CAUSE 0x01
17#define REQ_DISPLAY 0x04
18#define REQ_USER_TO_USER 0x08
19
20#define AppInfoMask REQ_CAUSE|REQ_DISPLAY|REQ_USER_TO_USER
21
22/* Connection Setup */
23extern int capi_conn_req(const char * calledPN, struct sk_buff **buf,
24 int proto);
25extern int capi_decode_conn_conf(struct pcbit_chan * chan, struct sk_buff *skb,
26 int *complete);
27
28extern int capi_decode_conn_ind(struct pcbit_chan * chan, struct sk_buff *skb,
29 struct callb_data *info);
30extern int capi_conn_resp(struct pcbit_chan* chan, struct sk_buff **skb);
31
32extern int capi_conn_active_req(struct pcbit_chan* chan, struct sk_buff **skb);
33extern int capi_decode_conn_actv_conf(struct pcbit_chan * chan,
34 struct sk_buff *skb);
35
36extern int capi_decode_conn_actv_ind(struct pcbit_chan * chan,
37 struct sk_buff *skb);
38extern int capi_conn_active_resp(struct pcbit_chan* chan,
39 struct sk_buff **skb);
40
41/* Data */
42extern int capi_select_proto_req(struct pcbit_chan *chan, struct sk_buff **skb,
43 int outgoing);
44extern int capi_decode_sel_proto_conf(struct pcbit_chan *chan,
45 struct sk_buff *skb);
46
47extern int capi_activate_transp_req(struct pcbit_chan *chan,
48 struct sk_buff **skb);
49extern int capi_decode_actv_trans_conf(struct pcbit_chan *chan,
50 struct sk_buff *skb);
51
52extern int capi_tdata_req(struct pcbit_chan* chan, struct sk_buff *skb);
53extern int capi_tdata_resp(struct pcbit_chan *chan, struct sk_buff ** skb);
54
55/* Connection Termination */
56extern int capi_disc_req(ushort callref, struct sk_buff **skb, u_char cause);
57extern int capi_decode_disc_conf(struct pcbit_chan *chan, struct sk_buff *skb);
58
59extern int capi_decode_disc_ind(struct pcbit_chan *chan, struct sk_buff *skb);
60extern int capi_disc_resp(struct pcbit_chan *chan, struct sk_buff **skb);
61
62#ifdef DEBUG
63extern int capi_decode_debug_188(u_char *hdr, ushort hdrlen);
64#endif
65
66static inline struct pcbit_chan *
67capi_channel(struct pcbit_dev *dev, struct sk_buff *skb)
68{
69 ushort callref;
70
71 callref = *((ushort*) skb->data);
72 skb_pull(skb, 2);
73
74 if (dev->b1->callref == callref)
75 return dev->b1;
76 else if (dev->b2->callref == callref)
77 return dev->b2;
78
79 return NULL;
80}
81
82#endif
83
84
85
86
87
88