1 /*********************************************************************
3 * Filename: ircomm_tty_attach.h
6 * Status: Experimental.
7 * Author: Dag Brattli <dagb@cs.uit.no>
8 * Created at: Wed Jun 9 15:55:18 1999
9 * Modified at: Thu Sep 2 10:29:30 1999
10 * Modified by: Dag Brattli <dagb@cs.uit.no>
12 * Copyright (c) 1999 Dag Brattli, All Rights Reserved.
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.
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.
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,
29 ********************************************************************/
31 #ifndef IRCOMM_TTY_ATTACH_H
32 #define IRCOMM_TTY_ATTACH_H
34 #include <net/irda/ircomm_tty.h>
39 IRCOMM_TTY_QUERY_PARAMETERS
,
40 IRCOMM_TTY_QUERY_LSAP_SEL
,
45 /* IrCOMM TTY Events */
47 IRCOMM_TTY_ATTACH_CABLE
,
48 IRCOMM_TTY_DETACH_CABLE
,
49 IRCOMM_TTY_DATA_REQUEST
,
50 IRCOMM_TTY_DATA_INDICATION
,
51 IRCOMM_TTY_DISCOVERY_REQUEST
,
52 IRCOMM_TTY_DISCOVERY_INDICATION
,
53 IRCOMM_TTY_CONNECT_CONFIRM
,
54 IRCOMM_TTY_CONNECT_INDICATION
,
55 IRCOMM_TTY_DISCONNECT_REQUEST
,
56 IRCOMM_TTY_DISCONNECT_INDICATION
,
57 IRCOMM_TTY_WD_TIMER_EXPIRED
,
58 IRCOMM_TTY_GOT_PARAMETERS
,
59 IRCOMM_TTY_GOT_LSAPSEL
,
62 /* Used for passing information through the state-machine */
63 struct ircomm_tty_info
{
64 __u32 saddr
; /* Source device address */
65 __u32 daddr
; /* Destination device address */
69 extern char *ircomm_state
[];
70 extern char *ircomm_event
[];
71 extern char *ircomm_tty_state
[];
73 int ircomm_tty_do_event(struct ircomm_tty_cb
*self
, IRCOMM_TTY_EVENT event
,
74 struct sk_buff
*skb
, struct ircomm_tty_info
*info
);
75 void ircomm_tty_next_state(struct ircomm_tty_cb
*self
, IRCOMM_TTY_STATE state
);
78 int ircomm_tty_attach_cable(struct ircomm_tty_cb
*self
);
79 void ircomm_tty_detach_cable(struct ircomm_tty_cb
*self
);
80 void ircomm_tty_connect_confirm(void *instance
, void *sap
,
85 void ircomm_tty_disconnect_indication(void *instance
, void *sap
,
88 void ircomm_tty_connect_indication(void *instance
, void *sap
,