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/iriap.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/iriap.h')
-rw-r--r-- | include/net/irda/iriap.h | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/include/net/irda/iriap.h b/include/net/irda/iriap.h new file mode 100644 index 000000000000..2007c5a0a43f --- /dev/null +++ b/include/net/irda/iriap.h | |||
@@ -0,0 +1,108 @@ | |||
1 | /********************************************************************* | ||
2 | * | ||
3 | * Filename: iriap.h | ||
4 | * Version: 0.5 | ||
5 | * Description: Information Access Protocol (IAP) | ||
6 | * Status: Experimental. | ||
7 | * Author: Dag Brattli <dagb@cs.uit.no> | ||
8 | * Created at: Thu Aug 21 00:02:07 1997 | ||
9 | * Modified at: Sat Dec 25 16:42:09 1999 | ||
10 | * Modified by: Dag Brattli <dagb@cs.uit.no> | ||
11 | * | ||
12 | * Copyright (c) 1997-1999 Dag Brattli <dagb@cs.uit.no>, | ||
13 | * All Rights Reserved. | ||
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 IRIAP_H | ||
27 | #define IRIAP_H | ||
28 | |||
29 | #include <linux/types.h> | ||
30 | #include <linux/skbuff.h> | ||
31 | |||
32 | #include <net/irda/iriap_event.h> | ||
33 | #include <net/irda/irias_object.h> | ||
34 | #include <net/irda/irqueue.h> /* irda_queue_t */ | ||
35 | #include <net/irda/timer.h> /* struct timer_list */ | ||
36 | |||
37 | #define IAP_LST 0x80 | ||
38 | #define IAP_ACK 0x40 | ||
39 | |||
40 | #define IAS_SERVER 0 | ||
41 | #define IAS_CLIENT 1 | ||
42 | |||
43 | /* IrIAP Op-codes */ | ||
44 | #define GET_INFO_BASE 0x01 | ||
45 | #define GET_OBJECTS 0x02 | ||
46 | #define GET_VALUE 0x03 | ||
47 | #define GET_VALUE_BY_CLASS 0x04 | ||
48 | #define GET_OBJECT_INFO 0x05 | ||
49 | #define GET_ATTRIB_NAMES 0x06 | ||
50 | |||
51 | #define IAS_SUCCESS 0 | ||
52 | #define IAS_CLASS_UNKNOWN 1 | ||
53 | #define IAS_ATTRIB_UNKNOWN 2 | ||
54 | #define IAS_DISCONNECT 10 | ||
55 | |||
56 | typedef void (*CONFIRM_CALLBACK)(int result, __u16 obj_id, | ||
57 | struct ias_value *value, void *priv); | ||
58 | |||
59 | struct iriap_cb { | ||
60 | irda_queue_t q; /* Must be first */ | ||
61 | magic_t magic; /* Magic cookie */ | ||
62 | |||
63 | int mode; /* Client or server */ | ||
64 | |||
65 | __u32 saddr; | ||
66 | __u32 daddr; | ||
67 | __u8 operation; | ||
68 | |||
69 | struct sk_buff *request_skb; | ||
70 | struct lsap_cb *lsap; | ||
71 | __u8 slsap_sel; | ||
72 | |||
73 | /* Client states */ | ||
74 | IRIAP_STATE client_state; | ||
75 | IRIAP_STATE call_state; | ||
76 | |||
77 | /* Server states */ | ||
78 | IRIAP_STATE server_state; | ||
79 | IRIAP_STATE r_connect_state; | ||
80 | |||
81 | CONFIRM_CALLBACK confirm; | ||
82 | void *priv; /* Used to identify client */ | ||
83 | |||
84 | __u8 max_header_size; | ||
85 | __u32 max_data_size; | ||
86 | |||
87 | struct timer_list watchdog_timer; | ||
88 | }; | ||
89 | |||
90 | int iriap_init(void); | ||
91 | void iriap_cleanup(void); | ||
92 | |||
93 | struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv, | ||
94 | CONFIRM_CALLBACK callback); | ||
95 | void iriap_close(struct iriap_cb *self); | ||
96 | |||
97 | int iriap_getvaluebyclass_request(struct iriap_cb *self, | ||
98 | __u32 saddr, __u32 daddr, | ||
99 | char *name, char *attr); | ||
100 | void iriap_connect_request(struct iriap_cb *self); | ||
101 | void iriap_send_ack( struct iriap_cb *self); | ||
102 | void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb); | ||
103 | |||
104 | void iriap_register_server(void); | ||
105 | |||
106 | #endif | ||
107 | |||
108 | |||