Commit graph

159 commits

Author SHA1 Message Date
Peter Wemm 968757cbee Implement some rudimentry IPX support... 1995-11-28 01:59:19 +00:00
Peter Wemm 8fb90141c8 If a lcp configure request is received in the lcp opened state and it
is acknowledged, it should go to the lcp ack sent state.

Don't reply on lcp echo requests when not in the lcp opened state.

If the interface is set to CISCO mode, it should still be marked
running when ifconfiged.

Fixed a few indentations that had gone wrong somewhere.

Submitted-by: John.Hay@csir.co.za
1995-11-21 01:23:13 +00:00
Poul-Henning Kamp c9d160712f Fix #includes. 1995-11-20 12:29:05 +00:00
Bruce Evans 68e2ef24ca Fixed a comment. 1995-11-18 13:07:51 +00:00
Bruce Evans 27501cb677 Added bogus casts to avoid warnings.
Continued cleaning up sysinit stuff.
1995-11-18 13:01:19 +00:00
Poul-Henning Kamp 5204129576 All net.* sysctl converted now. 1995-11-16 19:00:27 +00:00
Peter Wemm fae92a3f85 Enhance the likelyhood that IPX over ppp will actually work.. :-)
Note that pppd doesn't have an ipxcp.c module for negotiating and confuguring
IPX at startup, but after these mods, you can manually ifconfig IPX addresses
on the interface and it will probably work.. :-)
1995-11-13 22:09:39 +00:00
Bruce Evans 8b25681eb5 Replaced bogus macros for dummy devswitch entries by functions.
These functions went away:

	enosys (hasn't been used for some time)
	enxio
	enodev
	enoioctl (was used only once, actually for a vop)

if_tun.c:
Continued cleaning up...

conf.h:
Probably fixed the type of d_reset_t.  It is hard to tell the correct
type because there are no non-dummy device reset functions.

Removed last vestige of ambiguous sleep message strings.
1995-11-06 00:36:19 +00:00
Bruce Evans 286f8561e2 Replaced bogus macros for entry points to unconfigured line disciplines
by functions.

tty_conf.c:
Cleaned up formatting of tables.

Removed another ARGSUSED for consistency.

conf.h:
Introduced typedefs for line discipline functions.

Backed out most of previous revision (it is done elsewhere).
1995-11-05 20:25:59 +00:00
Bruce Evans 4fda91c705 Moved prototypes for devswitch functions from conf.c and driver sources
to <machine/conf.h>.  conf.h was mechanically generated by
`grep ^d_ conf.c >conf.h'.  This accounts for part of its ugliness.  The
prototypes should be moved back to the driver sources when the functions
are staticalized.
1995-11-04 13:25:33 +00:00
Peter Wemm 96673e6696 Fix the incomplete merge for the IPX code - the internals are different.
Note, the IPX in pppd support is not really there. I suspect that
it may work if you ifconfig it up manually.
1995-11-03 08:42:21 +00:00
Peter Wemm f2d642f969 Re-Zap unused variables in their new location.. :-) 1995-11-01 00:58:43 +00:00
Peter Wemm 1aea408caf Remove the old pppcompress files (btw: these look net-2 derived)
commit merge for bsd_comp.c - I missed this with a *ppp* wildcard.
1995-10-31 20:51:24 +00:00
Peter Wemm f2fdf012d4 Drat.. Missed this one, which #includes ppp-comp.h, not ppp_comp.h 1995-10-31 20:41:32 +00:00
Peter Wemm 45e829f5a5 Merge/update ppp-2.2 kernel parts onto mainline.
Note that the old if_ppp.c has been split in half into if_ppp.c and
ppp_tty.c
1995-10-31 20:24:14 +00:00
Peter Wemm 8511566984 Initial revision 1995-10-31 20:07:32 +00:00
Peter Wemm 71b9cf739a slcompress: split one of the functions into two parts, to allow use by both
if_sl and if_ppp (from ppp-2.2), eliminating the nearly identical
 pppcompress.[ch] code.  Add maximum VJ compression states argument to
 sl_compress_init().
if_sl: call sl_compress_init() with the extra argument.
1995-10-31 19:22:32 +00:00
Peter Wemm 06cc185852 Add a simplistic netisr register routine - I need this now for ppp-2.2. 1995-10-31 19:07:53 +00:00
Poul-Henning Kamp a98ca4699e Second batch of cleanup changes.
This time mostly making a lot of things static and some unused
variables here and there.
1995-10-29 15:33:36 +00:00
Julian Elischer cc6a66f20e Reviewed by: julian and jhay@mikom.csir.co.za
Submitted by:	Mike Mitchell, supervisor@alb.asctmd.com

This is a bulk mport of Mike's IPX/SPX protocol stacks and all the
related gunf that goes with it..
it is not guaranteed to work 100% correctly at this time
but as we had several people trying to work on it
I figured it would be better to get it checked in so
they could all get teh same thing to work on..

Mikes been using it for a year or so
but on 2.0

more changes and stuff will be merged in from other developers now that this is in.

Mike Mitchell, Network Engineer
AMTECH Systems Corporation, Technology and Manufacturing
8600 Jefferson Street, Albuquerque, New Mexico 87113 (505) 856-8000
supervisor@alb.asctmd.com
1995-10-26 20:31:59 +00:00
Garrett Wollman 3ba6426d14 Change signature of rt->rt_output() so that it is compatible with
ifp->if_output() functions.  This way, initial implementations of
rt_output functionality can just lazily use if_output until customized
versions are written.
1995-10-16 20:53:55 +00:00
Garrett Wollman aca1a47cb4 When adding a route fails because there is already a route with the same
(mask,value) in the tree, don't immediately return EEXIST.  Instead, check
to see if the pre-existing route was generated by protcol-cloning.  If so,
then it is OK to simply blow away the old route and re-attempt the insertion.
If not, then fall back to the same error code as before.
1995-10-16 19:09:40 +00:00
Garrett Wollman 233b60cec4 Say goodbye to IFF_NOTRAILERS. Support for trailers was officially
dropped for 4.4, but for some reason this flag lived on.  (Until
today, that is.)
1995-10-13 19:48:06 +00:00
Garrett Wollman ed07cc7f09 Protect against routing socket messages with way-too-big address families.
Submitted by:	Keith Sklower by way of Paul Traina
1995-10-13 16:01:59 +00:00
Bruce Evans 4ab32c3430 Fix types of sysctl functions. Add prototypes. Cosmetic. 1995-10-09 04:06:28 +00:00
Bruce Evans 9cdeffd562 Don't wait for output to drain in pppclose(). Discard output immediately
for the same reasons as in slclose().

Free the cblock in the canonical queue in pppclose().  This is a no-op in
the usual cases where the tty is being closed or the line discipline is
being switched back to the standard discipline, but it saves a cblock if
the line discipline is being switched to one that doesn't use the canonical
queue.

Add prototypes.  I use `extern' in prototypes for functions with bogus
linkage.  This should be fixed someday.

Continue cleaning up new init stuff yet again.
1995-10-05 00:33:27 +00:00
Jordan K. Hubbard 9e8433e6e0 This upgrades the driver for Cronyx-Sigma multiplexor boards
from version 1.2 to version 1.9.
Submitted by:	Serge Vakulenko, <vak@cronyx.ru>
1995-10-04 22:24:16 +00:00
Garrett Wollman e9a30d0016 Add newline at end of log message and reduce log level to INFO from NOTICE. 1995-09-27 15:00:49 +00:00
Garrett Wollman e508a00419 Add BPF and IP multicast capabilities to the tun' and lp' network
interfaces.

Submitted by:	Bill Fenner <fenner@parc.xerox.com>
1995-09-25 16:57:54 +00:00
Garrett Wollman 963e4c2a50 Fix BPf to generate a header mbuf for writes.
Fix loopback and discard interfaces to understand BPF writes.
(These two from Bill Fenner to fix PR 512.)

Move ifpromisc() from bpf.c to if.c as suggested by comment in BPF.
Send a notice to the log when promiscuous mode is enabled.
1995-09-22 17:57:48 +00:00
Garrett Wollman 2eeab93993 Only print `bpf: foo0 attached' if bootverbose. 1995-09-20 20:48:29 +00:00
Andrey A. Chernov f7f7fe111b Clear SC_OUTWAIT after checking of free clists, not before 1995-09-17 23:38:29 +00:00
Bruce Evans 6b435e575c Call output process in slstart() whether or not there is any output. As
in pppstart(), the output process may be overloaded to handle hardware
flow control and hardware output completions.

Don't wait for output to drain in slclose().  Discard output immediately.
New output is not prevented while processes are waiting for output to
drain (this is a bug), so the wait was sometimes forever.  Infinite
waits are also possible when CCTS_OFLOW is enabled and CTS is down.
Infinite waits were also caused by the above bug in slstart().

Start changing new init stuff yet again: rename unused arg `dummy'.

Reviewed by:	davidg
1995-09-10 12:22:59 +00:00
David Greenman 4590fd3a2a Fixed init functions argument type - caddr_t -> void *. Fixed a couple of
compiler warnings.
1995-09-09 18:10:37 +00:00
Bruce Evans 6003967057 Fix benign type mismatches in devsw functions. 82 out of 299 devsw
functions were wrong.
1995-09-08 11:09:15 +00:00
Garrett Wollman a5d3a8f99b Add a few hooks (in the form of an array of four void *'s) to allow
various bits of software to save some data in the ifnet structure without
having to constantly change the declaration thereof.
1995-08-31 15:21:31 +00:00
Bruce Evans b6f5c0b824 Fix several sysinit functions that had the wrong type and unnecessarily
external linkage.

Remove useless comments saying that SYSINIT() does system initialization.
1995-08-30 00:33:22 +00:00
Julian Elischer 2b14f991e6 Reviewed by: julian with quick glances by bruce and others
Submitted by:	terry (terry lambert)
This is  a composite of 3 patch sets submitted by terry.
they are:
New low-level init code that supports loadbal modules better
some cleanups in the namei code to help terry in 16-bit character support
some changes to the mount-root code to make it a little more
modular..

NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able
to test those cases..

certainly mounting root of disk still works just fine..
mfs should work but is untested. (tomorrows task)

The low level init stuff includes a total rewrite of init_main.c
to make it possible for new modules to have an init phase by simply
adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can
be added to the kernel without editing any other files other than the
'files' file.
1995-08-28 09:19:25 +00:00
Bruce Evans bf25be48a5 Make everything except the unsupported network sources compile cleanly
with -Wnested-externs.
1995-08-16 16:14:28 +00:00
Bruce Evans 0d0e55bbbd Obtained from: an ancient patch of mine via 1.1.5
Call output process whether or not there is any output.  The output
process may be overloaded to handle hardware flow control and
hardware output completions.
1995-07-31 21:54:46 +00:00
Bruce Evans 9fa18570a2 Obtained from: partly from ancient patches of mine via 1.1.5
Introduce TS_CONNECTED and TS_ZOMBIE states.  TS_CONNECTED is set
while a connection is established.  It is set while (TS_CARR_ON or
CLOCAL is set) and TS_ZOMBIE is clear.  TS_ZOMBIE is set for on to
off transitions of TS_CARR_ON that occur when CLOCAL is clear and
is cleared for off to on transitions of CLOCAL.  I/o can only occur
while TS_CONNECTED is set.  TS_ZOMBIE prevents further i/o.

Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp)
and TSA_HUP_OR_INPUT(tp).  The former address is now used only for
off to on carrier transitions and equivalent CLOCAL transitions.
The latter is used for all input events, all carrier transitions
and certain CLOCAL transitions.  There are some harmless extra
wakeups for rare connection- related events.  Previously there were
too many extra wakeups for non-rare input events.

Drivers now call l_modem() instead of setting TS_CARR_ON directly
to handle even the initial off to on transition of carrier.  They
should always have done this.  l_modem() now handles TS_CONNECTED
and TS_ZOMBIE as well as TS_CARR_ON.

gnu/isdn/iitty.c:
Set TS_CONNECTED for first open ourself to go with bogusly setting
CLOCAL.

i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c:
We fake carrier, so don't also fake CLOCAL.

kern/tty.c:
Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to
test CLOCAL.  TS_ISOPEN was tested instead, but that broke when we disabled
the clearing of TS_ISOPEN for certain transitions of CLOCAL.

Testing TS_CONNECTED fixes ttyselect() returning false success for output
to devices in state !TS_CARR_ON && !CLOCAL.

Optimize the other selwakeup() call (this is not related to the other
changes).

kern/tty_pty.c:
ptcopen() can be declared in traditional C now that dev_t isn't short.
1995-07-31 21:02:00 +00:00
Peter Wemm f0448ae4a2 Fix panic("ifpromisc failed") when shutting down a bpf tap when the attached
interface is no longer IFF_UP.
The test for IFF_UP in ifpromisc is only useful while enabling IFF_PROMISC
and the higher levels of the bpf code do not allow for the possibility of
failure while shutting down.  This is a trivial change.
Also, fixes PR#522.
1995-07-31 10:35:36 +00:00
Bruce Evans 267513a942 Obtained from: partly from ancient patches by ache and me via 1.1.5
Remove nullmodem().

It may be useful to have a null modem routine, but nullmodem()
wasn't one.  nullmodem() was identical to ttymodem() except it
didn't implement MDMBUF (carrier) flow control, didn't do any
wakeups for off to on carrier transitions, and didn't flush the
i/o queues for on to off carrier transitions (flushing has the side
effect of waking up readers and writers) although it did generate
SIGHUPs.  The wakeups must normally be done even if nullmodem() is
null in case something is sleeping waiting for a carrier transition.
In any case, the wakeups should be harmless.  They may cause bogus
results for select(), but select() is already bogus for nonstandard
line disciplines.
1995-07-29 13:40:13 +00:00
Bruce Evans 28f8db1403 Eliminate sloppy common-style declarations. There should be none left for
the LINT configuation.
1995-07-29 11:44:31 +00:00
Bruce Evans 6644e30617 Obtained from: partly from ancient patches by ache and me via 1.1.5
Nuke `symbolic sleep message strings'.  Use unique literal messages so that
`ps l' shows unambiguously where processes are sleeping.
1995-07-21 20:57:15 +00:00
Bruce Evans 97e156674d Don't include <sys/tty.h> in drivers that aren't tty drivers or in general
files that don't depend on the internals of <sys/tty.h>
1995-07-16 10:13:08 +00:00
Garrett Wollman 8e718bb4af When adding a route, set rt_ifa and rt_ifp a little earlier so that
the protocol-specific add routine can examine it if desired.
1995-07-10 15:22:37 +00:00
Joerg Wunsch 6f64074e6b Move some struct definitions outside of struct's, so their scopes for
C++ will match the scopes for C.

Submitted by:	Warner Losh
1995-07-09 08:12:27 +00:00
Joerg Wunsch 78988ab839 PR #kern/600: PPP does not pay attention to IPTOS_LOWDELAY
Kernel PPP doesn't pay attention to IPTOS_LOWDELAY, but uses
        a table of port numbers, which isn't a generic method.  The following
        patch fixes this (the table is still used, but in addition
        PPP queues the packet in fastq if IPTOS_LOWDELAY is set.

Obtained from:	Tatu Ylonen <ylo@cs.hut.fi>
Submitted by:	Heikki Suonsivu <hsu@clinet.fi>
1995-07-08 16:34:55 +00:00
David Greenman ef59de8517 Worked around a bug with if.c setting the interface up even when we don't
want it to.
1995-07-07 01:13:49 +00:00