Commit Graph

83 Commits

Author SHA1 Message Date
Kyle Evans
8073c947c7 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
2020-10-04 17:07:13 +00:00
Simon J. Gerraty
2c9a9dfc18 Update Makefile.depend files
Update a bunch of Makefile.depend files as
a result of adding Makefile.depend.options files

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22494
2019-12-11 17:37:53 +00:00
Simon J. Gerraty
5ab1c5846f Add Makefile.depend.options
Leaf directories that have dependencies impacted
by options need a Makefile.depend.options file
to avoid churn in Makefile.depend

DIRDEPS for cases such as OPENSSL, TCP_WRAPPERS etc
can be set in local.dirdeps-options.mk
which can add to those set in Makefile.depend.options

See share/mk/dirdeps-options.mk

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22469
2019-12-11 17:37:37 +00:00
Warner Losh
6c35c7d1b6 Replace complicated expression to disable libedit when no libthr is being built
with a simpler one.
2019-07-15 14:23:51 +00:00
Devin Teske
bb22479803 Add blank line after each item in "ngctl ls -l"
The output of "ngctl ls -l" is hard to read. To make it easier, add a blank
line after each listed item much how traditional "ls -l" does when listing
the contents of multiple directories.

Sponsored by:	Smule, Inc.
2018-10-26 19:16:17 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Conrad Meyer
2889bad81c ngctl dot: Drop invalid trailing semi-colon
PR:		203257
Submitted by:	Daniel O'Connor
Sponsored by:	EMC / Isilon Storage Division
2015-09-22 01:31:01 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Gleb Smirnoff
61b6fd5ab2 Plug mutex leak.
MFC after:	1 week
Sponsored by:	Nginx, Inc.
2015-01-16 18:51:26 +00:00
Baptiste Daroussin
c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Brooks Davis
80189b3b09 Replace all uses of libncurses and libtermcap with their wide character
variants.  This allows usable file system images (i.e. those with both a
shell and an editor) to be created with only one copy of the curses library.

Exp-run:	antoine
PR:		189842
Discussed with:	bapt
Sponsored by:	DARPA, AFRL
2014-07-17 18:24:34 +00:00
Baptiste Daroussin
01c2b8ac0d use .Mt to mark up email addresses consistently (part2)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:57:27 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Philippe Charnier
d31ff7a8fb Add __unused. Ansi prototypes. 2010-12-20 09:36:54 +00:00
Dag-Erling Smørgrav
c540146463 Add volatile to sig_atomic_t where it was missing.
MFC after:	1 week
2009-06-14 21:39:52 +00:00
Mike Makonnen
48b5fd636e Modify the DoParseCommand() to work on (const char *) instead of just
(char *). This is a slightly simplified version of the patch in the PR. It
fixes compilitation issues with -O3.

PR: misc/124385
2008-06-28 12:31:30 +00:00
Ruslan Ermilov
dbdb679c6f Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longer
build libkse.  This should fix WITHOUT_LIBTHR builds as a side effect.
2008-03-29 17:44:40 +00:00
David E. O'Brien
946367b8e2 Tweak the handling of "WITHOUT_LIBPTHREAD". Also remove the accidental
treatment of 'LIBKSE' as an "old style" knob.

Submitted by:	ru
Approved by:	re(kensmith)
2007-10-09 23:31:11 +00:00
David E. O'Brien
65c045e964 Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by:	re(kensmith)
2007-10-09 13:42:34 +00:00
Ruslan Ermilov
152f2a4a96 Always install libpthread.* symlinks if at least one of
the threading libraries is built.  This simplifies the
logic in makefiles that need to check if the pthreads
support is present.  It also fixes a bug where we would
build a threading library that we shouldn't have built:
for example, building with WITHOUT_LIBTHR and the default
value of DEFAULT_THREADING_LIB (libthr) would mistakenly
build the libthr library, but not install it.

