Wireshark-dev: Re: [Wireshark-dev] How to test sharkd?

From: Michał Łabędzki <michal.tomasz.labedzki@xxxxxxxxx>
Date: Mon, 18 Jun 2018 08:01:20 +0200
There is a lack of documentation.
Try in command line:
./sharkd -
# then "sharkd" reads/writes from stdout
There is JSON interface like:
{"req":"command"}
There is a need to push ENTER after JSON command.

For example:
{"req":"status"}
{"req":"load","file":"path/to/file.pcap.etc"}
{"req":"frames"}
{"req":"status"}

See sharkd_session.c for all commands and documentation, for example:
{"req":"frames",...}

/**
 * sharkd_session_process_frames()
 *
 * Process frames request
 *
 * Input:
 *   (o) column0...columnXX - requested columns either number in range
[0..NUM_COL_FMTS), or custom (syntax <dfilter>:<occurence>).
 *                            If column0 is not specified default
column set will be used.
 *   (o) filter - filter to be used
 *   (o) skip=N   - skip N frames
 *   (o) limit=N  - show only N frames
 *   (o) refs  - list (comma separated) with sorted time reference
frame numbers.
 *
 * Output array of frames with attributes:
 *   (m) c   - array of column data
 *   (m) num - frame number
 *   (o) i   - if frame is ignored
 *   (o) m   - if frame is marked
 *   (o) ct  - if frame is commented
 *   (o) bg  - color filter - background color in hex
 *   (o) fg  - color filter - foreground color in hex
 */

Complete example:
1. {"req":"status"}
2. {"frames":0,"duration":0.000000000}

1. It is a request.
2. This is a response from sharkd for request [1].
pon., 18 cze 2018 o 01:07 Jirka Novak <j.novak@xxxxxxxxxxxx> napisał(a):
>
> Hi all,
>
>   I'm refactoring RTP related parts of UI and I found that I have to
> touch sharkd even too. I would like to test new code and I found that I
> don't know how to start/use sharkd.
>   Can anyone help me?
>
>   BTW I found no information about sharkd at all. Did I missed something?
>
>                                                 Best regards,
>
>                                                         Jirka Novak
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>              mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe



-- 
Michał Łabędzki