freebsd-nq/sys/net
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
..
bpf_compat.h
bpf_filter.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
bpf.c Fix panic("ifpromisc failed") when shutting down a bpf tap when the attached 1995-07-31 10:35:36 +00:00
bpf.h Give the BPF the ability to generate signals when a packet is available. 1995-06-15 18:11:00 +00:00
bpfdesc.h Give the BPF the ability to generate signals when a packet is available. 1995-06-15 18:11:00 +00:00
fddi.h Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_arp.h
if_disc.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_dl.h Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_ethersubr.c Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
if_fddisubr.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_llc.h
if_loop.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_ppp.c Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
if_ppp.h Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_sl.c Obtained from: partly from ancient patches of mine via 1.1.5 1995-07-31 21:02:00 +00:00
if_slvar.h Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_sppp.h
if_spppsubr.c Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
if_tun.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_tun.h Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
if_types.h Fixed comment - IFT_P80 is 80mbit. 1995-02-25 15:57:55 +00:00
if.c Don't skip point-to-point interfaces if the netmask==0 (the netmask 1995-06-28 05:31:03 +00:00
if.h Move some struct definitions outside of struct's, so their scopes for 1995-07-09 08:12:27 +00:00
netisr.h Make networking domains drop-ins, through the magic of GNU ld. (Some day, 1995-05-11 00:13:26 +00:00
pppcompress.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
pppcompress.h Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
radix.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
radix.h Incorporate new radix code from UCB. This fixes the orphaned mask bugs. 1995-04-28 23:01:37 +00:00
raw_cb.c Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
raw_cb.h Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
raw_usrreq.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
route.c Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
route.h Eliminate sloppy common-style declarations. There should be none left for 1995-07-29 11:44:31 +00:00
rtsock.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
slcompress.c Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
slcompress.h Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
slip.h Fix misplaced idempotency #endif. 1995-04-29 15:24:00 +00:00