]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ngctl: add -c (compact output) for the dot command
authorkevans <kevans@FreeBSD.org>
Sun, 4 Oct 2020 17:07:13 +0000 (17:07 +0000)
committerkevans <kevans@FreeBSD.org>
Sun, 4 Oct 2020 17:07:13 +0000 (17:07 +0000)
commit64a57084a882bf7af5e2ad8ad2a20635df715bc7
tree50646a7e90cb0f93505c437a6ea7b14c43e2f94e
parente42c608b41e38efa55b3b02483b9f48e7e481d88
ngctl: add -c (compact output) for the dot command

The output of "ngctl dot" is suitable for small netgraph networks. Even
moderate complex netgraph setups (about a dozen nodes) are hard to
understand from the .dot output, because each node and each hook are shown
as a full blown structure.

This patch allows to generate much more compact output and graphs by
omitting the extra structures for the individual hooks. Instead the names of
the hooks are labels to the edges.

Submitted by: Lutz Donnerhacke <lutz_donnerhacke.de>
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21965
usr.sbin/ngctl/dot.c