Powered by Apache

CVS log for nsh/main.c

[BACK] Up to [local] / nsh

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.39 / (download) - annotate - [select for diffs], Wed Jun 17 22:24:32 2009 UTC (2 years, 11 months ago) by chris
Branch: MAIN
CVS Tags: HEAD
Diff to previous 1.38 (colored)

20090617

Revision 1.38 / (download) - annotate - [select for diffs], Sun Apr 27 00:40:38 2008 UTC (4 years ago) by chris
Branch: MAIN
Diff to previous 1.37 (colored)

20080426

Revision 1.37 / (download) - annotate - [select for diffs], Sat Feb 16 22:57:20 2008 UTC (4 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.36 (colored)

Dump StringList based makeargv and revert back to 4.4BSD makeargv, but
with cursor_argc/cursor_argo tracking added (for completion)

The newer makeargv was painful to read, and didn't handle fgets supplied
lines properly.  It did have the advantage of dynamically allocating
space for new arguments through the use of sl_add.  While this was nice,
it really isn't necessary.  Arguments are always parsed from a char line[].
So, we just set the max arguments to sizeof(line)/2 which is impossible
to exceed (an argument must be at least one character, and then it must
have another charater, space or \t to delineate.)  This ties makeargv()
to line[], which, surprise, is already the case.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Feb 14 01:00:59 2008 UTC (4 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.35 (colored)

-SIGINT longjmp back to command() loop
-Command completion framework based on ftp client's completion feature
-Import StringList library
-Import new StringList based makeargv() function with cursor argument
 locating trick

Now we need more command completions, only handles menu and interface name
completions at the moment.  We also need context sensitive help/usage
to pop up for uncompleted command arguments.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Feb 8 07:02:51 2008 UTC (4 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.34 (colored)

20080207

Revision 1.34 / (download) - annotate - [select for diffs], Thu Feb 7 06:56:18 2008 UTC (4 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.33 (colored)

use ioctl to get window size and maintain as global struct with updates
courtesy of SIGWINCH

Revision 1.33 / (download) - annotate - [select for diffs], Wed Feb 6 22:48:53 2008 UTC (4 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.32 (colored)

convert my copyrights to simpler ISC-style copyright statement

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jan 20 07:30:32 2008 UTC (4 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.31 (colored)

wipe out dhcp, ntp temp files on nsh -i startup

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jan 15 07:34:34 2008 UTC (4 years, 4 months ago) by chris
Branch: MAIN
Diff to previous 1.30 (colored)

-collaspe dhclient-kill.sh into if.c 'no ip dhcp' routine
-remote all ctl.c temp files in main.c on nsh -i routine

Revision 1.30 / (download) - annotate - [select for diffs], Sat Dec 29 23:12:44 2007 UTC (4 years, 4 months ago) by chris
Branch: MAIN
Diff to previous 1.29 (colored)

20071229

Revision 1.29 / (download) - annotate - [select for diffs], Wed Dec 26 05:19:33 2007 UTC (4 years, 4 months ago) by chris
Branch: MAIN
Diff to previous 1.28 (colored)

new route print code from /usr/src/sbin/route/show.c
(uses sysctl instead of kvm)
extinguish all remaining kvm usage from NSH

Revision 1.28 / (download) - annotate - [select for diffs], Mon Dec 17 06:57:02 2007 UTC (4 years, 5 months ago) by chris
Branch: MAIN
Diff to previous 1.27 (colored)

Time for a new snapshot so people can use nsh with current
(Unfortunately I haven't spent the time to setup anoncvs)

Revision 1.27 / (download) - annotate - [select for diffs], Fri Sep 14 16:54:53 2007 UTC (4 years, 8 months ago) by chris
Branch: MAIN
Diff to previous 1.26 (colored)

how did that ever work?

Revision 1.26 / (download) - annotate - [select for diffs], Wed Jan 17 09:57:18 2007 UTC (5 years, 4 months ago) by chris
Branch: MAIN
Diff to previous 1.25 (colored)

Move snapshot date to 2007-01-17

This project has been lagging for a bit of of 2005 and all of 2006

Users need various fixes to run with any recent version of OpenBSD, and
unfortunately no release was made in 2006 to address these issues at all.

Here it is.  More additions are needed to bring up to date with current
OpenBSD functionality, and hopefully I can get to that in the next month.
This better than what was previous released as a snapshot.   Also I'd like
to open anoncvs so people don't have to wait for snapshots, and maybe it
will encourage others to help and pitch in with development more.  I could
really use ideas and help to bring this program further along.  I have not used
nsh in a professional capacity in the past two years, at least not to as
much of a degree as I used to.  This could change at any time, but lately
i'm just too busy on other things.

I still would like to continue with nsh but, obviously, without some
outside help, further enhancements will be rather slow.  Also, I get
a lot of requests from people who do not have very much sophistication
with the C compiler and the OpenBSD environment.  I would encourage people
in this situation to think about what they want to accomplish and try
anyways, because this is a very easy project to work on, and you might
enjoy it...  If you are happy with C and OpenBSD, then there are plenty
of things in here that need to be cleaned up.  The CLI parser can be
largely rewritten, ipsecctl, bgp, etc can all be added, either as
functionality where the ctl executable is called, or with direct kernel
calls.  In most cases, calling the external executable is going to be
preferrable.  If you are interested then talk to me and I can direct you..

Revision 1.25 / (download) - annotate - [select for diffs], Tue Apr 11 11:08:50 2006 UTC (6 years, 1 month ago) by pata
Branch: MAIN
Diff to previous 1.24 (colored)



cleanup according to style(9)
message about non-root usefulness

Revision 1.24 / (download) - annotate - [select for diffs], Tue Aug 30 03:06:19 2005 UTC (6 years, 8 months ago) by chris
Branch: MAIN
Diff to previous 1.23 (colored)

up version to 20050829

Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 30 00:07:41 2005 UTC (6 years, 8 months ago) by chris
Branch: MAIN
Diff to previous 1.22 (colored)

Exit prototype moved ?  include stdlib.h now...

Also, set priv = 1 during cmdrc() mode because passwd.c expects priv = 1
when 'enable secret' is set... As the CLI is reworked, this will disappear.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jun 28 19:42:32 2005 UTC (6 years, 10 months ago) by chris
Branch: MAIN
Diff to previous 1.21 (colored)

20050628

Revision 1.21 / (download) - annotate - [select for diffs], Wed Mar 24 09:07:15 2004 UTC (8 years, 1 month ago) by chris
Branch: MAIN
Diff to previous 1.20 (colored)

Interim release 20040324

Revision 1.20 / (download) - annotate - [select for diffs], Mon Mar 22 03:56:29 2004 UTC (8 years, 1 month ago) by chris
Branch: MAIN
Diff to previous 1.19 (colored)

Move enable() into passwd.c, where cyc's new code makes more sense
(Anyways, commands.c is already bloated enough)

Unfortunately, this makes int priv a global..I tried to move priv,
bridge, editing, and verbose into a struct that gets passed around
appropriately, but I found that is just going to be damn hard with the current
(mis)design (including libedit's need for a prompt function, a function which
also needs to know about priv and bridge...) So, a little more thought
is necessary, but this is a nice extra cleanup for the moment.

Revision 1.19 / (download) - annotate - [select for diffs], Wed Mar 3 08:46:44 2004 UTC (8 years, 2 months ago) by chris
Branch: MAIN
Diff to previous 1.18 (colored)

libedit API changed after OpenBSD 3.4, accomodate that...

Revision 1.18 / (download) - annotate - [select for diffs], Thu Sep 18 19:44:23 2003 UTC (8 years, 8 months ago) by chris
Branch: MAIN
Diff to previous 1.17 (colored)

Clone OpenBSD policy of always using strlcpy, and some other misc source
cleanup, mostly from Vincent Labrecque <vincent@psyfreaks.ca>

Revision 1.17 / (download) - annotate - [select for diffs], Thu Sep 18 19:19:32 2003 UTC (8 years, 8 months ago) by chris
Branch: MAIN
Diff to previous 1.16 (colored)

Bring us to snapshot 20030918

Revision 1.16 / (download) - annotate - [select for diffs], Wed Sep 10 02:12:08 2003 UTC (8 years, 8 months ago) by chris
Branch: MAIN
Diff to previous 1.15 (colored)

optarg isn't guaranteed to stay there, and it shows with the memory
reorganization in openbsd 3.4....

Revision 1.15 / (download) - annotate - [select for diffs], Thu May 15 16:58:58 2003 UTC (9 years ago) by chris
Branch: MAIN
Diff to previous 1.14 (colored)

20030318 -> 20030515

Revision 1.14 / (download) - annotate - [select for diffs], Wed Apr 23 21:56:40 2003 UTC (9 years ago) by chris
Branch: MAIN
Diff to previous 1.13 (colored)

clean up pf rule handling a little bit:
-don't open a rule file and write anything unless there's something to write
this has the side effect of not allowing blank lines in the pf configuration,
although i think that is desirable
-remove any temporary rule file before starting nshrc initialization since
it will be appended later, not over-written

Revision 1.13 / (download) - annotate - [select for diffs], Tue Mar 18 23:10:46 2003 UTC (9 years, 2 months ago) by chris
Branch: MAIN
Diff to previous 1.12 (colored)

Up to version 20030318
And add some documentation to the manual

Revision 1.12 / (download) - annotate - [select for diffs], Tue Feb 18 09:29:46 2003 UTC (9 years, 2 months ago) by chris
Branch: MAIN
Diff to previous 1.11 (colored)

add rcs tags to everything

Revision 1.11 / (download) - annotate - [select for diffs], Mon Feb 10 22:09:50 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.10 (colored)

rfile -> rcfile

Revision 1.10 / (download) - annotate - [select for diffs], Mon Feb 10 08:20:42 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.9 (colored)

import of nsh-20030208
-make static work as static <mac> <member> not the other way around
-that way you can do no static <mac> without specifying a member
-use void where we don't need anything else
-add pfctl handling so that you can edit pf rules, flush pf, save pf.conf in
nshrc (this helps with the goal of keeping all the configuration in one file,
although calling pfctl to begin with is a compromise since pfctl is too
much of a moving target to try and integrate)
-add a manual
-exit if fork fails
-add commands to reboot and shutdown (jose)
-add command to save config (jose)
-add tunnel to conf() output
-add pf to conf() output
-make default mtu table nicer
-same for interface types
-make rtdump easier to handle correctly
-fix botched strlcat conversion in ieee80211 stuff
-improve method to get hardware address for an interface
-/dev/altq/altq becomes /dev/pf

Revision 1.9 / (download) - annotate - [select for diffs], Mon Feb 10 08:10:27 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.8 (colored)

import of nsh-20020619
-use a more macros for better enjoyment
-fix up the toilet flusher to handle arps and routes
-make show route display a specific destination like 'route get' if you
specify an additional argument
-add media types in conf() output
-add powersave to conf() output
-add routes/arps to conf() output
-add media type and hardware address to show interface
-same for network key/powersaving time
-add function that "suprisingly actually works" to get hardware address
-merge ip/netmask/bitmask parser to parse_ip() instead of duplicating code
-strtoul vs atoi becomes an issue
-add capability to setup vlans from interface mode
-get rid of mrtd code from routesys.c and go back to berkeley rtmsg()
-whoops, i forgot to 'cvs add' bridge.c in the last commit!!

Revision 1.8 / (download) - annotate - [select for diffs], Mon Feb 10 07:56:54 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.7 (colored)

import of nsh-20020607
-bridge config support from brconfig
-rant on openbsd routers
-extend interface mode handler to bridges as well (of course, they
are interfaces anyways) but in a rather hackish way
-add broadcast address to conf() output (not displayed if the user did
not make it non-default)
-fix up rate output while there
-add bridge commands to conf() output
-get rid of unused kern_routes()
-start passing a socket along to interface mode support routines instead of
opening and closing them each time
-explain broadcast or pointtopoint in show interface
-display vlan and rate information in show interface
-display average input and output sizes in show interface
-display flags on show interface if verbose
-add a function to find the network address given an IP and netmask
-add a function to find the broadcast address given an IP and netmask
-stop using strlen() where it is completely unnecessary

Revision 1.7 / (download) - annotate - [select for diffs], Mon Feb 10 07:47:55 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.6 (colored)

import of nsh-20020531
-ieee 802.11 interface config support from ifconfig
-add metric to conf() output
-add 802.11 nwid/nwkey to conf() output
-add link flags and no arp to conf() output
-nwid and powersave commands for interface mode

Revision 1.6 / (download) - annotate - [select for diffs], Mon Feb 10 07:43:48 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.5 (colored)

import of nsh-20020521
-make help() autosize output columns
-gently remind users that there is no 'config' command
-add interface mode command to set an ip address
-add interface mode command to set mtu, metric, link flags, and other flags
-have config generator dump metric, link flags, debug flag
and have it only show mtu if it is not a default setting for the interface

Revision 1.5 / (download) - annotate - [select for diffs], Mon Feb 10 07:37:31 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.4 (colored)

import of nsh-20020510
-start at configuration generator conf()
-use -ledit for command line editing and history
-add flush commands
-is_valid_ifname() walks if_nameindex for the lazy

Revision 1.4 / (download) - annotate - [select for diffs], Mon Feb 10 07:31:58 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.3 (colored)

import of nsh-20020415
-allow cmdrc() to feed interface mode commands
-add -v verbose flag
-add compile notes to show version

Revision 1.3 / (download) - annotate - [select for diffs], Mon Feb 10 07:26:15 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.2 (colored)

import of nsh-20020412
-add some -W gems
-get rid of \r\n crap
-add interface mode handler
-vlan stats for show interface
-make rate() work with interface mode handler
-route.c moves to routepr.c
-add route.c as a way to add routes with netmask or bitmask

Revision 1.2 / (download) - annotate - [select for diffs], Mon Feb 10 07:16:16 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN
Diff to previous 1.1 (colored)

import of nsh-20020304
-add README and TODO
-add routing statistics from netstat
-initialize nlist correctly

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Mon Feb 10 07:06:50 2003 UTC (9 years, 3 months ago) by chris
Branch: nsh
CVS Tags: initial
Diff to previous 1.1 (colored)

import of nsh-20020212

Revision 1.1 / (download) - annotate - [select for diffs], Mon Feb 10 07:06:50 2003 UTC (9 years, 3 months ago) by chris
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>