diff -uprN linux-2.4.25.old/Documentation/Configure.help linux-2.4.25/Documentation/Configure.help
--- linux-2.4.25.old/Documentation/Configure.help 2004-06-26 11:22:00.000000000 +0100
+++ linux-2.4.25/Documentation/Configure.help 2004-06-26 11:29:29.000000000 +0100
@@ -6204,6 +6204,57 @@ CONFIG_IPV6
It is safe to say N here for now.
+IPv6: IPv6 over IPv6 Tunneling (EXPERIMENTAL)
+CONFIG_IPV6_TUNNEL
+ Experimental IP6-IP6 tunneling. You must select this, if you want
+ to use CONFIG_IPV6_MOBILITY. More information in MIPL Mobile IPv6
+ instructions.
+
+ If you don't want IP6-IP6 tunnels and Mobile IPv6, say N.
+
+IPv6: Mobility Support (EXPERIMENTAL)
+CONFIG_IPV6_MOBILITY
+ This is experimental support for the upcoming specification of
+ Mobile IPv6. Mobile IPv6 allows nodes to seamlessly move between
+ networks without changing their IP addresses, thus allowing them to
+ maintain upper layer connections (e.g. TCP). Selecting this option
+ allows your computer to act as a Correspondent Node (CN). A MIPv6
+ Mobile Node will be able to communicate with the CN and use route
+ optimization.
+
+ For more information and configuration details, see
+ http://www.mipl.mediapoli.com/.
+
+ If unsure, say N.
+
+MIPv6: Mobile Node Support
+CONFIG_IPV6_MOBILITY_MN
+ If you want your computer to be a MIPv6 Mobile Node (MN), select
+ this option. You must configure MN using the userspace tools
+ available at http://www.mipl.mediapoli.com/download/mipv6-tools/.
+
+ If your computer is stationary, or you are unsure if you need this,
+ say N. Note that you will need a properly configured MIPv6 Home
+ Agent to use any Mobile Nodes.
+
+MIPv6: Home Agent Support
+CONFIG_IPV6_MOBILITY_HA
+ If you want your router to serve as a MIPv6 Home Agent (HA), select
+ this option. You must configure HA using the userspace tools
+ available at http://www.mipl.mediapoli.com/download/mipv6-tools/.
+
+ If your computer is not a router, or you are unsure if you need
+ this, say N.
+
+MIPv6: Debug messages
+CONFIG_IPV6_MOBILITY_DEBUG
+ MIPL Mobile IPv6 can produce a lot of debugging messages. There are
+ eight debug levels (0 through 7) and the level is controlled via
+ /proc/sys/net/ipv6/mobility/debuglevel. Since MIPL is still
+ experimental, you might want to say Y here.
+
+ Be sure to say Y and record debug messages when submitting a bug
+ report.
The SCTP Protocol (EXPERIMENTAL)
CONFIG_IP_SCTP
Stream Control Transmission Protocol
diff -uprN linux-2.4.25.old/Documentation/DocBook/Makefile linux-2.4.25/Documentation/DocBook/Makefile
--- linux-2.4.25.old/Documentation/DocBook/Makefile 2002-11-28 23:53:08.000000000 +0000
+++ linux-2.4.25/Documentation/DocBook/Makefile 2004-06-26 11:29:29.000000000 +0100
@@ -2,7 +2,7 @@ BOOKS := wanbook.sgml z8530book.sgml mca
kernel-api.sgml parportbook.sgml kernel-hacking.sgml \
kernel-locking.sgml via-audio.sgml mousedrivers.sgml sis900.sgml \
deviceiobook.sgml procfs-guide.sgml tulip-user.sgml \
- journal-api.sgml
+ journal-api.sgml mip6-func.sgml
PS := $(patsubst %.sgml, %.ps, $(BOOKS))
PDF := $(patsubst %.sgml, %.pdf, $(BOOKS))
@@ -86,6 +86,9 @@ videobook.sgml: videobook.tmpl $(TOPDIR)
procfs-guide.sgml: procfs-guide.tmpl procfs_example.sgml
$(TOPDIR)/scripts/docgen < procfs-guide.tmpl >$@
+mip6-func.sgml: mip6-func.tmpl
+ $(TOPDIR)/scripts/docgen <$< >$@
+
APISOURCES := $(TOPDIR)/drivers/media/video/videodev.c \
$(TOPDIR)/arch/i386/kernel/irq.c \
$(TOPDIR)/arch/i386/kernel/mca.c \
diff -uprN linux-2.4.25.old/Documentation/DocBook/mip6-func.tmpl linux-2.4.25/Documentation/DocBook/mip6-func.tmpl
--- linux-2.4.25.old/Documentation/DocBook/mip6-func.tmpl 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.4.25/Documentation/DocBook/mip6-func.tmpl 2004-06-26 11:29:29.000000000 +0100
@@ -0,0 +1,756 @@
+
+
+
+ MIPL Mobile IPv6 Function Reference Guide
+
+
+
+ MIPL Mobile IPv6 for Linux Team
+
+ Helsinki University of Technology
+ Telecommunications Software and Multimedia Lab
+
+ PO BOX 9201
+ FIN-02015 HUT
+ Finland
+ mipl@list.mipl.mediapoli.com
+
+
+
+
+
+
+ 2000-2001
+ Helsinki University of Technology
+
+
+
+
+ Copyright (c) 2001, 2002 MIPL Mobile IPv6 for Linux Team.
+
+
+ Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.1 published by the Free Software Foundation; with the
+ Invariant Sections being "Introduction", with the Front-Cover
+ Texts being "MIPL Mobile IPv6 Function Reference Guide", "MIPL
+ Mobile IPv6 for Linux Team" and "Helsinki University of
+ Technology". A copy of the license is included in .
+
+
+
+
+
+
+
+
+ Introduction
+
+
+ MIPL Mobile IPv6 for Linux is an implementation of Mobility
+ Support in IPv6 IETF mobile-ip working groups Internet-Draft
+ (draft-ietf-mobileip-ipv6). This implementation has been
+ developed in the Telecommunications Software and Multimedia
+ Laboratory at Helsinki University of Technology.
+
+
+
+ MIPL is fully open source, licensed under the GNU General
+ Public License. Latest source for MIPL can be downloaded from
+ the MIPL website at:
+
+
+ http://www.mipl.mediapoli.com/.
+
+
+ Developers and users interested in MIPL can subscribe to the
+ MIPL mailing list by sending e-mail to
+ majordomo@list.mipl.mediapoli.com with
+
+
+ subscribe mipl
+
+
+ in the body of the message.
+
+
+
+ This document is a reference guide to MIPL functions. Intended
+ audience is developers wishing to contribute to the project.
+ Hopefully this document will make it easier and quicker to
+ understand and adopt the inner workings of MIPL Mobile IPv6.
+
+
+
+ MIPL Mobile IPv6 for Linux Team members (past and present):
+
+
+
+
+ Sami Kivisaari Sami.Kivisaari@hut.fi
+
+
+
+
+ Niklas Kampe Niklas.Kampe@hut.fi
+
+
+
+
+ Juha Mynttinen Juha.Mynttinen@hut.fi
+
+
+
+
+ Toni Nykanen Toni.Nykanen@iki.fi
+
+
+
+
+ Henrik Petander Henrik.Petander@hut.fi
+
+
+
+
+ Antti Tuominen ajtuomin@tml.hut.fi
+
+
+
+
+
+
+
+ Marko Myllynen
+
+
+
+
+ Ville Nuorvala vnuorval@tcs.hut.fi
+
+
+
+
+ Jaakko Laine Jaakko.Laine@hut.fi
+
+
+
+
+
+
+
+
+ Common functions for all entities
+
+ Low-level functions
+
+ These functions implement memory allocation used by others.
+ Hashlist functions implement a linked list with hash lookup,
+ which is used with Binding Update List, Binding Cache, Home
+ Agents List etc.
+
+!Inet/ipv6/mobile_ip6/mempool.h
+!Inet/ipv6/mobile_ip6/hashlist.h
+
+
+ Debug functions
+
+ Debug and utility functions. These functions are available if
+ CONFIG_IPV6_MOBILITY_DEBUG is set.
+ Otherwise macros expand to no operation.
+
+!Inet/ipv6/mobile_ip6/debug.h
+!Inet/ipv6/mobile_ip6/mipv6.c
+
+
+ Extension Header functions
+
+ These functions create and handle extension headers that are
+ specific to MIPv6.
+
+!Inet/ipv6/mobile_ip6/exthdrs.c
+
+
+ Mobility Header functions
+
+ MIPv6 specifies a new protocol called Mobility Header.
+ Mobility Header has several message types. Messages may also
+ carry Mobility Options. These functions are used to create and
+ handle Mobility Headers and Mobility Options.
+
+!Inet/ipv6/mobile_ip6/sendopts.c
+!Inet/ipv6/mobile_ip6/mh_recv.c
+!Inet/ipv6/mobile_ip6/auth_subopt.c
+
+
+ Binding Cache
+
+ All Mobile IPv6 entities have a binding cache. These functions
+ provide easy manipulation of the binding cache.
+
+!Inet/ipv6/mobile_ip6/bcache.c
+
+
+ Security
+
+
+ These functions are common authentication functions and
+ implement Draft 13 style IPSec AH support for Binding Updates.
+
+!Inet/ipv6/mobile_ip6/ah_algo.c
+!Inet/ipv6/mobile_ip6/sadb.c
+!Inet/ipv6/mobile_ip6/ah.c
+
+
+ Utility functions
+
+
+ These functions are general utility functions commonly used by
+ all entities.
+
+!Inet/ipv6/mobile_ip6/util.c
+
+
+
+
+
+ Mobile Node functions
+ General functions
+
+
+!Inet/ipv6/mobile_ip6/mn.c
+
+
+ Binding Update List
+
+ Mobile Node keeps track of sent binding updates in Binding
+ Update List.
+
+!Inet/ipv6/mobile_ip6/bul.c
+
+
+ Movement detection
+
+
+ These functions are used by the mobile node for movement
+ detection.
+
+!Inet/ipv6/mobile_ip6/mdetect.c
+
+
+
+
+ Home Agent functions
+ General functions
+
+
+!Inet/ipv6/mobile_ip6/ha.c
+
+
+ Duplicate Address Detection functions
+
+ Home Agent does Duplicate Address Detection for Mobile Nodes'
+ addresses. These functions implement MIPv6 specific DAD
+ functionality.
+
+!Inet/ipv6/mobile_ip6/dad.c
+
+
+
+
+ GNU Free Documentation License
+
+
+ Version 1.1, March 2000
+
+
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ 0. PREAMBLE
+
+
+ The purpose of this License is to make a manual, textbook, or
+ other written document "free" in the sense of freedom: to
+ assure everyone the effective freedom to copy and redistribute
+ it, with or without modifying it, either commercially or
+ noncommercially. Secondarily, this License preserves for the
+ author and publisher a way to get credit for their work, while
+ not being considered responsible for modifications made by
+ others.
+
+
+
+ This License is a kind of "copyleft", which means that
+ derivative works of the document must themselves be free in the
+ same sense. It complements the GNU General Public License,
+ which is a copyleft license designed for free software.
+
+
+
+ We have designed this License in order to use it for manuals
+ for free software, because free software needs free
+ documentation: a free program should come with manuals
+ providing the same freedoms that the software does. But this
+ License is not limited to software manuals; it can be used for
+ any textual work, regardless of subject matter or whether it is
+ published as a printed book. We recommend this License
+ principally for works whose purpose is instruction or
+ reference.
+
+
+
+ 1. APPLICABILITY AND DEFINITIONS
+
+
+ This License applies to any manual or other work that contains
+ a notice placed by the copyright holder saying it can be
+ distributed under the terms of this License. The "Document",
+ below, refers to any such manual or work. Any member of the
+ public is a licensee, and is addressed as "you".
+
+
+
+ A "Modified Version" of the Document means any work containing
+ the Document or a portion of it, either copied verbatim, or
+ with modifications and/or translated into another language.
+
+
+
+ A "Secondary Section" is a named appendix or a front-matter
+ section of the Document that deals exclusively with the
+ relationship of the publishers or authors of the Document to
+ the Document's overall subject (or to related matters) and
+ contains nothing that could fall directly within that overall
+ subject. (For example, if the Document is in part a textbook of
+ mathematics, a Secondary Section may not explain any
+ mathematics.) The relationship could be a matter of historical
+ connection with the subject or with related matters, or of
+ legal, commercial, philosophical, ethical or political position
+ regarding them.
+
+
+
+ The "Invariant Sections" are certain Secondary Sections whose
+ titles are designated, as being those of Invariant Sections, in
+ the notice that says that the Document is released under this
+ License.
+
+
+
+ The "Cover Texts" are certain short passages of text that are
+ listed, as Front-Cover Texts or Back-Cover Texts, in the notice
+ that says that the Document is released under this License.
+
+
+
+ A "Transparent" copy of the Document means a machine-readable
+ copy, represented in a format whose specification is available
+ to the general public, whose contents can be viewed and edited
+ directly and straightforwardly with generic text editors or
+ (for images composed of pixels) generic paint programs or (for
+ drawings) some widely available drawing editor, and that is
+ suitable for input to text formatters or for automatic
+ translation to a variety of formats suitable for input to text
+ formatters. A copy made in an otherwise Transparent file format
+ whose markup has been designed to thwart or discourage
+ subsequent modification by readers is not Transparent. A copy
+ that is not "Transparent" is called "Opaque".
+
+
+
+ Examples of suitable formats for Transparent copies include
+ plain ASCII without markup, Texinfo input format, LaTeX input
+ format, SGML or XML using a publicly available DTD, and
+ standard-conforming simple HTML designed for human
+ modification. Opaque formats include PostScript, PDF,
+ proprietary formats that can be read and edited only by
+ proprietary word processors, SGML or XML for which the DTD
+ and/or processing tools are not generally available, and the
+ machine-generated HTML produced by some word processors for
+ output purposes only.
+
+
+
+ The "Title Page" means, for a printed book, the title page
+ itself, plus such following pages as are needed to hold,
+ legibly, the material this License requires to appear in the
+ title page. For works in formats which do not have any title
+ page as such, "Title Page" means the text near the most
+ prominent appearance of the work's title, preceding the
+ beginning of the body of the text.
+
+
+
+ 2. VERBATIM COPYING
+
+
+ You may copy and distribute the Document in any medium, either
+ commercially or noncommercially, provided that this License,
+ the copyright notices, and the license notice saying this
+ License applies to the Document are reproduced in all copies,
+ and that you add no other conditions whatsoever to those of
+ this License. You may not use technical measures to obstruct or
+ control the reading or further copying of the copies you make
+ or distribute. However, you may accept compensation in exchange
+ for copies. If you distribute a large enough number of copies
+ you must also follow the conditions in section 3.
+
+
+
+ You may also lend copies, under the same conditions stated
+ above, and you may publicly display copies.
+
+
+
+ 3. COPYING IN QUANTITY
+
+
+ If you publish printed copies of the Document numbering more
+ than 100, and the Document's license notice requires Cover
+ Texts, you must enclose the copies in covers that carry,
+ clearly and legibly, all these Cover Texts: Front-Cover Texts
+ on the front cover, and Back-Cover Texts on the back
+ cover. Both covers must also clearly and legibly identify you
+ as the publisher of these copies. The front cover must present
+ the full title with all words of the title equally prominent
+ and visible. You may add other material on the covers in
+ addition. Copying with changes limited to the covers, as long
+ as they preserve the title of the Document and satisfy these
+ conditions, can be treated as verbatim copying in other
+ respects.
+
+
+
+ If the required texts for either cover are too voluminous to
+ fit legibly, you should put the first ones listed (as many as
+ fit reasonably) on the actual cover, and continue the rest onto
+ adjacent pages.
+
+
+
+ If you publish or distribute Opaque copies of the Document
+ numbering more than 100, you must either include a
+ machine-readable Transparent copy along with each Opaque copy,
+ or state in or with each Opaque copy a publicly-accessible
+ computer-network location containing a complete Transparent
+ copy of the Document, free of added material, which the general
+ network-using public has access to download anonymously at no
+ charge using public-standard network protocols. If you use the
+ latter option, you must take reasonably prudent steps, when you
+ begin distribution of Opaque copies in quantity, to ensure that
+ this Transparent copy will remain thus accessible at the stated
+ location until at least one year after the last time you
+ distribute an Opaque copy (directly or through your agents or
+ retailers) of that edition to the public.
+
+
+
+ It is requested, but not required, that you contact the authors
+ of the Document well before redistributing any large number of
+ copies, to give them a chance to provide you with an updated
+ version of the Document.
+
+
+
+ 4. MODIFICATIONS
+
+
+ You may copy and distribute a Modified Version of the Document
+ under the conditions of sections 2 and 3 above, provided that
+ you release the Modified Version under precisely this License,
+ with the Modified Version filling the role of the Document,
+ thus licensing distribution and modification of the Modified
+ Version to whoever possesses a copy of it. In addition, you
+ must do these things in the Modified Version:
+
+
+
+
+
+
+ A. Use in the Title Page (and on the covers, if any) a title
+ distinct from that of the Document, and from those of previous
+ versions (which should, if there were any, be listed in the
+ History section of the Document). You may use the same title
+ as a previous version if the original publisher of that
+ version gives permission.
+
+
+
+
+ B. List on the Title Page, as authors, one or more persons
+ or entities responsible for authorship of the modifications in
+ the Modified Version, together with at least five of the
+ principal authors of the Document (all of its principal
+ authors, if it has less than five).
+
+
+
+
+ C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+
+
+
+
+ D. Preserve all the copyright notices of the Document.
+
+
+
+
+ E. Add an appropriate copyright notice for your
+ modifications adjacent to the other copyright notices.
+
+
+
+
+ F. Include, immediately after the copyright notices, a
+ license notice giving the public permission to use the
+ Modified Version under the terms of this License, in the form
+ shown in the Addendum below.
+
+
+
+
+ G. Preserve in that license notice the full lists of
+ Invariant Sections and required Cover Texts given in the
+ Document's license notice.
+
+
+
+
+ H. Include an unaltered copy of this License.
+
+
+
+
+ I. Preserve the section entitled "History", and its title,
+ and add to it an item stating at least the title, year, new
+ authors, and publisher of the Modified Version as given on the
+ Title Page. If there is no section entitled "History" in the
+ Document, create one stating the title, year, authors, and
+ publisher of the Document as given on its Title Page, then add
+ an item describing the Modified Version as stated in the
+ previous sentence.
+
+
+
+
+ J. Preserve the network location, if any, given in the
+ Document for public access to a Transparent copy of the
+ Document, and likewise the network locations given in the
+ Document for previous versions it was based on. These may be
+ placed in the "History" section. You may omit a network
+ location for a work that was published at least four years
+ before the Document itself, or if the original publisher of
+ the version it refers to gives permission.
+
+
+
+
+ K. In any section entitled "Acknowledgements" or
+ "Dedications", preserve the section's title, and preserve in
+ the section all the substance and tone of each of the
+ contributor acknowledgements and/or dedications given therein.
+
+
+
+
+ L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section
+ titles.
+
+
+
+
+ M. Delete any section entitled "Endorsements". Such a
+ section may not be included in the Modified Version.
+
+
+
+
+ N. Do not retitle any existing section as "Endorsements" or
+ to conflict in title with any Invariant Section.
+
+
+
+
+
+
+ If the Modified Version includes new front-matter sections or
+ appendices that qualify as Secondary Sections and contain no
+ material copied from the Document, you may at your option
+ designate some or all of these sections as invariant. To do
+ this, add their titles to the list of Invariant Sections in the
+ Modified Version's license notice. These titles must be
+ distinct from any other section titles.
+
+
+
+ You may add a section entitled "Endorsements", provided it
+ contains nothing but endorsements of your Modified Version by
+ various parties--for example, statements of peer review or that
+ the text has been approved by an organization as the
+ authoritative definition of a standard.
+
+
+
+ You may add a passage of up to five words as a Front-Cover
+ Text, and a passage of up to 25 words as a Back-Cover Text, to
+ the end of the list of Cover Texts in the Modified
+ Version. Only one passage of Front-Cover Text and one of
+ Back-Cover Text may be added by (or through arrangements made
+ by) any one entity. If the Document already includes a cover
+ text for the same cover, previously added by you or by
+ arrangement made by the same entity you are acting on behalf
+ of, you may not add another; but you may replace the old one,
+ on explicit permission from the previous publisher that added
+ the old one.
+
+
+
+ The author(s) and publisher(s) of the Document do not by this
+ License give permission to use their names for publicity for or
+ to assert or imply endorsement of any Modified Version.
+
+
+
+ 5. COMBINING DOCUMENTS
+
+
+ You may combine the Document with other documents released
+ under this License, under the terms defined in section 4 above
+ for modified versions, provided that you include in the
+ combination all of the Invariant Sections of all of the
+ original documents, unmodified, and list them all as Invariant
+ Sections of your combined work in its license notice.
+
+
+
+ The combined work need only contain one copy of this License,
+ and multiple identical Invariant Sections may be replaced with
+ a single copy. If there are multiple Invariant Sections with
+ the same name but different contents, make the title of each
+ such section unique by adding at the end of it, in parentheses,
+ the name of the original author or publisher of that section if
+ known, or else a unique number. Make the same adjustment to the
+ section titles in the list of Invariant Sections in the license
+ notice of the combined work.
+
+
+
+ In the combination, you must combine any sections entitled
+ "History" in the various original documents, forming one
+ section entitled "History"; likewise combine any sections
+ entitled "Acknowledgements", and any sections entitled
+ "Dedications". You must delete all sections entitled
+ "Endorsements."
+
+
+
+ 6. COLLECTIONS OF DOCUMENTS
+
+
+ You may make a collection consisting of the Document and other
+ documents released under this License, and replace the
+ individual copies of this License in the various documents with
+ a single copy that is included in the collection, provided that
+ you follow the rules of this License for verbatim copying of
+ each of the documents in all other respects.
+
+
+
+ You may extract a single document from such a collection, and
+ distribute it individually under this License, provided you
+ insert a copy of this License into the extracted document, and
+ follow this License in all other respects regarding verbatim
+ copying of that document.
+
+
+
+ 7. AGGREGATION WITH INDEPENDENT WORKS
+
+
+ A compilation of the Document or its derivatives with other
+ separate and independent documents or works, in or on a volume
+ of a storage or distribution medium, does not as a whole count
+ as a Modified Version of the Document, provided no compilation
+ copyright is claimed for the compilation. Such a compilation is
+ called an "aggregate", and this License does not apply to the
+ other self-contained works thus compiled with the Document, on
+ account of their being thus compiled, if they are not
+ themselves derivative works of the Document.
+
+
+
+ If the Cover Text requirement of section 3 is applicable to
+ these copies of the Document, then if the Document is less than
+ one quarter of the entire aggregate, the Document's Cover Texts
+ may be placed on covers that surround only the Document within
+ the aggregate. Otherwise they must appear on covers around the
+ whole aggregate.
+
+
+
+ 8. TRANSLATION
+
+
+ Translation is considered a kind of modification, so you may
+ distribute translations of the Document under the terms of
+ section 4. Replacing Invariant Sections with translations
+ requires special permission from their copyright holders, but
+ you may include translations of some or all Invariant Sections
+ in addition to the original versions of these Invariant
+ Sections. You may include a translation of this License
+ provided that you also include the original English version of
+ this License. In case of a disagreement between the translation
+ and the original English version of this License, the original
+ English version will prevail.
+
+
+
+ 9. TERMINATION
+
+
+ You may not copy, modify, sublicense, or distribute the
+ Document except as expressly provided for under this
+ License. Any other attempt to copy, modify, sublicense or
+ distribute the Document is void, and will automatically
+ terminate your rights under this License. However, parties who
+ have received copies, or rights, from you under this License
+ will not have their licenses terminated so long as such parties
+ remain in full compliance.
+
+
+
+ 10. FUTURE REVISIONS OF THIS LICENSE
+
+
+ The Free Software Foundation may publish new, revised versions
+ of the GNU Free Documentation License from time to time. Such
+ new versions will be similar in spirit to the present version,
+ but may differ in detail to address new problems or
+ concerns. See http://www.gnu.org/copyleft/.
+
+
+
+ Each version of the License is given a distinguishing version
+ number. If the Document specifies that a particular numbered
+ version of this License "or any later version" applies to it,
+ you have the option of following the terms and conditions
+ either of that specified version or of any later version that
+ has been published (not as a draft) by the Free Software
+ Foundation. If the Document does not specify a version number
+ of this License, you may choose any version ever published (not
+ as a draft) by the Free Software Foundation.
+
+
+
+
+
diff -uprN linux-2.4.25.old/include/linux/icmpv6.h linux-2.4.25/include/linux/icmpv6.h
--- linux-2.4.25.old/include/linux/icmpv6.h 2003-08-25 12:44:44.000000000 +0100
+++ linux-2.4.25/include/linux/icmpv6.h 2004-06-26 11:29:29.000000000 +0100
@@ -40,14 +40,16 @@ struct icmp6hdr {
struct icmpv6_nd_ra {
__u8 hop_limit;
#if defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 reserved:6,
+ __u8 reserved:5,
+ home_agent:1,
other:1,
managed:1;
#elif defined(__BIG_ENDIAN_BITFIELD)
__u8 managed:1,
other:1,
- reserved:6;
+ home_agent:1,
+ reserved:5;
#else
#error "Please fix "
#endif
@@ -70,6 +72,7 @@ struct icmp6hdr {
#define icmp6_addrconf_managed icmp6_dataun.u_nd_ra.managed
#define icmp6_addrconf_other icmp6_dataun.u_nd_ra.other
#define icmp6_rt_lifetime icmp6_dataun.u_nd_ra.rt_lifetime
+#define icmp6_home_agent icmp6_dataun.u_nd_ra.home_agent
};
diff -uprN linux-2.4.25.old/include/linux/if_arp.h linux-2.4.25/include/linux/if_arp.h
--- linux-2.4.25.old/include/linux/if_arp.h 2002-02-25 19:38:13.000000000 +0000
+++ linux-2.4.25/include/linux/if_arp.h 2004-06-26 11:29:29.000000000 +0100
@@ -59,7 +59,7 @@
#define ARPHRD_RAWHDLC 518 /* Raw HDLC */
#define ARPHRD_TUNNEL 768 /* IPIP tunnel */
-#define ARPHRD_TUNNEL6 769 /* IPIP6 tunnel */
+#define ARPHRD_TUNNEL6 769 /* IP6IP6 tunnel */
#define ARPHRD_FRAD 770 /* Frame Relay Access Device */
#define ARPHRD_SKIP 771 /* SKIP vif */
#define ARPHRD_LOOPBACK 772 /* Loopback device */
diff -uprN linux-2.4.25.old/include/linux/in6.h linux-2.4.25/include/linux/in6.h
--- linux-2.4.25.old/include/linux/in6.h 2003-06-13 15:51:38.000000000 +0100
+++ linux-2.4.25/include/linux/in6.h 2004-06-26 11:29:29.000000000 +0100
@@ -142,6 +142,11 @@ struct in6_flowlabel_req
#define IPV6_TLV_JUMBO 194
/*
+ * Mobile IPv6 TLV options.
+ */
+#define MIPV6_TLV_HOMEADDR 201
+
+/*
* IPV6 socket options
*/
diff -uprN linux-2.4.25.old/include/linux/ipv6.h linux-2.4.25/include/linux/ipv6.h
--- linux-2.4.25.old/include/linux/ipv6.h 2003-11-28 18:26:21.000000000 +0000
+++ linux-2.4.25/include/linux/ipv6.h 2004-06-26 11:29:29.000000000 +0100
@@ -29,6 +29,7 @@ struct in6_ifreq {
#define IPV6_SRCRT_STRICT 0x01 /* this hop must be a neighbor */
#define IPV6_SRCRT_TYPE_0 0 /* IPv6 type 0 Routing Header */
+#define IPV6_SRCRT_TYPE_2 2 /* type 2 for Mobile IPv6 */
/*
* routing header
@@ -71,6 +72,19 @@ struct rt0_hdr {
struct in6_addr addr[0];
#define rt0_type rt_hdr.type
+
+};
+
+/*
+ * routing header type 2
+ */
+
+struct rt2_hdr {
+ struct ipv6_rt_hdr rt_hdr;
+ __u32 reserved;
+ struct in6_addr addr;
+
+#define rt2_type rt_hdr.type;
};
/*
@@ -156,12 +170,16 @@ enum {
struct inet6_skb_parm
{
int iif;
+ __u8 mipv6_flags;
__u16 ra;
__u16 hop;
__u16 auth;
__u16 dst0;
__u16 srcrt;
+ __u16 srcrt2;
+ __u16 hao;
__u16 dst1;
+ struct in6_addr hoa;
};
#endif
diff -uprN linux-2.4.25.old/include/linux/ipv6_route.h linux-2.4.25/include/linux/ipv6_route.h
--- linux-2.4.25.old/include/linux/ipv6_route.h 2003-11-28 18:26:21.000000000 +0000
+++ linux-2.4.25/include/linux/ipv6_route.h 2004-06-26 11:29:29.000000000 +0100
@@ -33,6 +33,7 @@ enum
#define RTF_CACHE 0x01000000 /* cache entry */
#define RTF_FLOW 0x02000000 /* flow significant route */
#define RTF_POLICY 0x04000000 /* policy route */
+#define RTF_MOBILENODE 0x10000000 /* for routing to Mobile Node */
#define RTF_LOCAL 0x80000000
diff -uprN linux-2.4.25.old/include/linux/ipv6_tunnel.h linux-2.4.25/include/linux/ipv6_tunnel.h
--- linux-2.4.25.old/include/linux/ipv6_tunnel.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.4.25/include/linux/ipv6_tunnel.h 2004-06-26 11:29:29.000000000 +0100
@@ -0,0 +1,34 @@
+/*
+ * $Id$
+ */
+
+#ifndef _IPV6_TUNNEL_H
+#define _IPV6_TUNNEL_H
+
+#define IPV6_TLV_TNL_ENCAP_LIMIT 4
+#define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4
+
+/* don't add encapsulation limit if one isn't present in inner packet */
+#define IP6_TNL_F_IGN_ENCAP_LIMIT 0x1
+/* copy the traffic class field from the inner packet */
+#define IP6_TNL_F_USE_ORIG_TCLASS 0x2
+/* copy the flowlabel from the inner packet */
+#define IP6_TNL_F_USE_ORIG_FLOWLABEL 0x4
+/* created and maintained from within the kernel */
+#define IP6_TNL_F_KERNEL_DEV 0x8
+/* being used for Mobile IPv6 */
+#define IP6_TNL_F_MIP6_DEV 0x10
+
+struct ip6_tnl_parm {
+ char name[IFNAMSIZ]; /* name of tunnel device */
+ int link; /* ifindex of underlying L2 interface */
+ __u8 proto; /* tunnel protocol */
+ __u8 encap_limit; /* encapsulation limit for tunnel */
+ __u8 hop_limit; /* hop limit for tunnel */
+ __u32 flowinfo; /* traffic class and flowlabel for tunnel */
+ __u32 flags; /* tunnel flags */
+ struct in6_addr laddr; /* local tunnel end-point address */
+ struct in6_addr raddr; /* remote tunnel end-point address */
+};
+
+#endif
diff -uprN linux-2.4.25.old/include/linux/rtnetlink.h linux-2.4.25/include/linux/rtnetlink.h
--- linux-2.4.25.old/include/linux/rtnetlink.h 2004-02-18 13:36:32.000000000 +0000
+++ linux-2.4.25/include/linux/rtnetlink.h 2004-06-26 11:29:29.000000000 +0100
@@ -309,15 +309,17 @@ enum
IFA_LABEL,
IFA_BROADCAST,
IFA_ANYCAST,
- IFA_CACHEINFO
+ IFA_CACHEINFO,
+ IFA_HOMEAGENT
};
-#define IFA_MAX IFA_CACHEINFO
+#define IFA_MAX IFA_HOMEAGENT
/* ifa_flags */
#define IFA_F_SECONDARY 0x01
+#define IFA_F_HOMEADDR 0x10
#define IFA_F_DEPRECATED 0x20
#define IFA_F_TENTATIVE 0x40
#define IFA_F_PERMANENT 0x80
diff -uprN linux-2.4.25.old/include/linux/skbuff.h linux-2.4.25/include/linux/skbuff.h
--- linux-2.4.25.old/include/linux/skbuff.h 2003-08-25 12:44:44.000000000 +0100
+++ linux-2.4.25/include/linux/skbuff.h 2004-06-26 11:29:29.000000000 +0100
@@ -177,7 +177,7 @@ struct sk_buff {
* want to keep them across layers you have to do a skb_clone()
* first. This is owned by whoever has the skb queued ATM.
*/
- char cb[48];
+ char cb[64];
unsigned int len; /* Length of actual data */
unsigned int data_len;
diff -uprN linux-2.4.25.old/include/linux/sysctl.h linux-2.4.25/include/linux/sysctl.h
--- linux-2.4.25.old/include/linux/sysctl.h 2004-02-18 13:36:32.000000000 +0000
+++ linux-2.4.25/include/linux/sysctl.h 2004-06-26 11:29:29.000000000 +0100
@@ -387,7 +387,24 @@ enum {
NET_IPV6_NEIGH=17,
NET_IPV6_ROUTE=18,
NET_IPV6_ICMP=19,
- NET_IPV6_BINDV6ONLY=20
+ NET_IPV6_BINDV6ONLY=20,
+ NET_IPV6_MOBILITY=26
+};
+
+/* /proc/sys/net/ipv6/mobility */
+enum {
+ NET_IPV6_MOBILITY_DEBUG=1,
+ NET_IPV6_MOBILITY_TUNNEL_SITELOCAL=2,
+ NET_IPV6_MOBILITY_ROUTER_SOLICITATION_MAX_SENDTIME=3,
+ NET_IPV6_MOBILITY_ROUTER_REACH=4,
+ NET_IPV6_MOBILITY_MDETECT_MECHANISM=5,
+ NET_IPV6_MOBILITY_RETROUT=6,
+ NET_IPV6_MOBILITY_MAX_TNLS=7,
+ NET_IPV6_MOBILITY_MIN_TNLS=8,
+ NET_IPV6_MOBILITY_BINDING_REFRESH=9,
+ NET_IPV6_MOBILITY_BU_F_LLADDR=10,
+ NET_IPV6_MOBILITY_BU_F_KEYMGM=11,
+ NET_IPV6_MOBILITY_BU_F_CN_ACK=12
};
enum {
diff -uprN linux-2.4.25.old/include/net/addrconf.h linux-2.4.25/include/net/addrconf.h
--- linux-2.4.25.old/include/net/addrconf.h 2003-08-25 12:44:44.000000000 +0100
+++ linux-2.4.25/include/net/addrconf.h 2004-06-26 11:29:29.000000000 +0100
@@ -16,9 +16,11 @@ struct prefix_info {
#if defined(__BIG_ENDIAN_BITFIELD)
__u8 onlink : 1,
autoconf : 1,
- reserved : 6;
+ router_address : 1,
+ reserved : 5;
#elif defined(__LITTLE_ENDIAN_BITFIELD)
- __u8 reserved : 6,
+ __u8 reserved : 5,
+ router_address : 1,
autoconf : 1,
onlink : 1;
#else
@@ -55,6 +57,7 @@ extern int ipv6_chk_addr(struct in6_ad
struct net_device *dev);
extern struct inet6_ifaddr * ipv6_get_ifaddr(struct in6_addr *addr,
struct net_device *dev);
+extern void ipv6_del_addr(struct inet6_ifaddr *ifp);
extern int ipv6_get_saddr(struct dst_entry *dst,
struct in6_addr *daddr,
struct in6_addr *saddr);
@@ -85,7 +88,9 @@ extern void ipv6_mc_up(struct inet6_dev
extern void ipv6_mc_down(struct inet6_dev *idev);
extern void ipv6_mc_init_dev(struct inet6_dev *idev);
extern void ipv6_mc_destroy_dev(struct inet6_dev *idev);
+extern void addrconf_dad_start(struct inet6_ifaddr *ifp, int flags);
extern void addrconf_dad_failure(struct inet6_ifaddr *ifp);
+extern void addrconf_dad_completed(struct inet6_ifaddr *ifp);
extern int ipv6_chk_mcast_addr(struct net_device *dev, struct in6_addr *group,
struct in6_addr *src_addr);
@@ -116,6 +121,9 @@ extern int ipv6_chk_acast_addr(struct
extern int register_inet6addr_notifier(struct notifier_block *nb);
extern int unregister_inet6addr_notifier(struct notifier_block *nb);
+extern int ipv6_generate_eui64(u8 *eui, struct net_device *dev);
+extern int ipv6_inherit_eui64(u8 *eui, struct inet6_dev *idev);
+
static inline struct inet6_dev *
__in6_dev_get(struct net_device *dev)
{
diff -uprN linux-2.4.25.old/include/net/ip6_route.h linux-2.4.25/include/net/ip6_route.h
--- linux-2.4.25.old/include/net/ip6_route.h 2003-06-13 15:51:39.000000000 +0100
+++ linux-2.4.25/include/net/ip6_route.h 2004-06-26 11:29:29.000000000 +0100
@@ -2,6 +2,7 @@
#define _NET_IP6_ROUTE_H
#define IP6_RT_PRIO_FW 16
+#define IP6_RT_PRIO_MIPV6 64
#define IP6_RT_PRIO_USER 1024
#define IP6_RT_PRIO_ADDRCONF 256
#define IP6_RT_PRIO_KERN 512
@@ -40,6 +41,9 @@ extern int ipv6_route_ioctl(unsigned i
extern int ip6_route_add(struct in6_rtmsg *rtmsg,
struct nlmsghdr *);
+
+extern int ip6_route_del(struct in6_rtmsg *rtmsg,
+ struct nlmsghdr *);
extern int ip6_del_rt(struct rt6_info *,
struct nlmsghdr *);
@@ -99,7 +103,8 @@ extern rwlock_t rt6_lock;
*/
static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
- struct in6_addr *daddr)
+ struct in6_addr *daddr,
+ struct in6_addr *saddr)
{
struct ipv6_pinfo *np = &sk->net_pinfo.af_inet6;
struct rt6_info *rt = (struct rt6_info *) dst;
@@ -107,6 +112,9 @@ static inline void ip6_dst_store(struct
write_lock(&sk->dst_lock);
__sk_dst_set(sk, dst);
np->daddr_cache = daddr;
+#ifdef CONFIG_IPV6_SUBTREES
+ np->saddr_cache = saddr;
+#endif
np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
write_unlock(&sk->dst_lock);
}
diff -uprN linux-2.4.25.old/include/net/ipv6.h linux-2.4.25/include/net/ipv6.h
--- linux-2.4.25.old/include/net/ipv6.h 2003-11-28 18:26:21.000000000 +0000
+++ linux-2.4.25/include/net/ipv6.h 2004-06-26 11:29:29.000000000 +0100
@@ -37,6 +37,7 @@
#define NEXTHDR_ICMP 58 /* ICMP for IPv6. */
#define NEXTHDR_NONE 59 /* No next header */
#define NEXTHDR_DEST 60 /* Destination options header. */
+#define NEXTHDR_MH 135 /* Mobility header, RFC 3775 */
#define NEXTHDR_MAX 255
@@ -145,9 +146,12 @@ struct ipv6_txoptions
__u16 opt_flen; /* after fragment hdr */
__u16 opt_nflen; /* before fragment hdr */
+ __u8 mipv6_flags; /* flags set by MIPv6 */
+
struct ipv6_opt_hdr *hopopt;
struct ipv6_opt_hdr *dst0opt;
- struct ipv6_rt_hdr *srcrt; /* Routing Header */
+ struct ipv6_rt_hdr *srcrt; /* Routing Header Type 0 */
+ struct ipv6_rt_hdr *srcrt2; /* Routing Header Type 2 */
struct ipv6_opt_hdr *auth;
struct ipv6_opt_hdr *dst1opt;
@@ -256,6 +260,38 @@ static inline int ipv6_addr_any(const st
a->s6_addr32[2] | a->s6_addr32[3] ) == 0);
}
+static inline void ipv6_addr_prefix(struct in6_addr *pfx,
+ const struct in6_addr *addr, int plen)
+{
+ /* caller must guarantee 0 <= plen <= 128 */
+ int o = plen >> 3,
+ b = plen & 0x7;
+
+ memcpy(pfx->s6_addr, addr, o);
+ if (b != 0) {
+ pfx->s6_addr[o] = addr->s6_addr[o] & (0xff00 >> b);
+ o++;
+ }
+ if (o < 16)
+ memset(pfx->s6_addr + o, 0, 16 - o);
+}
+
+static inline int ipv6_prefix_cmp(const struct in6_addr *p1,
+ const struct in6_addr *p2, int plen)
+{
+ int b = plen&0x7;
+ int o = plen>>3;
+ int res = 0;
+
+ if (o > 0)
+ res = memcmp(&p1->s6_addr[0], &p2->s6_addr[0], o);
+ if (res == 0 && b > 0) {
+ __u8 m = (0xff00 >> b) & 0xff;
+ res = (p1->s6_addr[o] & m) - (p2->s6_addr[o] & m);
+ }
+ return res;
+}
+
/*
* Prototypes exported by ipv6
*/
diff -uprN linux-2.4.25.old/include/net/ipv6_tunnel.h linux-2.4.25/include/net/ipv6_tunnel.h
--- linux-2.4.25.old/include/net/ipv6_tunnel.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.4.25/include/net/ipv6_tunnel.h 2004-06-26 11:29:29.000000000 +0100
@@ -0,0 +1,92 @@
+/*
+ * $Id$
+ */
+
+#ifndef _NET_IPV6_TUNNEL_H
+#define _NET_IPV6_TUNNEL_H
+
+#include
+#include
+#include
+#include
+#include
+
+/* capable of sending packets */
+#define IP6_TNL_F_CAP_XMIT 0x10000
+/* capable of receiving packets */
+#define IP6_TNL_F_CAP_RCV 0x20000
+
+#define IP6_TNL_MAX 128
+
+/* IPv6 tunnel */
+
+struct ip6_tnl {
+ struct ip6_tnl *next; /* next tunnel in list */
+ struct net_device *dev; /* virtual device associated with tunnel */
+ struct net_device_stats stat; /* statistics for tunnel device */
+ int recursion; /* depth of hard_start_xmit recursion */
+ struct ip6_tnl_parm parms; /* tunnel configuration paramters */
+ struct flowi fl; /* flowi template for xmit */
+ atomic_t refcnt; /* nr of identical tunnels used by kernel */
+ struct socket *sock;
+};
+
+#define IP6_TNL_PRE_ENCAP 0
+#define IP6_TNL_PRE_DECAP 1
+#define IP6_TNL_MAXHOOKS 2
+
+#define IP6_TNL_DROP 0
+#define IP6_TNL_ACCEPT 1
+
+typedef int ip6_tnl_hookfn(struct ip6_tnl *t, struct sk_buff *skb);
+
+struct ip6_tnl_hook_ops {
+ struct list_head list;
+ unsigned int hooknum;
+ int priority;
+ ip6_tnl_hookfn *hook;
+};
+
+enum ip6_tnl_hook_priorities {
+ IP6_TNL_PRI_FIRST = INT_MIN,
+ IP6_TNL_PRI_LAST = INT_MAX
+};
+
+/* Tunnel encapsulation limit destination sub-option */
+
+struct ipv6_tlv_tnl_enc_lim {
+ __u8 type; /* type-code for option */
+ __u8 length; /* option length */
+ __u8 encap_limit; /* tunnel encapsulation limit */
+} __attribute__ ((packed));
+
+#ifdef __KERNEL__
+extern int ip6ip6_tnl_create(struct ip6_tnl_parm *p, struct ip6_tnl **pt);
+
+extern struct ip6_tnl *ip6ip6_tnl_lookup(struct in6_addr *remote,
+ struct in6_addr *local);
+
+void ip6ip6_tnl_change(struct ip6_tnl *t, struct ip6_tnl_parm *p);
+
+extern int ip6ip6_kernel_tnl_add(struct ip6_tnl_parm *p);
+
+extern int ip6ip6_kernel_tnl_del(struct ip6_tnl *t);
+
+extern unsigned int ip6ip6_tnl_inc_max_kdev_count(unsigned int n);
+
+extern unsigned int ip6ip6_tnl_dec_max_kdev_count(unsigned int n);
+
+extern unsigned int ip6ip6_tnl_inc_min_kdev_count(unsigned int n);
+
+extern unsigned int ip6ip6_tnl_dec_min_kdev_count(unsigned int n);
+
+extern void ip6ip6_tnl_register_hook(struct ip6_tnl_hook_ops *reg);
+
+extern void ip6ip6_tnl_unregister_hook(struct ip6_tnl_hook_ops *reg);
+
+#ifdef CONFIG_IPV6_TUNNEL
+extern int __init ip6_tunnel_init(void);
+extern void ip6_tunnel_cleanup(void);
+#endif
+#endif
+#endif
diff -uprN linux-2.4.25.old/include/net/mipglue.h linux-2.4.25/include/net/mipglue.h
--- linux-2.4.25.old/include/net/mipglue.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.4.25/include/net/mipglue.h 2004-06-26 11:29:29.000000000 +0100
@@ -0,0 +1,266 @@
+/*
+ * Glue for Mobility support integration to IPv6
+ *
+ * Authors:
+ * Antti Tuominen
+ *
+ * $Id$
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef _NET_MIPGLUE_H
+#define _NET_MIPGLUE_H
+
+#ifndef USE_IPV6_MOBILITY
+#if defined(CONFIG_IPV6_MOBILITY) || defined(CONFIG_IPV6_MOBILITY_MODULE)
+#define USE_IPV6_MOBILITY
+#endif
+#endif
+
+/* symbols to indicate whether destination options received should take
+ * effect or not (see exthdrs.c, procrcv.c)
+ */
+#define MIPV6_DSTOPTS_ACCEPT 1
+#define MIPV6_DSTOPTS_DISCARD 0
+
+#define MIPV6_IGN_RTR 0
+#define MIPV6_ADD_RTR 1
+#define MIPV6_CHG_RTR 2
+
+/* MIPV6: Approximate maximum for mobile IPv6 options and headers */
+#define MIPV6_HEADERS 48
+
+#ifdef __KERNEL__
+#include
+#include
+#include
+
+struct sk_buff;
+struct ndisc_options;
+struct sock;
+struct ipv6_txoptions;
+struct flowi;
+struct dst_entry;
+struct in6_addr;
+struct inet6_ifaddr;
+
+#ifdef USE_IPV6_MOBILITY
+
+/* calls a procedure from mipv6-module */
+#define MIPV6_CALLPROC(X) if(mipv6_functions.X) mipv6_functions.X
+
+/* calls a function from mipv6-module, default-value if function not defined
+ */
+#define MIPV6_CALLFUNC(X,Y) (!mipv6_functions.X)?(Y):mipv6_functions.X
+
+/* sets a handler-function to process a call */
+#define MIPV6_SETCALL(X,Y) if(mipv6_functions.X) printk("mipv6: Warning, function assigned twice!\n"); \
+ mipv6_functions.X = Y
+#define MIPV6_RESETCALL(X) mipv6_functions.X = NULL
+
+/* pointers to mipv6 callable functions */
+struct mipv6_callable_functions {
+ void (*mipv6_initialize_dstopt_rcv) (struct sk_buff *skb);
+ int (*mipv6_finalize_dstopt_rcv) (int process);
+ int (*mipv6_handle_homeaddr) (struct sk_buff *skb, int optoff);
+ int (*mipv6_ra_rcv) (struct sk_buff *skb,
+ struct ndisc_options *ndopts);
+ void (*mipv6_icmp_rcv) (struct sk_buff *skb);
+ struct ipv6_txoptions * (*mipv6_modify_txoptions) (
+ struct sock *sk,
+ struct sk_buff *skb,
+ struct ipv6_txoptions *opt,
+ struct flowi *fl,
+ struct dst_entry **dst);
+ void (*mipv6_set_home) (int ifindex, struct in6_addr *homeaddr,
+ int plen, struct in6_addr *homeagent,
+ int plen2);
+ void (*mipv6_get_home_address) (struct in6_addr *home_addr);
+ void (*mipv6_get_care_of_address)(struct in6_addr *homeaddr,
+ struct in6_addr *coa);
+ int (*mipv6_is_home_addr)(struct in6_addr *addr);
+ void (*mipv6_change_router)(void);
+ void (*mipv6_check_dad)(struct in6_addr *home_addr);
+ void (*mipv6_icmp_swap_addrs)(struct sk_buff *skb);
+ int (*mipv6_forward)(struct sk_buff *skb);
+ int (*mipv6_mn_ha_probe)(struct inet6_ifaddr *ifp, u8 *lladdr);
+};
+
+extern struct mipv6_callable_functions mipv6_functions;
+
+extern void mipv6_invalidate_calls(void);
+
+extern int mipv6_handle_dstopt(struct sk_buff *skb, int optoff);
+
+static inline int
+ndisc_mip_mn_ha_probe(struct inet6_ifaddr *ifp, u8 *lladdr)
+{
+ return MIPV6_CALLFUNC(mipv6_mn_ha_probe, 0)(ifp, lladdr);
+}
+
+/* Must only be called for HA, no checks here */
+static inline int ip6_mipv6_forward(struct sk_buff *skb)
+{
+ return MIPV6_CALLFUNC(mipv6_forward, 0)(skb);
+}
+
+/*
+ * Avoid adding new default routers if the old one is still in use
+ */
+
+static inline int ndisc_mipv6_ra_rcv(struct sk_buff *skb,
+ struct ndisc_options *ndopts)
+{
+ return MIPV6_CALLFUNC(mipv6_ra_rcv, MIPV6_ADD_RTR)(skb, ndopts);
+}
+
+static inline int ipv6_chk_mip_home_addr(struct in6_addr *addr)
+{
+ return MIPV6_CALLFUNC(mipv6_is_home_addr, 0)(addr);
+}
+
+static inline void ndisc_mipv6_change_router(int change_rtr)
+{
+ if (change_rtr == MIPV6_CHG_RTR)
+ MIPV6_CALLPROC(mipv6_change_router)();
+}
+
+static inline void ndisc_check_mipv6_dad(struct in6_addr *target)
+{
+ MIPV6_CALLPROC(mipv6_check_dad)(target);
+}
+
+static inline void icmpv6_swap_mipv6_addrs(struct sk_buff *skb)
+{
+ MIPV6_CALLPROC(mipv6_icmp_swap_addrs)(skb);
+}
+
+static inline void mipv6_icmp_rcv(struct sk_buff *skb)
+{
+ MIPV6_CALLPROC(mipv6_icmp_rcv)(skb);
+}
+
+static inline int tcp_v6_get_mipv6_header_len(void)
+{
+ return MIPV6_HEADERS;
+}
+
+static inline struct in6_addr *
+mipv6_get_fake_hdr_daddr(struct in6_addr *hdaddr, struct in6_addr *daddr)
+{
+ return daddr;
+}
+
+static inline void
+addrconf_set_mipv6_mn_home(int ifindex, struct in6_addr *homeaddr, int plen,
+ struct in6_addr *homeagent, int plen2)
+{
+ MIPV6_CALLPROC(mipv6_set_home)(ifindex, homeaddr, plen, homeagent, plen2);
+}
+
+static inline void addrconf_get_mipv6_home_address(struct in6_addr *saddr)
+{
+ MIPV6_CALLPROC(mipv6_get_home_address)(saddr);
+}
+
+static inline struct ipv6_txoptions *
+ip6_add_mipv6_txoptions(struct sock *sk, struct sk_buff *skb,
+ struct ipv6_txoptions *opt, struct flowi *fl,
+ struct dst_entry **dst)
+{
+ return MIPV6_CALLFUNC(mipv6_modify_txoptions, opt)(sk, skb, opt, fl, dst);
+
+}
+
+static inline void
+ip6_mark_mipv6_packet(struct ipv6_txoptions *txopt, struct sk_buff *skb)
+{
+ struct inet6_skb_parm *opt;
+ if (txopt) {
+ opt = (struct inet6_skb_parm *)skb->cb;
+ opt->mipv6_flags = txopt->mipv6_flags;
+ }
+}
+
+static inline void
+ip6_free_mipv6_txoptions(struct ipv6_txoptions *opt,
+ struct ipv6_txoptions *orig_opt)
+{
+ if (opt && opt != orig_opt)
+ kfree(opt);
+}
+
+#else /* USE_IPV6_MOBILITY */
+
+#define mipv6_handle_dstopt ip6_tlvopt_unknown
+
+static inline int
+ndisc_mip_mn_ha_probe(struct inet6_ifaddr *ifp, u8 *lladdr)
+{
+ return 0;
+}
+
+static inline int ip6_mipv6_forward(struct sk_buff *skb)
+{
+ return 0;
+}
+
+static inline int ndisc_mipv6_ra_rcv(struct sk_buff *skb,
+ struct ndisc_options *ndopts)
+{
+ return MIPV6_ADD_RTR;
+}
+
+static inline int ipv6_chk_mip_home_addr(struct in6_addr *addr)
+{
+ return 0;
+}
+
+static inline void ndisc_mipv6_change_router(int change_rtr) {}
+
+static inline void ndisc_check_mipv6_dad(struct in6_addr *target) {}
+
+static inline void icmpv6_swap_mipv6_addrs(struct sk_buff *skb) {}
+
+static inline void mipv6_icmp_rcv(struct sk_buff *skb) {}
+
+static inline int tcp_v6_get_mipv6_header_len(void)
+{
+ return 0;
+}
+
+static inline struct in6_addr *
+mipv6_get_fake_hdr_daddr(struct in6_addr *hdaddr, struct in6_addr *daddr)
+{
+ return hdaddr;
+}
+
+static inline void
+addrconf_set_mipv6_mn_home(int ifindex, struct in6_addr *homeaddr, int plen,
+ struct in6_addr *homeagent, int plen2) {}
+
+static inline void addrconf_get_mipv6_home_address(struct in6_addr *saddr) {}
+
+static inline struct ipv6_txoptions *
+ip6_add_mipv6_txoptions(struct sock *sk, struct sk_buff *skb,
+ struct ipv6_txoptions *opt, struct flowi *fl,
+ struct dst_entry **dst)
+{
+ return opt;
+}
+
+static inline void
+ip6_mark_mipv6_packet(struct ipv6_txoptions *txopt, struct sk_buff *skb) {}
+
+static inline void
+ip6_free_mipv6_txoptions(struct ipv6_txoptions *opt,
+ struct ipv6_txoptions *orig_opt) {}
+
+#endif /* USE_IPV6_MOBILITY */
+#endif /* __KERNEL__ */
+#endif /* _NET_MIPGLUE_H */
diff -uprN linux-2.4.25.old/include/net/mipv6.h linux-2.4.25/include/net/mipv6.h
--- linux-2.4.25.old/include/net/mipv6.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.4.25/include/net/mipv6.h 2004-06-26 11:29:29.000000000 +0100
@@ -0,0 +1,258 @@
+/*
+ * Mobile IPv6 header-file
+ *
+ * Authors:
+ * Sami Kivisaari
+ *
+ * $Id$
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef _NET_MIPV6_H
+#define _NET_MIPV6_H
+
+#include
+#include
+#include
+
+/*
+ *
+ * Mobile IPv6 Protocol constants
+ *
+ */
+#define DHAAD_RETRIES 4 /* transmissions */
+#define INITIAL_BINDACK_TIMEOUT 1 /* seconds */
+#define INITIAL_DHAAD_TIMEOUT 3 /* seconds */
+#define INITIAL_SOLICIT_TIMER 3 /* seconds */
+#define MAX_BINDACK_TIMEOUT 32 /* seconds */
+#define MAX_NONCE_LIFE 240 /* seconds */
+#define MAX_TOKEN_LIFE 210 /* seconds */
+#define MAX_RR_BINDING_LIFE 420 /* seconds */
+#define MAX_UPDATE_RATE 3 /* 1/s (min delay=1s) */
+#define PREFIX_ADV_RETRIES 3 /* transmissions */
+#define PREFIX_ADV_TIMEOUT 3 /* seconds */
+
+#define MAX_FAST_UPDATES 5 /* transmissions */
+#define MAX_PFX_ADV_DELAY 1000 /* seconds */
+#define SLOW_UPDATE_RATE 10 /* 1/10s (max delay=10s)*/
+#define INITIAL_BINDACK_DAD_TIMEOUT 2 /* seconds */
+
+/*
+ *
+ * Mobile IPv6 (RFC 3775) Protocol configuration variable defaults
+ *
+ */
+#define DefHomeRtrAdvInterval 1000 /* seconds */
+#define DefMaxMobPfxAdvInterval 86400 /* seconds */
+#define DefMinDelayBetweenRAs 3 /* seconds (min 0.03) */
+#define DefMinMobPfxAdvInterval 600 /* seconds */
+#define DefInitialBindackTimeoutFirstReg 1.5 /* seconds */
+
+/* This is not actually specified in the draft, but is needed to avoid
+ * prefix solicitation storm when valid lifetime of a prefix is smaller
+ * than MAX_PFX_ADV_DELAY
+ */
+#define MIN_PFX_SOL_DELAY 5 /* seconds */
+
+/* Mobile IPv6 ICMP types */
+/*
+ * Official numbers from RFC 3775
+ */
+#define MIPV6_DHAAD_REQUEST 144
+#define MIPV6_DHAAD_REPLY 145
+#define MIPV6_PREFIX_SOLICIT 146
+#define MIPV6_PREFIX_ADV 147
+
+/* Binding update flag codes */
+#define MIPV6_BU_F_ACK 0x80
+#define MIPV6_BU_F_HOME 0x40
+#define MIPV6_BU_F_LLADDR 0x20
+#define MIPV6_BU_F_KEYMGM 0x10
+
+/* Binding ackknowledgment flag codes */
+#define MIPV6_BA_F_KEYMGM 0x80
+
+/* Binding error status */
+#define MIPV6_BE_HAO_WO_BINDING 1
+#define MIPV6_BE_UNKNOWN_MH_TYPE 2
+
+/* Mobility Header */
+struct mipv6_mh
+{
+ __u8 payload; /* Payload Protocol */
+ __u8 length; /* MH Length */
+ __u8 type; /* MH Type */
+ __u8 reserved; /* Reserved */
+ __u16 checksum; /* Checksum */
+ __u8 data[0]; /* Message specific data */
+} __attribute__ ((packed));
+
+/* Mobility Header type */
+#define IPPROTO_MOBILITY 135 /* RFC 3775*/
+/* Mobility Header Message Types */
+
+#define MIPV6_MH_BRR 0
+#define MIPV6_MH_HOTI 1
+#define MIPV6_MH_COTI 2
+#define MIPV6_MH_HOT 3
+#define MIPV6_MH_COT 4
+#define MIPV6_MH_BU 5
+#define MIPV6_MH_BA 6
+#define MIPV6_MH_BE 7
+
+/*
+ * Status codes for Binding Acknowledgements
+ */
+#define SUCCESS 0
+#define REASON_UNSPECIFIED 128
+#define ADMINISTRATIVELY_PROHIBITED 129
+#define INSUFFICIENT_RESOURCES 130
+#define HOME_REGISTRATION_NOT_SUPPORTED 131
+#define NOT_HOME_SUBNET 132
+#define NOT_HA_FOR_MN 133
+#define DUPLICATE_ADDR_DETECT_FAIL 134
+#define SEQUENCE_NUMBER_OUT_OF_WINDOW 135
+#define EXPIRED_HOME_NONCE_INDEX 136
+#define EXPIRED_CAREOF_NONCE_INDEX 137
+#define EXPIRED_NONCES 138
+#define REG_TYPE_CHANGE_FORBIDDEN 139
+/*
+ * Values for mipv6_flags in struct inet6_skb_parm
+ */
+
+#define MIPV6_RCV_TUNNEL 0x1
+#define MIPV6_SND_HAO 0x2
+#define MIPV6_SND_BU 0x4
+
+/*
+ * Mobility Header Message structures
+ */
+
+struct mipv6_mh_brr
+{
+ __u16 reserved;
+ /* Mobility options */
+} __attribute__ ((packed));
+
+struct mipv6_mh_bu
+{
+ __u16 sequence; /* sequence number of BU */
+ __u8 flags; /* flags */
+ __u8 reserved; /* reserved bits */
+ __u16 lifetime; /* lifetime of BU */
+ /* Mobility options */
+} __attribute__ ((packed));
+
+struct mipv6_mh_ba
+{
+ __u8 status; /* statuscode */
+ __u8 reserved; /* reserved bits */
+ __u16 sequence; /* sequence number of BA */
+ __u16 lifetime; /* lifetime in CN's bcache */
+ /* Mobility options */
+} __attribute__ ((packed));
+
+struct mipv6_mh_be
+{
+ __u8 status;
+ __u8 reserved;
+ struct in6_addr home_addr;
+ /* Mobility options */
+} __attribute__ ((packed));
+
+struct mipv6_mh_addr_ti
+{
+ __u16 reserved; /* Reserved */
+ u_int8_t init_cookie[8]; /* HoT/CoT Init Cookie */
+ /* Mobility options */
+} __attribute__ ((packed));
+
+struct mipv6_mh_addr_test
+{
+ __u16 nonce_index; /* Home/Care-of Nonce Index */
+ u_int8_t init_cookie[8]; /* HoT/CoT Init Cookie */
+ u_int8_t kgen_token[8]; /* Home/Care-of key generation token */
+ /* Mobility options */
+} __attribute__ ((packed));
+
+/*
+ * Mobility Options for various MH types.
+ */
+#define MIPV6_OPT_PAD1 0x00
+#define MIPV6_OPT_PADN 0x01
+#define MIPV6_OPT_BIND_REFRESH_ADVICE 0x02
+#define MIPV6_OPT_ALTERNATE_COA 0x03
+#define MIPV6_OPT_NONCE_INDICES 0x04
+#define MIPV6_OPT_AUTH_DATA 0x05
+
+#define MIPV6_SEQ_GT(x,y) \
+ ((short int)(((__u16)(x)) - ((__u16)(y))) > 0)
+
+/*
+ * Mobility Option structures
+ */
+
+struct mipv6_mo
+{
+ __u8 type;
+ __u8 length;
+ __u8 value[0]; /* type specific data */
+} __attribute__ ((packed));
+
+struct mipv6_mo_pad1
+{
+ __u8 type;
+} __attribute__ ((packed));
+
+struct mipv6_mo_padn
+{
+ __u8 type;
+ __u8 length;
+ __u8 data[0];
+} __attribute__ ((packed));
+
+struct mipv6_mo_alt_coa
+{
+ __u8 type;
+ __u8 length;
+ struct in6_addr addr; /* alternate care-of-address */
+} __attribute__ ((packed));
+
+struct mipv6_mo_nonce_indices
+{
+ __u8 type;
+ __u8 length;
+ __u16 home_nonce_i; /* Home Nonce Index */
+ __u16 careof_nonce_i; /* Careof Nonce Index */
+} __attribute__ ((packed));
+
+struct mipv6_mo_bauth_data
+{
+ __u8 type;
+ __u8 length;
+ __u8 data[0];
+} __attribute__ ((packed));
+
+struct mipv6_mo_br_advice
+{
+ __u8 type;
+ __u8 length;
+ __u16 refresh_interval; /* Refresh Interval */
+} __attribute__ ((packed));
+
+/*
+ * Home Address Destination Option structure
+ */
+struct mipv6_dstopt_homeaddr
+{
+ __u8 type; /* type-code for option */
+ __u8 length; /* option length */
+ struct in6_addr addr; /* home address */
+} __attribute__ ((packed));
+
+#endif /* _NET_MIPV6_H */
diff -uprN linux-2.4.25.old/include/net/ndisc.h linux-2.4.25/include/net/ndisc.h
--- linux-2.4.25.old/include/net/ndisc.h 2002-11-28 23:53:15.000000000 +0000
+++ linux-2.4.25/include/net/ndisc.h 2004-06-26 11:29:29.000000000 +0100
@@ -21,6 +21,10 @@
#define ND_OPT_REDIRECT_HDR 4
#define ND_OPT_MTU 5
+/* Mobile IPv6 specific ndisc options */
+#define ND_OPT_RTR_ADV_INTERVAL 7
+#define ND_OPT_HOME_AGENT_INFO 8
+
#define MAX_RTR_SOLICITATION_DELAY HZ
#define ND_REACHABLE_TIME (30*HZ)
@@ -57,7 +61,7 @@ struct nd_opt_hdr {
} __attribute__((__packed__));
struct ndisc_options {
- struct nd_opt_hdr *nd_opt_array[7];
+ struct nd_opt_hdr *nd_opt_array[10];
struct nd_opt_hdr *nd_opt_piend;
};
@@ -67,6 +71,8 @@ struct ndisc_options {
#define nd_opts_pi_end nd_opt_piend
#define nd_opts_rh nd_opt_array[ND_OPT_REDIRECT_HDR]
#define nd_opts_mtu nd_opt_array[ND_OPT_MTU]
+#define nd_opts_rai nd_opt_array[ND_OPT_RTR_ADV_INTERVAL]
+#define nd_opts_hai nd_opt_array[ND_OPT_HOME_AGENT_INFO]
extern struct nd_opt_hdr *ndisc_next_option(struct nd_opt_hdr *cur, struct nd_opt_hdr *end);
extern struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len, struct ndisc_options *ndopts);
@@ -83,6 +89,15 @@ extern void ndisc_send_ns(struct net_d
struct in6_addr *daddr,
struct in6_addr *saddr);
+extern void ndisc_send_na(struct net_device *dev,
+ struct neighbour *neigh,
+ struct in6_addr *daddr,
+ struct in6_addr *solicited_addr,
+ int router,
+ int solicited,
+ int override,
+ int inc_opt);
+
extern void ndisc_send_rs(struct net_device *dev,
struct in6_addr *saddr,
struct in6_addr *daddr);
diff -uprN linux-2.4.25.old/include/net/sock.h linux-2.4.25/include/net/sock.h
--- linux-2.4.25.old/include/net/sock.h 2004-02-18 13:36:32.000000000 +0000
+++ linux-2.4.25/include/net/sock.h 2004-06-26 11:29:30.000000000 +0100
@@ -149,7 +149,9 @@ struct ipv6_pinfo {
struct in6_addr rcv_saddr;
struct in6_addr daddr;
struct in6_addr *daddr_cache;
-
+#if defined(CONFIG_IPV6_SUBTREES)
+ struct in6_addr *saddr_cache;
+#endif
__u32 flow_label;
__u32 frag_size;
int hop_limit;
diff -uprN linux-2.4.25.old/net/Makefile linux-2.4.25/net/Makefile
--- linux-2.4.25.old/net/Makefile 2004-06-26 11:22:00.000000000 +0100
+++ linux-2.4.25/net/Makefile 2004-06-26 11:29:30.000000000 +0100
@@ -7,7 +7,7 @@
O_TARGET := network.o
-mod-subdirs := ipv4/netfilter ipv6/netfilter ipx irda bluetooth atm netlink sched core sctp
+mod-subdirs := ipv4/netfilter ipv6/netfilter ipx irda bluetooth atm netlink sched core sctp ipv6
export-objs := netsyms.o
subdir-y := core ethernet
@@ -25,6 +25,7 @@ subdir-$(CONFIG_IP_SCTP) += sctp
ifneq ($(CONFIG_IPV6),n)
ifneq ($(CONFIG_IPV6),)
subdir-$(CONFIG_NETFILTER) += ipv6/netfilter
+subdir-$(CONFIG_IPV6_MOBILITY) += ipv6/mobile_ip6
endif
endif
diff -uprN linux-2.4.25.old/net/core/neighbour.c linux-2.4.25/net/core/neighbour.c