Commit graph

69 commits

Author SHA1 Message Date
Ondrej Zajicek (work)
8860e991f6 Merge branch 'master' into int-new 2016-11-08 19:27:58 +01:00
Ondrej Zajicek (work)
cc5b93f72d Merge tag 'v1.6.2' into int-new 2016-11-08 17:04:29 +01:00
Jan Moskyto Matejka
3e236955c9 Build: switch on -Wextra, get rid of most of the warnings
There are several unresolved -Wmissing-field-initializers on older
versions of GCC than 5.1, all of them false positive.
2016-11-01 14:52:54 +01:00
Pavel Tvrdik
6273fcf072 Add stdlib.h to client/commands.c 2016-09-15 17:02:52 +02:00
Pavel Tvrdík
8f01879c56 cppcheck: fix va_end() functions 2016-06-27 15:07:50 +02:00
Pavel Tvrdik
044e123fd3 Client: Includes stdlib.h for malloc() 2016-06-09 10:43:00 +02:00
Ondrej Zajicek (work)
b66a9e2f33 Merge branch 'master' into int-new 2016-05-12 21:49:52 +02:00
Ondrej Zajicek (work)
3f2c7600fa We don't need bvsnprintf() in BIRD client 2016-05-12 21:44:27 +02:00
Ondrej Zajicek (work)
af678af0d5 Merge remote-tracking branch 'origin/master' into int-new 2016-05-12 18:03:23 +02:00
Ondrej Zajicek (work)
286e2011d2 Miscellaneous minor fixes 2016-05-12 16:04:47 +02:00
Jan Moskyto Matejka
7152e5efbb Build system reworked to one global Makefile with includes and no nesting
Also removed the lib-dir merging with sysdep. Updated #include's
accordingly.

Fixed make doc on recent Debian together with moving generated doc into
objdir.

Moved Makefile.in into root dir

Retired all.o and birdlib.a
Linking the final binaries directly from all the .o files.
2016-05-10 14:07:34 +02:00
Ondrej Zajicek (work)
f2ae2badff Main: Add local option
Add option that changes default paths for config file and control socket
to the current working directory.
2016-04-07 12:39:49 +02:00
Ondrej Zajicek (work)
8465dccb06 Major RIP redesign
The new RIP implementation fixes plenty of old bugs and also adds support
for many new features: ECMP support, link state support, BFD support,
configurable split horizon and more. Most options are now per-interface.
2015-10-05 13:18:10 +02:00
Pavel Tvrdík
ae80a2de95 unsigned [int] -> uint 2015-06-08 02:24:08 +02:00
Pavel Tvrdik
e598853e68 Add const to a param msg at functions log_msg, log_rl, die, bug and debug 2015-02-21 19:32:57 +01:00
Ondrej Zajicek
05476c4d04 IPv4/IPv6 integrated socket code. 2014-05-18 11:42:26 +02:00
Ondrej Zajicek
43eb8f610f Removes conflicting definition.
This function is a part of Readline interface for a long time
(with a different type).
2014-03-31 12:02:20 +02:00
Ondrej Zajicek
8137fe6d45 Allows shorthands for birdc noninteractive commands. 2013-11-25 02:03:23 +01:00
Ondrej Zajicek
4d4979c67c Fixes some potential issues with invalid term size in clients. 2013-11-20 13:25:33 +01:00
Ondrej Zajicek
a5e9f3d26f Restructures birdc and birdcl to merge duplicated code.
The BIRD client code is restructured that most of the code (including
main function) is shared in client.c, while birdc.c and birdcl.c contain
just I/O-specific callbacks. This removes all duplicated code from
variant-specific files.
2013-04-23 02:42:35 +02:00
Ondrej Zajicek
d2c392d448 Removes unnecessary client subdirectories and updates buildsystem.
Renames some files:
birdc/client.c -> birdc.c
birdcl/client.c -> birdcl.c
client_common.c -> common.c
2013-04-19 13:59:08 +02:00
Tomas Hlavacek
568d9c9fae Fix birdcl async message handling
Fix handling of async messafe in the bird light client. The async message
may occure at the any moment so we need the client to liste for the
message from server when it waits for user input.
2013-04-06 22:07:32 +02:00
Tomas Hlavacek
ce13485374 Fix birdcl questionmark handling
Fix handling of questionmark handling in the bird light client. The
questionmark should display help when it is the last non-blank character on
command line. Otherwise the questionmark does not have any special meaning
and it could be a part of a pattern.
2013-03-19 18:03:49 +01:00
Tomas Hlavacek
8322ecde12 Add lightweight client - birdcl
Restructure client/ subdir. Add two different flavors of client.
The full featured birdc client code is in client/birdc/.
The new light client birtcl is in client/birdcl/.
Common sources of both clients are directly in client/.

Rework on-line auto-completion in client/command.c to conditionally turn off
ncurses-specific code.

