summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-01-13 05:03:46 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-01-13 05:03:46 +0000
commit4230b66ed1e7f90ad07b01652000dd436c1dab6b (patch)
tree8a137a688ba9417986c739d04bce83f339301da6 /sys
parentf20f4e54963db3b234309be7e57ceec18627a77c (diff)
Add an ip4_input6() for use with IPv6 (just a wrapper for
ip4_input()), add prototype, ifdef include files.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_ah.h6
-rw-r--r--sys/netinet/ip_esp.h8
-rw-r--r--sys/netinet/ip_ip4.c14
-rw-r--r--sys/netinet/ip_ip4.h8
-rw-r--r--sys/netinet/ip_ipsp.h6
5 files changed, 35 insertions, 7 deletions
diff --git a/sys/netinet/ip_ah.h b/sys/netinet/ip_ah.h
index 2b2bbbe5a9a..be7f3a2be65 100644
--- a/sys/netinet/ip_ah.h
+++ b/sys/netinet/ip_ah.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah.h,v 1.22 2000/01/09 23:42:37 angelos Exp $ */
+/* $OpenBSD: ip_ah.h,v 1.23 2000/01/13 05:03:45 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -40,6 +40,9 @@
* Per RFC1826 (Atkinson, 1995)
*/
+#ifndef _NETINET_AH_H_
+#define _NETINET_AH_H_
+
struct ah_old
{
u_int8_t ah_nh; /* Next header (protocol) */
@@ -110,3 +113,4 @@ int ah6_input __P((struct mbuf **, int *, int));
extern int ah_enable;
struct ahstat ahstat;
#endif /* _KERNEL */
+#endif /* _NETINET_AH_H_ */
diff --git a/sys/netinet/ip_esp.h b/sys/netinet/ip_esp.h
index a4dc7ce5786..3146ebaf1ef 100644
--- a/sys/netinet/ip_esp.h
+++ b/sys/netinet/ip_esp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.h,v 1.29 2000/01/09 23:42:37 angelos Exp $ */
+/* $OpenBSD: ip_esp.h,v 1.30 2000/01/13 05:03:45 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -40,6 +40,9 @@
* Per RFC1827 (Atkinson, 1995)
*/
+#ifndef _NETINET_ESP_H_
+#define _NETINET_ESP_H_
+
/* Various defines for the "new" ESP */
#define ESP_NEW_ALEN 12 /* 96bits authenticator */
@@ -103,4 +106,5 @@ int esp6_input __P((struct mbuf **, int *, int));
extern int esp_enable;
struct espstat espstat;
-#endif /* _Kernel */
+#endif /* _KERNEL */
+#endif _NETINET_ESP_H_
diff --git a/sys/netinet/ip_ip4.c b/sys/netinet/ip_ip4.c
index 8d8242a6462..51b794a3eee 100644
--- a/sys/netinet/ip_ip4.c
+++ b/sys/netinet/ip_ip4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ip4.c,v 1.45 2000/01/02 09:31:03 angelos Exp $ */
+/* $OpenBSD: ip_ip4.c,v 1.46 2000/01/13 05:03:45 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -95,6 +95,18 @@ int ip4_allow = 0;
struct ip4stat ip4stat;
+#ifdef INET6
+/*
+ * Really only a wrapper for ip4_input(), for use with IPv6.
+ */
+int
+ip4_input6(struct mbuf *m, int *offp, int proto)
+{
+ ip4_input(m, *offp);
+ return IPPROTO_DONE;
+}
+#endif /* INET6 */
+
/*
* ip4_input gets called when we receive an IPv4 encapsulated packet,
* either because we got it at a real interface, or because AH or ESP
diff --git a/sys/netinet/ip_ip4.h b/sys/netinet/ip_ip4.h
index 2c58b8d804d..5e15d9c4bdd 100644
--- a/sys/netinet/ip_ip4.h
+++ b/sys/netinet/ip_ip4.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ip4.h,v 1.16 1999/12/09 09:02:59 angelos Exp $ */
+/* $OpenBSD: ip_ip4.h,v 1.17 2000/01/13 05:03:45 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -35,6 +35,9 @@
* PURPOSE.
*/
+#ifndef _NETINET_IP4_H_
+#define _NETINET_IP4_H_
+
/*
* IP-inside-IP processing.
* Not quite all the functionality of RFC-1853, but the main idea is there.
@@ -73,4 +76,5 @@ int ip4_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
extern int ip4_allow;
extern struct ip4stat ip4stat;
-#endif
+#endif /* _KERNEL */
+#endif /* _NETINET_IP4_H_ */
diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h
index 6df506c0725..e0769b1fc08 100644
--- a/sys/netinet/ip_ipsp.h
+++ b/sys/netinet/ip_ipsp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.h,v 1.56 2000/01/13 00:34:31 angelos Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.57 2000/01/13 05:03:45 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -551,6 +551,10 @@ extern int ipe4_output(struct mbuf *, struct tdb *, struct mbuf **, int, int);
extern void ipe4_input __P((struct mbuf *, ...));
extern void ip4_input __P((struct mbuf *, ...));
+#ifdef INET6
+extern int ip4_input6 __P((struct mbuf *, int *, int));
+#endif /* INET */
+
/* XF_ETHERIP */
extern int etherip_output(struct mbuf *, struct tdb *, struct mbuf **,
int, int);