1 /* $Id: isdn_concap.c,v 1.5 1998/10/30 18:44:48 he Exp $
3 * Stuff to support the concap_proto by isdn4linux. isdn4linux - specific
4 * stuff goes here. Stuff that depends only on the concap protocol goes to
5 * another -- protocol specific -- source file.
7 * $Log: isdn_concap.c,v $
8 * Revision 1.5 1998/10/30 18:44:48 he
9 * pass return value from isdn_net_dial_req for dialmode change
11 * Revision 1.4 1998/10/30 17:55:24 he
12 * dialmode for x25iface and multulink ppp
14 * Revision 1.3 1998/05/26 22:39:22 he
15 * sync'ed with 2.1.102 where appropriate (CAPABILITY changes)
17 * cleared dev.tbusy in isdn_net BCONN status callback
19 * Revision 1.2 1998/01/31 22:49:21 keil
22 * Revision 1.1 1998/01/31 22:27:57 keil
23 * New files from Henner Eisen for X.25 support
28 #include <linux/isdn.h>
29 #include "isdn_x25iface.h"
31 #include <linux/concap.h>
32 #include "isdn_concap.h"
35 /* The following set of device service operations are for encapsulation
36 protocols that require for reliable datalink semantics. That means:
38 - before any data is to be submitted the connection must explicitly
40 - after the successful set up of the connection is signalled the
41 connection is considered to be reliably up.
43 Auto-dialing ist not compatible with this requirements. Thus, auto-dialing
44 is completely bypassed.
46 It might be possible to implement a (non standardized) datalink protocol
47 that provides a reliable data link service while using some auto dialing
48 mechanism. Such a protocol would need an auxiliary channel (i.e. user-user-
49 signaling on the D-channel) while the B-channel is down.
53 int isdn_concap_dl_data_req(struct concap_proto
*concap
, struct sk_buff
*skb
)
56 struct device
*ndev
= concap
-> net_dev
;
57 isdn_net_local
*lp
= (isdn_net_local
*) ndev
->priv
;
59 IX25DEBUG( "isdn_concap_dl_data_req: %s \n", concap
->net_dev
->name
);
61 tmp
=isdn_net_send_skb(ndev
, lp
, skb
);
62 IX25DEBUG( "isdn_concap_dl_data_req: %s : isdn_net_send_skb returned %d\n", concap
-> net_dev
-> name
, tmp
);
67 int isdn_concap_dl_connect_req(struct concap_proto
*concap
)
69 struct device
*ndev
= concap
-> net_dev
;
70 isdn_net_local
*lp
= (isdn_net_local
*) ndev
->priv
;
72 IX25DEBUG( "isdn_concap_dl_connect_req: %s \n", ndev
-> name
);
75 ret
= isdn_net_dial_req( lp
);
76 if ( ret
) IX25DEBUG("dialing failed\n");
80 int isdn_concap_dl_disconn_req(struct concap_proto
*concap
)
82 IX25DEBUG( "isdn_concap_dl_disconn_req: %s \n", concap
-> net_dev
-> name
);
84 isdn_net_hangup( concap
-> net_dev
);
88 struct concap_device_ops isdn_concap_reliable_dl_dops
= {
89 &isdn_concap_dl_data_req
,
90 &isdn_concap_dl_connect_req
,
91 &isdn_concap_dl_disconn_req
94 struct concap_device_ops isdn_concap_demand_dial_dops
= {
95 NULL
, /* set this first entry to something like &isdn_net_start_xmit,
96 but the entry part of the current isdn_net_start_xmit must be
98 /* no connection control for demand dial semantics */
103 /* The following should better go into a dedicated source file such that
104 this sourcefile does not need to include any protocol specific header
107 struct concap_proto
* isdn_concap_new( int encap
)
110 case ISDN_NET_ENCAP_X25IFACE
:
111 return isdn_x25iface_proto_new();