Commit Graph

375 Commits

Author SHA1 Message Date
Eivind Eklund
5591b823d1 Make COMPAT_43 and COMPAT_SUNOS new-style options. 1997-12-16 17:40:42 +00:00
Eivind Eklund
430df5f4b7 Throw options IPX, IPXIP and IPTUNNEL into opt_ipx.h.
The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and
ifconfig.c only).

I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code
inside, as it never could have compiled - doh.)
1997-12-15 20:31:25 +00:00
Bruce Evans
239b7b699e Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that are
not handled at a particular level.  This fixes mainly restarting
of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
1997-12-06 13:25:01 +00:00
Bruce Evans
a0f1e323d0 Unstaticized rn_delete() and rn_lookup(). They are used in dark corners
of netatalk (if NETATALKDEBUG is configured).

Removed stray semicolons.
1997-11-24 13:50:24 +00:00
Bruce Evans
517c5ddbd3 Removed now-unused blocking mode flag. 1997-11-18 16:37:04 +00:00
Bruce Evans
9a43455f43 Removed unused #includes.
Fixed gratuitous ANSIisms.

Fixed nonblocking mode.  It was per-device instead of per-file.
1997-11-18 16:36:15 +00:00
Bruce Evans
fba9235d76 Removed unused #includes.
Fixed nonblocking mode.  It was per-device instead of per-file.  This
also fixes clobbering of bd_rtout by overloading it to hold a wrong
version of the blocking flag.  I hope nothing depends on the bugs.
1997-11-18 16:29:53 +00:00
Bruce Evans
42d263adde Don't test for conflicting combinations of PPP_FILTER/BPFILTER here.
Testing in if_ppp.c is good enough.

Added comments about bogus #includes and #defines.

Removed unused #includes.

Don't depend on gcc's misfeature of rewriting short args in old-style
function definitions to match wrong prototypes.  I just changed the
function definition to match the prototype, since this is easy to
verify automatically (it causes no changes in the object code), but
it breaks K&R1 support and doesn't fix the pessimal type.
1997-11-18 14:08:51 +00:00
Bruce Evans
6418d75452 Cleaned up PPP_FILTER/NBPFILTER ifdefs.
Use gettime() instead of microtime() to set if_lastchange for i/o's.
microtime() is probably too expensive.  However, setting if_lastchange
for i/o's may be wrong.
1997-11-18 13:52:41 +00:00
Bruce Evans
16355bd11c Use gettime() instead of assignment from time'. (time' is too
volatile to use outside of splclock().  microtime() is probably too
expensive to use for every i/o.  However, setting ifi_lastchange for
every i/o is just wrong according to the comment about ifi_lastchange
in <net/if.h>.  It is set then for atm, fddi and the latest version
of ppp.)
1997-11-18 13:37:56 +00:00
Poul-Henning Kamp
4a11ca4e29 Remove a bunch of variables which were unused both in GENERIC and LINT.
Found by:	-Wunused
1997-11-07 08:53:44 +00:00
David Greenman
95b6073cd5 Fixed bug in RTM_ADD where rmx_locks weren't being set on the new route,
preventing "route add default 1.2.3.4 -lock -mtu 1500" from working as
expected (which is, BTW, to disable Path MTU Discovery).
1997-10-31 08:53:13 +00:00
Julian Elischer
de1e682d58 didn't even know fddi had the atalk support.
fix it here too. (really needs more of the fixes from the ethernet)
1997-10-29 07:59:27 +00:00
Julian Elischer
1d0eab59d3 Fix various problems with netatalk kernel support.
Some of these changes are a bit rough and will become
more polished later.  the changes to if_ethersubr should largely be moved
to within the appletalk code, but that will happen later.
A few of these were related to network-byteorder problems,
and more were related to loopback failures.
1997-10-29 00:30:52 +00:00
Bruce Evans
55b211e3af Removed unused #includes. 1997-10-28 15:59:26 +00:00
Peter Wemm
635de877cb Braino on my part.. a #define isn't a reference to a structure, so the
struct only needs to be defined if the macro is used.