Add lightweight client without libreadline and ncurses dependencies - birdcl.
The birdcl lacks support of history, on-line auto-completion and there
are different implementations of "more" functionality and help on '?' press.
New client operates in canonical terminal mode (apart from "more" display)
and therefore all commands have to be executed by a return key including help
commands (called by '?' character in the end of the line).
Apart from these limitations the interaction style should be the same as
for the full client - birdc.
Build of birdcl is always on (independent on --enable-client parameter).
2013-03-19 18:03:49 +01:00
Tomas Hlavacek
e454916149 Pull out independent routines from client_full.c
Pull out routines for interacting with the server and interpreting
internal commands which are not dependent on libreadline and
ncurses libraries.

This is a preparation step for a new lightweight birdc client.
2013-03-19 18:03:49 +01:00
Tomas Hlavacek
5c2c4ea8b1 Rename client/client.c to client_full.c
Rename client/client.c to client-full.c and change the Makefile accordingly.
This is a preparation step for introducing a new lightweight client which
should reuse as much code as possible from the old one but it should not depend
on external libraries.

Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
2013-03-19 18:03:49 +01:00
Ondrej Filip
4c2abee74e Allow submitting BIRD commands from UNIX shell even in restricted mode. 2013-02-12 13:15:01 +01:00
Ondrej Zajicek
064e7be5cd History deduplication in birdc. 2012-05-04 00:20:23 +02:00
Ondrej Zajicek
c47d037ecb Some minor changes to CLI. 2012-03-22 12:13:26 +01:00
Ondrej Zajicek
154e2aeded Fixes string handling in birdc. 2010-12-13 11:17:11 +01:00
Ondrej Zajicek
e81b440f68 Fix configure to enable warnings and fix most of them. 2010-02-21 14:34:53 +01:00
Ondrej Zajicek
e0a45fb421 Restricted read-only CLI.
Also adds support for executing commands using birdc <cmd>.
2010-02-21 09:57:26 +01:00
Ondrej Zajicek
9c46ad8e2f Count number of lines (and not messages) in 'more'. 2009-08-12 10:16:32 +02:00
Ondrej Zajicek
f0333f44a5 Implements 'more' feature to birdc.
Also does some code restructuring.
2009-07-15 01:47:29 +02:00
Ondrej Zajicek
cf18603491 New syntax for bgp_path 2009-03-14 12:43:10 +01:00
Ondrej Zajicek
80ac7dc181 Do not use ? for client-side help when in new BGP path syntax 2009-02-12 13:41:34 +01:00
Ondrej Zajicek
661ec5db7f I am not sure whether this is proper fix for a problem that birdc
shows only parts of larger outputs (for example 'show route all').
It seems that birdc reads (from bird) and writes (to stdout)
everything but during execution of some readline code some already
written output disappeared (although it is fflush()ed and
tcdrain()ed).

As birdc reads from stdin when select said there are some data,
O_NONBLOCK for stdin is unnecessary and when it is removed,
i didn't notified this problem.
2008-11-21 13:05:12 +01:00
Ondrej Zajicek
e00115904f birdc died during terminal resize because of unhandled EINTR
in select loop.
2008-11-21 12:59:03 +01:00
Ondrej Zajicek
68fa95cfec Check of socket name length 2008-10-26 23:55:38 +01:00
Ondrej Filip
97c6fa02e0 Previous patch reverted. :-( 2008-08-25 12:06:20 +00:00
Ondrej Filip
030e3a79cb Buffer overflow fix. 2008-08-25 11:57:46 +00:00
Martin Mares
d7390312d4 Unused parameters in the client. 2004-06-05 09:26:48 +00:00
Martin Mares
7deffd845a Need <termios.h> for tcdrain(). 2004-05-31 20:51:45 +00:00
Martin Mares
5f2a6a9ff3 Fix handling on full pipe to client in bird. Prevent packet overflows
for even only medium sized route table output. Fix a strange garbled
output problem in the client. The latter seems to be caused by some
library doing tcflush while there is still command output pending. So
the best fix here is to do fflush and then tcdrain. Note that this
problem occurs only under certain load situations and is not too easy to
reproduce.

(by Andreas)
2004-05-31 17:55:30 +00:00
Ondrej Filip
bd62eeca27 Small change to compile client on FreeBSD. 2004-05-31 13:32:58 +00:00
Martin Mares
59b96d7b4d Don't use obsolete functions which are no longer declared in the header. 2002-11-13 08:45:24 +00:00
Martin Mares
01b776e117 Fixed <time.h> vs. <sys/time.h> problems. 2001-03-06 13:40:39 +00:00
Martin Mares
4daf03e513 Use our own SUN_LEN if libc doesn't provide it. 2000-06-16 23:12:47 +00:00
Martin Mares
0b3bf4b1d8 Use SUN_LEN() for length of UNIX domain addresses. This should fix problems
with connection to clients on libc5 machines.
2000-06-09 07:30:22 +00:00
Martin Mares
2983460bc0 Both help' command and the unknown command' error message now tell
the user to press `?' if he wants help.
2000-05-31 22:39:06 +00:00