Commit Graph

303 Commits

Author SHA1 Message Date
Joerg Wunsch 75eeeb9273 Fix a couple of log()'s that came out with the wrong (default)
log level, as opposed to LOG_DEBUG.
1997-05-23 20:40:15 +00:00
Joerg Wunsch 32ef6b86b5 Introduce a third queue per interface, serving only PPP control
protocol packets.  This queue is the only one being enabled until
network phase has been reached.
1997-05-22 22:15:39 +00:00
Joerg Wunsch 07f0846feb Major nit: i've confused link0 and link1 in my brain and/or in either
the man page or the source file.  Fix this.

Minor problem: don't choke with ENETDOWN early.  As long as our output
queue has space, put the IP packets there even if IPCP ain't up yet.
We will eventually be able delivering them once the PPP state machine
came up.
1997-05-20 22:54:04 +00:00
Joerg Wunsch 00081cc989 Major overhaul of the SyncPPP layer. Basically, this comprises now a
full implementation of the sate machine as described in RFC1661, and
provides support for plugging in various control protocols.  I needed
this to provide PPP support for the BISDN project (right now).

Unfortunatley, while the existing API was almost up to the point, i
needed one minor API change in order to decouple the this-layer-
started and this-layer-finished actions from the respective Up and
Down events of the lower layer.  This requires two additional lines in
the attach routines of all existing lower layer interface drivers that
are using syncPPP (shortcutting these actions and events).  Apart from
this, i believe i didn't change the API of all this, so everything
should plug in without too many hassles.  Please report if i broke
something in the existing drivers.

For a list of features (including new ones like dial-on-demand), and
things still to be done, please refer to the man page i'll commit asap.

Encouraged by:	Serge Vakulenko <vak@cronyx.ru>
1997-05-19 22:03:09 +00:00
Joerg Wunsch db99d43f6f Make sppp's logging human-readable. Also, use log(9), as opposed to
printf(9), so the log output doesn't clutter the console.

While i was at it, KNFified some function definitions.  This file was
very inconsistent in this respect.
1997-05-11 10:04:24 +00:00
John Hay b1c9d77e44 Use the MAC address of an interface for the host part of an IPX address
and not the MAC address of the first interface for every IPX address.
This is more inline with the way others like Novell do it.
Originally Submitted by: "Serge A. Babkin" <babkin@hq.icb.chel.su>
1997-05-10 10:01:32 +00:00
Kenjiro Cho 68713f97a1 merge ATM driver 1997-05-09 12:19:06 +00:00
Kenjiro Cho 413fe3928f import Chuck Cranor's ATM driver 1997-05-09 07:48:14 +00:00
Peter Wemm a912e453bc add SIOC{S,G}IFMEDIA ioctl support 1997-05-03 21:07:13 +00:00
Peter Wemm dca8fa3b0d Make it compile on FreeBSD, add $Id$ 1997-05-03 20:58:10 +00:00
Peter Wemm 0b6a73a276 This commit was generated by cvs2svn to compensate for changes in r25428,
which included commits to RCS files with non-trunk default branches.
1997-05-03 20:54:36 +00:00
Peter Wemm f94bb78809 Backend support for if_media interface ioctl's. This is for supporting
the many-mode, many-media-option type ethernet cards, in particular, the
new if_de.

Obtained from: NetBSD  (Their implementation of BSDI's design)
1997-05-03 20:54:36 +00:00
Garrett Wollman a29f300e80 The long-awaited mega-massive-network-code- cleanup. Part I.
This commit includes the following changes:
1) Old-style (pr_usrreq()) protocols are no longer supported, the compatibility
glue for them is deleted, and the kernel will panic on boot if any are compiled
in.

2) Certain protocol entry points are modified to take a process structure,
so they they can easily tell whether or not it is possible to sleep, and
also to access credentials.

3) SS_PRIV is no more, and with it goes the SO_PRIVSTATE setsockopt()
call.  Protocols should use the process pointer they are now passed.

