* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/*
+ * See
+ *
+ * http://www.amqp.org/confluence/display/AMQP/AMQP+Specification
+ *
+ * for specifications for various versions of the AMQP protocol.
+ */
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
/* Generic defines */
-#define AMQP_INCREMENT(offset, addend, bound) {\
- int tmp;\
- tmp = offset;\
- offset += (addend);\
- DISSECTOR_ASSERT(offset <= bound);\
-}
-
#define AMQP_FRAME_TYPE_METHOD 1
#define AMQP_FRAME_TYPE_CONTENT_HEADER 2
#define AMQP_FRAME_TYPE_CONTENT_BODY 3
get_amqp_message_len(packet_info *pinfo, tvbuff_t *tvb, int offset);
static void
-dissect_amqp_field_table(tvbuff_t *tvb, int offset, int bound, int length, proto_item *item);
+dissect_amqp_field_table(tvbuff_t *tvb, int offset, int length, proto_item *item);
static void
dissect_amqp_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int
dissect_amqp_method_connection_start(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_start_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_secure(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_secure_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_tune(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_tune_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_open(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_open_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_redirect(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_close(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_connection_close_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_open(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_open_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_flow(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_flow_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_close(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_close_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_resume(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_ping(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_pong(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_channel_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_access_request(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_access_request_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_exchange_declare(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_exchange_declare_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_exchange_delete(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_exchange_delete_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_declare(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_declare_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_bind(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_bind_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_unbind(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_unbind_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_purge(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_purge_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_delete(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_queue_delete_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_qos(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_qos_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_consume(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_consume_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_cancel(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_cancel_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_publish(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_return(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_deliver(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_get(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_get_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_get_empty(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_ack(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_reject(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_basic_recover(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_qos(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_qos_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_consume(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_consume_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_cancel(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_cancel_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_open(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_open_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_stage(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_publish(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_return(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_deliver(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_ack(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_file_reject(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_qos(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_qos_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_consume(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_consume_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_cancel(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_cancel_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_publish(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_return(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_stream_deliver(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_tx_select(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_tx_select_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_tx_commit(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_tx_commit_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_tx_rollback(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_tx_rollback_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_dtx_select(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_dtx_select_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_dtx_start(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_dtx_start_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_method_tunnel_request(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree);
+ int offset, proto_tree *args_tree);
static int
dissect_amqp_content_header_basic(tvbuff_t *tvb,
- int offset, int bound, proto_tree *prop_tree);
+ int offset, proto_tree *prop_tree);
static int
dissect_amqp_content_header_file(tvbuff_t *tvb,
- int offset, int bound, proto_tree *prop_tree);
+ int offset, proto_tree *prop_tree);
static int
dissect_amqp_content_header_stream(tvbuff_t *tvb,
- int offset, int bound, proto_tree *prop_tree);
+ int offset, proto_tree *prop_tree);
static int
dissect_amqp_content_header_tunnel(tvbuff_t *tvb,
- int offset, int bound, proto_tree *prop_tree);
+ int offset, proto_tree *prop_tree);
/* Various handles */
static void
dissect_amqp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- /* Minimal frame size is 8 bytes - smaller frames are malformed */
- DISSECTOR_ASSERT (tvb_length (tvb) >= 8);
-
+ /*
+ * XXX - the minimum amount of data needed to get the message
+ * length differs from protocol version to protocol version.
+ * It's 7 bytes for version 0-9.
+ */
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 7,
get_amqp_message_len, dissect_amqp_frame);
}
static guint
get_amqp_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
{
+ guint32 length;
+
/* Heuristic - protocol initialisation frame starts with 'AMQP' */
- if (tvb_get_guint8(tvb, 0) == 'A' &&
- tvb_get_guint8(tvb, 1) == 'M' &&
- tvb_get_guint8(tvb, 2) == 'Q' &&
- tvb_get_guint8(tvb, 3) == 'P')
+ if (tvb_get_guint8(tvb, offset + 0) == 'A' &&
+ tvb_get_guint8(tvb, offset + 1) == 'M' &&
+ tvb_get_guint8(tvb, offset + 2) == 'Q' &&
+ tvb_get_guint8(tvb, offset + 3) == 'P')
return 8;
- return (guint) tvb_get_ntohl(tvb, offset + 3) + 8;
+ /*
+ * XXX - the location of the length differs from protocol version to
+ * protocol version; for now, we only handle version 0-9, and we
+ * clamp the length at 1MB so we don't go nuts if we get a bogus
+ * length due to dissecting the wrong version (or getting a malformed
+ * packet).
+ */
+ length = tvb_get_ntohl(tvb, offset + 3);
+ if (length > 1048576)
+ length = 1048576;
+ return length + 8;
}
/* Dissection routine for AMQP field tables */
static void
-dissect_amqp_field_table(tvbuff_t *tvb, int offset, int bound, int length, proto_item *item)
+dissect_amqp_field_table(tvbuff_t *tvb, int offset, int length, proto_item *item)
{
proto_item *field_table_tree;
guint namelen, vallen;
while (length > 0) {
field_start = offset;
namelen = tvb_get_guint8(tvb, offset);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
length -= 1;
name = (char*) tvb_get_ephemeral_string(tvb, offset, namelen);
- AMQP_INCREMENT(offset, namelen, bound);
+ offset += namelen;
length -= namelen;
type = tvb_get_guint8(tvb, offset);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
length -= 1;
switch (type) {
case 'S':
typename = "string";
vallen = tvb_get_ntohl(tvb, offset);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
length -= 4;
value = (char*) tvb_get_ephemeral_string(tvb, offset, vallen);
- AMQP_INCREMENT(offset, vallen, bound);
+ offset += vallen;
length -= vallen;
break;
case 'I':
typename = "integer";
value = ep_strdup_printf("%d", tvb_get_ntohl(tvb, offset));
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
length -= 4;
break;
case 'D':
typename = "decimal";
value = "...";
- AMQP_INCREMENT(offset, 5, bound);
+ offset += 5;
length -= 5;
break;
case 'T':
typename = "timestamp";
value = "...";
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
length -= 8;
break;
case 'F':
/* TODO: make it recursive here */
typename = "field table";
vallen = tvb_get_ntohl(tvb, offset);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
length -= 4;
value = "...";
- AMQP_INCREMENT(offset, vallen, bound);
+ offset += vallen;
length -= vallen;
break;
case 'V':
typename = "void";
value = "";
default:
- typename = "";
- value = "";
- DISSECTOR_ASSERT(FALSE);
+ proto_tree_add_none_format(field_table_tree, hf_amqp_field, tvb,
+ field_start, offset - field_start, "%s (unknown type %c): ...",
+ name, type);
+ return;
}
proto_tree_add_none_format(field_table_tree, hf_amqp_field, tvb,
proto_item *prop_tree;
guint length;
int offset;
+ guint8 frame_type;
+ guint16 class_id, method_id;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "AMQP");
col_clear(pinfo->cinfo, COL_INFO);
col_set_fence(pinfo->cinfo, COL_INFO);
}
+ /*
+ * XXX - unless we can heuristically determine the protocol
+ * version by looking at the header for frames other than
+ * the protocol initialization frame, we would:
+ *
+ * need to remember the major and minor version, associate
+ * it with the connection, and properly dissect different
+ * versions of the protocol;
+ *
+ * have some way of specifying the version for traces
+ * where we don't capture the protocol initialization
+ * frame (e.g., a preference);
+ *
+ * reject protocol versions we don't understand.
+ */
ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, FALSE);
amqp_tree = proto_item_add_subtree(ti, ett_amqp_init);
proto_tree_add_item(amqp_tree, hf_amqp_init_protocol, tvb, 0, 4, FALSE);
ti = proto_tree_add_item(tree, proto_amqp, tvb, 0, -1, FALSE);
amqp_tree = proto_item_add_subtree(ti, ett_amqp);
+ frame_type = tvb_get_guint8(tvb, 0);
proto_tree_add_item(amqp_tree, hf_amqp_type, tvb, 0, 1, FALSE);
proto_tree_add_item(amqp_tree, hf_amqp_channel, tvb, 1, 2, FALSE);
proto_tree_add_item(amqp_tree, hf_amqp_length, tvb, 3, 4, FALSE);
length = tvb_get_ntohl(tvb, 3);
- switch (tvb_get_guint8(tvb, 0)) {
+ switch (frame_type) {
case AMQP_FRAME_TYPE_METHOD:
+ class_id = tvb_get_ntohs(tvb, 7);
proto_tree_add_item(amqp_tree, hf_amqp_method_class_id,
tvb, 7, 2, FALSE);
- switch (tvb_get_ntohs(tvb, 7)) {
+ switch (class_id) {
case AMQP_CLASS_CONNECTION:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_connection_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_CONNECTION_START:
offset = dissect_amqp_method_connection_start(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Start ");
break;
case AMQP_METHOD_CONNECTION_START_OK:
offset = dissect_amqp_method_connection_start_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Start-Ok ");
break;
case AMQP_METHOD_CONNECTION_SECURE:
offset = dissect_amqp_method_connection_secure(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Secure ");
break;
case AMQP_METHOD_CONNECTION_SECURE_OK:
offset = dissect_amqp_method_connection_secure_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Secure-Ok ");
break;
case AMQP_METHOD_CONNECTION_TUNE:
offset = dissect_amqp_method_connection_tune(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Tune ");
break;
case AMQP_METHOD_CONNECTION_TUNE_OK:
offset = dissect_amqp_method_connection_tune_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Tune-Ok ");
break;
case AMQP_METHOD_CONNECTION_OPEN:
offset = dissect_amqp_method_connection_open(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Open ");
break;
case AMQP_METHOD_CONNECTION_OPEN_OK:
offset = dissect_amqp_method_connection_open_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Open-Ok ");
break;
case AMQP_METHOD_CONNECTION_REDIRECT:
offset = dissect_amqp_method_connection_redirect(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Redirect ");
break;
case AMQP_METHOD_CONNECTION_CLOSE:
offset = dissect_amqp_method_connection_close(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Close ");
break;
case AMQP_METHOD_CONNECTION_CLOSE_OK:
offset = dissect_amqp_method_connection_close_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Connection.Close-Ok ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Connection.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_CHANNEL:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_channel_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_CHANNEL_OPEN:
offset = dissect_amqp_method_channel_open(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Open ");
break;
case AMQP_METHOD_CHANNEL_OPEN_OK:
offset = dissect_amqp_method_channel_open_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Open-Ok ");
break;
case AMQP_METHOD_CHANNEL_FLOW:
offset = dissect_amqp_method_channel_flow(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Flow ");
break;
case AMQP_METHOD_CHANNEL_FLOW_OK:
offset = dissect_amqp_method_channel_flow_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Flow-Ok ");
break;
case AMQP_METHOD_CHANNEL_CLOSE:
offset = dissect_amqp_method_channel_close(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Close ");
break;
case AMQP_METHOD_CHANNEL_CLOSE_OK:
offset = dissect_amqp_method_channel_close_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Close-Ok ");
break;
case AMQP_METHOD_CHANNEL_RESUME:
offset = dissect_amqp_method_channel_resume(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Resume ");
break;
case AMQP_METHOD_CHANNEL_PING:
offset = dissect_amqp_method_channel_ping(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Ping ");
break;
case AMQP_METHOD_CHANNEL_PONG:
offset = dissect_amqp_method_channel_pong(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Pong ");
break;
case AMQP_METHOD_CHANNEL_OK:
offset = dissect_amqp_method_channel_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Channel.Ok ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Channel.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_ACCESS:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_access_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_ACCESS_REQUEST:
offset = dissect_amqp_method_access_request(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Access.Request ");
break;
case AMQP_METHOD_ACCESS_REQUEST_OK:
offset = dissect_amqp_method_access_request_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Access.Request-Ok ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Access.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_EXCHANGE:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_exchange_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_EXCHANGE_DECLARE:
offset = dissect_amqp_method_exchange_declare(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Exchange.Declare ");
break;
case AMQP_METHOD_EXCHANGE_DECLARE_OK:
offset = dissect_amqp_method_exchange_declare_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Exchange.Declare-Ok ");
break;
case AMQP_METHOD_EXCHANGE_DELETE:
offset = dissect_amqp_method_exchange_delete(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Exchange.Delete ");
break;
case AMQP_METHOD_EXCHANGE_DELETE_OK:
offset = dissect_amqp_method_exchange_delete_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Exchange.Delete-Ok ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Exchange.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_QUEUE:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_queue_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_QUEUE_DECLARE:
offset = dissect_amqp_method_queue_declare(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Declare ");
break;
case AMQP_METHOD_QUEUE_DECLARE_OK:
offset = dissect_amqp_method_queue_declare_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Declare-Ok ");
break;
case AMQP_METHOD_QUEUE_BIND:
offset = dissect_amqp_method_queue_bind(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Bind ");
break;
case AMQP_METHOD_QUEUE_BIND_OK:
offset = dissect_amqp_method_queue_bind_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Bind-Ok ");
break;
case AMQP_METHOD_QUEUE_UNBIND:
offset = dissect_amqp_method_queue_unbind(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Unbind ");
break;
case AMQP_METHOD_QUEUE_UNBIND_OK:
offset = dissect_amqp_method_queue_unbind_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Unbind-Ok ");
break;
case AMQP_METHOD_QUEUE_PURGE:
offset = dissect_amqp_method_queue_purge(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Purge ");
break;
case AMQP_METHOD_QUEUE_PURGE_OK:
offset = dissect_amqp_method_queue_purge_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Purge-Ok ");
break;
case AMQP_METHOD_QUEUE_DELETE:
offset = dissect_amqp_method_queue_delete(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Delete ");
break;
case AMQP_METHOD_QUEUE_DELETE_OK:
offset = dissect_amqp_method_queue_delete_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Queue.Delete-Ok ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Queue.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_BASIC:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_basic_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_BASIC_QOS:
offset = dissect_amqp_method_basic_qos(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Qos ");
break;
case AMQP_METHOD_BASIC_QOS_OK:
offset = dissect_amqp_method_basic_qos_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Qos-Ok ");
break;
case AMQP_METHOD_BASIC_CONSUME:
offset = dissect_amqp_method_basic_consume(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Consume ");
break;
case AMQP_METHOD_BASIC_CONSUME_OK:
offset = dissect_amqp_method_basic_consume_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Consume-Ok ");
break;
case AMQP_METHOD_BASIC_CANCEL:
offset = dissect_amqp_method_basic_cancel(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Cancel ");
break;
case AMQP_METHOD_BASIC_CANCEL_OK:
offset = dissect_amqp_method_basic_cancel_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Cancel-Ok ");
break;
case AMQP_METHOD_BASIC_PUBLISH:
offset = dissect_amqp_method_basic_publish(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Publish ");
break;
case AMQP_METHOD_BASIC_RETURN:
offset = dissect_amqp_method_basic_return(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Return ");
break;
case AMQP_METHOD_BASIC_DELIVER:
offset = dissect_amqp_method_basic_deliver(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Deliver ");
break;
case AMQP_METHOD_BASIC_GET:
offset = dissect_amqp_method_basic_get(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Get ");
break;
case AMQP_METHOD_BASIC_GET_OK:
offset = dissect_amqp_method_basic_get_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Get-Ok ");
break;
case AMQP_METHOD_BASIC_GET_EMPTY:
offset = dissect_amqp_method_basic_get_empty(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Get-Empty ");
break;
case AMQP_METHOD_BASIC_ACK:
offset = dissect_amqp_method_basic_ack(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Ack ");
break;
case AMQP_METHOD_BASIC_REJECT:
offset = dissect_amqp_method_basic_reject(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Reject ");
break;
case AMQP_METHOD_BASIC_RECOVER:
offset = dissect_amqp_method_basic_recover(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Basic.Recover ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Basic.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_FILE:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_file_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_FILE_QOS:
offset = dissect_amqp_method_file_qos(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Qos ");
break;
case AMQP_METHOD_FILE_QOS_OK:
offset = dissect_amqp_method_file_qos_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Qos-Ok ");
break;
case AMQP_METHOD_FILE_CONSUME:
offset = dissect_amqp_method_file_consume(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Consume ");
break;
case AMQP_METHOD_FILE_CONSUME_OK:
offset = dissect_amqp_method_file_consume_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Consume-Ok ");
break;
case AMQP_METHOD_FILE_CANCEL:
offset = dissect_amqp_method_file_cancel(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Cancel ");
break;
case AMQP_METHOD_FILE_CANCEL_OK:
offset = dissect_amqp_method_file_cancel_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Cancel-Ok ");
break;
case AMQP_METHOD_FILE_OPEN:
offset = dissect_amqp_method_file_open(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Open ");
break;
case AMQP_METHOD_FILE_OPEN_OK:
offset = dissect_amqp_method_file_open_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Open-Ok ");
break;
case AMQP_METHOD_FILE_STAGE:
offset = dissect_amqp_method_file_stage(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Stage ");
break;
case AMQP_METHOD_FILE_PUBLISH:
offset = dissect_amqp_method_file_publish(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Publish ");
break;
case AMQP_METHOD_FILE_RETURN:
offset = dissect_amqp_method_file_return(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Return ");
break;
case AMQP_METHOD_FILE_DELIVER:
offset = dissect_amqp_method_file_deliver(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Deliver ");
break;
case AMQP_METHOD_FILE_ACK:
offset = dissect_amqp_method_file_ack(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Ack ");
break;
case AMQP_METHOD_FILE_REJECT:
offset = dissect_amqp_method_file_reject(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"File.Reject ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id File.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_STREAM:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_stream_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_STREAM_QOS:
offset = dissect_amqp_method_stream_qos(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Qos ");
break;
case AMQP_METHOD_STREAM_QOS_OK:
offset = dissect_amqp_method_stream_qos_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Qos-Ok ");
break;
case AMQP_METHOD_STREAM_CONSUME:
offset = dissect_amqp_method_stream_consume(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Consume ");
break;
case AMQP_METHOD_STREAM_CONSUME_OK:
offset = dissect_amqp_method_stream_consume_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Consume-Ok ");
break;
case AMQP_METHOD_STREAM_CANCEL:
offset = dissect_amqp_method_stream_cancel(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Cancel ");
break;
case AMQP_METHOD_STREAM_CANCEL_OK:
offset = dissect_amqp_method_stream_cancel_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Cancel-Ok ");
break;
case AMQP_METHOD_STREAM_PUBLISH:
offset = dissect_amqp_method_stream_publish(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Publish ");
break;
case AMQP_METHOD_STREAM_RETURN:
offset = dissect_amqp_method_stream_return(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Return ");
break;
case AMQP_METHOD_STREAM_DELIVER:
offset = dissect_amqp_method_stream_deliver(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Stream.Deliver ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Stream.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_TX:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_tx_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_TX_SELECT:
offset = dissect_amqp_method_tx_select(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Tx.Select ");
break;
case AMQP_METHOD_TX_SELECT_OK:
offset = dissect_amqp_method_tx_select_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Tx.Select-Ok ");
break;
case AMQP_METHOD_TX_COMMIT:
offset = dissect_amqp_method_tx_commit(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Tx.Commit ");
break;
case AMQP_METHOD_TX_COMMIT_OK:
offset = dissect_amqp_method_tx_commit_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Tx.Commit-Ok ");
break;
case AMQP_METHOD_TX_ROLLBACK:
offset = dissect_amqp_method_tx_rollback(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Tx.Rollback ");
break;
case AMQP_METHOD_TX_ROLLBACK_OK:
offset = dissect_amqp_method_tx_rollback_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Tx.Rollback-Ok ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Tx.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_DTX:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_dtx_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_DTX_SELECT:
offset = dissect_amqp_method_dtx_select(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Dtx.Select ");
break;
case AMQP_METHOD_DTX_SELECT_OK:
offset = dissect_amqp_method_dtx_select_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Dtx.Select-Ok ");
break;
case AMQP_METHOD_DTX_START:
offset = dissect_amqp_method_dtx_start(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Dtx.Start ");
break;
case AMQP_METHOD_DTX_START_OK:
offset = dissect_amqp_method_dtx_start_ok(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Dtx.Start-Ok ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Dtx.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_CLASS_TUNNEL:
+ method_id = tvb_get_ntohs(tvb, 9);
proto_tree_add_item(amqp_tree, hf_amqp_method_tunnel_method_id,
tvb, 9, 2, FALSE);
ti = proto_tree_add_item(amqp_tree, hf_amqp_method_arguments,
tvb, 11, length - 4, FALSE);
args_tree = proto_item_add_subtree(ti, ett_args);
- switch (tvb_get_ntohs(tvb, 9)) {
+ switch (method_id) {
case AMQP_METHOD_TUNNEL_REQUEST:
offset = dissect_amqp_method_tunnel_request(tvb,
- 11, tvb_length (tvb), args_tree);
+ 11, args_tree);
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO,
"Tunnel.Request ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown method-id Tunnel.%u ", method_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO,
+ "Unknown class-id %u ", class_id);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
break;
case AMQP_FRAME_TYPE_CONTENT_HEADER:
+ class_id = tvb_get_ntohs(tvb, 7);
proto_tree_add_item(amqp_tree, hf_amqp_header_class_id,
tvb, 7, 2, FALSE);
proto_tree_add_item(amqp_tree, hf_amqp_header_weight,
tvb, 21, length - 14, FALSE);
prop_tree = proto_item_add_subtree(ti, ett_props);
offset = 21;
- switch (tvb_get_ntohs(tvb, 7)) {
+ switch (class_id) {
case AMQP_CLASS_BASIC:
offset = dissect_amqp_content_header_basic(tvb,
- offset, tvb_length (tvb), prop_tree);
+ offset, prop_tree);
break;
case AMQP_CLASS_FILE:
offset = dissect_amqp_content_header_file(tvb,
- offset, tvb_length (tvb), prop_tree);
+ offset, prop_tree);
break;
case AMQP_CLASS_STREAM:
offset = dissect_amqp_content_header_stream(tvb,
- offset, tvb_length (tvb), prop_tree);
+ offset, prop_tree);
break;
case AMQP_CLASS_TUNNEL:
offset = dissect_amqp_content_header_tunnel(tvb,
- offset, tvb_length (tvb), prop_tree);
+ offset, prop_tree);
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ break;
}
if (check_col(pinfo->cinfo, COL_INFO)) {
col_append_str(pinfo->cinfo, COL_INFO, "Content-Header ");
}
break;
default:
- DISSECTOR_ASSERT(FALSE);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Unknown frame type %u ",
+ frame_type);
+ col_set_fence(pinfo->cinfo, COL_INFO);
+ break;
}
}
}
static int
dissect_amqp_method_connection_start(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree)
+ int offset, proto_tree *args_tree)
{
proto_item *ti;
/* version-major (octet) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_start_version_major,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* version-minor (octet) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_start_version_minor,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* server-properties (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_connection_start_server_properties,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
/* mechanisms (longstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_start_mechanisms,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
/* locales (longstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_start_locales,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_connection_start_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree)
+ int offset, proto_tree *args_tree)
{
proto_item *ti;
/* client-properties (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_connection_start_ok_client_properties,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
/* mechanism (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_mechanism,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* response (longstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_response,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
/* locale (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_start_ok_locale,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_connection_secure(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree)
+ int offset, proto_tree *args_tree)
{
/* challenge (longstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_secure_challenge,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_connection_secure_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree)
+ int offset, proto_tree *args_tree)
{
/* response (longstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_secure_ok_response,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_connection_tune(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree)
+ int offset, proto_tree *args_tree)
{
/* channel-max (short) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_channel_max,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* frame-max (long) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_frame_max,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
/* heartbeat (short) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_heartbeat,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
return offset;
}
static int
dissect_amqp_method_connection_tune_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree)
+ int offset, proto_tree *args_tree)
{
/* channel-max (short) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_ok_channel_max,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* frame-max (long) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_ok_frame_max,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
/* heartbeat (short) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_tune_ok_heartbeat,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
return offset;
}
static int
dissect_amqp_method_connection_open(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree)
+ int offset, proto_tree *args_tree)
{
/* virtual-host (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_open_virtual_host,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* capabilities (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_open_capabilities,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* insist (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_open_insist,
static int
dissect_amqp_method_connection_open_ok(tvbuff_t *tvb,
- int offset, int bound, proto_tree *args_tree)
+ int offset, proto_tree *args_tree)
{
/* known-hosts (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_open_ok_known_hosts,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_connection_redirect(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* host (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_redirect_host,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* known-hosts (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_redirect_known_hosts,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_connection_close(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* reply-code (short) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_close_reply_code,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* reply-text (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_close_reply_text,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* class-id (short) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_close_class_id,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* method-id (short) */
proto_tree_add_item(args_tree, hf_amqp_method_connection_close_method_id,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
return offset;
}
static int
dissect_amqp_method_connection_close_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_channel_open(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* out-of-band (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_open_out_of_band,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_channel_open_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* channel-id (longstr) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_open_ok_channel_id,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_channel_flow(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* active (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_flow_active,
static int
dissect_amqp_method_channel_flow_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* active (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_flow_ok_active,
static int
dissect_amqp_method_channel_close(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* reply-code (short) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_close_reply_code,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* reply-text (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_close_reply_text,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* class-id (short) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_close_class_id,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* method-id (short) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_close_method_id,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
return offset;
}
static int
dissect_amqp_method_channel_close_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_channel_resume(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* channel-id (longstr) */
proto_tree_add_item(args_tree, hf_amqp_method_channel_resume_channel_id,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_channel_ping(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_channel_pong(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_channel_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_access_request(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* realm (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_access_request_realm,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* exclusive (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_access_request_exclusive,
static int
dissect_amqp_method_access_request_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_access_request_ok_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
return offset;
}
static int
dissect_amqp_method_exchange_declare(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
proto_item *ti;
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* type (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_type,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* passive (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_passive,
proto_tree_add_item(args_tree, hf_amqp_method_exchange_declare_nowait,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* arguments (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_exchange_declare_arguments,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_exchange_declare_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_exchange_delete(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* if-unused (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_exchange_delete_if_unused,
static int
dissect_amqp_method_exchange_delete_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_queue_declare(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
proto_item *ti;
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* passive (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_passive,
proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_nowait,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* arguments (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_queue_declare_arguments,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_queue_declare_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ok_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* message-count (long) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ok_message_count,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
/* consumer-count (long) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_declare_ok_consumer_count,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
return offset;
}
static int
dissect_amqp_method_queue_bind(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
proto_item *ti;
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* nowait (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_bind_nowait,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* arguments (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_queue_bind_arguments,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_queue_bind_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_queue_unbind(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
proto_item *ti;
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_unbind_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* arguments (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_queue_unbind_arguments,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_queue_unbind_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_queue_purge(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* nowait (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_nowait,
static int
dissect_amqp_method_queue_purge_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* message-count (long) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_purge_ok_message_count,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
return offset;
}
static int
dissect_amqp_method_queue_delete(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* if-unused (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_if_unused,
static int
dissect_amqp_method_queue_delete_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* message-count (long) */
proto_tree_add_item(args_tree, hf_amqp_method_queue_delete_ok_message_count,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
return offset;
}
static int
dissect_amqp_method_basic_qos(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* prefetch-size (long) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_prefetch_size,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
/* prefetch-count (short) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_prefetch_count,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* global (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_qos_global,
static int
dissect_amqp_method_basic_qos_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_basic_consume(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
proto_item *ti;
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* no-local (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_no_local,
proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_nowait,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* filter (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_basic_consume_filter,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_basic_consume_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_consume_ok_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_basic_cancel(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* nowait (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_nowait,
static int
dissect_amqp_method_basic_cancel_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_cancel_ok_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_basic_publish(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* mandatory (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_publish_mandatory,
static int
dissect_amqp_method_basic_return(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* reply-code (short) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_return_reply_code,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* reply-text (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_return_reply_text,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_return_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_return_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_basic_deliver(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* delivery-tag (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_delivery_tag,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
/* redelivered (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_redelivered,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_deliver_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_basic_get(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* no-ack (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_no_ack,
static int
dissect_amqp_method_basic_get_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* delivery-tag (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_delivery_tag,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
/* redelivered (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_redelivered,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* message-count (long) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_ok_message_count,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
return offset;
}
static int
dissect_amqp_method_basic_get_empty(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* cluster-id (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_get_empty_cluster_id,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_basic_ack(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* delivery-tag (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_ack_delivery_tag,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
/* multiple (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_ack_multiple,
static int
dissect_amqp_method_basic_reject(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* delivery-tag (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_reject_delivery_tag,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
/* requeue (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_reject_requeue,
static int
dissect_amqp_method_basic_recover(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* requeue (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_basic_recover_requeue,
static int
dissect_amqp_method_file_qos(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* prefetch-size (long) */
proto_tree_add_item(args_tree, hf_amqp_method_file_qos_prefetch_size,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
/* prefetch-count (short) */
proto_tree_add_item(args_tree, hf_amqp_method_file_qos_prefetch_count,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* global (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_file_qos_global,
static int
dissect_amqp_method_file_qos_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_file_consume(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
proto_item *ti;
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_file_consume_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_consume_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_consume_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* no-local (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_file_consume_no_local,
proto_tree_add_item(args_tree, hf_amqp_method_file_consume_nowait,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* filter (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_file_consume_filter,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_file_consume_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_consume_ok_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_file_cancel(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* nowait (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_nowait,
static int
dissect_amqp_method_file_cancel_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_cancel_ok_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_file_open(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* identifier (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_open_identifier,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* content-size (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_file_open_content_size,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
return offset;
}
static int
dissect_amqp_method_file_open_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* staged-size (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_file_open_ok_staged_size,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
return offset;
}
static int
dissect_amqp_method_file_stage(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_file_publish(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_file_publish_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_publish_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_publish_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* mandatory (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_file_publish_mandatory,
proto_tree_add_item(args_tree, hf_amqp_method_file_publish_immediate,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* identifier (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_publish_identifier,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_file_return(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* reply-code (short) */
proto_tree_add_item(args_tree, hf_amqp_method_file_return_reply_code,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* reply-text (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_return_reply_text,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_return_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_return_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_file_deliver(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* delivery-tag (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_delivery_tag,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
/* redelivered (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_redelivered,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* identifier (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_file_deliver_identifier,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_file_ack(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* delivery-tag (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_file_ack_delivery_tag,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
/* multiple (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_file_ack_multiple,
static int
dissect_amqp_method_file_reject(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* delivery-tag (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_file_reject_delivery_tag,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
/* requeue (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_file_reject_requeue,
static int
dissect_amqp_method_stream_qos(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* prefetch-size (long) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_prefetch_size,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
/* prefetch-count (short) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_prefetch_count,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* consume-rate (long) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_consume_rate,
tvb, offset, 4, FALSE);
- AMQP_INCREMENT(offset, 4, bound);
+ offset += 4;
/* global (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_qos_global,
static int
dissect_amqp_method_stream_qos_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_stream_consume(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
proto_item *ti;
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* no-local (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_no_local,
proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_nowait,
tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ offset += 1;
/* filter (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_stream_consume_filter,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_method_stream_consume_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_consume_ok_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_stream_cancel(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* nowait (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_nowait,
static int
dissect_amqp_method_stream_cancel_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_cancel_ok_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_stream_publish(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* ticket (short) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_ticket,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* mandatory (bit) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_publish_mandatory,
static int
dissect_amqp_method_stream_return(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* reply-code (short) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_return_reply_code,
tvb, offset, 2, FALSE);
- AMQP_INCREMENT(offset, 2, bound);
+ offset += 2;
/* reply-text (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_return_reply_text,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_return_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* routing-key (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_return_routing_key,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_stream_deliver(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* consumer-tag (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_consumer_tag,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* delivery-tag (longlong) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_delivery_tag,
tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ offset += 8;
/* exchange (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_exchange,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
/* queue (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_stream_deliver_queue,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_tx_select(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_tx_select_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_tx_commit(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_tx_commit_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_tx_rollback(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_tx_rollback_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_dtx_select(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_dtx_select_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_dtx_start(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
/* dtx-identifier (shortstr) */
proto_tree_add_item(args_tree, hf_amqp_method_dtx_start_dtx_identifier,
tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ offset += 1 + tvb_get_guint8(tvb, offset);
return offset;
}
static int
dissect_amqp_method_dtx_start_ok(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
return offset;
}
static int
dissect_amqp_method_tunnel_request(tvbuff_t *tvb _U_,
- int offset _U_, int bound _U_, proto_tree *args_tree _U_)
+ int offset _U_, proto_tree *args_tree _U_)
{
proto_item *ti;
/* meta-data (table) */
ti = proto_tree_add_item(
args_tree, hf_amqp_method_tunnel_request_meta_data,
tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
return offset;
}
static int
dissect_amqp_content_header_basic(tvbuff_t *tvb,
- int offset, int bound, proto_tree *prop_tree)
+ int offset, proto_tree *prop_tree)
{
proto_item *ti;
guint16 prop_flags;
prop_flags = tvb_get_ntohs(tvb, 19);
- if (prop_flags & 0x8000) {
- /* content-type (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_content_type,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* content-type (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_content_type,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* content-encoding (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_content_encoding,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* content-encoding (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_content_encoding,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* headers (table) */
- ti = proto_tree_add_item(
- prop_tree, hf_amqp_header_basic_headers,
- tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* headers (table) */
+ ti = proto_tree_add_item(
+ prop_tree, hf_amqp_header_basic_headers,
+ tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* delivery-mode (octet) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_delivery_mode,
- tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ if (prop_flags & 0x8000) {
+ /* delivery-mode (octet) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_delivery_mode,
+ tvb, offset, 1, FALSE);
+ offset += 1;
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* priority (octet) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_priority,
- tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ if (prop_flags & 0x8000) {
+ /* priority (octet) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_priority,
+ tvb, offset, 1, FALSE);
+ offset += 1;
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* correlation-id (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_correlation_id,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* correlation-id (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_correlation_id,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* reply-to (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_reply_to,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* reply-to (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_reply_to,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* expiration (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_expiration,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* expiration (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_expiration,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* message-id (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_message_id,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* message-id (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_message_id,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* timestamp (timestamp) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_timestamp,
- tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ if (prop_flags & 0x8000) {
+ /* timestamp (timestamp) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_timestamp,
+ tvb, offset, 8, FALSE);
+ offset += 8;
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* type (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_type,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* type (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_type,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* user-id (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_user_id,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* user-id (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_user_id,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* app-id (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_app_id,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* app-id (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_app_id,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* cluster-id (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_basic_cluster_id,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* cluster-id (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_basic_cluster_id,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
static int
dissect_amqp_content_header_file(tvbuff_t *tvb,
- int offset, int bound, proto_tree *prop_tree)
+ int offset, proto_tree *prop_tree)
{
proto_item *ti;
guint16 prop_flags;
prop_flags = tvb_get_ntohs(tvb, 19);
- if (prop_flags & 0x8000) {
- /* content-type (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_file_content_type,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* content-type (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_file_content_type,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* content-encoding (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_file_content_encoding,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* content-encoding (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_file_content_encoding,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* headers (table) */
- ti = proto_tree_add_item(
- prop_tree, hf_amqp_header_file_headers,
- tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* headers (table) */
+ ti = proto_tree_add_item(prop_tree, hf_amqp_header_file_headers,
+ tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* priority (octet) */
- proto_tree_add_item(prop_tree, hf_amqp_header_file_priority,
- tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ if (prop_flags & 0x8000) {
+ /* priority (octet) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_file_priority,
+ tvb, offset, 1, FALSE);
+ offset += 1;
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* reply-to (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_file_reply_to,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* reply-to (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_file_reply_to,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* message-id (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_file_message_id,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* message-id (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_file_message_id,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* filename (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_file_filename,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* filename (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_file_filename,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* timestamp (timestamp) */
- proto_tree_add_item(prop_tree, hf_amqp_header_file_timestamp,
- tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ if (prop_flags & 0x8000) {
+ /* timestamp (timestamp) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_file_timestamp,
+ tvb, offset, 8, FALSE);
+ offset += 8;
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* cluster-id (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_file_cluster_id,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* cluster-id (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_file_cluster_id,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
static int
dissect_amqp_content_header_stream(tvbuff_t *tvb,
- int offset, int bound, proto_tree *prop_tree)
+ int offset, proto_tree *prop_tree)
{
proto_item *ti;
guint16 prop_flags;
prop_flags = tvb_get_ntohs(tvb, 19);
- if (prop_flags & 0x8000) {
- /* content-type (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_stream_content_type,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* content-type (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_stream_content_type,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* content-encoding (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_stream_content_encoding,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* content-encoding (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_stream_content_encoding,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* headers (table) */
- ti = proto_tree_add_item(
- prop_tree, hf_amqp_header_stream_headers,
- tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* headers (table) */
+ ti = proto_tree_add_item(prop_tree, hf_amqp_header_stream_headers,
+ tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* priority (octet) */
- proto_tree_add_item(prop_tree, hf_amqp_header_stream_priority,
- tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ if (prop_flags & 0x8000) {
+ /* priority (octet) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_stream_priority,
+ tvb, offset, 1, FALSE);
+ offset += 1;
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* timestamp (timestamp) */
- proto_tree_add_item(prop_tree, hf_amqp_header_stream_timestamp,
- tvb, offset, 8, FALSE);
- AMQP_INCREMENT(offset, 8, bound);
+ if (prop_flags & 0x8000) {
+ /* timestamp (timestamp) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_stream_timestamp,
+ tvb, offset, 8, FALSE);
+ offset += 8;
}
prop_flags <<= 1;
static int
dissect_amqp_content_header_tunnel(tvbuff_t *tvb,
- int offset, int bound, proto_tree *prop_tree)
+ int offset, proto_tree *prop_tree)
{
proto_item *ti;
guint16 prop_flags;
prop_flags = tvb_get_ntohs(tvb, 19);
- if (prop_flags & 0x8000) {
- /* headers (table) */
- ti = proto_tree_add_item(
- prop_tree, hf_amqp_header_tunnel_headers,
- tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
- dissect_amqp_field_table (tvb, offset + 4,
- offset + 4 + tvb_get_ntohl(tvb, offset), tvb_get_ntohl(tvb, offset), ti);
- AMQP_INCREMENT(offset, 4 + tvb_get_ntohl(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* headers (table) */
+ ti = proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_headers,
+ tvb, offset + 4, tvb_get_ntohl(tvb, offset), FALSE);
+ dissect_amqp_field_table (tvb, offset + 4, tvb_get_ntohl(tvb, offset), ti);
+ offset += 4 + tvb_get_ntohl(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* proxy-name (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_proxy_name,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* proxy-name (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_proxy_name,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* data-name (shortstr) */
- proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_data_name,
- tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
- AMQP_INCREMENT(offset, 1 + tvb_get_guint8(tvb, offset), bound);
+ if (prop_flags & 0x8000) {
+ /* data-name (shortstr) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_data_name,
+ tvb, offset + 1, tvb_get_guint8(tvb, offset), FALSE);
+ offset += 1 + tvb_get_guint8(tvb, offset);
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* durable (octet) */
- proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_durable,
- tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ if (prop_flags & 0x8000) {
+ /* durable (octet) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_durable,
+ tvb, offset, 1, FALSE);
+ offset += 1;
}
prop_flags <<= 1;
- if (prop_flags & 0x8000) {
- /* broadcast (octet) */
- proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_broadcast,
- tvb, offset, 1, FALSE);
- AMQP_INCREMENT(offset, 1, bound);
+ if (prop_flags & 0x8000) {
+ /* broadcast (octet) */
+ proto_tree_add_item(prop_tree, hf_amqp_header_tunnel_broadcast,
+ tvb, offset, 1, FALSE);
+ offset += 1;
}
prop_flags <<= 1;