⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mipv6-1.0-v2.4.22.patch

📁 mobile ipv6协议Linux实现源代码
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
+     <para>+       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.+     </para>++     </sect1>+     <sect1><title>8. TRANSLATION</title>++     <para>+       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.+     </para>++     </sect1>+     <sect1><title>9. TERMINATION</title>++     <para>+       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.+     </para>++     </sect1>+     <sect1><title>10. FUTURE REVISIONS OF THIS LICENSE</title>++     <para>+       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/.+     </para>++     <para>+       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.+     </para>++     </sect1>+  </appendix>+</book>diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/linux/icmpv6.h devel/include/linux/icmpv6.h--- linux-2.4/include/linux/icmpv6.h	Sat Aug  2 00:07:52 2003+++ devel/include/linux/icmpv6.h	Thu Oct  2 13:36:16 2003@@ -40,14 +40,16 @@                 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 <asm/byteorder.h>" #endif@@ -70,6 +72,7 @@ #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 -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/linux/if_arp.h devel/include/linux/if_arp.h--- linux-2.4/include/linux/if_arp.h	Sat Aug  2 00:07:52 2003+++ devel/include/linux/if_arp.h	Thu Oct  2 13:36:15 2003@@ -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 -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/linux/in6.h devel/include/linux/in6.h--- linux-2.4/include/linux/in6.h	Sat Aug  2 00:07:52 2003+++ devel/include/linux/in6.h	Mon Sep 29 16:48:20 2003@@ -142,6 +142,11 @@ #define IPV6_TLV_JUMBO		194  /*+ *	Mobile IPv6 TLV options.+ */+#define MIPV6_TLV_HOMEADDR	201++/*  *	IPV6 socket options  */ diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/linux/ipv6.h devel/include/linux/ipv6.h--- linux-2.4/include/linux/ipv6.h	Sat Aug  2 00:07:52 2003+++ devel/include/linux/ipv6.h	Mon Sep 29 16:49:15 2003@@ -29,6 +29,7 @@  #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@@ -74,6 +75,18 @@ };  /*+ *	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;+};++/*  *	IPv6 fixed header  *  *	BEWARE, it is incorrect. The first 4 bits of flow_lbl@@ -110,11 +123,14 @@ 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; }; diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/linux/ipv6_route.h devel/include/linux/ipv6_route.h--- linux-2.4/include/linux/ipv6_route.h	Sat Aug  2 00:07:52 2003+++ devel/include/linux/ipv6_route.h	Tue Aug  5 14:11:48 2003@@ -32,6 +32,7 @@ #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 -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/linux/ipv6_tunnel.h devel/include/linux/ipv6_tunnel.h--- linux-2.4/include/linux/ipv6_tunnel.h	Thu Jan  1 02:00:00 1970+++ devel/include/linux/ipv6_tunnel.h	Wed Sep 24 14:29:27 2003@@ -0,0 +1,34 @@+/*+ * $Id: s.ipv6_tunnel.h 1.4 03/09/16 01:46:35+03:00 vnuorval@dsl-hkigw1a8b.dial.inet.fi $+ */++#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 */+};++#endifdiff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/linux/rtnetlink.h devel/include/linux/rtnetlink.h--- linux-2.4/include/linux/rtnetlink.h	Sat Aug  2 00:07:52 2003+++ devel/include/linux/rtnetlink.h	Tue Aug 26 11:08:55 2003@@ -307,15 +307,17 @@ 	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		0x80diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/linux/sysctl.h devel/include/linux/sysctl.h--- linux-2.4/include/linux/sysctl.h	Tue Aug 26 10:11:24 2003+++ devel/include/linux/sysctl.h	Mon Sep 29 16:48:09 2003@@ -354,7 +354,24 @@ 	NET_IPV6_NEIGH=17, 	NET_IPV6_ROUTE=18, 	NET_IPV6_ICMP=19,-	NET_IPV6_BINDV6ONLY=20+	NET_IPV6_BINDV6ONLY=20,+	NET_IPV6_MOBILITY=21+};++/* /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 -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/net/addrconf.h devel/include/net/addrconf.h--- linux-2.4/include/net/addrconf.h	Sat Aug  2 00:07:53 2003+++ devel/include/net/addrconf.h	Thu Oct  2 13:40:06 2003@@ -16,9 +16,11 @@ #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@@ -86,6 +88,7 @@ extern void ipv6_mc_init_dev(struct inet6_dev *idev); extern void ipv6_mc_destroy_dev(struct inet6_dev *idev); 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);diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/net/ip6_route.h devel/include/net/ip6_route.h--- linux-2.4/include/net/ip6_route.h	Sat Aug  2 00:07:53 2003+++ devel/include/net/ip6_route.h	Thu Oct  2 13:40:06 2003@@ -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			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 @@  */  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 @@ 	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 -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/include/net/ipv6.h devel/include/net/ipv6.h--- linux-2.4/include/net/ipv6.h	Sat Aug  2 00:07:53 2003+++ devel/include/net/ipv6.h	Thu Oct  2 13:39:14 2003@@ -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		0xd2	/* Mobility header */  #define NEXTHDR_MAX		255 @@ -145,9 +146,12 @@ 	__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; @@ -254,6 +258,38 @@ { 	return ((a->s6_addr32[0] | a->s6_addr32[1] |  		 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;+

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -