diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/net/irda/irda.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/net/irda/irda.h')
-rw-r--r-- | include/net/irda/irda.h | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h new file mode 100644 index 000000000000..05a840837fe7 --- /dev/null +++ b/include/net/irda/irda.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /********************************************************************* | ||
2 | * | ||
3 | * Filename: irda.h | ||
4 | * Version: 1.0 | ||
5 | * Description: IrDA common include file for kernel internal use | ||
6 | * Status: Stable | ||
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> | ||
11 | * | ||
12 | * Copyright (c) 1998-2000 Dag Brattli, All Rights Reserved. | ||
13 | * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com> | ||
14 | * | ||
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. | ||
19 | * | ||
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. | ||
23 | * | ||
24 | ********************************************************************/ | ||
25 | |||
26 | #ifndef NET_IRDA_H | ||
27 | #define NET_IRDA_H | ||
28 | |||
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> | ||
34 | |||
35 | typedef __u32 magic_t; | ||
36 | |||
37 | #ifndef TRUE | ||
38 | #define TRUE 1 | ||
39 | #endif | ||
40 | |||
41 | #ifndef FALSE | ||
42 | #define FALSE 0 | ||
43 | #endif | ||
44 | |||
45 | /* Hack to do small backoff when setting media busy in IrLAP */ | ||
46 | #ifndef SMALL | ||
47 | #define SMALL 5 | ||
48 | #endif | ||
49 | |||
50 | #ifndef IRDA_MIN /* Lets not mix this MIN with other header files */ | ||
51 | #define IRDA_MIN(a, b) (((a) < (b)) ? (a) : (b)) | ||
52 | #endif | ||
53 | |||
54 | #ifndef IRDA_ALIGN | ||
55 | # define IRDA_ALIGN __attribute__((aligned)) | ||
56 | #endif | ||
57 | #ifndef IRDA_PACK | ||
58 | # define IRDA_PACK __attribute__((packed)) | ||
59 | #endif | ||
60 | |||
61 | |||
62 | #ifdef CONFIG_IRDA_DEBUG | ||
63 | |||
64 | extern unsigned int irda_debug; | ||
65 | |||
66 | /* use 0 for production, 1 for verification, >2 for debug */ | ||
67 | #define IRDA_DEBUG_LEVEL 0 | ||
68 | |||
69 | #define IRDA_DEBUG(n, args...) \ | ||
70 | do { if (irda_debug >= (n)) \ | ||
71 | printk(KERN_DEBUG args); \ | ||
72 | } while (0) | ||
73 | #define IRDA_ASSERT(expr, func) \ | ||
74 | do { if(!(expr)) { \ | ||
75 | printk( "Assertion failed! %s:%s:%d %s\n", \ | ||
76 | __FILE__,__FUNCTION__,__LINE__,(#expr) ); \ | ||
77 | func } } while (0) | ||
78 | #define IRDA_ASSERT_LABEL(label) label | ||
79 | #else | ||
80 | #define IRDA_DEBUG(n, args...) do { } while (0) | ||
81 | #define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0) | ||
82 | #define IRDA_ASSERT_LABEL(label) | ||
83 | #endif /* CONFIG_IRDA_DEBUG */ | ||
84 | |||
85 | #define IRDA_WARNING(args...) printk(KERN_WARNING args) | ||
86 | #define IRDA_MESSAGE(args...) printk(KERN_INFO args) | ||
87 | #define IRDA_ERROR(args...) printk(KERN_ERR args) | ||
88 | |||
89 | /* | ||
90 | * Magic numbers used by Linux-IrDA. Random numbers which must be unique to | ||
91 | * give the best protection | ||
92 | */ | ||
93 | |||
94 | #define IRTTY_MAGIC 0x2357 | ||
95 | #define LAP_MAGIC 0x1357 | ||
96 | #define LMP_MAGIC 0x4321 | ||
97 | #define LMP_LSAP_MAGIC 0x69333 | ||
98 | #define LMP_LAP_MAGIC 0x3432 | ||
99 | #define IRDA_DEVICE_MAGIC 0x63454 | ||
100 | #define IAS_MAGIC 0x007 | ||
101 | #define TTP_MAGIC 0x241169 | ||
102 | #define TTP_TSAP_MAGIC 0x4345 | ||
103 | #define IROBEX_MAGIC 0x341324 | ||
104 | #define HB_MAGIC 0x64534 | ||
105 | #define IRLAN_MAGIC 0x754 | ||
106 | #define IAS_OBJECT_MAGIC 0x34234 | ||
107 | #define IAS_ATTRIB_MAGIC 0x45232 | ||
108 | #define IRDA_TASK_MAGIC 0x38423 | ||
109 | |||
110 | #define IAS_DEVICE_ID 0x0000 /* Defined by IrDA, IrLMP section 4.1 (page 68) */ | ||
111 | #define IAS_PNP_ID 0xd342 | ||
112 | #define IAS_OBEX_ID 0x34323 | ||
113 | #define IAS_IRLAN_ID 0x34234 | ||
114 | #define IAS_IRCOMM_ID 0x2343 | ||
115 | #define IAS_IRLPT_ID 0x9876 | ||
116 | |||
117 | #endif /* NET_IRDA_H */ | ||