1 /*********************************************************************
5 * Description: IrDA common include file for kernel internal use
7 * Author: Dag Brattli <dagb@cs.uit.no>
8 * Created at: Tue Dec 9 21:13:12 1997
9 * Modified at: Fri Jan 28 13:16:32 2000
10 * Modified by: Dag Brattli <dagb@cs.uit.no>
12 * Copyright (c) 1998-2000 Dag Brattli, All Rights Reserved.
13 * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License as
17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version.
20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charge.
24 ********************************************************************/
29 #include <linux/config.h>
30 #include <linux/skbuff.h> /* struct sk_buff */
31 #include <linux/kernel.h>
32 #include <linux/if.h> /* sa_family_t in <linux/irda.h> */
33 #include <linux/irda.h>
35 typedef __u32 magic_t
;
45 /* Hack to do small backoff when setting media busy in IrLAP */
50 #ifndef IRDA_MIN /* Lets not mix this MIN with other header files */
51 #define IRDA_MIN(a, b) (((a) < (b)) ? (a) : (b))
55 # define IRDA_ALIGN __attribute__((aligned))
58 # define IRDA_PACK __attribute__((packed))
62 #ifdef CONFIG_IRDA_DEBUG
64 extern unsigned int irda_debug
;
66 /* use 0 for production, 1 for verification, >2 for debug */
67 #define IRDA_DEBUG_LEVEL 0
69 #define IRDA_DEBUG(n, args...) (irda_debug >= (n)) ? (printk(KERN_DEBUG args)) : 0
70 #define ASSERT(expr, func) \
72 printk( "Assertion failed! %s:%s:%d %s\n", \
73 __FILE__,__FUNCTION__,__LINE__,(#expr)); \
76 #define IRDA_DEBUG(n, args...)
77 #define ASSERT(expr, func) \
80 #endif /* CONFIG_IRDA_DEBUG */
82 #define WARNING(args...) printk(KERN_WARNING args)
83 #define MESSAGE(args...) printk(KERN_INFO args)
84 #define ERROR(args...) printk(KERN_ERR args)
87 * Magic numbers used by Linux-IrDA. Random numbers which must be unique to
88 * give the best protection
91 #define IRTTY_MAGIC 0x2357
92 #define LAP_MAGIC 0x1357
93 #define LMP_MAGIC 0x4321
94 #define LMP_LSAP_MAGIC 0x69333
95 #define LMP_LAP_MAGIC 0x3432
96 #define IRDA_DEVICE_MAGIC 0x63454
97 #define IAS_MAGIC 0x007
98 #define TTP_MAGIC 0x241169
99 #define TTP_TSAP_MAGIC 0x4345
100 #define IROBEX_MAGIC 0x341324
101 #define HB_MAGIC 0x64534
102 #define IRLAN_MAGIC 0x754
103 #define IAS_OBJECT_MAGIC 0x34234
104 #define IAS_ATTRIB_MAGIC 0x45232
105 #define IRDA_TASK_MAGIC 0x38423
107 #define IAS_DEVICE_ID 0x0000 /* Defined by IrDA, IrLMP section 4.1 (page 68) */
108 #define IAS_PNP_ID 0xd342
109 #define IAS_OBEX_ID 0x34323
110 #define IAS_IRLAN_ID 0x34234
111 #define IAS_IRCOMM_ID 0x2343
112 #define IAS_IRLPT_ID 0x9876
114 #endif /* NET_IRDA_H */