diff options
author | Petr Gotthard <petr.gotthard@centrum.cz> | 2015-01-30 16:18:48 +0100 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-02-01 07:25:13 +0000 |
commit | a30022784ae2afca6dcf367ad5257be3aeba6471 (patch) | |
tree | 260776b8c1bce8f80dfd6044580bcf891b8dba09 /epan/dissectors/packet-amqp.c | |
parent | df468f5f845b68860325bd29ae0e6305f61d03ea (diff) |
AMQP 0-9-1: Add missing methods connection.block and connection.unblock.
Change-Id: I11b32b876ec0f43b1faa2ab40ab66e7f18d981c2
Reviewed-on: https://code.wireshark.org/review/6857
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-amqp.c')
-rw-r--r-- | epan/dissectors/packet-amqp.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/epan/dissectors/packet-amqp.c b/epan/dissectors/packet-amqp.c index 4a7797a385..e0c10e28b6 100644 --- a/epan/dissectors/packet-amqp.c +++ b/epan/dissectors/packet-amqp.c @@ -113,6 +113,8 @@ typedef struct { #define AMQP_0_9_METHOD_CONNECTION_REDIRECT 42 #define AMQP_0_9_METHOD_CONNECTION_CLOSE 50 #define AMQP_0_9_METHOD_CONNECTION_CLOSE_OK 51 +#define AMQP_0_9_METHOD_CONNECTION_BLOCKED 60 +#define AMQP_0_9_METHOD_CONNECTION_UNBLOCKED 61 #define AMQP_0_9_METHOD_CHANNEL_OPEN 10 #define AMQP_0_9_METHOD_CHANNEL_OPEN_OK 11 @@ -597,6 +599,14 @@ dissect_amqp_0_9_method_connection_close_ok(tvbuff_t *tvb, int offset, proto_tree *args_tree); static int +dissect_amqp_0_9_method_connection_blocked(tvbuff_t *tvb, + int offset, proto_tree *args_tree); + +static int +dissect_amqp_0_9_method_connection_unblocked(tvbuff_t *tvb, + int offset, proto_tree *args_tree); + +static int dissect_amqp_0_9_method_channel_open(tvbuff_t *tvb, int offset, proto_tree *args_tree); @@ -1911,6 +1921,7 @@ static int hf_amqp_0_10_method_connection_close_reply_code = -1; static int hf_amqp_method_connection_close_reply_text = -1; static int hf_amqp_method_connection_close_class_id = -1; static int hf_amqp_method_connection_close_method_id = -1; +static int hf_amqp_method_connection_blocked_reason = -1; static int hf_amqp_method_channel_open_out_of_band = -1; static int hf_amqp_method_channel_open_ok_channel_id = -1; static int hf_amqp_method_channel_flow_active = -1; @@ -2582,6 +2593,8 @@ static const value_string amqp_method_connection_methods [] = { {42, "Redirect"}, {50, "Close"}, {51, "Close-Ok"}, + {60, "Blocked"}, + {61, "Unblocked"}, {0, NULL} }; @@ -7555,6 +7568,14 @@ dissect_amqp_0_9_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void dissect_amqp_0_9_method_connection_close_ok(tvb, 11, args_tree); break; + case AMQP_0_9_METHOD_CONNECTION_BLOCKED: + dissect_amqp_0_9_method_connection_blocked(tvb, + 11, args_tree); + break; + case AMQP_0_9_METHOD_CONNECTION_UNBLOCKED: + dissect_amqp_0_9_method_connection_unblocked(tvb, + 11, args_tree); + break; default: expert_add_info_format(pinfo, amqp_tree, &ei_amqp_unknown_connection_method, "Unknown connection method %u", method_id); } @@ -8380,6 +8401,29 @@ dissect_amqp_0_9_method_connection_close_ok(tvbuff_t *tvb _U_, return offset; } +/* Dissection routine for method Connection.Blocked */ + +static int +dissect_amqp_0_9_method_connection_blocked(tvbuff_t *tvb _U_, + int offset, proto_tree *args_tree _U_) +{ + /* reason (shortstr) */ + proto_tree_add_item(args_tree, hf_amqp_method_connection_blocked_reason, + tvb, offset + 1, tvb_get_guint8(tvb, offset), ENC_ASCII|ENC_NA); + offset += 1 + tvb_get_guint8(tvb, offset); + + return offset; +} + +/* Dissection routine for method Connection.Unblocked */ + +static int +dissect_amqp_0_9_method_connection_unblocked(tvbuff_t *tvb _U_, + int offset, proto_tree *args_tree _U_) +{ + return offset; +} + /* Dissection routine for method Channel.Open */ static int @@ -12877,6 +12921,10 @@ proto_register_amqp(void) "Method-Id", "amqp.method.arguments.method_id", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL}}, + {&hf_amqp_method_connection_blocked_reason, { + "Reason", "amqp.method.arguments.reason", + FT_STRING, BASE_NONE, NULL, 0, + NULL, HFILL}}, {&hf_amqp_method_channel_open_out_of_band, { "Out-Of-Band", "amqp.method.arguments.out_of_band", FT_STRING, BASE_NONE, NULL, 0, |