Pointed out by: bde
1997-10-18 09:02:39 +00:00
Peter Wemm
7a387305bb Convert PPP_FILTER to an option, like PPP_BSDCOMP and PPP_DEFLATE.
It requires bpf, I'll note this in LINT.
1997-10-18 01:20:28 +00:00
Peter Wemm
c871745648 Better fix for the bpf dependency that doesn't have such a large impact
on the code and pppd in userland.  PPP_FILTER is meant to be an option (or
negatable option).
1997-10-18 00:56:23 +00:00
Peter Wemm
d11c4262eb Back out the `PPP_FILTER => NBPFILTER' changes. 1997-10-18 00:49:59 +00:00
Peter Wemm
f2189317fa Back out the `PPP_FILTER => NBPFILTER' changes 1997-10-18 00:46:10 +00:00
Ollivier Robert
1f7ce4e6c9 A better fix for both kernel and LKM compilation. 1997-10-17 21:50:32 +00:00
Ollivier Robert
eacd95ff9e Change PPP_FILTER into NBPFILTER to fix kernel compilation.
It should probably be changed in ppp_tty.c for consistency but I'll let
Brian deal with this.

Forgotten by:	brian
1997-10-17 21:30:30 +00:00
Brian Somers
c647c98349 PPP_FILTER => NBPFILTER 1997-10-17 00:12:38 +00:00
Poul-Henning Kamp
a1c995b626 Last major round (Unless Bruce thinks of somthing :-) of malloc changes.
Distribute all but the most fundamental malloc types.  This time I also
remembered the trick to making things static:  Put "static" in front of
them.

A couple of finer points by:	bde
1997-10-12 20:26:33 +00:00
Joerg Wunsch
1f6b09ad8b Jumbo patch to implement PAP and CHAP for sppp(4). Partially based on
Serge's (Cronyx's) code in the vendor branch.  (FR support not yet
merged.)
1997-10-11 11:25:28 +00:00
Peter Wemm
b476a2db23 Try out PPP_FILTER 1997-10-10 11:57:43 +00:00
Andrey A. Chernov
44a8636f2a Preserve old SC_STATIC value after units exchange 1997-10-07 09:13:06 +00:00
Joerg Wunsch
d7189ec67c Ooops, this should have made it into the same commit, but didn't.
Introduce the SIOC[SG]IFGENERIC hooks that can be used to pass an
arbritrary ioctl subcommand into an interface driver.  Surprisingly
enough, there was no provision for this already present (except of the
option of abusing SIOC[SG]IFMEDIA for this).

The idea is that an interface driver can establish ioctl subcommands
of its own that can't be meaningfully interpreted by the upper layer
interface ioctl function.  Something like this is required to
implement a clean solution of passing down things like CHAP secrets or
PPP options to the /sys/net/if_sppp* files.  (Yes, my CHAP is now
finally working with it, but i gotta update my kernel to the new
callout interface before being able to commit _that_.)

Reviewed by:    peter   [long ago, actually]
1997-10-07 07:40:35 +00:00
Julian Elischer
ed0af9bc44 Allow interfaces to be attached to bpf at times other than boot.
doing so without this patch leads to an infinite loop in the kernel.
1997-10-03 21:32:05 +00:00
John Dyson
0639feb218 Remove an unfortunate name clash with the zalloc/zfree routines. Since the
ppp_deflate code uses the names locally - it looses.
1997-09-21 22:31:20 +00:00
Justin T. Gibbs
6c951b4441 Update for new callout interface. 1997-09-21 22:02:25 +00:00
Bruce Evans
514ede0953 Fixed gratuitous ANSIisms. 1997-09-16 11:44:05 +00:00
Peter Wemm
f8f6cbba92 Update network code to use poll support. 1997-09-14 03:10:42 +00:00
Peter Wemm
e0e8ed506f Update select -> poll 1997-09-14 03:09:01 +00:00
Peter Wemm
243ac7d85a select -> poll
Obtained from: NetBSD (I think)
1997-09-14 03:03:05 +00:00
Joerg Wunsch
bc6d9b8094 Fix a typo that becomes apparent when compiling without COMPAT_443.
Submitted by:	Tony Kimball <Anthony.Kimball@East.Sun.COM>
1997-09-07 11:09:22 +00:00
Bruce Evans
a3199409b8 Some staticized variables were still declared to be extern. 1997-09-07 08:49:04 +00:00
Bruce Evans
bea0f0be7b Some staticized variables were still declared to be extern. 1997-09-07 05:27:26 +00:00
Bruce Evans
4d1d4912ae Added used #include - don't depend on <sys/mbuf.h> including
<sys/malloc.h> (unless we only use the bogusly shared M*WAIT flags).
1997-09-02 01:19:47 +00:00
Bruce Evans
e8af045620 Removed unused #includes. 1997-09-01 02:18:13 +00:00
Julian Elischer
7ed8f465e7 Add a per-interface-address pointer to a function that can be supplied
by a protocol, to detirmine if an address matches the net this address
is part of.  This is needed by protocols for which netmasks
"just don't work", for example appletalk.

