~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/net/irda/irlap_event.h

Version: ~ [ 2.2.5 ] ~ [ 2.4.1 ] ~ [ 2.4.9 ] ~ [ 2.6.17.10 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*********************************************************************
  2  *                
  3  *                
  4  * Filename:      irlap_event.h
  5  * Version:       0.1
  6  * Description:   
  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>
 12  * 
 13  *     Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>, 
 14  *     All Rights Reserved.
 15  *     
 16  *     This program is free software; you can redistribute it and/or 
 17  *     modify it under the terms of the GNU General Public License as 
 18  *     published by the Free Software Foundation; either version 2 of 
 19  *     the License, or (at your option) any later version.
 20  * 
 21  *     This program is distributed in the hope that it will be useful,
 22  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 23  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 24  *     GNU General Public License for more details.
 25  * 
 26  *     You should have received a copy of the GNU General Public License 
 27  *     along with this program; if not, write to the Free Software 
 28  *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
 29  *     MA 02111-1307 USA
 30  *     
 31  ********************************************************************/
 32 
 33 #ifndef IRLAP_EVENT_H
 34 #define IRLAP_EVENT_H
 35 
 36 #include <net/irda/irda.h>
 37 #include <net/irda/discovery.h>
 38 
 39 struct irlap_cb;
 40 
 41 /* IrLAP States */
 42 typedef enum {
 43         LAP_NDM,         /* Normal disconnected mode */
 44         LAP_QUERY,
 45         LAP_REPLY,
 46         LAP_CONN,        /* Connect indication */
 47         LAP_SETUP,       /* Setting up connection */
 48         LAP_OFFLINE,     /* A really boring state */
 49         LAP_XMIT_P,
 50         LAP_PCLOSE,
 51         LAP_NRM_P,       /* Normal response mode as primary */
 52         LAP_RESET_WAIT,
 53         LAP_RESET,
 54         LAP_NRM_S,       /* Normal response mode as secondary */
 55         LAP_XMIT_S,
 56         LAP_SCLOSE,
 57         LAP_RESET_CHECK,
 58 } IRLAP_STATE;
 59 
 60 /* IrLAP Events */
 61 typedef enum {
 62         /* Services events */
 63         DISCOVERY_REQUEST,
 64         CONNECT_REQUEST,
 65         CONNECT_RESPONSE,
 66         DISCONNECT_REQUEST,
 67         DATA_REQUEST,
 68         RESET_REQUEST,
 69         RESET_RESPONSE,
 70 
 71         /* Send events */
 72         SEND_I_CMD,
 73         SEND_UI_FRAME,
 74 
 75         /* Receive events */
 76         RECV_DISCOVERY_XID_CMD,
 77         RECV_DISCOVERY_XID_RSP,
 78         RECV_SNRM_CMD,
 79         RECV_TEST_CMD,
 80         RECV_TEST_RSP,
 81         RECV_UA_RSP,
 82         RECV_DM_RSP,
 83         RECV_RD_RSP,
 84         RECV_I_CMD,
 85         RECV_I_RSP,
 86         RECV_UI_FRAME,
 87         RECV_FRMR_RSP,
 88         RECV_RR_CMD,
 89         RECV_RR_RSP,
 90         RECV_RNR_CMD,
 91         RECV_RNR_RSP,
 92         RECV_REJ_CMD,
 93         RECV_REJ_RSP,
 94         RECV_SREJ_CMD,
 95         RECV_SREJ_RSP,
 96         RECV_DISC_CMD,
 97 
 98         /* Timer events */
 99         SLOT_TIMER_EXPIRED,
100         QUERY_TIMER_EXPIRED,
101         FINAL_TIMER_EXPIRED,
102         POLL_TIMER_EXPIRED,
103         DISCOVERY_TIMER_EXPIRED,
104         WD_TIMER_EXPIRED,
105         BACKOFF_TIMER_EXPIRED,
106 } IRLAP_EVENT;
107 
108 /*
109  *  Various things used by the IrLAP state machine
110  */
111 struct irlap_info {
112         __u8 caddr;   /* Connection address */
113         __u8 control; /* Frame type */
114         __u8 cmd;
115 
116         __u32 saddr;
117         __u32 daddr;
118         
119         int pf;        /* Poll/final bit set */
120 
121         __u8  nr;      /* Sequence number of next frame expected */
122         __u8  ns;      /* Sequence number of frame sent */
123 
124         int  S;        /* Number of slots */
125         int  slot;     /* Random chosen slot */
126         int  s;        /* Current slot */
127 
128         discovery_t *discovery; /* Discovery information */
129 };
130 
131 extern const char *irlap_state[];
132 
133 void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, 
134                     struct sk_buff *skb, struct irlap_info *info);
135 void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state);
136 void irlap_print_event(IRLAP_EVENT event);
137 
138 extern int irlap_qos_negotiate(struct irlap_cb *self, struct sk_buff *skb);
139 
140 #endif
141 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.