nexmon – Blame information for rev 1

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