Also add the code in appletalk to make use of this new feature.
Thsi fixes one of the longest standing bugs in appletalk.
The inability to talk to machines to which the path is via a router
which is on a different net, but the same netrange, as your interface.
Protocols that do not supply this function (e.g. IP) should not be affected.
1997-08-28 01:17:12 +00:00
Julian Elischer
7e2a6151f5 add some comments while trying to understand why appletalk
gets some things wrong.
(part of my continuing "comment it as you understand it" effort :)
1997-08-22 22:47:27 +00:00
Peter Wemm
080ea4d851 Some fixes from Bruce:
- don't access time (a volatile) via struct copy.
  - merge botches
  - note risk of CCOUNT accessing *tp outside spltty().

Submitted by:  bde
1997-08-22 11:34:08 +00:00
Peter Wemm
3b053446d4 Remove some stray extra prototypes 1997-08-19 17:07:07 +00:00
Peter Wemm
13c497114e Use two NetBSD-style options (PPP_DEFLATE and PPP_BSDCOMP) to control
whether or not to compile the two ppp compression methods.
1997-08-19 17:05:26 +00:00
Peter Wemm
2d4b190bc5 Update kernel parts of pppd from 2.2.0 to 2.3.0. I've yet to look at the
2.3.0 -> 2.3.1 changes, but I seem to recall that there are certain
"issues" with 2.3.1 (I'm not sure if it's just pppd or the whole lot, I
am not quite that far).  The present pppd seems to work with it just fine
for the time being.

Among the changes are that zlib (aka LZ77 aka deflate aka gzip) compression
is implemented as well as the original compress(1) LZW style.
1997-08-19 14:10:50 +00:00
Garrett Wollman
57bf258e3d Fix all areas of the system (or at least all those in LINT) to avoid storing
socket addresses in mbufs.  (Socket buffers are the one exception.)  A number
of kernel APIs needed to get fixed in order to make this happen.  Also,
fix three protocol families which kept PCBs in mbufs to not malloc them
instead.  Delete some old compatibility cruft while we're at it, and add
some new routines in the in_cksum family.
1997-08-16 19:16:27 +00:00
Andrey A. Chernov
6e5334121f SUNIT: exchange up/down states too 1997-08-13 14:57:14 +00:00
Kenjiro Cho
2c060c765a Fix a traceroute problem in the CISCO HDLC mode. (cisco routers not
returning ICMP_TIMXCEED)

use CISCO_UNICAST instead of CISCO_MULTICAST to send normal packets.
this is needed for packets to get processed by a cisco router,
but doesn't matter if a packet is just forwarded.

Reviewed by:itojun@itojun.org
1997-08-12 05:22:54 +00:00
Joerg Wunsch
16e2a68bff Implement the LCP fail_counter: if an option has been NAK'ed for more
than max_failures attempts, we are going to REJ it, to prevent endless
NAK loops.

(This is actually part of a larger local set of modifications i'm
running with, but the remainder (PAP & CHAP) ain't ready for prime-
time yet.)
1997-08-10 14:28:16 +00:00