Fix Win64 compilation problems in the plugins directory.
[obnox/wireshark/wip.git] / plugins / irda / irda-appl.h
1 /* irda-appl.h
2  * Interface for IrDA application dissectors
3  * By Jan Kiszka <jan.kiszka@web.de>
4  * Copyright 2003 Jan Kiszka
5  *
6  * $Id$
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@unicom.net>
10  * Copyright 1998 Gerald Combs
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25  */
26
27
28 #ifndef __IRDA_APPL_H__
29 #define __IRDA_APPL_H__
30
31 /*
32  * Prototypes, defines, and typedefs needed for implementing IrDA application
33  * layer dissectors.
34  * There should be no need to modify this part.
35  */
36
37 /* LM-IAS Attribute types */
38 #define IAS_MISSING         0
39 #define IAS_INTEGER         1
40 #define IAS_OCT_SEQ         2
41 #define IAS_STRING          3
42
43 /* Maximum number of handled list entries of an IAP result */
44 #define MAX_IAP_ENTRIES     32
45
46
47 typedef enum {
48     CONNECT_PDU,
49     DISCONNECT_PDU,
50     DATA_PDU
51 } pdu_type_t;
52
53 typedef gboolean (*ias_value_dissector_t)(tvbuff_t* tvb, unsigned offset, packet_info* pinfo, proto_tree* tree,
54                                           unsigned list_index, guint8 attr_type);
55
56 typedef const struct ias_attr_dissector {
57     const char*             attr_name;
58     ias_value_dissector_t   value_dissector;
59 } ias_attr_dissector_t;
60
61 typedef const struct ias_class_dissector {
62     const char*             class_name;
63     ias_attr_dissector_t*   pattr_dissector;
64 } ias_class_dissector_t;
65
66
67 extern gboolean check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
68                                        const char* attr_name, guint8 attr_type);
69 extern guint8 check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
70                                     const char* attr_name, guint8 attr_type);
71
72 extern void add_lmp_conversation(packet_info* pinfo, guint8 dlsap, gboolean ttp, dissector_t proto_dissector);
73
74 extern unsigned dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, unsigned offset);
75
76 /*
77  * Protocol exports.
78  * Modify the lines below to add new protocols.
79  */
80
81 /* IrCOMM/IrLPT protocol */
82 extern void proto_register_ircomm(void);
83 extern ias_attr_dissector_t ircomm_attr_dissector[];
84 extern ias_attr_dissector_t irlpt_attr_dissector[];
85
86 /* Serial Infrared (SIR) */
87 extern void proto_register_irsir(void);
88
89
90 /*
91  * Protocol hooks
92  */
93
94 /* IAS class dissectors */
95 #define CLASS_DISSECTORS                                    \
96     { "Device",         device_attr_dissector },            \
97     { "IrDA:IrCOMM",    ircomm_attr_dissector },            \
98     { "IrLPT",          irlpt_attr_dissector },             \
99     { NULL,             NULL }
100
101 #endif /* __IRDA_APPL_H__ */