Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Change the first argument of the encapsulation check fun...



details:   https://anonhg.NetBSD.org/src/rev/9cd28b4a77f1
branches:  trunk
changeset: 581559:9cd28b4a77f1
user:      tron <tron%NetBSD.org@localhost>
date:      Thu Jun 02 15:21:35 2005 +0000

description:
Change the first argument of the encapsulation check function from
"const struct mbuf *" to "struct mbuf *". Without this change the
actual implementation cannot even use m_copydata() on the mbuf chain
which is broken.

diffstat:

 sys/net/if_stf.c       |   8 ++++----
 sys/netinet/in_gif.c   |   6 +++---
 sys/netinet/ip_encap.c |   4 ++--
 sys/netinet/ip_encap.h |   6 +++---
 sys/netinet6/in6_gif.c |   6 +++---
 sys/netinet6/in6_gif.h |  14 +++++++-------
 6 files changed, 22 insertions(+), 22 deletions(-)

diffs (167 lines):

diff -r 7bdbe5f34782 -r 9cd28b4a77f1 sys/net/if_stf.c
--- a/sys/net/if_stf.c  Thu Jun 02 15:19:28 2005 +0000
+++ b/sys/net/if_stf.c  Thu Jun 02 15:21:35 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_stf.c,v 1.47 2005/06/02 10:54:58 tron Exp $ */
+/*     $NetBSD: if_stf.c,v 1.48 2005/06/02 15:21:35 tron Exp $ */
 /*     $KAME: if_stf.c,v 1.62 2001/06/07 22:32:16 itojun Exp $ */
 
 /*
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_stf.c,v 1.47 2005/06/02 10:54:58 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_stf.c,v 1.48 2005/06/02 15:21:35 tron Exp $");
 
 #include "opt_inet.h"
 
@@ -165,7 +165,7 @@
 };
 
 void stfattach __P((int));
-static int stf_encapcheck __P((const struct mbuf *, int, int, void *));
+static int stf_encapcheck __P((struct mbuf *, int, int, void *));
 static struct in6_ifaddr *stf_getsrcifa6 __P((struct ifnet *));
 static int stf_output __P((struct ifnet *, struct mbuf *, struct sockaddr *,
        struct rtentry *));
@@ -247,7 +247,7 @@
 
 static int
 stf_encapcheck(m, off, proto, arg)
-       const struct mbuf *m;
+       struct mbuf *m;
        int off;
        int proto;
        void *arg;
diff -r 7bdbe5f34782 -r 9cd28b4a77f1 sys/netinet/in_gif.c
--- a/sys/netinet/in_gif.c      Thu Jun 02 15:19:28 2005 +0000
+++ b/sys/netinet/in_gif.c      Thu Jun 02 15:21:35 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_gif.c,v 1.43 2005/06/02 10:54:58 tron Exp $ */
+/*     $NetBSD: in_gif.c,v 1.44 2005/06/02 15:21:35 tron Exp $ */
 /*     $KAME: in_gif.c,v 1.66 2001/07/29 04:46:09 itojun Exp $ */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.43 2005/06/02 10:54:58 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_gif.c,v 1.44 2005/06/02 15:21:35 tron Exp $");
 
 #include "opt_inet.h"
 #include "opt_iso.h"
@@ -386,7 +386,7 @@
  * matched the physical addr family.  see gif_encapcheck().
  */
 int