Approved by:	re (kensmith)
2007-10-01 18:22:32 +00:00
Gleb Smirnoff
611619b338 The last change is not needed for HEAD.
Explained by:	ru
2007-03-30 08:23:59 +00:00
Gleb Smirnoff
3cb88013ba Do not build the libedit support if NO_LIBPTHREAD is defined.
PR:		bin/104478
Submitted by:	Mike Durian <durian shadetreesoftware.com>
2007-03-28 14:04:35 +00:00
Kevin Lo
9c20ad30e0 getopt(3) returns -1, not EOF. 2007-02-06 08:48:28 +00:00
Ruslan Ermilov
968ed7eedb Push the detection of threading libs support down to ngctl/Makefile
as the latter can be built without threading (with the loss of line
editing functionality).

Pointed by:	glebius
2006-11-27 16:55:14 +00:00
Ruslan Ermilov
1d5dd15d75 Fix "make checkdpadd". 2006-11-26 14:43:03 +00:00
Alexander Kabaev
9a4194814d Silence GCC4 signed/unsigned pointer mismatch warning. 2006-09-21 01:48:47 +00:00
Gleb Smirnoff
eac2afced2 - Pass pointer to fd_set in ReadSockets.
- style(9) nits.

Submitted by:	ru
2006-08-08 07:04:40 +00:00
Gleb Smirnoff
b9124a7354 Add line edit and history support to ngctl(8) via editline(3).
Details:
- The main thread runs editline(3) functions, that can block.
- A separate thread is launched to monitor netgraph sockets.
- The access to the descriptors is protected by a mutex. At
  runtime the monitoring thread owns the mutex. When the main
  thread reads a command from el_gets() it asks the monitoring
  thread to release a mutex and sleep until the main thread
  processes the command.

This makes ngctl(8) depend on libedit, and libpthread. Thus, the
new functionality isn't compiled in if release is being built
with -DRELEASE_CRUNCH.

PR:		bin/87352
Reviewed by:	ru, Nuno Antunes <nuno.antunes gmail.com>
2006-08-07 14:17:05 +00:00
Stefan Farfeleder
c3759b3a3f Don't use empty braces ("{}") to initialise arrays. This is a syntax
error in ISO C (both 90 and 99).
2006-07-17 08:35:47 +00:00
Gleb Smirnoff
9caee2ece7 Style: space after "return". 2006-06-28 10:38:38 +00:00
Gleb Smirnoff
78cdd8ed1b Unnest includes before forthcoming editing. 2006-05-24 14:46:55 +00:00
Ruslan Ermilov
62f8299baa - Reduce the number of netgraph messages when listing
nodes from (N + 1) to 1, where N is the number of
  nodes in the system.

- Implement "ls -l" which runs the "show" command for
  each node.

In collaboration with:	glebius
2005-02-09 16:17:33 +00:00
Maxim Konovalov
c44e20ebec Backout rev. 1.17 per ru@ request: there are net.graph.recvspace and
net.graph.maxdgram sysctls.
2005-02-04 20:09:11 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Maxim Konovalov
b5974bdbab Increase a socket receive buffer size. This helps 'ngctl list'
to deal with a big number of nodes.

Submitted by:		archie
Approved by:		archie
Reported and tested:	Konstantin Timashkov
MFC after:		1 month
2004-11-25 09:27:56 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Ruslan Ermilov
9fe5fadaf1 Get rid of all (but one in write.c) static size buffers. 2004-01-27 21:52:52 +00:00
Ruslan Ermilov
723c1c2ee8 Make this WARNS=3 clean. 2004-01-26 10:27:18 +00:00
Brian Feldman
bbd6d60a85 Add a GraphViz-exporting ngctl(8) "dot" command. You can now create
very useful .dot files of your netgraph(4) to quickly visualize the
nodes, hooks and edges.  An example of this can be found here:
	http://people.freebsd.org/~green/sample-netgraph-dot.ps
If anyone would like to refine the output further, please do so.
2004-01-09 03:19:40 +00:00
Philippe Charnier
b00304d4a1 Use fprintf() instead of errx() when displaying usage string. The program name
will not be written twice.
2004-01-04 16:11:29 +00:00
Hartmut Brandt
9d901d3b5f Get rid of the old constants which did not include the trailing NUL
and use the new constants which do.
2003-11-12 13:04:44 +00:00