1 /*********************************************************************
4 * Filename: irlap_event.h
7 * Status: Experimental.
8 * Author: Dag Brattli <dagb@cs.uit.no>
9 * Created at: Sat Aug 16 00:59:29 1997
10 * Modified at: Tue Dec 21 11:20:30 1999
11 * Modified by: Dag Brattli <dagb@cs.uit.no>
13 * Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
14 * All Rights Reserved.
15 * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License as
19 * published by the Free Software Foundation; either version 2 of
20 * the License, or (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, see <http://www.gnu.org/licenses/>.
30 ********************************************************************/
35 #include <net/irda/irda.h>
37 /* A few forward declarations (to make compiler happy) */
43 LAP_NDM
, /* Normal disconnected mode */
46 LAP_CONN
, /* Connect indication */
47 LAP_SETUP
, /* Setting up connection */
48 LAP_OFFLINE
, /* A really boring state */
51 LAP_NRM_P
, /* Normal response mode as primary */
54 LAP_NRM_S
, /* Normal response mode as secondary */
76 RECV_DISCOVERY_XID_CMD
,
77 RECV_DISCOVERY_XID_RSP
,
103 DISCOVERY_TIMER_EXPIRED
,
105 BACKOFF_TIMER_EXPIRED
,
106 MEDIA_BUSY_TIMER_EXPIRED
,
110 * Disconnect reason code
112 typedef enum { /* FIXME check the two first reason codes */
113 LAP_DISC_INDICATION
=1, /* Received a disconnect request from peer */
114 LAP_NO_RESPONSE
, /* To many retransmits without response */
115 LAP_RESET_INDICATION
, /* To many retransmits, or invalid nr/ns */
116 LAP_FOUND_NONE
, /* No devices were discovered */
118 LAP_PRIMARY_CONFLICT
,
121 extern const char *const irlap_state
[];
123 void irlap_do_event(struct irlap_cb
*self
, IRLAP_EVENT event
,
124 struct sk_buff
*skb
, struct irlap_info
*info
);
125 void irlap_print_event(IRLAP_EVENT event
);
127 int irlap_qos_negotiate(struct irlap_cb
*self
, struct sk_buff
*skb
);