Created
June 21, 2014 07:38
-
-
Save syuu1228/dcbeb91db14c701a7ced to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 9f7df95b77e12370da9a87c8cd9cea859e6d546e Mon Sep 17 00:00:00 2001 | |
From: Takuya ASADA <syuu@cloudius-systems.com> | |
Date: Sat, 21 Jun 2014 16:37:08 +0900 | |
Subject: [PATCH] network: add in6addr_any | |
Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com> | |
--- | |
bsd/sys/netinet6/in6.cc | 94 +++++++++++++++++++++++++++++++++++++++++++++++++ | |
build.mk | 1 + | |
2 files changed, 95 insertions(+) | |
create mode 100644 bsd/sys/netinet6/in6.cc | |
diff --git a/bsd/sys/netinet6/in6.cc b/bsd/sys/netinet6/in6.cc | |
new file mode 100644 | |
index 0000000..a03ecc6 | |
--- /dev/null | |
+++ b/bsd/sys/netinet6/in6.cc | |
@@ -0,0 +1,94 @@ | |
+/*- | |
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | |
+ * All rights reserved. | |
+ * | |
+ * Redistribution and use in source and binary forms, with or without | |
+ * modification, are permitted provided that the following conditions | |
+ * are met: | |
+ * 1. Redistributions of source code must retain the above copyright | |
+ * notice, this list of conditions and the following disclaimer. | |
+ * 2. Redistributions in binary form must reproduce the above copyright | |
+ * notice, this list of conditions and the following disclaimer in the | |
+ * documentation and/or other materials provided with the distribution. | |
+ * 3. Neither the name of the project nor the names of its contributors | |
+ * may be used to endorse or promote products derived from this software | |
+ * without specific prior written permission. | |
+ * | |
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | |
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE | |
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
+ * SUCH DAMAGE. | |
+ * | |
+ * $KAME: in6.c,v 1.259 2002/01/21 11:37:50 keiichi Exp $ | |
+ */ | |
+ | |
+/*- | |
+ * Copyright (c) 1982, 1986, 1991, 1993 | |
+ * The Regents of the University of California. All rights reserved. | |
+ * | |
+ * Redistribution and use in source and binary forms, with or without | |
+ * modification, are permitted provided that the following conditions | |
+ * are met: | |
+ * 1. Redistributions of source code must retain the above copyright | |
+ * notice, this list of conditions and the following disclaimer. | |
+ * 2. Redistributions in binary form must reproduce the above copyright | |
+ * notice, this list of conditions and the following disclaimer in the | |
+ * documentation and/or other materials provided with the distribution. | |
+ * 4. Neither the name of the University nor the names of its contributors | |
+ * may be used to endorse or promote products derived from this software | |
+ * without specific prior written permission. | |
+ * | |
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
+ * SUCH DAMAGE. | |
+ * | |
+ * @(#)in.c 8.2 (Berkeley) 11/15/93 | |
+ */ | |
+ | |
+#include <sys/cdefs.h> | |
+ | |
+#include <osv/ioctl.h> | |
+ | |
+#include <bsd/porting/netport.h> | |
+ | |
+#include <bsd/sys/sys/param.h> | |
+#include <bsd/sys/sys/priv.h> | |
+#include <bsd/sys/sys/socket.h> | |
+ | |
+#include <bsd/sys/net/if.h> | |
+#include <bsd/sys/net/if_var.h> | |
+#include <bsd/sys/net/if_arp.h> | |
+#include <bsd/sys/net/if_dl.h> | |
+#include <bsd/sys/net/if_llatbl.h> | |
+#include <bsd/sys/net/if_types.h> | |
+#include <bsd/sys/net/route.h> | |
+#include <bsd/sys/net/vnet.h> | |
+ | |
+#include <bsd/sys/netinet/in.h> | |
+#include <bsd/sys/netinet/in_var.h> | |
+#include <bsd/sys/netinet/in_pcb.h> | |
+#include <bsd/sys/netinet/ip_var.h> | |
+#include <bsd/sys/netinet/igmp_var.h> | |
+ | |
+#include <bsd/sys/netinet/udp.h> | |
+#include <bsd/sys/netinet/udp_var.h> | |
+ | |
+#include <netinet6/in6.h> | |
+ | |
+const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT; | |
+ | |
diff --git a/build.mk b/build.mk | |
index 3b95f8e..98411a4 100644 | |
--- a/build.mk | |
+++ b/build.mk | |
@@ -516,6 +516,7 @@ bsd += bsd/sys/netinet/cc/cc.o | |
bsd += bsd/sys/netinet/cc/cc_cubic.o | |
bsd += bsd/sys/netinet/cc/cc_htcp.o | |
bsd += bsd/sys/netinet/cc/cc_newreno.o | |
+bsd += bsd/sys/netinet6/in6.o | |
bsd += bsd/sys/xdr/xdr.o | |
bsd += bsd/sys/xdr/xdr_array.o | |
bsd += bsd/sys/xdr/xdr_mem.o | |
-- | |
1.9.3 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment