Module Name: src Committed By: pooka Date: Tue May 26 23:43:40 UTC 2009
Modified Files: src/sys/rump/librump/rumpnet: netisr.c src/sys/rump/librump/rumpnet/opt: opt_inet.h src/sys/rump/net/lib/libnetinet: Makefile.inc Added Files: src/sys/rump/librump/rumpnet/opt: opt_inet6.h Log Message: Support IPv6 in rump. I'd have liked to introduce a netinet6 component, but due to ifdef happiness permeating the sources, it's a compile decision for now, so netinet pulls in both inet and inet6. One issue, one single issue: the loopback interface still needs to be created for IPv6 to work. I have patches to take care of it automatically if the appropriate component (net) is present, but they require a bit more testing before commit. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpnet/netisr.c cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpnet/opt/opt_inet.h cvs rdiff -u -r0 -r1.1 src/sys/rump/librump/rumpnet/opt/opt_inet6.h cvs rdiff -u -r1.3 -r1.4 src/sys/rump/net/lib/libnetinet/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/librump/rumpnet/netisr.c diff -u src/sys/rump/librump/rumpnet/netisr.c:1.3 src/sys/rump/librump/rumpnet/netisr.c:1.4 --- src/sys/rump/librump/rumpnet/netisr.c:1.3 Wed Mar 18 10:22:45 2009 +++ src/sys/rump/librump/rumpnet/netisr.c Tue May 26 23:43:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: netisr.c,v 1.3 2009/03/18 10:22:45 cegger Exp $ */ +/* $NetBSD: netisr.c,v 1.4 2009/05/26 23:43:39 pooka Exp $ */ /* * Copyright (c) 2008 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: netisr.c,v 1.3 2009/03/18 10:22:45 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netisr.c,v 1.4 2009/05/26 23:43:39 pooka Exp $"); #include <sys/param.h> #include <sys/intr.h> @@ -34,6 +34,8 @@ #include <netinet/in.h> #include <netinet/ip_var.h> #include <netinet/if_inarp.h> +#include <netinet/ip6.h> +#include <netinet6/ip6_var.h> #include <net/netisr.h> #include "rump_net_private.h" @@ -68,6 +70,15 @@ } __weak_alias(arpintr,__arpintr_stub); +void __ip6intr_stub(void); +void +__ip6intr_stub(void) +{ + + panic("ip6intr called but networking stack missing"); +} +__weak_alias(ip6intr,__ip6intr_stub); + void rump_netisr_init(void) { @@ -76,4 +87,6 @@ (void (*)(void *))ipintr, NULL); netisrs[NETISR_ARP] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE, (void (*)(void *))arpintr, NULL); + netisrs[NETISR_IPV6] = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE, + (void (*)(void *))ip6intr, NULL); } Index: src/sys/rump/librump/rumpnet/opt/opt_inet.h diff -u src/sys/rump/librump/rumpnet/opt/opt_inet.h:1.1 src/sys/rump/librump/rumpnet/opt/opt_inet.h:1.2 --- src/sys/rump/librump/rumpnet/opt/opt_inet.h:1.1 Wed Oct 15 13:00:40 2008 +++ src/sys/rump/librump/rumpnet/opt/opt_inet.h Tue May 26 23:43:39 2009 @@ -1,3 +1,4 @@ -/* $NetBSD: opt_inet.h,v 1.1 2008/10/15 13:00:40 pooka Exp $ */ +/* $NetBSD: opt_inet.h,v 1.2 2009/05/26 23:43:39 pooka Exp $ */ -#define INET +#define INET 1 +#define INET6 1 Index: src/sys/rump/net/lib/libnetinet/Makefile.inc diff -u src/sys/rump/net/lib/libnetinet/Makefile.inc:1.3 src/sys/rump/net/lib/libnetinet/Makefile.inc:1.4 --- src/sys/rump/net/lib/libnetinet/Makefile.inc:1.3 Tue Feb 3 00:33:48 2009 +++ src/sys/rump/net/lib/libnetinet/Makefile.inc Tue May 26 23:43:39 2009 @@ -1,13 +1,20 @@ -# $NetBSD: Makefile.inc,v 1.3 2009/02/03 00:33:48 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.4 2009/05/26 23:43:39 pooka Exp $ # -.PATH: ${.CURDIR}/../../../../netinet +.PATH: ${.CURDIR}/../../../../netinet ${.CURDIR}/../../../../netinet6 -# IP +# INET SRCS+= in_proto.c igmp.c in.c in_offload.c in_pcb.c ip_icmp.c \ ip_flow.c ip_id.c ip_input.c ip_output.c raw_ip.c in_cksum.c \ cpu_in_cksum.c in4_cksum.c ip_encap.c +# INET6 +SRCS+= dest6.c frag6.c icmp6.c in6.c in6_cksum.c in6_ifattach.c \ + in6_offload.c in6_pcb.c in6_proto.c in6_src.c ip6_flow.c \ + ip6_forward.c ip6_id.c ip6_input.c ip6_mroute.c ip6_output.c \ + mld6.c nd6.c nd6_nbr.c nd6_rtr.c raw_ip6.c route6.c scope6.c \ + udp6_output.c udp6_usrreq.c + # ARP SRCS+= if_arp.c Added files: Index: src/sys/rump/librump/rumpnet/opt/opt_inet6.h diff -u /dev/null src/sys/rump/librump/rumpnet/opt/opt_inet6.h:1.1 --- /dev/null Tue May 26 23:43:40 2009 +++ src/sys/rump/librump/rumpnet/opt/opt_inet6.h Tue May 26 23:43:39 2009 @@ -0,0 +1 @@ +/* $NetBSD: opt_inet6.h,v 1.1 2009/05/26 23:43:39 pooka Exp $ */