Linux Audio

Check our new training course

Loading...
v5.9
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 * These are the public elements of the Linux LAPB module.
 4 */
 5
 6#ifndef	LAPB_KERNEL_H
 7#define	LAPB_KERNEL_H
 8
 9#define	LAPB_OK			0
10#define	LAPB_BADTOKEN		1
11#define	LAPB_INVALUE		2
12#define	LAPB_CONNECTED		3
13#define	LAPB_NOTCONNECTED	4
14#define	LAPB_REFUSED		5
15#define	LAPB_TIMEDOUT		6
16#define	LAPB_NOMEM		7
17
18#define	LAPB_STANDARD		0x00
19#define	LAPB_EXTENDED		0x01
20
21#define	LAPB_SLP		0x00
22#define	LAPB_MLP		0x02
23
24#define	LAPB_DTE		0x00
25#define	LAPB_DCE		0x04
26
27struct lapb_register_struct {
28	void (*connect_confirmation)(struct net_device *dev, int reason);
29	void (*connect_indication)(struct net_device *dev, int reason);
30	void (*disconnect_confirmation)(struct net_device *dev, int reason);
31	void (*disconnect_indication)(struct net_device *dev, int reason);
32	int  (*data_indication)(struct net_device *dev, struct sk_buff *skb);
33	void (*data_transmit)(struct net_device *dev, struct sk_buff *skb);
34};
35
36struct lapb_parms_struct {
37	unsigned int t1;
38	unsigned int t1timer;
39	unsigned int t2;
40	unsigned int t2timer;
41	unsigned int n2;
42	unsigned int n2count;
43	unsigned int window;
44	unsigned int state;
45	unsigned int mode;
46};
47
48extern int lapb_register(struct net_device *dev,
49			 const struct lapb_register_struct *callbacks);
50extern int lapb_unregister(struct net_device *dev);
51extern int lapb_getparms(struct net_device *dev, struct lapb_parms_struct *parms);
52extern int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms);
53extern int lapb_connect_request(struct net_device *dev);
54extern int lapb_disconnect_request(struct net_device *dev);
55extern int lapb_data_request(struct net_device *dev, struct sk_buff *skb);
56extern int lapb_data_received(struct net_device *dev, struct sk_buff *skb);
57
58#endif
v4.6
 
 1/*
 2 * These are the public elements of the Linux LAPB module.
 3 */
 4
 5#ifndef	LAPB_KERNEL_H
 6#define	LAPB_KERNEL_H
 7
 8#define	LAPB_OK			0
 9#define	LAPB_BADTOKEN		1
10#define	LAPB_INVALUE		2
11#define	LAPB_CONNECTED		3
12#define	LAPB_NOTCONNECTED	4
13#define	LAPB_REFUSED		5
14#define	LAPB_TIMEDOUT		6
15#define	LAPB_NOMEM		7
16
17#define	LAPB_STANDARD		0x00
18#define	LAPB_EXTENDED		0x01
19
20#define	LAPB_SLP		0x00
21#define	LAPB_MLP		0x02
22
23#define	LAPB_DTE		0x00
24#define	LAPB_DCE		0x04
25
26struct lapb_register_struct {
27	void (*connect_confirmation)(struct net_device *dev, int reason);
28	void (*connect_indication)(struct net_device *dev, int reason);
29	void (*disconnect_confirmation)(struct net_device *dev, int reason);
30	void (*disconnect_indication)(struct net_device *dev, int reason);
31	int  (*data_indication)(struct net_device *dev, struct sk_buff *skb);
32	void (*data_transmit)(struct net_device *dev, struct sk_buff *skb);
33};
34
35struct lapb_parms_struct {
36	unsigned int t1;
37	unsigned int t1timer;
38	unsigned int t2;
39	unsigned int t2timer;
40	unsigned int n2;
41	unsigned int n2count;
42	unsigned int window;
43	unsigned int state;
44	unsigned int mode;
45};
46
47extern int lapb_register(struct net_device *dev,
48			 const struct lapb_register_struct *callbacks);
49extern int lapb_unregister(struct net_device *dev);
50extern int lapb_getparms(struct net_device *dev, struct lapb_parms_struct *parms);
51extern int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms);
52extern int lapb_connect_request(struct net_device *dev);
53extern int lapb_disconnect_request(struct net_device *dev);
54extern int lapb_data_request(struct net_device *dev, struct sk_buff *skb);
55extern int lapb_data_received(struct net_device *dev, struct sk_buff *skb);
56
57#endif