ircomm_event.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  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. #ifndef IRCOMM_EVENT_H
  31. #define IRCOMM_EVENT_H
  32. typedef enum {
  33.         IRCOMM_IDLE,
  34.         IRCOMM_WAITI,
  35.         IRCOMM_WAITR,
  36.         IRCOMM_CONN,
  37. } IRCOMM_STATE;
  38. /* IrCOMM Events */
  39. typedef enum {
  40.         IRCOMM_CONNECT_REQUEST,
  41.         IRCOMM_CONNECT_RESPONSE,
  42.         IRCOMM_TTP_CONNECT_INDICATION,
  43. IRCOMM_LMP_CONNECT_INDICATION,
  44.         IRCOMM_TTP_CONNECT_CONFIRM,
  45. IRCOMM_LMP_CONNECT_CONFIRM,
  46.         IRCOMM_LMP_DISCONNECT_INDICATION,
  47. IRCOMM_TTP_DISCONNECT_INDICATION,
  48.         IRCOMM_DISCONNECT_REQUEST,
  49.         IRCOMM_TTP_DATA_INDICATION,
  50. IRCOMM_LMP_DATA_INDICATION,
  51.         IRCOMM_DATA_REQUEST,
  52.         IRCOMM_CONTROL_REQUEST,
  53.         IRCOMM_CONTROL_INDICATION,
  54. } IRCOMM_EVENT;
  55. /*
  56.  * Used for passing information through the state-machine
  57.  */
  58. struct ircomm_info {
  59.         __u32     saddr;               /* Source device address */
  60.         __u32     daddr;               /* Destination device address */
  61.         __u8      dlsap_sel;
  62.         LM_REASON reason;              /* Reason for disconnect */
  63. __u32     max_data_size;
  64. __u32     max_header_size;
  65. struct qos_info *qos;
  66. };
  67. extern char *ircomm_state[];
  68. extern char *ircomm_event[];
  69. struct ircomm_cb;   /* Forward decl. */
  70. int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event,
  71.     struct sk_buff *skb, struct ircomm_info *info);
  72. void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state);
  73. #endif