| 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
33typedef enum {
34 CONNECT_PDU,
35 DISCONNECT_PDU,
36 DATA_PDU
37} pdu_type_t;
38
39typedef 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
53extern bool check_iap_octet_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
54 const char* attr_name, uint8_t attr_type);
55extern uint8_t check_iap_lsap_result(tvbuff_t* tvb, proto_tree* tree, unsigned offset,
56 const char* attr_name, uint8_t attr_type);
57
58extern void add_lmp_conversation(packet_info* pinfo, uint8_t dlsap, bool ttp, dissector_handle_t dissector, uint8_t circuit_id);
59
60extern unsigned dissect_param_tuple(tvbuff_t* tvb, proto_tree* tree, unsigned offset);
61
62/*
63 * Protocol exports.
64 * Modify the lines below to add new protocols.
65 */
66
67/* IrCOMM/IrLPT protocol */
68extern void proto_register_ircomm(void);
69extern ias_attr_dissector_t ircomm_attr_dissector[];
70extern ias_attr_dissector_t irlpt_attr_dissector[];
71
72/* Serial Infrared (SIR) */
73extern void proto_register_irsir(void);
74
75
76/*
77 * Protocol hooks
78 */
79
80/* IAS class dissectors */
81#define CLASS_DISSECTORS \
82 { "Device", device_attr_dissector }, \
83 { "IrDA:IrCOMM", ircomm_attr_dissector }, \
84 { "IrLPT", irlpt_attr_dissector }, \
85 { NULL, NULL }
86
87#endif /* __IRDA_APPL_H__ */
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:907
dissector_handle
Definition packet.c:857
ias_attr_dissector
Definition irda-appl.h:42
ias_class_dissector
Definition irda-appl.h:47
tvbuff
Definition tvbuff-int.h:35