Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ircomm_event.h

Go to the documentation of this file.
00001 /*********************************************************************
00002  *                
00003  * Filename:      ircomm_event.h
00004  * Version:       
00005  * Description:   
00006  * Status:        Experimental.
00007  * Author:        Dag Brattli <dagb@cs.uit.no>
00008  * Created at:    Sun Jun  6 23:51:13 1999
00009  * Modified at:   Thu Jun 10 08:36:25 1999
00010  * Modified by:   Dag Brattli <dagb@cs.uit.no>
00011  * 
00012  *     Copyright (c) 1999 Dag Brattli, All Rights Reserved.
00013  *     
00014  *     This program is free software; you can redistribute it and/or 
00015  *     modify it under the terms of the GNU General Public License as 
00016  *     published by the Free Software Foundation; either version 2 of 
00017  *     the License, or (at your option) any later version.
00018  * 
00019  *     This program is distributed in the hope that it will be useful,
00020  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00022  *     GNU General Public License for more details.
00023  * 
00024  *     You should have received a copy of the GNU General Public License 
00025  *     along with this program; if not, write to the Free Software 
00026  *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
00027  *     MA 02111-1307 USA
00028  *     
00029  ********************************************************************/
00030 
00031 #ifndef IRCOMM_EVENT_H
00032 #define IRCOMM_EVENT_H
00033 
00034 typedef enum {
00035         IRCOMM_IDLE,
00036         IRCOMM_WAITI,
00037         IRCOMM_WAITR,
00038         IRCOMM_CONN,
00039 } IRCOMM_STATE;
00040 
00041 /* IrCOMM Events */
00042 typedef enum {
00043         IRCOMM_CONNECT_REQUEST,
00044         IRCOMM_CONNECT_RESPONSE,
00045         IRCOMM_TTP_CONNECT_INDICATION,
00046         IRCOMM_LMP_CONNECT_INDICATION,
00047         IRCOMM_TTP_CONNECT_CONFIRM,
00048         IRCOMM_LMP_CONNECT_CONFIRM,
00049 
00050         IRCOMM_LMP_DISCONNECT_INDICATION,
00051         IRCOMM_TTP_DISCONNECT_INDICATION,
00052         IRCOMM_DISCONNECT_REQUEST,
00053 
00054         IRCOMM_TTP_DATA_INDICATION,
00055         IRCOMM_LMP_DATA_INDICATION,
00056         IRCOMM_DATA_REQUEST,
00057         IRCOMM_CONTROL_REQUEST,
00058         IRCOMM_CONTROL_INDICATION,
00059 } IRCOMM_EVENT;
00060 
00061 /*
00062  * Used for passing information through the state-machine
00063  */
00064 struct ircomm_info {
00065         __u32     saddr;               /* Source device address */
00066         __u32     daddr;               /* Destination device address */
00067         __u8      dlsap_sel;
00068         LM_REASON reason;              /* Reason for disconnect */
00069         __u32     max_data_size;
00070         __u32     max_header_size;
00071 
00072         struct qos_info *qos;
00073 };
00074 
00075 extern char *ircomm_state[];
00076 extern char *ircomm_event[];
00077 
00078 struct ircomm_cb;   /* Forward decl. */
00079 
00080 int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
00081                     struct sk_buff *skb, struct ircomm_info *info);
00082 void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state);
00083 
00084 #endif