-gif_encapcheck4(const struct mbuf *m, int off, int proto, void *arg)
+gif_encapcheck4(struct mbuf *m, int off, int proto, void *arg)
 {
        struct ip ip;
        struct gif_softc *sc;
diff -r 7bdbe5f34782 -r 9cd28b4a77f1 sys/netinet/ip_encap.c
--- a/sys/netinet/ip_encap.c    Thu Jun 02 15:19:28 2005 +0000
+++ b/sys/netinet/ip_encap.c    Thu Jun 02 15:21:35 2005 +0000
@@ -70,7 +70,7 @@
 #define USE_RADIX
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.23 2005/02/03 03:49:01 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.24 2005/06/02 15:21:35 tron Exp $");
 
 #include "opt_mrouting.h"
 #include "opt_inet.h"
@@ -645,7 +645,7 @@
 
 const struct encaptab *
 encap_attach_func(int af, int proto,
-    int (*func)(const struct mbuf *, int, int, void *),
+    int (*func)(struct mbuf *, int, int, void *),
     const struct protosw *psw, void *arg)
 {
        struct encaptab *ep;
diff -r 7bdbe5f34782 -r 9cd28b4a77f1 sys/netinet/ip_encap.h
--- a/sys/netinet/ip_encap.h    Thu Jun 02 15:19:28 2005 +0000
+++ b/sys/netinet/ip_encap.h    Thu Jun 02 15:21:35 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_encap.h,v 1.6 2005/02/02 21:41:55 perry Exp $       */
+/*     $NetBSD: ip_encap.h,v 1.7 2005/06/02 15:21:35 tron Exp $        */
 /*     $KAME: ip_encap.h,v 1.7 2000/03/25 07:23:37 sumikawa Exp $      */
 
 /*
@@ -50,7 +50,7 @@
        struct sockaddr *srcmask;
        struct sockaddr *dst;           /* remote addr */
        struct sockaddr *dstmask;
-       int (*func) (const struct mbuf *, int, int, void *);
+       int (*func) (struct mbuf *, int, int, void *);
        const struct protosw *psw;      /* only pr_input will be used */
        void *arg;                      /* passed via PACKET_TAG_ENCAP */
 };
@@ -63,7 +63,7 @@
        const struct sockaddr *, const struct sockaddr *,
        const struct sockaddr *, const struct protosw *, void *);
 const struct encaptab *encap_attach_func(int, int,
-       int (*)(const struct mbuf *, int, int, void *),
+       int (*)(struct mbuf *, int, int, void *),
        const struct protosw *, void *);
 void   encap6_ctlinput(int, struct sockaddr *, void *);
 int    encap_detach(const struct encaptab *);
diff -r 7bdbe5f34782 -r 9cd28b4a77f1 sys/netinet6/in6_gif.c
--- a/sys/netinet6/in6_gif.c    Thu Jun 02 15:19:28 2005 +0000
+++ b/sys/netinet6/in6_gif.c    Thu Jun 02 15:21:35 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_gif.c,v 1.41 2005/06/02 10:54:58 tron Exp $        */
+/*     $NetBSD: in6_gif.c,v 1.42 2005/06/02 15:21:35 tron Exp $        */
 /*     $KAME: in6_gif.c,v 1.62 2001/07/29 04:27:25 itojun Exp $        */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.41 2005/06/02 10:54:58 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_gif.c,v 1.42 2005/06/02 15:21:35 tron Exp $");
 
 #include "opt_inet.h"
 #include "opt_iso.h"
@@ -364,7 +364,7 @@
  */
 int
 gif_encapcheck6(m, off, proto, arg)
-       const struct mbuf *m;
+       struct mbuf *m;
        int off;
        int proto;
        void *arg;
diff -r 7bdbe5f34782 -r 9cd28b4a77f1 sys/netinet6/in6_gif.h
--- a/sys/netinet6/in6_gif.h    Thu Jun 02 15:19:28 2005 +0000
+++ b/sys/netinet6/in6_gif.h    Thu Jun 02 15:21:35 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_gif.h,v 1.9 2002/11/11 18:35:28 itojun Exp $       */
+/*     $NetBSD: in6_gif.h,v 1.10 2005/06/02 15:21:35 tron Exp $        */
 /*     $KAME: in6_gif.h,v 1.7 2001/07/26 06:53:16 jinmei Exp $ */
 
 /*
@@ -38,13 +38,13 @@
 
 struct gif_softc;
 struct sockaddr;
-int in6_gif_input __P((struct mbuf **, int *, int));
-int in6_gif_output __P((struct ifnet *, int, struct mbuf *));
+int in6_gif_input(struct mbuf **, int *, int);
+int in6_gif_output(struct ifnet *, int, struct mbuf *);
 #ifdef GIF_ENCAPCHECK
-int gif_encapcheck6 __P((const struct mbuf *, int, int, void *));
+int gif_encapcheck6(struct mbuf *, int, int, void *);
 #endif
-int in6_gif_attach __P((struct gif_softc *));
-int in6_gif_detach __P((struct gif_softc *));
-void in6_gif_ctlinput __P((int, struct sockaddr *, void *));
+int in6_gif_attach(struct gif_softc *);
+int in6_gif_detach(struct gif_softc *);
+void in6_gif_ctlinput(int, struct sockaddr *, void *);
 
 #endif /* _NETINET6_IN6_GIF_H_ */



Home | Main Index | Thread Index | Old Index