Commit Graph

34 Commits

Author SHA1 Message Date
Gary Palmer
e39a0280cb Change the use if ifnet.if_lastchange to be more in line with
SNMP requirements. Update description of ifnet.if_lastchange in if.h
to indicate this.
1996-06-10 23:07:36 +00:00
Bruce Evans
c5294719c3 Eliminated sloppy common-style declarations. Now there are no duplicated
common labels for LINT.  There are still some common declarations for the
!KERNEL case in tcp_debug.h and spx_debug.h.  trpt depends on the ones in
tcp_debug.h.
1996-04-13 12:45:57 +00:00
Bruce Evans
6ffde942bf Removed never-used #includes of <machine/cpu.h>. Many were apparently
copied from bad examples.
1996-04-07 17:39:28 +00:00
Garrett Wollman
9b44ff2214 Clean up Ethernet drivers:
- fill in and use ifp->if_softc
	- use if_bpf rather than private cookie variables
	- change bpf interface to take advantage of this
	- call ether_ifattach() directly from Ethernet drivers
	- delete kludge in if_attach() that did this indirectly
1996-02-06 18:51:28 +00:00
Poul-Henning Kamp
1ce9bf88c3 Use new printf features rather than local kludges. 1996-01-24 21:12:23 +00:00
Poul-Henning Kamp
f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +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
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
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
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
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
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
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
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
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
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
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
Rodney W. Grimes
d3628763db Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Andrey A. Chernov
3de5725908 pppinput:
Fix serial errors handling
Add no carrier check
1995-03-29 20:34:17 +00:00
Garrett Wollman
69244b69db Support for pseudo-device LKMs. Note that this is restricted to only
one pseudo per module (a restriction which will eventually be lifted) and
isthus not in its final form.
1995-03-20 19:20:44 +00:00
Andrey A. Chernov
a3f80a9b22 *close: just purge tty queues if we can't drain them 1995-02-13 02:09:14 +00:00
Bruce Evans
7b9754ed1f Fix previous change: don't attempt to reserve cblocks if the tty is null. 1994-11-27 15:29:57 +00:00
Bruce Evans
d1a795a280 Fix cblock starvation bugs by reserving enough cblocks for minimal
operation of each clist.  Limit the growth of each clist.  Clists
can only grow larger than the reserved minimum if there are free
cblocks in a shared pool.  The size of this pool is now fixed
(this could be improved).  The reserved and maximum sizes are more
carefully allocated for slip and ppp, depending on the mtu.  A maximum
MTU of 16384 is now enforced for ppp.
1994-11-26 19:24:13 +00:00
Ugen J.S. Antsilevich
033f71c8e2 The long-time-waited-for patch for PPP.
See Gene's mail for explanation..
Submitted by: Gene Stark
1994-11-23 08:29:44 +00:00
Garrett Wollman
cb2646da64 Make it compile again. XXX - this is not really the right way to fix
this problem.
1994-11-01 22:18:34 +00:00
Paul Traina
c9014e4e10 Make PPP compile cleanly 1994-11-01 09:03:20 +00:00
Garrett Wollman
5f62e00893 Install line discipline the new way. 1994-10-05 21:22:45 +00:00
Garrett Wollman
2624cf89f9 A number of bug-fixes inspired by Mark Treacy:
- Allow PPP to run multicasts natively.
- Deal properly with lots of similarly-named interfaces.
- Don't sign-extend if_flags.

NB: the last fix (to rtsock.c) must be reversed when we expand if_flags to a
reasonable size.

Submitted by:	Mark Treacy
1994-10-05 20:11:28 +00:00
Garrett Wollman
45d17740c2 Make the kernel side of PPP compile. 1994-09-23 00:13:22 +00:00
Garrett Wollman
2980d1306a Initial revision 1994-09-23 00:10:32 +00:00