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-2001 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, write to the Free Software
29 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 ********************************************************************/
37 #include <net/irda/irda.h>
38 #include <net/irda/discovery.h>
44 LAP_NDM, /* Normal disconnected mode */
47 LAP_CONN, /* Connect indication */
48 LAP_SETUP, /* Setting up connection */
49 LAP_OFFLINE, /* A really boring state */
52 LAP_NRM_P, /* Normal response mode as primary */
55 LAP_NRM_S, /* Normal response mode as secondary */
77 RECV_DISCOVERY_XID_CMD,
78 RECV_DISCOVERY_XID_RSP,
104 DISCOVERY_TIMER_EXPIRED,
106 BACKOFF_TIMER_EXPIRED,
107 MEDIA_BUSY_TIMER_EXPIRED,
111 * Various things used by the IrLAP state machine
114 __u8 caddr; /* Connection address */
115 __u8 control; /* Frame type */
121 int pf; /* Poll/final bit set */
123 __u8 nr; /* Sequence number of next frame expected */
124 __u8 ns; /* Sequence number of frame sent */
126 int S; /* Number of slots */
127 int slot; /* Random chosen slot */
128 int s; /* Current slot */
130 discovery_t *discovery; /* Discovery information */
133 extern const char *irlap_state[];
135 void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
136 struct sk_buff *skb, struct irlap_info *info);
137 void irlap_print_event(IRLAP_EVENT event);
139 extern int irlap_qos_negotiate(struct irlap_cb *self, struct sk_buff *skb);