diff options
author | Romain Tartière <romain@blogreen.org> | 2018-07-12 15:29:58 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2018-07-12 15:32:41 +0000 |
commit | 3d0b00243a77f3f11f134b4a7dc09fc3a8422ef8 (patch) | |
tree | 39dc9957ab167a8eb9f52d95fde7608475da4d61 /epan/dissectors/packet-riemann.c | |
parent | be39241b4475d83ba58b17fbffbc0f17caf66096 (diff) |
Add time_micros field to the riemann dissector
This field was added in Riemann 0.2.13 and Riemann client 0.4.4:
https://github.com/riemann/riemann-java-client/commit/797e8db998dee01f98ae49848da016682a33250d
Change-Id: I132155d090725461f0e7df3d203dbe3d4a215f75
Reviewed-on: https://code.wireshark.org/review/28692
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-riemann.c')
-rw-r--r-- | epan/dissectors/packet-riemann.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/dissectors/packet-riemann.c b/epan/dissectors/packet-riemann.c index a2fda53957..b9d28ec177 100644 --- a/epan/dissectors/packet-riemann.c +++ b/epan/dissectors/packet-riemann.c @@ -37,6 +37,7 @@ * optional float ttl = 8; * repeated Attribute attributes = 9; * + * optional int64 time_micros = 10; * optional sint64 metric_sint64 = 13; * optional double metric_d = 14; * optional float metric_f = 15; @@ -87,6 +88,7 @@ static int hf_riemann_event_ttl = -1; static int hf_riemann_event_time = -1; static int hf_riemann_event_metric_d = -1; static int hf_riemann_event_metric_f = -1; +static int hf_riemann_event_time_micros = -1; static int hf_riemann_event_metric_sint64 = -1; static int hf_riemann_state = -1; static int hf_riemann_state_service = -1; @@ -122,6 +124,7 @@ static gint ett_state = -1; #define RIEMANN_FN_EVENT_TAGS 7 #define RIEMANN_FN_EVENT_TTL 8 #define RIEMANN_FN_EVENT_ATTRIBUTES 9 +#define RIEMANN_FN_EVENT_TIME_MICROS 10 #define RIEMANN_FN_EVENT_METRIC_SINT64 13 #define RIEMANN_FN_EVENT_METRIC_D 14 #define RIEMANN_FN_EVENT_METRIC_F 15 @@ -418,6 +421,10 @@ riemann_dissect_event(packet_info *pinfo, proto_tree *riemann_tree, VERIFY_WIRE_FORMAT("Event.attributes", RIEMANN_WIRE_BYTES); len = riemann_dissect_attribute(pinfo, event_tree, tvb, offset); break; + case RIEMANN_FN_EVENT_TIME_MICROS: + VERIFY_WIRE_FORMAT("Event.time_micros", RIEMANN_WIRE_INTEGER); + len = riemann_dissect_int64(event_tree, tvb, offset, hf_riemann_event_time_micros); + break; case RIEMANN_FN_EVENT_METRIC_SINT64: VERIFY_WIRE_FORMAT("Event.metric_sint64", RIEMANN_WIRE_INTEGER); len = riemann_dissect_sint64(event_tree, tvb, offset, hf_riemann_event_metric_sint64); @@ -728,6 +735,10 @@ proto_register_riemann(void) { "metric_f", "riemann.event.metric_f", FT_FLOAT, BASE_NONE, NULL, 0, NULL, HFILL } }, + { &hf_riemann_event_time_micros, + { "time_micros", "riemann.event.time_micros", + FT_INT64, BASE_DEC, NULL, 0, NULL, HFILL } + }, { &hf_riemann_event_metric_sint64, { "metric_sint64", "riemann.event.metric_sint64", FT_INT64, BASE_DEC, NULL, 0, NULL, HFILL } |