4) The PF_LOCAL and PF_ROUTE families have been updated to use the new
style, as has the `raw' skeleton family.

5) PF_LOCAL sockets now obey the process's umask when creating a socket
in the filesystem.

As a result, LINT is now broken.  I'm hoping that some enterprising hacker
with a bit more time will either make the broken bits work (should be
easy for netipx) or dike them out.
1997-04-27 20:01:29 +00:00
Poul-Henning Kamp ea01105988 Use LIST macros instead of insque/remque 1997-04-14 18:23:25 +00:00
Bruce Evans 528f627f00 Don't include <sys/ioctl.h> in the kernel. Stage 6: include
<sys/filio.h>, <sys/sockio.h> and <sys/ttycom.h> instead of
<sys/ioctl.h> in a couple of files.  This is still only 1/3
as spammish as <sys/ioctl.h> - 5 or 6 old tty ioctl headers
aren't needed.
1997-03-24 12:12:36 +00:00
Bruce Evans 2098241054 Don't include <sys/ioctl.h> in the kernel. Stage 4: include
<sys/ttycom.h> and sometimes <sys/filio.h> instead of <sys/ioctl.h>
in miscellaneous files.  Most of these files have nothing to do
with ttys but need to include <sys/ttycom.h> to get the definitions
of TIOC[SG]PGRP which are (ab)used to convert F[SG]ETOWN fcntls into
ioctls.
1997-03-24 11:52:29 +00:00
Bruce Evans 51a534883a Don't include <sys/ioctl.h> in the kernel. Stage 2: include
<sys/sockio.h> instead of <sys/ioctl.h> in network files.
1997-03-24 11:33:46 +00:00
Bruce Evans fce002fdef Don't include <sys/ioctl.h> in the kernel. Stage 1: don't include
it when it is not used.  In most cases, the reasons for including it
went away when the special ioctl headers became self-sufficient.
1997-03-24 11:25:10 +00:00
Bruce Evans 3ac4d1ef0c Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.
Fixed everything that depended on getting fcntl.h stuff from the wrong
place.  Most things don't depend on file.h stuff at all.
1997-03-23 03:37:54 +00:00
Joerg Wunsch 1355add51f Fix from Matt for the problem described in PR # kern/2990: ``DEC FDDI
is a little *too* promiscuous''

Also a 2.2 candidate, again, after testing.

Submitted by:	Matt Thomas <matt@lkg.dec.com>
1997-03-15 19:58:43 +00:00
Bruce Evans ed637f8f5f Fixed clist limits. I got them wrong several years ago in rev.1.9
(1994/11/26).  Packets with more than approximately 128 0xc0's or
0xdb's in them were untransmittable.
1997-03-11 19:39:21 +00:00
Julian Elischer 499676df4d add a bunch of comments to describe what's going on.
This is some of the worst code I've had to wade through in
ages and I don't want to have to start from scratch again next time.

(I have a 2.2 version of these comments, can I commit them?)
1997-03-05 08:01:28 +00:00
Peter Wemm 6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Garrett Wollman 4a26224c8d Send RTM_IFINFO messages whenever promiscuous and all-multicast
modes are enabled or disabled.
1997-02-14 15:30:54 +00:00
Garrett Wollman 176395b2e8 Implement PRC_IFUP a la PRC_IFDOWN so that protocols know when an interface
has come bacl up (and can referse actions taken as a result of downing).
1997-02-12 18:54:32 +00:00
Bill Fenner 3aa7200510 Make sure we have arguments to pass before calling ifaof_ifpforaddr
and ifa_ifwithroute.

This eliminates the panic seen in kern/2647, although it doesn't
address the fact that RTM_CHANGE can't change flags.
1997-02-04 03:14:35 +00:00
Joerg Wunsch 161f9f547e Fix yet another breakage i've missed when committing rev 1.14. It was
non-obvious to me since my test kernel didn't run NETATALK.  Sorry.

LINT should compile again now.
1997-01-30 22:51:02 +00:00
Julian Elischer d57d661cf2 fix mixleading comment (my error.. I wrote the comment) 1997-01-26 01:00:45 +00:00
Joerg Wunsch 00bbbd73e9 Round #2. This basically brings back the changes from rev 1.12.
I have only separated both to make it more convenient merging all this
into 2.2.
1997-01-17 23:56:20 +00:00
Joerg Wunsch e4107dcf00 This mega-merge brings Matt Thomas' 960801 FDDI driver (almost) up
to -current.

Thanks goes to Ulrike Nitzsche <ulrike@ifw-dresden.de> for giving me
a chance to test this.  Only the PCI driver is tested though.

One final patch will follow in a separate commit.  This is so that
everything up to here can be dragged into 2.2, if we decide so.

Reviewed by:	joerg
Submitted by:	Matt Thomas <matt@3am-software.com>
1997-01-17 23:54:45 +00:00
Garrett Wollman c7e54a6a04 Don't try to do anything with the `ifr' parameter for SIOCADDMULTI
and SIOCDELMULTI; it is guaranteed to be null in the new system.
1997-01-17 19:38:16 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Garrett Wollman 477180fbc8 Use the new if_multiaddrs list for multicast addresses rather than the
previous hackery involving struct in_ifaddr and arpcom.  Get rid of the
abominable multi_kludge.  Update all network interfaces to use the
new machanism.  Distressingly few Ethernet drivers program the multicast
filter properly (assuming the hardware has one, which it usually does).
1997-01-13 21:26:53 +00:00
Garrett Wollman b20531189a Fix typo. I hate waking up at 4:45 in the morning... 1997-01-08 15:23:17 +00:00
Garrett Wollman 4f079e2ff0 Correctly account for header length in m_pkthdr.len when sending
packets through BPF.

