aboutsummaryrefslogtreecommitdiffstats
path: root/sharkd_session.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-11-20 16:22:46 +0100
committerAnders Broman <a.broman58@gmail.com>2018-11-21 04:35:41 +0000
commit049d7464951eed3aa059b6b875888697bad3b2a5 (patch)
treef48c74dc2a98443e2a0d47221581fad2d8699fc3 /sharkd_session.c
parent4708ffdb999d73f467ab5d86da161a03b0c99399 (diff)
sharkd: update documentation for some requests to match reality
Align comments and add two fixup notes while at it. Change-Id: I977c1a6e55712414f7af042cb215bac49926a019 Reviewed-on: https://code.wireshark.org/review/30742 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'sharkd_session.c')
-rw-r--r--sharkd_session.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/sharkd_session.c b/sharkd_session.c
index dea7d9bc9a..5c84c5aa68 100644
--- a/sharkd_session.c
+++ b/sharkd_session.c
@@ -473,6 +473,8 @@ sharkd_follower_visit_cb(const void *key _U_, void *value, void *user_data)
* Process info request
*
* Output object with attributes:
+ * (m) version - version number
+ *
* (m) columns - available column formats, array of object with attributes:
* 'name' - column name
* 'format' - column format-name
@@ -501,15 +503,20 @@ sharkd_follower_visit_cb(const void *key _U_, void *value, void *user_data)
* 'name' - sequence analysis name
* 'tap' - sharkd tap-name
*
- * (m) taps - available taps, array of object with attributes:
+ * (m) taps - available taps, array of object with attributes:
* 'name' - tap name
* 'tap' - sharkd tap-name
*
- * (m) follow - available followers, array of object with attributes:
+ * (m) follow - available followers, array of object with attributes:
+ * 'name' - tap name
+ * 'tap' - sharkd tap-name
+ *
+ * (m) ftypes - conversation table for FT_ number to string, array of FT_xxx strings.
+ *
+ * (m) nstat - available table-based taps, array of object with attributes:
* 'name' - tap name
* 'tap' - sharkd tap-name
*
- * (m) ftypes - conversation table for FT_ number to string
*/
static void
sharkd_session_process_info(void)
@@ -1599,6 +1606,7 @@ sharkd_session_process_tap_rtp_analyse_cb(void *tapdata)
* (m) type - tap output type
* (m) proto - protocol short name
* (o) filter - filter string
+ * (o) geoip - whether GeoIP information is available, boolean
*
* (o) convs - array of object with attributes:
* (m) saddr - source address
@@ -1611,6 +1619,7 @@ sharkd_session_process_tap_rtp_analyse_cb(void *tapdata)
* (m) rxb - RX bytes
* (m) start - (relative) first packet time
* (m) stop - (relative) last packet time
+ * (o) filter - conversation filter
*
* (o) hosts - array of object with attributes:
* (m) host - host address
@@ -2597,6 +2606,8 @@ sharkd_session_process_tap(char *buf, const jsmntok_t *tokens, int count)
sharkd_json_array_open(FALSE, "taps");
sharkd_retap();
+ // This dummy value exists to permit unconditionally adding ',' in the taps callback.
+ // XXX convert to json_dumper and remove this.
sharkd_json_value_anyf(FALSE, NULL, "null");
sharkd_json_array_close();
@@ -3025,6 +3036,8 @@ sharkd_session_process_frame_cb(epan_dissect_t *edt, proto_tree *tree, struct ep
}
sharkd_json_array_open(TRUE, "fol");
+ // This dummy entry allows sharkd_follower_visit_layers_cb() to always insert ',' before dumping item.
+ // XXX convert to json_dumper and remove the dummy entry.
sharkd_json_value_anyf(FALSE, NULL, "0");
follow_iterate_followers(sharkd_follower_visit_layers_cb, pi);
sharkd_json_array_close();