2 * header file for java rmiregistry dissection
3 * Copyright 2002, Michael Stiller <ms@2scale.net>
5 * $Id: packet-rmi.h,v 1.3 2002/08/28 21:00:29 jmayer Exp $
7 * Ethereal - Network traffic analyzer
8 * By Gerald Combs <gerald@ethereal.com>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #ifndef __PACKET_RMI_H__
26 #define __PACKET_RMI_H__
28 #define SER_STREAM_MAGIC 0xaced
30 #define SER_STREAM_VERSION 5
32 #define SER_TC_NULL 0x70
33 #define SER_TC_REFERENCE 0x71
34 #define SER_TC_CLASSDESC 0x72
35 #define SER_TC_OBJECT 0x73
36 #define SER_TC_STRING 0x74
37 #define SER_TC_ARRAY 0x75
38 #define SER_TC_CLASS 0x76
39 #define SER_TC_BLOCKDATA 0x77
40 #define SER_TC_ENDBLOCKDATA 0x78
41 #define SER_TC_RESET 0x79
42 #define SER_TC_BLOCKDATALONG 0x7A
43 #define SER_TC_EXCEPTION 0x7B
45 #define RMI_MAGIC "JRMI"
46 #define RMI_MAGIC_HEX 0x4a524d49
48 #define RMI_OUTPUTSTREAM_PROTOCOL_STREAM 0x4b
49 #define RMI_OUTPUTSTREAM_PROTOCOL_SINGLEOP 0x4c
50 #define RMI_OUTPUTSTREAM_PROTOCOL_MULTIPLEX 0x4d
52 #define RMI_OUTPUTSTREAM_MESSAGE_CALL 0x50
53 #define RMI_OUTPUTSTREAM_MESSAGE_PING 0x52
54 #define RMI_OUTPUTSTREAM_MESSAGE_DGCACK 0x54
56 #define RMI_INPUTSTREAM_MESSAGE_ACK 0x4e
57 #define RMI_INPUTSTREAM_MESSAGE_NOTSUPPORTED 0x4f
58 #define RMI_INPUTSTREAM_MESSAGE_RETURNDATA 0x51
59 #define RMI_INPUTSTREAM_MESSAGE_PINGACK 0x53
64 RMI_OUTPUTMESSAGE = 3,
66 SERIALIZATION_DATA = 128,
69 static const value_string rmi_protocol_str[] = {
70 {RMI_OUTPUTSTREAM_PROTOCOL_STREAM, "StreamProtocol"},
71 {RMI_OUTPUTSTREAM_PROTOCOL_SINGLEOP, "SingleOpProtocol"},
72 {RMI_OUTPUTSTREAM_PROTOCOL_MULTIPLEX, "MultiPlexProtocol"},
76 static const value_string rmi_output_message_str[] = {
77 {RMI_OUTPUTSTREAM_MESSAGE_CALL, "Call"},
78 {RMI_OUTPUTSTREAM_MESSAGE_PING, "Ping"},
79 {RMI_OUTPUTSTREAM_MESSAGE_DGCACK, "DgcAck"},
83 static const value_string rmi_input_message_str[] = {
84 {RMI_INPUTSTREAM_MESSAGE_ACK, "ProtocolAck"},
85 {RMI_INPUTSTREAM_MESSAGE_NOTSUPPORTED, "ProtocolNotSupported"},
86 {RMI_INPUTSTREAM_MESSAGE_RETURNDATA, "ReturnData"},
87 {RMI_INPUTSTREAM_MESSAGE_PINGACK, "PingAck"},
92 dissect_rmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
95 dissect_ser(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
98 get_rmi_type(const guchar *data, int datalen);