summaryrefslogtreecommitdiffstats
path: root/sys/net/if.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for offloading IP/TCP/UDP checksums to NIC hardware whichjlemon2000-03-271-2/+2
| | | | supports them.
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-4/+4
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* KAME related header files additions and merges.shin1999-11-051-0/+28
| | | | | | | (only those which don't affect c source files so much) Reviewed by: cvs-committers Obtained from: KAME project
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fixed English errors, spelling errors and formatting errors in rev.1.51bde1999-07-051-7/+9
| | | | and rev.1.53.
* Add a new interface ioctl, to return "aux status".phk1999-06-191-1/+15
| | | | | | | | | | | | | | | | | | | This is inteded for to allow ifconfig to print various unstructured information from an interface. The data is returned from the kernel in ASCII form, see the comment in if.h for some technicalities. Canonical cut&paste example to be found in if_tun.c Initial use: Now tun* interfaces tell the PID of the process which opened them. Future uses could be (volounteers welcome!): Have ppp/slip interfaces tell which tty they use. Make sync interfaces return their media state: red/yellow/blue alarm, timeslot assignment and so on. Make ethernets warn about missing heartbeats and/or cables
* Introduce IFF_SMART bit.phk1999-06-061-2/+3
| | | | | | | | This means that the driver will add/delete routes when it knows it is up/down, rather than have the generic code belive it is up if configured. This is probably most useful for serial lines, although many PHY chips could probably tell us if we're connected to the cable/hub as well.
* Fix some disordering I introduced with the jail code.phk1999-05-081-2/+3
|
* This Implements the mumbled about "Jail" feature.phk1999-04-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a seriously beefed up chroot kind of thing. The process is jailed along the same lines as a chroot does it, but with additional tough restrictions imposed on what the superuser can do. For all I know, it is safe to hand over the root bit inside a prison to the customer living in that prison, this is what it was developed for in fact: "real virtual servers". Each prison has an ip number associated with it, which all IP communications will be coerced to use and each prison has its own hostname. Needless to say, you need more RAM this way, but the advantage is that each customer can run their own particular version of apache and not stomp on the toes of their neighbors. It generally does what one would expect, but setting up a jail still takes a little knowledge. A few notes: I have no scripts for setting up a jail, don't ask me for them. The IP number should be an alias on one of the interfaces. mount a /proc in each jail, it will make ps more useable. /proc/<pid>/status tells the hostname of the prison for jailed processes. Quotas are only sensible if you have a mountpoint per prison. There are no privisions for stopping resource-hogging. Some "#ifdef INET" and similar may be missing (send patches!) If somebody wants to take it from here and develop it into more of a "virtual machine" they should be most welcome! Tools, comments, patches & documentation most welcome. Have fun... Sponsored by: http://www.rndassociates.com/ Run for almost a year by: http://www.servetheweb.com/
* Since ifru_flags is a short, we can fit in a copy of the flagsphk1999-02-191-4/+4
| | | | | | | before they got changed. This can help eliminate much of the gymnastics drivers do in their ioctl routines to figure this out. Remove commented out IFF_NOTRAILERS
* On most other systems "out there", <net/if.h> does not require the callerpeter1998-03-211-1/+9
| | | | | | | to #include <sys/time.h> first. I've lost count of the number of times I've had to patch this in porting code. The problem is the "struct timeval ifi_lastchange" in the mib stats. (most other systems don't have this, until 4.4bsd anyway).
* Add a macro to accurately calculate the length of a struct ifreq whenwollman1998-01-131-1/+6
| | | | | | | | | it contains an address. This can replace all the myriad (wrong) ways in which this task is performed in the current system. As an added bonus, since it's a macro, then third-party software vendors have an easy way to tell whether it's there or not. (This will become necessary when sizeof(struct sockaddr) is increaased, and also when additional fields are added to struct ifreq.)
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-121-1/+8
| | | | | | | | 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
* add SIOC{S,G}IFMEDIA ioctl supportpeter1997-05-031-1/+12
|
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Use the new if_multiaddrs list for multicast addresses rather than thewollman1997-01-131-1/+14
| | | | | | | 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).
* Separate kernel-internal data structures from exposed user interfacewollman1997-01-031-272/+3
| | | | | | to interfaces. (Amazing nobody had done this!) More commits to fix up user-land to follow.
* Convert the interface address and IP interface address structureswollman1996-12-131-13/+7
| | | | | | 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).
* Use queue macros for the list of interfaces. Next stop: ifaddrs!wollman1996-12-111-7/+18
|
* Include <net/if_arp.h> in the one header that requires it,wollman1996-12-111-3/+1
| | | | | | | <netinet/if_ether.h>, rather than in <net/if.h>, most of whose callers have no need of it. Pointed-out-by: bde
* Finally, after six years, remove the ``quick hack for SNMP'' that waswollman1996-12-101-5/+1
| | | | ``going away soon''.
* 1) Implement SIOCSIFMTU in ether_ioctl(), and change ether_ioctl's returndg1996-12-101-2/+2
| | | | | | | | | 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().
* Fix comments, which appear to have been mangled long ago and far away.fenner1996-10-211-6/+8
|
* Removed nested include if <sys/socket.h> from <net/if.h> andbde1996-10-121-3/+1
| | | | | | | <net/if_arp.h> and fixed the things that depended on it. The nested include just allowed unportable programs to compile and made my simple #include checking program report that networking code doesn't need to include <sys/socket.h>.
* correct a field comment that someone must have accidentally spammedjulian1996-08-261-2/+2
| | | | as it's still used for what the original BSD4.4 comment says it's for.
* Add a callback pointer to the interfaces "init" routine.phk1996-08-041-1/+6
| | | | | Add ether_ioctl() which can take care of the SIOC[SG]IFADDR cases for most (ethernet) drivers.
* Add better support for retrieving management information from networkwollman1996-07-301-7/+23
| | | | | | | | | | | | | 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 spelling error I forgot to bring over from my personal versionwollman1996-07-231-2/+2
| | | | of the last (IF_ENQ_DROP) commit.
* Add a new, better mechanism for sticking packets onto ifqueues.wollman1996-07-221-1/+30
| | | | | | | | The old system had the misfeature that the only policy it could implement was tail-drop; the new IF_ENQ_DROP macro/function makes it possible to implement more sophisticated queueing policies on a system-wide basis. No code actually uses this yet (although on my machine I have converted the ethernet and (polled) loopback to use it).
* Change the use if ifnet.if_lastchange to be more in line withgpalmer1996-06-101-2/+2
| | | | | SNMP requirements. Update description of ifnet.if_lastchange in if.h to indicate this.
* Clean up Ethernet drivers:wollman1996-02-061-2/+2
| | | | | | | | - 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
* 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-261-2/+1
| | | | | Sorry for the delay. (%D is for hexdumping.)
* Staticize, clean lint.phk1995-12-091-8/+1
|
* all:dg1995-12-051-6/+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!).
* Say goodbye to IFF_NOTRAILERS. Support for trailers was officiallywollman1995-10-131-2/+2
| | | | | dropped for 4.4, but for some reason this flag lived on. (Until today, that is.)
* Add a few hooks (in the form of an array of four void *'s) to allowwollman1995-08-311-1/+4
| | | | | various bits of software to save some data in the ifnet structure without having to constantly change the declaration thereof.
* Fix several sysinit functions that had the wrong type and unnecessarilybde1995-08-301-2/+1
| | | | | | external linkage. Remove useless comments saying that SYSINIT() does system initialization.
* Make everything except the unsupported network sources compile cleanlybde1995-08-161-1/+2
| | | | with -Wnested-externs.
* Move some struct definitions outside of struct's, so their scopes forjoerg1995-07-091-35/+40
| | | | | | C++ will match the scopes for C. Submitted by: Warner Losh
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Cleanup loopback interface support.pst1995-04-261-2/+2
| | | | Reviewed by: wollman
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-1/+2
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Moved declaration of ifnet pointer out of the header file and into thedg1994-12-301-2/+2
| | | | .c file where it belongs. Bezeroed some uninitialized malloc data.
* Removed bogus semicolon at end of a #define line.dg1994-12-221-2/+2
|
* Add generic part of generic multiple-physical-interface support (thewollman1994-12-211-1/+3
| | | | successor of IFF_ALTPHYS).
* Add a #define for if_rawoutput(), which isn't used now, but eventually willwollman1994-12-211-1/+2
| | | | be.
* Add support for two separate cloning flags, one set by the lower layers,wollman1994-12-131-1/+13
| | | | | | | | | | | | | | | | | and one set by the protocol family. Also add another parameter to rtalloc1() to allow for any interface flags to be ignored; currently this is only useful for RTF_PRCLONING. Get rid of rt_prflags and re-unite with rt_flags. Add T/TCP ``route metrics''. NB: YOU MUST RECOMPILE `route' AND OTHER RELATED PROGRAMS AS A RESULT OF THIS CHANGE. This also adds a new interface parameter, `ifi_physical', which will eventually replace IFF_ALTPHYS as the mechanism for specifying the particular physical connection desired on a multiple-connection card. NB: YOU MUST RECOMPILE `ifconfig' AND OTHER RELATED PROGRAMS AS A RESULT OF THIS CHANGE.
* #include <socket.h> -> <sys/socket.h>phk1994-11-161-2/+2
|
OpenPOWER on IntegriCloud