| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
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 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@unicom.net>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13
14#ifndef __IRDA_APPL_H__
15#define __IRDA_APPL_H__
16
17/*
18 * Prototypes, defines, and typedefs needed for implementing IrDA application
19 * layer dissectors.
20 * There should be no need to modify this part.
21 */
22
23/* LM-IAS Attribute types */
24#define IAS_MISSING 0
25#define IAS_INTEGER 1
26#define IAS_OCT_SEQ 2
27#define IAS_STRING 3
28
29/* Maximum number of handled list entries of an IAP result */
30#define MAX_IAP_ENTRIES 32
31
32
33 typedef enum {
34 CONNECT_PDU,
35 DISCONNECT_PDU,
36 DATA_PDU
37} pdu_type_t;
38
39 typedef bool (*ias_value_dissector_t)(tvbuff_t* tvb, unsigned offset, packet_info* pinfo, proto_tree* tree,
40 unsigned list_index, uint8_t attr_type, uint8_t circuit_id);
41
42 typedef const struct ias_attr_dissector {
43 const char* attr_name;
44 ias_value_dissector_t value_dissector;
45} ias_attr_dissector_t;
46
47 typedef const struct ias_class_dissector {
48 const char* class_name;
49 ias_attr_dissector_t* pattr_dissector;
50} ias_class_dissector_t;
51
52
63 extern bool check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
64 const char* attr_name, uint8_t attr_type);
65
81 extern uint8_t check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
82 const char* attr_name, uint8_t attr_type);
83
96 extern void add_lmp_conversation(packet_info* pinfo, uint8_t dlsap, bool ttp, dissector_handle_t dissector, uint8_t circuit_id);
97
106 extern unsigned dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, unsigned offset);
107
108/*
109 * Protocol exports.
110 * Modify the lines below to add new protocols.
111 */
112
113/* IrCOMM/IrLPT protocol */
114
120 extern void proto_register_ircomm(void);
121 extern ias_attr_dissector_t ircomm_attr_dissector[];
122 extern ias_attr_dissector_t irlpt_attr_dissector[];
123
124/* Serial Infrared (SIR) */
125 extern void proto_register_irsir(void);
126
127
128/*
129 * Protocol hooks
130 */
131
132/* IAS class dissectors */
133#define CLASS_DISSECTORS \
134 { "Device", device_attr_dissector }, \
135 { "IrDA:IrCOMM", ircomm_attr_dissector }, \
136 { "IrLPT", irlpt_attr_dissector }, \
137 { NULL, NULL }
138
139#endif /* __IRDA_APPL_H__ */
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:905
dissector_handle
Definition packet.c:852
ias_attr_dissector
Definition irda-appl.h:42
ias_class_dissector
Definition irda-appl.h:47
tvbuff
Definition tvbuff-int.h:36