Commit Graph

3 Commits

Author SHA1 Message Date
Toke Høiland-Jørgensen
f27c7c2c46 lib/util: Import logging helpers from xdp-tools
Include logging.{h,c} from xdp-tools so utilities can use them for setting
libxdp and libbpf logging.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2022-04-20 13:24:22 +02:00
Simon Sundberg
399c9dc935 pping: Refactor json code and format
Use a JSON-writer library from iproute instead of complicated printf
statement. Also output timestamp, rtt and min_rtt as integers in
nanoseconds, rather than floats in seconds.

Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
2021-06-23 15:02:26 +02:00
Toke Høiland-Jørgensen
b0536ce4ec lib: Add lib/util for adding utility library code
Add the directory and Makefile rules to prepare for storing library
functions in lib/util like we do in xdp-tools. With this, library code can
be added by just dropping the .c and .h into lib/util and updating
lib/util/util.mk with the object name.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
2021-06-01 17:16:24 +02:00