summaryrefslogtreecommitdiffstats
path: root/sys/net
Commit message (Collapse)AuthorAgeFilesLines
* The Great PC98 Merge.asami1996-06-141-1/+5
| | | | | | | | All new code is "#ifdef PC98"ed so this should make no difference to PC/AT (and its clones) users. Ok'd by: core Submitted by: FreeBSD(98) development team
* Keep ether_type in network order for BPF to be consistent with otherdg1996-06-131-9/+8
| | | | | | | systems. Submitted by: Ted Lemon, Matt Thomas, and others. Retrofitted for -current by me.
* Only print out the new masks if bootverbose is set.nate1996-06-121-2/+4
|
* Since the updates to ifnet.if_lastchange are so rare (relativelygpalmer1996-06-125-17/+17
| | | | | | | speaking), go for the extra accuracy and call microtime() to get the current time. Pointed Out By: bde
* Clean up -Wunused warnings.gpalmer1996-06-122-6/+6
| | | | Reviewed by: bde
* Add $Id$gpalmer1996-06-101-0/+2
|
* Change the use if ifnet.if_lastchange to be more in line withgpalmer1996-06-1011-35/+42
| | | | | SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
* Also count bytes in if_tun. kern/1253phk1996-06-091-0/+2
| | | | | Reviewed by: phk Submitted by: John Capo <jc@irbs.com>
* Changed some memcpy()'s back to bcopy()'s.bde1996-06-081-2/+2
| | | | | | | gcc only inlines memcpy()'s whose count is constant and didn't inline these. I want memcpy() in the kernel go away so that it's obvious that it doesn't need to be optimized. Now it is only used for one struct copy in si.c.
* Fix bug in bpf_ifname() where the unit didn't get added correctly to thedg1996-06-081-1/+2
| | | | | | | | name string. This function should be rewritten to deal with more than 10 units of a given type. Pointed out by: jmf@free-gate.com (Jean-Marc Frailong) (I fixed it slightly differently)
* Don't allow trailing garbage after the unit number in ifunit().wollman1996-06-051-1/+3
|
* Set ifnet.baudrate for ethernet / FDDI interfaces too. Makesgpalmer1996-06-012-2/+5
| | | | | | SNMP slightly more informative Reviewed by: Garrett Wollman
* added missing semicolonscrappy1996-05-261-1/+1
| | | | Submitted by: Jeffrey Hsu <hsu@freefall.freebsd.org>
* If tunnel is busy we return EBUSY, not ENXIO.phk1996-05-261-1/+1
|
* Obtained from: netatalk distribution netatalk@itd.umich.edujulian1996-05-243-8/+113
| | | | | | | Kernel Appletalk protocol support both CAP and netatalk can make use of this.. still needs some owrk but it seemd the right tiime to commit it so other can experiment.
* When two units swapped, copy SC_STATIC flag too, not clear itache1996-05-131-1/+2
|
* Prevent mixing of static and dynamic unit allocation strategiesache1996-05-132-7/+23
|
* Clean up various compiler warnings. Most (if not all) were benigngpalmer1996-05-081-2/+2
| | | | Reviewed by: bde
* Add three new route flags to help determine what sort of addresswollman1996-05-061-2/+5
| | | | | | | | | | | | | | | | | | | | | | the destination represents. For IP: - Iff it is a host route, RTF_LOCAL and RTF_BROADCAST indicate local (belongs to this host) and broadcast addresses, respectively. - For all routes, RTF_MULTICAST is set if the destination is multicast. The RTF_BROADCAST flag is used by ip_output() to eliminate a call to in_broadcast() in a common case; this gives about 1% in our packet-generation experiments. All three flags might be used (although they aren't now) to determine whether a packet can be forwarded; a given host route can represent a forwardable address if: (rt->rt_flags & (RTF_HOST | RTF_LOCAL | RTF_BROADCAST | RTF_MULTICAST)) == RTF_HOST Obviously, one still has to do all the work if a host route is not present, but this code allows one to cache the results of such a lookup if rtalloc1() is called without masking RTF_PRCLONING.
* Regardless of whether or not the check for IPv4 is useful, we certainlydg1996-04-251-3/+3
| | | | don't need to assign the "ip" pointer twice.
* Reject all IP versions but 4.phk1996-04-241-2/+3
|
* Eliminated sloppy common-style declarations. Now there are no duplicatedbde1996-04-132-3/+5
| | | | | | 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.
* When cslip gets an uncompressed packet, it attempts to save off the TCP/IPdg1996-04-111-4/+11
| | | | | | | | | | header for use in decompressing subsequant packets. If cslip gets garbage (such as what happens when there is a port speed mismatch or modem line noise), it will occasionally mistake the packet as a valid uncompressed packet. When it tries to save off the header, it doesn't bother to check for the validity of the header length and will happily clobber not only the cslip data structure, but parts of other kernel memory that happens to follow it...causing, ahem, undesired behavior.
* Removed never-used #includes of <machine/cpu.h>. Many were apparentlybde1996-04-077-17/+6
| | | | copied from bad examples.
* Removed now-unused #includes of <machine/cpu.h>. They were for bootverbosebde1996-04-071-2/+1
| | | | being declared in the wrong place.
* Eliminate panic("rtfree") caused by double-freeing the routefenner1996-03-291-5/+6
| | | | | | | | when rt == rt->rt_gwroute . rt == rt->gwroute shouldn't happen in the first place, but that's another problem. (try "route add -host <hostonmynet> <hostonmynet>; ping <hostonmynet>; route delete <hostonmynet>")
* Using devfs_add_devswf() instead of devfs_add_devsw()scrappy1996-03-281-6/+9
| | | | Reviewed by: julian@freebsd.org
* Fixed ownerships of callout devices.bde1996-03-271-7/+3
|
* Move or add #include <queue.h> in preparation for upcoming struct socketdg1996-03-115-6/+10
| | | | changes.
* Make user-level PPP on-demand with dynamic IP actually work.ache1996-03-081-1/+1
| | | | | | | | | | | | | | | Story so fr: 1) PPP on-demand with static IP works. 2) PPP on-demand with dynamic IP says "Host is down" on any IP request The problem is that tun driver check its READY state by *first* ifconfig address. i.e.: set ifaddr <addr> <addr2> works (static IP) and set ifaddr 0 <addr2> not works (dynamic IP) because first address is equal 0. Since tun is always POINTOPOINT interface, dst address is more meaningfull. I change checking to second (dst) address in READY test. PPP on-demand finally works.
* Add more options into the conf/options and i386/conf/options.i386 filespeter1996-03-021-1/+3
| | | | | | and the #include hooks so that 'make depend' is more useful. This covers most of the options I regularly use (but not all) and some other easy ones.
* Make tundebug sysctl writable.phk1996-02-091-1/+1
|
* If a slow input queue was defined by the driver, initialize it.wollman1996-02-081-1/+13
|
* Clean up Ethernet drivers:wollman1996-02-0613-114/+53
| | | | | | | | - 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
* Make me feel a little better by filling in reasonable values for rmx_sendpipewollman1996-02-051-6/+12
| | | | | | and rmx_recvpipe. This has no demonstrable effect on performance. (ttcp reports about 44 Mbit/s for all the buffer sizes I tried between 16384 and 65536.)
* Fix a bunch of spelling errors in the comment fields ofmpp1996-01-309-21/+21
| | | | a bunch of system include files.
* Delete the if_private[] array in struct ifnet; this turned out to bewollman1996-01-261-4/+19
| | | | | | | | | | | | of limited utility. In their place, add bunch of pointers which will eventually be needed by the polled-interrupt scheme we're working here. (It will probably be a while before the code is written and committed here.) At the same time, a `void *if_softc' field was added to the beginning of the structure to make certain driver writers happier. The practical upshot of all this is that you need to recompile utilities such as netstat which manipulate struct ifnet.
* The last part of the ether_sprint -> %6D change.phk1996-01-262-4/+2
| | | | | Sorry for the delay. (%D is for hexdumping.)
* Use new printf features rather than local kludges.phk1996-01-244-90/+20
|
* Fix memory leak in case of adding a host route on top of another one.wollman1996-01-241-1/+3
| | | | Pointed-out-by: Bill Fenner <fenner@parc.xerox.com>
* in_proto.c: spell ``Internet'' right and put whitespace after commas.wollman1995-12-202-2/+8
| | | | | | | | others: start to populate the link-layer branch of the net mib, by moving ARP to its proper place. (ARP is not a protocol family, it's an interface layer between a medium-access layer and a protocol family.) sysctl(8) needs to be taught about the structure of this branch, unless Poul-Henning implements dynamic MIB exploration soon.
* Uniformized pr_ctlinput protosw functions. The third arg is now `voidbde1995-12-162-4/+5
| | | | | | | *' instead of caddr_t and it isn't optional (it never was). Most of the netipx (and netns) pr_ctlinput functions abuse the second arg instead of using the third arg but fixing this is beyond the scope of this round of changes.
* Another mega commit to staticize things.phk1995-12-1413-131/+133
|
* Make FIONREAD return the actual that a read() would return, not just thepeter1995-12-111-3/+5
| | | | | | amount of data in the first mbuf. Obtained from: Bob Smart <smart@mel.dit.csiro.au> (for NetBSD & SunOS)
* Restored used variable `name[32]' (used by DEVFS).bde1995-12-101-3/+3
| | | | | Removed an `#ifdef __FreeBSD__'. Hundreds, if not thousands of other FreeBSD-specific things aren't ifdefed.
* Staticize, clean lint.phk1995-12-095-50/+39
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-2/+2
|
* Pass 3 of the great devsw changesjulian1995-12-082-80/+70
| | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :)
* Replaced #includes of <sys/user.h> by less gross headers, usuallybde1995-12-061-2/+2
| | | | | | | <sys/vm.h>. Many device drivers need only the definition of vtophys() from vm. Added nearby #includes of <sys/conf.h> where appropriate.
* all:dg1995-12-052-24/+4
| | | | | | | | | | | | | | | | Removed ifnet.if_init and ifnet.if_reset as they are generally unused. Change the parameter passed to if_watchdog to be a ifnet * rather than a unit number. All of this is an attempt to move toward not needing an array of softc pointers (which is usually static in size) to point to the driver softc. if_ed.c: Changed some of the argument passing to some functions to make a little more sense. if_ep.c, if_vx.c: Killed completely bogus use of if_timer. It was being set in such a way that the interface was being reset once per second (blech!).
OpenPOWER on IntegriCloud