Wireshark 4.7.3
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 <[email protected]>
4 * Copyright 2003 Jan Kiszka
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <[email protected]>
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
36typedef enum {
37 CONNECT_PDU,
38 DISCONNECT_PDU,
39 DATA_PDU
40} pdu_type_t;
41
42typedef bool (*ias_value_dissector_t)(tvbuff_t* tvb, unsigned offset, packet_info* pinfo, proto_tree* tree,
43 unsigned list_index, uint8_t attr_type, uint8_t circuit_id);
44
48typedef const struct ias_attr_dissector {
49 const char* attr_name;
50 ias_value_dissector_t value_dissector;
51} ias_attr_dissector_t;
52
56typedef const struct ias_class_dissector {
57 const char* class_name;
58 ias_attr_dissector_t *pattr_dissector;
59} ias_class_dissector_t;
60
61
72extern bool check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
73 const char* attr_name, uint8_t attr_type);
74
90extern uint8_t check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
91 const char* attr_name, uint8_t attr_type);
92
105extern void add_lmp_conversation(packet_info* pinfo, uint8_t dlsap, bool ttp, dissector_handle_t dissector, uint8_t circuit_id);
106
115extern unsigned dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, unsigned offset);
116
117/*
118 * Protocol exports.
119 * Modify the lines below to add new protocols.
120 */
121
122/* IrCOMM/IrLPT protocol */
123
129extern void proto_register_ircomm(void);
130extern ias_attr_dissector_t ircomm_attr_dissector[];
131extern ias_attr_dissector_t irlpt_attr_dissector[];
132
133/* Serial Infrared (SIR) */
134
140extern void proto_register_irsir(void);
141
142
143/*
144 * Protocol hooks
145 */
146
147/* IAS class dissectors */
148#define CLASS_DISSECTORS \
149 { "Device", device_attr_dissector }, \
150 { "IrDA:IrCOMM", ircomm_attr_dissector }, \
151 { "IrLPT", irlpt_attr_dissector }, \
152 { NULL, NULL }
153
154#endif /* __IRDA_APPL_H__ */
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
Maps an IAS attribute name to its corresponding value dissector function.
Definition irda-appl.h:48
const char * attr_name
Definition irda-appl.h:49
ias_value_dissector_t value_dissector
Definition irda-appl.h:50
Maps an IAS class name to its array of attribute dissectors.
Definition irda-appl.h:56
const char * class_name
Definition irda-appl.h:57
ias_attr_dissector_t * pattr_dissector
Definition irda-appl.h:58