Linux Audio

Check our new training course

Loading...
v3.1
 1/*********************************************************************
 2 *                
 3 * Filename:      ircomm_event.h
 4 * Version:       
 5 * Description:   
 6 * Status:        Experimental.
 7 * Author:        Dag Brattli <dagb@cs.uit.no>
 8 * Created at:    Sun Jun  6 23:51:13 1999
 9 * Modified at:   Thu Jun 10 08:36:25 1999
10 * Modified by:   Dag Brattli <dagb@cs.uit.no>
11 * 
12 *     Copyright (c) 1999 Dag Brattli, All Rights Reserved.
13 *     
14 *     This program is free software; you can redistribute it and/or 
15 *     modify it under the terms of the GNU General Public License as 
16 *     published by the Free Software Foundation; either version 2 of 
17 *     the License, or (at your option) any later version.
18 * 
19 *     This program is distributed in the hope that it will be useful,
20 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
21 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 *     GNU General Public License for more details.
23 * 
24 *     You should have received a copy of the GNU General Public License 
25 *     along with this program; if not, write to the Free Software 
26 *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
27 *     MA 02111-1307 USA
28 *     
29 ********************************************************************/
30
31#ifndef IRCOMM_EVENT_H
32#define IRCOMM_EVENT_H
33
34#include <net/irda/irmod.h>
35
36typedef enum {
37        IRCOMM_IDLE,
38        IRCOMM_WAITI,
39        IRCOMM_WAITR,
40        IRCOMM_CONN,
41} IRCOMM_STATE;
42
43/* IrCOMM Events */
44typedef enum {
45        IRCOMM_CONNECT_REQUEST,
46        IRCOMM_CONNECT_RESPONSE,
47        IRCOMM_TTP_CONNECT_INDICATION,
48	IRCOMM_LMP_CONNECT_INDICATION,
49        IRCOMM_TTP_CONNECT_CONFIRM,
50	IRCOMM_LMP_CONNECT_CONFIRM,
51
52        IRCOMM_LMP_DISCONNECT_INDICATION,
53	IRCOMM_TTP_DISCONNECT_INDICATION,
54        IRCOMM_DISCONNECT_REQUEST,
55
56        IRCOMM_TTP_DATA_INDICATION,
57	IRCOMM_LMP_DATA_INDICATION,
58        IRCOMM_DATA_REQUEST,
59        IRCOMM_CONTROL_REQUEST,
60        IRCOMM_CONTROL_INDICATION,
61} IRCOMM_EVENT;
62
63/*
64 * Used for passing information through the state-machine
65 */
66struct ircomm_info {
67        __u32     saddr;               /* Source device address */
68        __u32     daddr;               /* Destination device address */
69        __u8      dlsap_sel;
70        LM_REASON reason;              /* Reason for disconnect */
71	__u32     max_data_size;
72	__u32     max_header_size;
73
74	struct qos_info *qos;
75};
76
77extern const char *const ircomm_state[];
78
79struct ircomm_cb;   /* Forward decl. */
80
81int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
82		    struct sk_buff *skb, struct ircomm_info *info);
83void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state);
84
85#endif
v3.15
 1/*********************************************************************
 2 *                
 3 * Filename:      ircomm_event.h
 4 * Version:       
 5 * Description:   
 6 * Status:        Experimental.
 7 * Author:        Dag Brattli <dagb@cs.uit.no>
 8 * Created at:    Sun Jun  6 23:51:13 1999
 9 * Modified at:   Thu Jun 10 08:36:25 1999
10 * Modified by:   Dag Brattli <dagb@cs.uit.no>
11 * 
12 *     Copyright (c) 1999 Dag Brattli, All Rights Reserved.
13 *     
14 *     This program is free software; you can redistribute it and/or 
15 *     modify it under the terms of the GNU General Public License as 
16 *     published by the Free Software Foundation; either version 2 of 
17 *     the License, or (at your option) any later version.
18 * 
19 *     This program is distributed in the hope that it will be useful,
20 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
21 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 *     GNU General Public License for more details.
23 * 
24 *     You should have received a copy of the GNU General Public License 
25 *     along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 
26 *     
27 ********************************************************************/
28
29#ifndef IRCOMM_EVENT_H
30#define IRCOMM_EVENT_H
31
32#include <net/irda/irmod.h>
33
34typedef enum {
35        IRCOMM_IDLE,
36        IRCOMM_WAITI,
37        IRCOMM_WAITR,
38        IRCOMM_CONN,
39} IRCOMM_STATE;
40
41/* IrCOMM Events */
42typedef enum {
43        IRCOMM_CONNECT_REQUEST,
44        IRCOMM_CONNECT_RESPONSE,
45        IRCOMM_TTP_CONNECT_INDICATION,
46	IRCOMM_LMP_CONNECT_INDICATION,
47        IRCOMM_TTP_CONNECT_CONFIRM,
48	IRCOMM_LMP_CONNECT_CONFIRM,
49
50        IRCOMM_LMP_DISCONNECT_INDICATION,
51	IRCOMM_TTP_DISCONNECT_INDICATION,
52        IRCOMM_DISCONNECT_REQUEST,
53
54        IRCOMM_TTP_DATA_INDICATION,
55	IRCOMM_LMP_DATA_INDICATION,
56        IRCOMM_DATA_REQUEST,
57        IRCOMM_CONTROL_REQUEST,
58        IRCOMM_CONTROL_INDICATION,
59} IRCOMM_EVENT;
60
61/*
62 * Used for passing information through the state-machine
63 */
64struct ircomm_info {
65        __u32     saddr;               /* Source device address */
66        __u32     daddr;               /* Destination device address */
67        __u8      dlsap_sel;
68        LM_REASON reason;              /* Reason for disconnect */
69	__u32     max_data_size;
70	__u32     max_header_size;
71
72	struct qos_info *qos;
73};
74
75extern const char *const ircomm_state[];
76
77struct ircomm_cb;   /* Forward decl. */
78
79int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
80		    struct sk_buff *skb, struct ircomm_info *info);
81void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state);
82
83#endif