summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
Commit message (Collapse)AuthorAgeFilesLines
* Submitted by: archie@whistle.comjulian1996-08-071-2/+3
| | | | | | | | | | This is a patch to sys/net/if.c. What it does is patch the algorithm for finding an IP address on an interface which most closely matches a given IP address. The problem with it is when no address matches, and you have to just pick one at random. Then the code ends up picking the last IP address in the list. This patch changes things so it picks up the first address instead. Usually the first address is more useful as the later ones are aliases.
* Add better support for retrieving management information from networkwollman1996-07-301-3/+3
| | | | | | | | | | | | | interfaces. This creates two new tables in the net.link.generic branch of the MIB; one contains (essentially) `ifdata' structures, and the other contains a blob provided by the interface (and presumably used to implement link-layer-specific MIB variables). A number of things have been moved around in the `ifnet' and `ifdata' structures, so NEW VERSIONS OF ifconfig(8) AND routed(8) ARE REQUIRED. (A simple recompile is all that's necessary.) I have a sample program which uses this interface for those interested in making use of it.
* Fix a bug in ifa_ifwithnet() which caused a page fault in bcmp()wollman1996-07-241-2/+3
| | | | | | | | when attepmting to add certain types of routes. This problem only manifested itself in the presence of unconfigured point-to-point interfaces. Noticed by: Chuck Cranor <chuck@maria.wustl.edu>
* Modify the kernel to use the new pr_usrreqs interface rather than the oldwollman1996-07-111-24/+9
| | | | | | | | | | | | | | pr_usrreq mechanism which was poorly designed and error-prone. This commit renames pr_usrreq to pr_ousrreq so that old code which depended on it would break in an obvious manner. This commit also implements the new interface for TCP, although the old function is left as an example (#ifdef'ed out). This commit ALSO fixes a longstanding bug in the TCP timer processing (introduced by davidg on 1995/04/12) which caused timer processing on a TCB to always stop after a single timer had expired (because it misinterpreted the return value from tcp_usrreq() to indicate that the TCB had been deleted). Finally, some code related to polling has been deleted from if.c because it is not relevant t -current and doesn't look at all like my current code.
* Since the updates to ifnet.if_lastchange are so rare (relativelygpalmer1996-06-121-9/+9
| | | | | | | speaking), go for the extra accuracy and call microtime() to get the current time. Pointed Out By: bde
* Change the use if ifnet.if_lastchange to be more in line withgpalmer1996-06-101-7/+22
| | | | | SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
* Don't allow trailing garbage after the unit number in ifunit().wollman1996-06-051-1/+3
|
* Move or add #include <queue.h> in preparation for upcoming struct socketdg1996-03-111-1/+2
| | | | changes.
* If a slow input queue was defined by the driver, initialize it.wollman1996-02-081-1/+13
|
* Clean up Ethernet drivers:wollman1996-02-061-7/+1
| | | | | | | | - 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
* Use new printf features rather than local kludges.phk1996-01-241-37/+13
|
* in_proto.c: spell ``Internet'' right and put whitespace after commas.wollman1995-12-201-1/+4
| | | | | | | | 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.
* Staticize, clean lint.phk1995-12-091-25/+14
|
* all:dg1995-12-051-18/+2
| | | | | | | | | | | | | | | | 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!).
* Added bogus casts to avoid warnings.bde1995-11-181-5/+12
| | | | Continued cleaning up sysinit stuff.
* Add newline at end of log message and reduce log level to INFO from NOTICE.wollman1995-09-271-2/+2
|
* Fix BPf to generate a header mbuf for writes.wollman1995-09-221-1/+36
| | | | | | | | Fix loopback and discard interfaces to understand BPF writes. (These two from Bill Fenner to fix PR 512.) Move ifpromisc() from bpf.c to if.c as suggested by comment in BPF. Send a notice to the log when promiscuous mode is enabled.
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofdg1995-09-091-4/+4
| | | | compiler warnings.
* Reviewed by: julian with quick glances by bruce and othersjulian1995-08-281-2/+14
| | | | | | | | | | | | | | | | | | | | | | Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular.. NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases.. certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task) The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file.
* Don't skip point-to-point interfaces if the netmask==0 (the netmaskdg1995-06-281-3/+5
| | | | | | | | should be completely ignored for point-to-point interfaces). For point-to-point interfaces, route based on the destination address, not the local address. Submitted by: Peter Wemm
* Took out P2P_LOCALADDR_SHARE option and made it standard.dg1995-06-151-9/+3
|
* Remove trailing whitespace.rgrimes1995-05-301-5/+5
|
* Added a fix for a bug which caused the wrong interface to be selecteddg1995-05-271-28/+45
| | | | | | | | | | | for broadcasts if point-to-point links shared the same IP address as the ethernet. The fix must be enabled with P2P_LOCALADDR_SHARE option in the kernel config file. This will someday likely be standard, but there isn't sufficient time before release to determine if there are any interoperability problems with routed and/or gated. Reviewed by: Garrett Wollman, and me Submitted by: Peter Wemm
* In ifa_ifwithdstaddr() when walking through ifa structs associated withdg1995-02-241-2/+2
| | | | | a point-to-point link, don't attempt a comparison if the pointer to the destination sockaddr is NULL (i.e. it has not been set/initialized).
* Moved declaration of ifnet pointer out of the header file and into thedg1994-12-301-1/+3
| | | | .c file where it belongs. Bezeroed some uninitialized malloc data.
* Add generic part of generic multiple-physical-interface support (thewollman1994-12-211-1/+12
| | | | successor of IFF_ALTPHYS).
* Remove redundant stuff. Amazing that they actually solved a bug found inguido1994-11-101-3/+1
| | | | 1.1.5.1, and oversaw this thang.
* Mostly Cosmetics. Some of the procedures in if_sl.c was void, but shouldphk1994-10-081-10/+17
| | | | | be int. I made them int, and let them return 0. Will have to find out what the return-val is used for.
* A number of bug-fixes inspired by Mark Treacy:wollman1994-10-051-5/+15
| | | | | | | | | | | - 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
* Made the kernel compile even without "ether".phk1994-09-161-1/+4
|
* Fix up some sloppy coding practices:wollman1994-08-181-4/+3
| | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter.
* On second thought, better restrict the mtu to between 72-65535...strangedg1994-08-081-2/+6
| | | | things happen otherwise.
* Enforce the mtu to between the range 1-65535 before calling the driverdg1994-08-081-1/+3
| | | | ioctl routine.
* Added ioctl support for SIOCGIFMTU and SIOCSIFMTU. These set the per-dg1994-08-081-1/+12
| | | | interface MTU.
* Added $Id$dg1994-08-021-0/+1
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+670
OpenPOWER on IntegriCloud