summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_var.h
Commit message (Collapse)AuthorAgeFilesLines
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | 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.
* IPSEC support in the kernel.shin1999-12-221-4/+7
| | | | | | | | pr_input() routines prototype is also changed to support IPSEC and IPV6 chained protocol headers. Reviewed by: freebsd-arch, cvs-committers Obtained from: KAME project
* Miscellaneous fixes/cleanups relating to ipfw and divert(4):archie1999-12-061-4/+4
| | | | | | | | | | | | | - Implement 'ipfw tee' (finally) - Divert packets by calling new function divert_packet() directly instead of going through protosw[]. - Replace kludgey global variable 'ip_divert_port' with a function parameter to divert_packet() - Replace kludgey global variable 'frag_divert_port' with a function parameter to ip_reass() - style(9) fixes Reviewed by: julian, green
* KAME related header files additions and merges.shin1999-11-051-0/+1
| | | | | | | (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
|
* Re-implement tcp and ip fragment reassembly to not store pointers in thedfr1998-08-241-32/+3
| | | | | | ip header which can't work on alpha since pointers are too big. Reviewed by: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
* Yow! Completely change the way socket options are handled, eliminatingwollman1998-08-231-7/+7
| | | | | | another specialized mbuf type in the process. Also clean up some of the cruft surrounding IPFW, multicast routing, RSVP, and other ill-explored corners.
* Removed a bogus forward struct declaration.bde1998-07-131-4/+4
| | | | Cleaned up ifdefs.
* Support for IPFW based transparent forwarding.julian1998-07-061-1/+4
| | | | | | | | | | | | | | Any packet that can be matched by a ipfw rule can be redirected transparently to another port or machine. Redirection to another port mostly makes sense with tcp, where a session can be set up between a proxy and an unsuspecting client. Redirection to another machine requires that the other machine also be expecting to receive the forwarded packets, as their headers will not have been modified. /sbin/ipfw must be recompiled!!! Reviewed by: Peter Wemm <peter@freebsd.org> Submitted by: Chrisy Luke <chrisy@flix.net>
* Fixed pedantic semantics errors (bitfields not of type int, signed intbde1998-06-081-3/+3
| | | | | | | or unsigned int (this doesn't change the struct layout, size or alignment in any of the files changed in this commit, at least for gcc on i386's. Using bitfields of type u_char may affect size and alignment but not packing)).
* clean up the changes made to ipfw over the last weeksjulian1998-06-061-10/+2
| | | | (should make the ipfw lkm work again)
* Reverse the default sense of the IPFW/DIVERT reinjection codejulian1998-06-051-5/+5
| | | | | | | | | so that the new behaviour is now default. Solves the "infinite loop in diversion" problem when more than one diversion is active. Man page changes follow. The new code is in -stable as the NON default option.
* Add optional code to change the way that divert and ipfw work together.julian1998-05-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | | Prior to this change, Accidental recursion protection was done by the diverted daemon feeding back the divert port number it got the packet on, as the port number on a sendto(). IPFW knew not to redivert a packet to this port (again). Processing of the ruleset started at the beginning again, skipping that divert port. The new semantic (which is how we should have done it the first time) is that the port number in the sendto() is the rule number AFTER which processing should restart, and on a recvfrom(), the port number is the rule number which caused the diversion. This is much more flexible, and also more intuitive. If the user uses the same sockaddr received when resending, processing resumes at the rule number following that that caused the diversion. The user can however select to resume rule processing at any rule. (0 is restart at the beginning) To enable the new code use option IPFW_DIVERT_RESTART This should become the default as soon as people have looked at it a bit
* Move (private) struct ipflow out of ip_var.h, to reduce dependenciespb1998-05-191-16/+1
| | | | | (for ipfw for example) on internal implementation details. Add $Id$ where missing.
* Moved #define of IPFLOW_HASHBITS to ip_flow.c where I think it belongs.dg1998-05-191-2/+1
|
* Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> viadg1998-05-191-1/+19
| | | | | | | | | | | | NetBSD, ported to FreeBSD by Pierre Beyssac <pb@fasterix.freenix.org> and minorly tweaked by me. This is a standard part of FreeBSD, but must be enabled with: "sysctl -w net.inet.ip.fastforwarding=1" ...and of course forwarding must also be enabled. This should probably be modified to use the zone allocator for speed and space efficiency. The current algorithm also appears to lose if the number of active paths exceeds IPFLOW_MAX (256), in which case it wastes lots of time trying to figure out which cache entry to drop.
* Some staticized variables were still declared to be extern.bde1997-09-071-2/+1
|
* Connect the ipdivert div_usrreqs struct to the ip proto switch tablepeter1997-05-251-3/+2
|
* The long-awaited mega-massive-network-code- cleanup. Part I.wollman1997-04-271-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Convert raw IP from mondo-switch-statement-from-Hell towollman1997-02-181-2/+1
| | | | | | | | | pr_usrreqs. Collapse duplicates with udp_usrreq.c and tcp_usrreq.c (calling the generic routines in uipc_socket2.c and in_pcb.c). Calling sockaddr()_ or peeraddr() on a detached socket now traps, rather than harmlessly returning an error; this should never happen. Allow the raw IP buffer sizes to be controlled via sysctl.
* Provide PRC_IFDOWN and PRC_IFUP support for IP. Now, when an interfacewollman1997-02-131-0/+1
| | | | | | | | is administratively downed, all routes to that interface (including the interface route itself) which are not static will be deleted. When it comes back up, and addresses remaining will have their interface routes re-added. This solves the problem where, for example, an Ethernet interface is downed by traffic continues to flow by way of ARP entries.
* Count multicast packets received for groups of which we are notwollman1997-01-211-0/+1
| | | | | a member separately from generic ``can't forward'' packets. This would have helped me find the previous bug much faster.
* 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.
* Forward-declare `struct inpcb' so that including this file doesn't causebde1996-11-121-1/+2
| | | | | | lots of warnings. Should be in 2.2. Previous version shouldn't have been in 2.2.
* Add the IP_RECVIF socket option, which supplies a packet's incoming interfacefenner1996-11-111-1/+3
| | | | | | | | using a sockaddr_dl. Fix the other packet-information socket options (SO_TIMESTAMP, IP_RECVDSTADDR) to work for multicast UDP and raw sockets as well. (They previously only worked for unicast UDP).
* Don't allow reassembly to create packets bigger than IP_MAXPACKET, and countfenner1996-10-251-2/+3
| | | | | | | | | attempts to do so. Don't allow users to source packets bigger than IP_MAXPACKET. Make UDP length and ipovly's protocol length unsigned short. Reviewed by: wollman Submitted by: (partly by) kml@nas.nasa.gov (Kevin Lahey)
* Give ip_len and ip_off more natural, unsigned types.wollman1996-10-231-3/+3
|
* Forward-declared `struct route' for the KERNEL case so that <net/route.h>bde1996-10-151-5/+7
| | | | | | isn't a prerequisite. Fixed style of ifdefs.
* Adding changes to ipfw and the kernel to support ip packet diversion..julian1996-07-101-2/+14
| | | | | | This stuff should not be too destructive if the IPDIVERT is not compiled in.. be aware that this changes the size of the ip_fw struct so ipfw needs to be recompiled to use it.. more changes coming to clean this up.
* Make rip_input() take the header lengthfenner1996-03-261-5/+4
| | | | | | Move ipip_input() and rsvp_input() prototypes to ip_var.h Remove unused prototype for rip_ip_input() from ip_var.h Remove unused variable *opts from rip_output()
* Fix a bunch of spelling errors in the comment fields ofmpp1996-01-301-2/+2
| | | | a bunch of system include files.
* Another mega commit to staticize things.phk1995-12-141-2/+1
|
* Path MTU Discovery is now standard.wollman1995-12-051-3/+1
|
* New style sysctl & staticize alot of stuff.phk1995-11-141-16/+1
|
* Merge 4.4-Lite-2 by updating the version number.wollman1995-09-211-2/+2
| | | | Obtained from: 4.4BSD-Lite-2
* Initial back-end support for IP MTU discovery, gated on MTUDISC. The supportwollman1995-09-181-1/+4
| | | | for TCP has yet to be written.
* Fix test for determining when RSVP is inactive in a router. (In thiswollman1995-07-261-1/+2
| | | | | | case, multicast options are not passed to ip_mforward().) The previous version had a wrong test, thus causing RSVP mrouters to forward RSVP messages in violation of the spec.
* Added function prototypes for ip_rsvp_vif_init, ip_rsvp_vif_done, anddg1995-06-281-1/+4
| | | | ip_rsvp_force_done.
* Kernel side of 3.5 multicast routing code, based on work by Bill Fennerwollman1995-06-131-3/+4
| | | | | and other work done here. The LKM support is probably broken, but it still compiles and will be fixed later.
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-1/+3
| | | | | | (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.
* This set of patches enables IP multicasting to work under FreeBSD. I amwollman1995-03-161-1/+5
| | | | | | | | | | | | | | | | | | | | submitting them as context diffs for the following files: sys/netinet/ip_mroute.c sys/netinet/ip_var.h sys/netinet/raw_ip.c usr.sbin/mrouted/igmp.c usr.sbin/mrouted/prune.c The routine rip_ip_input in raw_ip.c is suggested by Mark Tinguely (tinguely@plains.nodak.edu). I have been running mrouted with these patches for over a week and nothing has seemed seriously wrong. It is being run in two places on our network as a tunnel on one and a subnet querier on the other. The only problem I have run into is that mrouted on the tunnel must start up last or the pruning isn't done correctly and multicast packets flood your subnets. Submitted by: Soochon Radee <slr@mitre.org>
* YPfixphk1995-02-141-1/+3
|
* Shuffle some functions and variables around to make it possible forwollman1994-09-141-2/+2
| | | | | multicast routing to be implemented as an LKM. (There's still a bit of work to do in this area.)
* Initial get-the-easy-case-working upgrade of the multicast codewollman1994-09-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to something more recent than the ancient 1.2 release contained in 4.4. This code has the following advantages as compared to previous versions (culled from the README file for the SunOS release): - True multicast delivery - Configurable rate-limiting of forwarded multicast traffic on each physical interface or tunnel, using a token-bucket limiter. - Simplistic classification of packets for prioritized dropping. - Administrative scoping of multicast address ranges. - Faster detection of hosts leaving groups. - Support for multicast traceroute (code not yet available). - Support for RSVP, the Resource Reservation Protocol. What still needs to be done: - The multicast forwarder needs testing. - The multicast routing daemon needs to be ported. - Network interface drivers need to have the `#ifdef MULTICAST' goop ripped out of them. - The IGMP code should probably be bogon-tested. Some notes about the porting process: In some cases, the Berkeley people decided to incorporate functionality from later releases of the multicast code, but then had to do things differently. As a result, if you look at Deering's patches, and then look at our code, it is not always obvious whether the patch even applies. Let the reader beware. I ran ip_mroute.c through several passes of `unifdef' to get rid of useless grot, and to permanently enable the RSVP support, which we will include as standard. Ported by: Garrett Wollman Submitted by: Steve Deering and Ajit Thyagarajan (among others)
* Made idempotent.paul1994-08-211-1/+6
| | | | Submitted by: Paul
* Fix up some sloppy coding practices:wollman1994-08-181-6/+5
| | | | | | | | | | | | - 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.
* Added $Id$dg1994-08-021-0/+1
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+188
OpenPOWER on IntegriCloud