Submitted by:	seki@sysrap.cs.fujitsu.co.jp in PR#2415
1997-01-08 14:17:27 +00:00
Garrett Wollman 373f88ed5c Fix a few oversights in the new multicast membership interface. 1997-01-08 13:20:25 +00:00
Garrett Wollman 1158dfb736 Checkpoint the beginnings of the new kernel interface for
multicast group memberships.  This is not actually operative
at the moment (a lot of other code still needs to be changed), but
this seemed like a useful reference point to check in so that
others (i.e. Bill Fenner) have fair warning of where we are going.
1997-01-07 19:15:32 +00:00
Garrett Wollman 9cb3aff230 Move the ethertypes from <netinet/if_ether.h> to <net/ethernet.h>.
Many programs need the numbers but don't need the internals of ARP.

More commits to follow...
1997-01-03 19:51:54 +00:00
Garrett Wollman 19ff91c6b0 Separate kernel-internal data structures from exposed user interface
to interfaces.  (Amazing nobody had done this!)

More commits to fix up user-land to follow.
1997-01-03 19:50:26 +00:00
Bruce Evans 323416489d More cleanups to satisfy the following rules:
- C++ should be supported for application functions (use __BEGIN_DECLS,
  etc.).
- prototypes should be sorted.
- comments on #endif's should spell identifiers the same as the code.
- comments on #endif's should have the same sense as the code (use `!'
  to match ifndef, etc.).
1996-12-19 18:12:06 +00:00
Garrett Wollman 992af1d001 Clean up Bill's additions. 1996-12-19 15:42:52 +00:00
Bill Paul 18fe100709 Add prototypes for ethers.3 functions as per wollman:
> wollman     96/12/10 09:19:15
>
>   Modified:    lib/libc/net  ether_addr.c ethers.3
>   Log:
>   Get struct ether_addr directly from <net/ethernet.h> rather than pulling
>   in lots of unrelated junk from <net/if.h> and <net/if_ether.h>.  These
>   functions still aren't prototyped anywhere (but should be in
>   <net/ethernet.h>---got that, Bill?).

(Note that this file has no copyright header; one should probably
be added.)
1996-12-18 21:42:38 +00:00
Bruce Evans 8b1f0fa595 Fixed pedantic syntax error. 1996-12-18 19:36:01 +00:00
Bill Fenner c812f23a41 Change default tun MTU back to 1500.
Use the interface MTU instead of the constant when deciding what
	packets to accept.
Allow using the SIOCSIFMTU ioctl (e.g. "ifconfig tun0 mtu XXX") to
	set the MTU.
1996-12-16 19:23:34 +00:00
Garrett Wollman 59562606b9 Convert the interface address and IP interface address structures
to TAILQs.  Fix places which referenced these for no good reason
that I can see (the references remain, but were fixed to compile
again; they are still questionable).
1996-12-13 21:29:07 +00:00
Garrett Wollman 294121822b Use queue macros for the list of interfaces. Next stop: ifaddrs! 1996-12-11 20:38:25 +00:00
Garrett Wollman 4963f4cd96 Include <net/if_arp.h> in the one header that requires it,
<netinet/if_ether.h>, rather than in <net/if.h>, most of whose callers
have no need of it.

Pointed-out-by:	bde
1996-12-11 17:46:33 +00:00
Garrett Wollman 662f33aaf6 Finally, after six years, remove the ``quick hack for SNMP'' that was
``going away soon''.
1996-12-10 18:03:51 +00:00
David Greenman fb5831565c 1) Implement SIOCSIFMTU in ether_ioctl(), and change ether_ioctl's return
type to be int so that errors can be returned.
2) Use the new SIOCSIFMTU ether_ioctl support in the few drivers that are
   using ether_ioctl().
3) In if_fxp.c: treat if_bpf as a token, not as a pointer. Don't bother
   testing for FXP_NTXSEG being reached in fxp_start()...just check for
   non-NULL 'm'. Change fxp_ioctl() to use ether_ioctl().
1996-12-10 07:29:50 +00:00
Julian Elischer 610600118c 2 small changes:
1/ increase the tun MTU from 1500 to 1600 to allow it to be used with
packets formatted according to RFC1490 and RFC1717

2/ allow the tsleep() when reading, to be interruptable by signals
so that one can now do:
od -xc </dev/tun0
to dump packets for debugging without getting hung.

Passed on by: Archie@whistle.com (archie Cobbs)

Nice but not neccessary in 2.2
1996-12-02 21:07:33 +00:00