diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-05-29 18:52:28 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-05-29 18:52:28 +0000 |
commit | 0feb7affba1f47e1d8e73695b7b78b3e3604f4b6 (patch) | |
tree | 37b125a0d3b5807f823547319ca27a0994d960b0 /packet-rmi.h | |
parent | 4403c56558e933c494ecd1e7d3bd1215a15535c2 (diff) | |
download | wireshark-0feb7affba1f47e1d8e73695b7b78b3e3604f4b6.tar.gz wireshark-0feb7affba1f47e1d8e73695b7b78b3e3604f4b6.tar.bz2 wireshark-0feb7affba1f47e1d8e73695b7b78b3e3604f4b6.zip |
Java RMI protocol support, from Michael Stiller.
svn path=/trunk/; revision=5590
Diffstat (limited to 'packet-rmi.h')
-rw-r--r-- | packet-rmi.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/packet-rmi.h b/packet-rmi.h new file mode 100644 index 0000000000..0b404712cb --- /dev/null +++ b/packet-rmi.h @@ -0,0 +1,100 @@ +/* packet-rmi.h + * header file for java rmiregistry dissection + * Copyright 2002, Michael Stiller <ms@2scale.net> + * + * $Id: packet-rmi.h,v 1.1 2002/05/29 18:52:26 guy Exp $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@ethereal.com> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ +#ifndef __PACKET_RMI_H__ +#define __PACKET_RMI_H__ + +#define SER_STREAM_MAGIC 0xaced + +#define SER_STREAM_VERSION 5 + +#define SER_TC_NULL 0x70 +#define SER_TC_REFERENCE 0x71 +#define SER_TC_CLASSDESC 0x72 +#define SER_TC_OBJECT 0x73 +#define SER_TC_STRING 0x74 +#define SER_TC_ARRAY 0x75 +#define SER_TC_CLASS 0x76 +#define SER_TC_BLOCKDATA 0x77 +#define SER_TC_ENDBLOCKDATA 0x78 +#define SER_TC_RESET 0x79 +#define SER_TC_BLOCKDATALONG 0x7A +#define SER_TC_EXCEPTION 0x7B + +#define RMI_MAGIC "JRMI" +#define RMI_MAGIC_HEX 0x4a524d49 + +#define RMI_OUTPUTSTREAM_PROTOCOL_STREAM 0x4b +#define RMI_OUTPUTSTREAM_PROTOCOL_SINGLEOP 0x4c +#define RMI_OUTPUTSTREAM_PROTOCOL_MULTIPLEX 0x4d + +#define RMI_OUTPUTSTREAM_MESSAGE_CALL 0x50 +#define RMI_OUTPUTSTREAM_MESSAGE_PING 0x52 +#define RMI_OUTPUTSTREAM_MESSAGE_DGCACK 0x54 + +#define RMI_INPUTSTREAM_MESSAGE_ACK 0x4e +#define RMI_INPUTSTREAM_MESSAGE_NOTSUPPORTED 0x4f +#define RMI_INPUTSTREAM_MESSAGE_RETURNDATA 0x51 +#define RMI_INPUTSTREAM_MESSAGE_PINGACK 0x53 + +typedef enum { + CONTINUATION = 1, + RMI_OUTPUTSTREAM = 2, + RMI_OUTPUTMESSAGE = 3, + RMI_INPUTSTREAM = 16, + SERIALIZATION_DATA = 128, +} rmi_type; + +static const value_string rmi_protocol_str[] = { + {RMI_OUTPUTSTREAM_PROTOCOL_STREAM, "StreamProtocol"}, + {RMI_OUTPUTSTREAM_PROTOCOL_SINGLEOP, "SingleOpProtocol"}, + {RMI_OUTPUTSTREAM_PROTOCOL_MULTIPLEX, "MultiPlexProtocol"}, + {0, NULL} +}; + +static const value_string rmi_output_message_str[] = { + {RMI_OUTPUTSTREAM_MESSAGE_CALL, "Call"}, + {RMI_OUTPUTSTREAM_MESSAGE_PING, "Ping"}, + {RMI_OUTPUTSTREAM_MESSAGE_DGCACK, "DgcAck"}, + {0, NULL} +}; + +static const value_string rmi_input_message_str[] = { + {RMI_INPUTSTREAM_MESSAGE_ACK, "ProtocolAck"}, + {RMI_INPUTSTREAM_MESSAGE_NOTSUPPORTED, "ProtocolNotSupported"}, + {RMI_INPUTSTREAM_MESSAGE_RETURNDATA, "ReturnData"}, + {RMI_INPUTSTREAM_MESSAGE_PINGACK, "PingAck"}, + {0, NULL} +}; + +static void +dissect_rmi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); + +static void +dissect_ser(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); + +static rmi_type +get_rmi_type(const u_char *data, int datalen); + +#endif |