Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / asn1 / ros / packet-ros-template.h
blobf1a28685e0f8e506cd87e01f8e6d242c2088f588
1 /* packet-ros.h
2 * Routines for ROS packet dissection
3 * Graeme Lunt 2005
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef PACKET_ROS_H
13 #define PACKET_ROS_H
15 #include "packet-ros-exp.h"
17 # include "packet-ses.h"
19 /* for use in the SESSION_DATA_STRUCTURE ros_op argument
20 top byte indicates ROS invocation
21 bottom three bytes indicate operation code */
23 # define ROS_OP_MASK 0xff000000
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
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
36 # define ROS_OP_OPCODE_MASK (~ROS_OP_MASK)
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 */
41 typedef struct _ros_opr_t {
42 int32_t opcode;
43 dissector_t arg_pdu;
44 dissector_t res_pdu;
45 } ros_opr_t;
47 typedef struct _ros_err_t {
48 int32_t errcode;
49 dissector_t err_pdu;
50 } ros_err_t;
52 typedef struct _ros_info_t {
53 const char *name;
54 int *proto;
55 int *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;
62 void register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name, bool uses_rtse);
63 void register_ros_protocol_info(const char *oid, const ros_info_t *rinfo, int proto _U_, const char *name, bool 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);
66 #endif /* PACKET_ROS_H */