summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/defs.c
Commit message (Collapse)AuthorAgeFilesLines
* Make ppp WARNS=5 cleanbrian2004-09-051-8/+15
|
* o Clean up some #includesbrian2002-05-141-1/+0
| | | | | | | | | | | | | | | | | | o Bump version number to 3.0.4 o When talking to a RADIUS server, provide a NAS-Port-Type. When the NAS-Port-Type is Ethernet, provide a NAS-Port value equal to the SESSIONID from the environment in direct mode or the NGM_PPPOE_SESSIONID message in other modes. If no SESSIONID is found, default to the interface index in client mode or zero in server mode. When the NAS-Port-Type is ISDN, set the NAS-Port to the minor number of the physical device (ie, the N in /dev/i4brbchN). This makes it easier for the RADIUS server to identify the client WRT accounting data etc. Prompted by: lsz8425 <lsz8425@mail.cd.hn.cn>
* When it's necessary to kldload tun(4), don't forget to re-try to openbrian2002-04-151-4/+10
| | | | | | tun0. Submitted by: qhwt@myrealbox.com
* Merge the NETGRAPH branch into HEAD. tty devices now use netgraph's linebrian2002-03-301-1/+27
| | | | | | | | discipline to do the async escaping, but no other benefits are available yet. Change ``ifdef HAVE_DES'' to ``ifndef NODES'' for consistency. Make the Makefile a little more sane WRT RELEASE_CRUNCH.
* Handle B460800 and B921600 being defined in <termios.h>brian2002-03-121-0/+6
|
* Add a ``log'' command for logging specific information.brian2001-11-031-0/+17
| | | | | | | | | | | | | | Add an ``UPTIME'' variable to indicate the bundle uptime. It's now possible to put something like this in ppp.linkdown for a server setup: MYADDR: log Session closing: User USER, address HISADDR, up UPTIME Fixed some memory leakage with commands that expand words. Made some functions static. Fixed a diagnostic bug (iface add .... SIOCDIFADDR)
* Correct the arg count after parsing a line with an unescaped # that isn'tbrian2001-06-151-3/+2
| | | | | | preceeded with whitespace. MFC after: 3 weeks
* Ignore ``#'' properly when told tobrian2000-10-281-1/+1
|
* Create fd_sets big enough to handle getdtablesize() descriptors.brian2000-10-091-0/+12
|
* libutil.h is no longer required for setproctitle()brian2000-09-021-5/+0
|
* Use arc4random() instead of random()brian2000-08-311-1/+3
|
* Don't treat two or more whitespace followed by a comment asbrian2000-08-301-6/+11
| | | | | | | an empty argument PR: 20937 (maybe) PR: 20938
* Use srandom() under OpenBSDbrian2000-08-291-1/+1
| | | | Submitted by: Matt Behrens <matt@megaweapon.zigg.com>
* setproctitle() doesn't need to be called with root privs, so movebrian2000-08-161-0/+16
| | | | it from id.c into defs.c
* When running ppp -background, show comfort messages showingbrian2000-04-071-0/+16
| | | | | | | | when we're redialing/reconnecting. While we're here, log redial, reconnect and phone number announcements to LogCHAT, and reduce some other logging to LogDEBUG.
* don't treat # specially if PARSE_NOHASH is passedbrian2000-03-281-2/+2
|
* When ppp can't identify the relevant name, don't use "???", usebrian2000-03-141-0/+27
| | | | <nnn> or <0xxxx> instead.
* Actually ignore comments at the end of lines - broken with the commitbrian2000-01-271-1/+1
| | | | that made ppp *not* treat #s in quoted arguments as comments.
* Don't allowt '#' as a comment when it's embedded in quotes:brian1999-12-271-5/+6
| | | | | | | | set something "xxx yyy # zzz" aaa shouldn't be interpreted as set something "xxx yyy" aaa
* Understand double-quotes anywhere on a command line in the samebrian1999-12-231-16/+12
| | | | | way that a shell does. The previous way ppp did it just didn't make any sense.
* Don't munge ``set dial|login|logout|hangup'' arguments beforebrian1999-12-221-6/+9
| | | | ExpandString() has a chance to do its own substitutions.
* Handle comments at the end of lines.brian1999-12-201-19/+13
|
* Notice and warn about unterminated quoted strings in commands.brian1999-12-201-1/+4
| | | | The entire command is ignored if the syntax is invalid...
* Make -foreground a proper option (allowing ``allow mode foreground'',brian1999-11-281-0/+1
| | | | ``set mode foreground'' etc.
* Back out the bogus #ifdef __NetBSD__ #include <signal.h> lines.brian1999-09-211-3/+0
| | | | | | | The original report was due to a mis-installation of the NetBS header files :-/ Submitted by: Kazuyoshi Kato <kazk@yyy.or.jp>
* NetBSD has moved ``extern int errno;'' to signal.h :-/brian1999-09-201-0/+3
| | | | Submitted by: Kazuyoshi Kato <kazk@yyy.or.jp>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Handle unterminated quoted strings without dup'ing the last characterbrian1999-05-271-3/+3
| | | | with an out-by-one-memcpy.
* o Redesign the layering mechanism and make the aliasing code part ofbrian1999-05-081-1/+167
| | | | | | | | | | | | | | | | | | | | | the layering. We now ``stack'' layers as soon as we open the device (when we figure out what we're dealing with). A static set of `dispatch' routines are also declared for dealing with incoming packets after they've been `pulled' up through the stacked layers. Physical devices are now assigned handlers based on the device type when they're opened. For the moment there are three device types; ttys, execs and tcps. o Increment version number to 2.2 o Make an entry in [uw]tmp for non-tty -direct invocations (after pap/chap authentication). o Make throughput counters quad_t's o Account for the absolute number of mbuf malloc()s and free()s in ``show mem''. o ``show modem'' becomes ``show physical''.
* #include <errno.h>, not <sys/errno.h>brian1999-04-261-2/+2
|
* Parse IP addresses more securely - specifically, don't allowbrian1999-02-251-1/+38
| | | | | | | | a bum name to return as 0.0.0.0... we don't want ``delete xxx'' to delete the default route when xxx doesn't resolve. Support IP number specifications as the host when specifying a tcp-style device (rather than *just* hostnames).
* Remove redundant includesbrian1998-06-271-1/+3
|
* o De-staticise things that don't need to be static.brian1998-06-151-2/+2
| | | | | | | | | | o Bring the static ``ttystate'' into struct prompt so that the tilde context is per prompt and not global. o Comment the remaining static variables so that it's clear why they're static. o Add some XXX comments suggesting that our interface list and our hostname should be re-generated after a signal (say SIGUSR1) so that a machine with PCCARDs has a chance.
* o Make modes consistent throughout ppp. The same strings are usedbrian1998-05-291-5/+5
| | | | | | | | | | | | | | | in `set mode', `allow modes', on the command line and when outputting mode names. The strings are matched so that only enough characters to uniquely identify the string are required, so you can now ppp -a mylabel (for auto mode) ppp -b mylabel (for background mode) ppp -dd mylabel (for direct dial mode) etc. o Make -ddial dial when specified on the command line (oops). Pointed out by: Alex <garbanzo@hooked.net>
* srandomdev() isn't available in all 2.* versions. Onlybrian1998-05-291-2/+2
| | | | use it for version 3 (-current) & up.
* MFMP: Make ppp multilink capable.brian1998-05-211-61/+58
| | | | See the file README.changes, and re-read the man page.
* Correct #ifdef for __FreeBSD__ < 3brian1998-03-131-2/+3
|
* Remove unused #includes.brian1998-01-211-2/+1
| | | | | | Make various bits static. Remove unused variables. Submitted by: eivind
* Typo in error message.brian1997-12-301-2/+2
|
* Show who closes the diagnostic connection.brian1997-12-271-3/+4
| | | | | | Show the IP range (if specified) in "show ipcp". Close unused descriptors 0 and 2 in interactive mode. Pass (size_t *) rather than (int *) to sysctl().
* Cosmetic (style):brian1997-12-241-3/+3
| | | | | | | sizeof(var) -> sizeof var sizeof type -> sizeof(type) Suggested by: J Wunsch <j@uriah.heep.sax.de>
* strncpy(x,y,sizeof(x)) --> strncpy(x,y,sizeof(x)-1)brian1997-12-231-2/+2
| | | | | Suggested by: Philippe Charnier <charnier@lirmm.fr> Theo de Raadt <deraadt@cvs.openbsd.org>
* Add (BSD) copyright headers.brian1997-12-211-2/+26
|
* Fix prototypes.brian1997-11-221-2/+7
| | | | | | | | | | | | | | Remove extraneous decls. Add ``const'' to several places. Allow ``make NOALIAS=1'' to remove IP aliasing. Merge with OpenBSD - only the Makefiles vary. We can now survive a compile with -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts (although the Makefile just contains -Wall).
* Add and use a DropClient() function for closing the diagnostic port.brian1997-11-181-1/+17
| | | | Call DropClient() from Cleanup() too.
* Add id strings to tun.[ch].brian1997-11-171-1/+29
| | | | Don't try to open ppp.secret if we're never going to use it.
* Finish the security improvements:brian1997-11-111-2/+19
| | | | | | | | | | | | | | | | | | | o Add "allow" command: "allow users a b c" gives access to users a, b and c. "allow modes auto" gives those users access to auto mode only. "allow users *" and "allow modes *" are accepted. No users and all modes are allowed by default. UID 0 can do anything. o Set the current label with the "load" and "dial" commands so that the call to ppp.linkdown makes sense. o Up the verison number. o Don't OR MODE_AUTO for -background and -ddial. o Don't OR MODE_INTER when we get a diagnostic connection. o Allow up to 40 args per line (was 20). o "set ifaddr" only changes the interface in AUTO mode (with other modes, it happens after IPCP negotiation). o Sort command descriptions in the man page. o Support -dedicated mode where we just talk ppp forever (no login etc).
* Cosmetic (no functional changes):brian1997-10-261-0/+26
o Add missing $Id$s o Move extern decls from .c -> .h files o Staticize o Remove #includes from .h files o style(9)ify includes o bcopy -> memcpy bzero -> memset bcmp -> memcmp index -> strchr rindex -> strrchr o Move timeout.h -> timer.h (making it consistent w/ timer.c) o Add -Wmissing-prototypes
OpenPOWER on IntegriCloud