Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
packet-ros-template.h
1 /* packet-ros.h
2  * Routines for ROS packet dissection
3  * Graeme Lunt 2005
4  *
5  * Wireshark - Network traffic analyzer
6  * By Gerald Combs <gerald@wireshark.org>
7  * Copyright 1998 Gerald Combs
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  */
11 
12 #ifndef PACKET_ROS_H
13 #define PACKET_ROS_H
14 
15 #include "packet-ros-exp.h"
16 
17 # include "packet-ses.h"
18 
19 /* for use in the SESSION_DATA_STRUCTURE ros_op argument
20  top byte indicates ROS invocation
21  bottom three bytes indicate operation code */
22 
23 # define ROS_OP_MASK 0xff000000
24 
25 # define ROS_OP_PDU_MASK 0xf0000000
26 # define ROS_OP_ARGUMENT 0x10000000
27 # define ROS_OP_RESULT 0x20000000
28 # define ROS_OP_ERROR 0x30000000
29 # define ROS_OP_REJECT 0x40000000
30 
31 # define ROS_OP_TYPE_MASK 0x0f000000
32 # define ROS_OP_BIND 0x01000000
33 # define ROS_OP_UNBIND 0x02000000
34 # define ROS_OP_INVOKE 0x03000000
35 
36 # define ROS_OP_OPCODE_MASK (~ROS_OP_MASK)
37 
38 # define op_ros_bind (-1) /* pseudo operation code for asn2wrs generated binds */
39 # define err_ros_bind (-2) /* pseudo error code for asn2wrs generated binds */
40 
41 typedef struct _ros_opr_t {
42  gint32 opcode;
43  dissector_t arg_pdu;
44  dissector_t res_pdu;
45 } ros_opr_t;
46 
47 typedef struct _ros_err_t {
48  gint32 errcode;
49  dissector_t err_pdu;
50 } ros_err_t;
51 
52 typedef struct _ros_info_t {
53  const gchar *name;
54  int *proto;
55  gint *ett_proto;
56  const value_string *opr_code_strings;
57  const ros_opr_t *opr_code_dissectors;
58  const value_string *err_code_strings;
59  const ros_err_t *err_code_dissectors;
60 } ros_info_t;
61 
62 void register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, gboolean uses_rtse);
63 void register_ros_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name, gboolean uses_rtse);
64 int call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, struct SESSION_DATA_STRUCTURE* session);
65 
66 #endif /* PACKET_ROS_H */
Definition: packet_info.h:44
Definition: packet-ros-template.h:52
Definition: tvbuff-int.h:35
Definition: packet.c:659
Definition: packet-ses.h:187
Definition: packet-ros-template.h:47
Definition: packet-ros-template.h:41
Definition: value_string.h:24
Definition: proto.h:759