Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet6 reduce diff with kame. whitespace changes only.



details:   https://anonhg.NetBSD.org/src/rev/f80cc84d1bb5
branches:  trunk
changeset: 516073:f80cc84d1bb5
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Oct 15 03:55:37 2001 +0000

description:
reduce diff with kame.  whitespace changes only.

diffstat:

 sys/netinet6/ah.h            |  10 +++---
 sys/netinet6/ah_core.c       |  12 +++---
 sys/netinet6/ah_input.c      |  68 ++++++++++++++++---------------------------
 sys/netinet6/ah_output.c     |  24 +++++++-------
 sys/netinet6/esp.h           |  36 +++++++++++-----------
 sys/netinet6/esp_core.c      |  18 ++++-------
 sys/netinet6/esp_input.c     |  22 +++++++-------
 sys/netinet6/esp_output.c    |  28 +++++++++---------
 sys/netinet6/ipcomp.h        |   8 ++--
 sys/netinet6/ipcomp_core.c   |  10 +++---
 sys/netinet6/ipcomp_input.c  |  12 +++---
 sys/netinet6/ipcomp_output.c |  12 +++---
 12 files changed, 119 insertions(+), 141 deletions(-)

diffs (truncated from 790 to 300 lines):

diff -r 80b72da85a9e -r f80cc84d1bb5 sys/netinet6/ah.h
--- a/sys/netinet6/ah.h Mon Oct 15 03:00:22 2001 +0000
+++ b/sys/netinet6/ah.h Mon Oct 15 03:55:37 2001 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ah.h,v 1.16 2001/05/30 12:04:54 mrg Exp $      */
-/*     $KAME: ah.h,v 1.13 2000/10/18 21:28:00 itojun Exp $     */
+/*     $NetBSD: ah.h,v 1.17 2001/10/15 03:55:37 itojun Exp $   */
+/*     $KAME: ah.h,v 1.16 2001/09/04 08:43:19 itojun Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -63,7 +63,7 @@
 
 struct ah_algorithm_state {
        struct secasvar *sav;
-       void* foo;      /*per algorithm data - maybe*/
+       void* foo;      /* per algorithm data - maybe */
 };
 
 struct ah_algorithm {
@@ -102,6 +102,6 @@
 extern void ah6_ctlinput __P((int, struct sockaddr *, void *));
 #endif /* INET6 */
 
-#endif /*_KERNEL*/
+#endif /* _KERNEL */
 
-#endif /*_NETINET6_AH_H_*/
+#endif /* _NETINET6_AH_H_ */
diff -r 80b72da85a9e -r f80cc84d1bb5 sys/netinet6/ah_core.c
--- a/sys/netinet6/ah_core.c    Mon Oct 15 03:00:22 2001 +0000
+++ b/sys/netinet6/ah_core.c    Mon Oct 15 03:55:37 2001 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ah_core.c,v 1.23 2001/02/21 01:27:58 itojun Exp $      */
-/*     $KAME: ah_core.c,v 1.41 2001/02/21 00:35:59 itojun Exp $        */
+/*     $NetBSD: ah_core.c,v 1.24 2001/10/15 03:55:37 itojun Exp $      */
+/*     $KAME: ah_core.c,v 1.45 2001/07/26 06:53:14 jinmei Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -726,7 +726,7 @@
        if (!n)
                panic("ah_update_mbuf: wrong offset specified");
 
-       for (/*nothing*/; n && len > 0; n = n->m_next) {
+       for (/* nothing */; n && len > 0; n = n->m_next) {
                if (n->m_len == 0)
                        continue;
                if (n->m_len - off < len)
@@ -770,7 +770,7 @@
                return EINVAL;
 
        ahseen = 0;
-       hdrtype = -1;   /*dummy, it is called IPPROTO_IP*/
+       hdrtype = -1;   /* dummy, it is called IPPROTO_IP */
 
        off = 0;
 
@@ -778,12 +778,12 @@
        if (error)
                return error;
 
-       advancewidth = 0;       /*safety*/
+       advancewidth = 0;       /* safety */
 
 again:
        /* gory. */
        switch (hdrtype) {
-       case -1:        /*first one only*/
+       case -1:        /* first one only */
            {
                /*
                 * copy ip hdr, modify to fit the AH checksum rule,
diff -r 80b72da85a9e -r f80cc84d1bb5 sys/netinet6/ah_input.c
--- a/sys/netinet6/ah_input.c   Mon Oct 15 03:00:22 2001 +0000
+++ b/sys/netinet6/ah_input.c   Mon Oct 15 03:55:37 2001 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ah_input.c,v 1.27 2001/04/13 23:30:24 thorpej Exp $    */
-/*     $KAME: ah_input.c,v 1.53 2001/03/01 09:12:08 itojun Exp $       */
+/*     $NetBSD: ah_input.c,v 1.28 2001/10/15 03:55:37 itojun Exp $     */
+/*     $KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -104,6 +104,7 @@
        int s;
        int off, proto;
        va_list ap;
+       size_t stripsiz = 0;
 
        va_start(ap, m);
        off = va_arg(ap, int);
@@ -249,7 +250,7 @@
         */
        if ((sav->flags & SADB_X_EXT_OLD) == 0 && sav->replay) {
                if (ipsec_chkreplay(ntohl(((struct newah *)ah)->ah_seq), sav))
-                       ; /*okey*/
+                       ; /* okey */
                else {
                        ipsecstat.in_ahreplay++;
                        ipseclog((LOG_WARNING,
@@ -355,8 +356,8 @@
                m->m_flags &= ~M_AUTHIPHDR;
                m->m_flags &= ~M_AUTHIPDGM;
        }
-#endif /*INET6*/
-#endif /*0*/
+#endif /* INET6 */
+#endif /* 0 */
 
        if (m->m_flags & M_AUTHIPHDR
         && m->m_flags & M_AUTHIPDGM) {
@@ -384,6 +385,13 @@
        }
 
        /* was it transmitted over the IPsec tunnel SA? */
+       if (sav->flags & SADB_X_EXT_OLD) {
+               /* RFC 1826 */
+               stripsiz = sizeof(struct ah) + siz1;
+       } else {
+               /* RFC 2402 */
+               stripsiz = sizeof(struct newah) + siz1;
+       }
        if (ipsec4_tunnel_validate(ip, nxt, sav)) {
                /*
                 * strip off all the headers that precedes AH.
@@ -392,17 +400,9 @@
                 * XXX more sanity checks
                 * XXX relationship with gif?
                 */
-               size_t stripsiz = 0;
                u_int8_t tos;
 
                tos = ip->ip_tos;
-               if (sav->flags & SADB_X_EXT_OLD) {
-                       /* RFC 1826 */
-                       stripsiz = sizeof(struct ah) + siz1;
-               } else {
-                       /* RFC 2402 */
-                       stripsiz = sizeof(struct newah) + siz1;
-               }
                m_adj(m, off + stripsiz);
                if (m->m_len < sizeof(*ip)) {
                        m = m_pullup(m, sizeof(*ip));
@@ -470,22 +470,13 @@
                }
                IF_ENQUEUE(&ipintrq, m);
                m = NULL;
-               schednetisr(NETISR_IP); /*can be skipped but to make sure*/
+               schednetisr(NETISR_IP); /* can be skipped but to make sure */
                splx(s);
                nxt = IPPROTO_DONE;
        } else {
                /*
                 * strip off AH.
                 */
-               size_t stripsiz = 0;
-
-               if (sav->flags & SADB_X_EXT_OLD) {
-                       /* RFC 1826 */
-                       stripsiz = sizeof(struct ah) + siz1;
-               } else {
-                       /* RFC 2402 */
-                       stripsiz = sizeof(struct newah) + siz1;
-               }
 
                ip = mtod(m, struct ip *);
 #ifndef PULLDOWN_TEST
@@ -652,6 +643,7 @@
        struct secasvar *sav = NULL;
        u_int16_t nxt;
        int s;
+       size_t stripsiz = 0;
 
 #ifndef PULLDOWN_TEST
        IP6_EXTHDR_CHECK(m, off, sizeof(struct ah), IPPROTO_DONE);
@@ -756,7 +748,7 @@
         */
        if ((sav->flags & SADB_X_EXT_OLD) == 0 && sav->replay) {
                if (ipsec_chkreplay(ntohl(((struct newah *)ah)->ah_seq), sav))
-                       ; /*okey*/
+                       ; /* okey */
                else {
                        ipsec6stat.in_ahreplay++;
                        ipseclog((LOG_WARNING,
@@ -867,6 +859,13 @@
        }
 
        /* was it transmitted over the IPsec tunnel SA? */
+       if (sav->flags & SADB_X_EXT_OLD) {
+               /* RFC 1826 */
+               stripsiz = sizeof(struct ah) + siz1;
+       } else {
+               /* RFC 2402 */
+               stripsiz = sizeof(struct newah) + siz1;
+       }
        if (ipsec6_tunnel_validate(ip6, nxt, sav)) {
                /*
                 * strip off all the headers that precedes AH.
@@ -875,17 +874,9 @@
                 * XXX more sanity checks
                 * XXX relationship with gif?
                 */
-               size_t stripsiz = 0;
-               u_int32_t flowinfo;     /*net endian*/
+               u_int32_t flowinfo;     /* net endian */
 
                flowinfo = ip6->ip6_flow;
-               if (sav->flags & SADB_X_EXT_OLD) {
-                       /* RFC 1826 */
-                       stripsiz = sizeof(struct ah) + siz1;
-               } else {
-                       /* RFC 2402 */
-                       stripsiz = sizeof(struct newah) + siz1;
-               }
                m_adj(m, off + stripsiz);
                if (m->m_len < sizeof(*ip6)) {
                        /*
@@ -943,14 +934,13 @@
                }
                IF_ENQUEUE(&ip6intrq, m);
                m = NULL;
-               schednetisr(NETISR_IPV6); /*can be skipped but to make sure*/
+               schednetisr(NETISR_IPV6); /* can be skipped but to make sure */
                splx(s);
                nxt = IPPROTO_DONE;
        } else {
                /*
                 * strip off AH.
                 */
-               size_t stripsiz = 0;
                char *prvnxtp;
 
                /*
@@ -961,14 +951,6 @@
                prvnxtp = ip6_get_prevhdr(m, off); /* XXX */
                *prvnxtp = nxt;
 
-               if (sav->flags & SADB_X_EXT_OLD) {
-                       /* RFC 1826 */
-                       stripsiz = sizeof(struct ah) + siz1;
-               } else {
-                       /* RFC 2402 */
-                       stripsiz = sizeof(struct newah) + siz1;
-               }
-
                ip6 = mtod(m, struct ip6_hdr *);
 #ifndef PULLDOWN_TEST
                /*
diff -r 80b72da85a9e -r f80cc84d1bb5 sys/netinet6/ah_output.c
--- a/sys/netinet6/ah_output.c  Mon Oct 15 03:00:22 2001 +0000
+++ b/sys/netinet6/ah_output.c  Mon Oct 15 03:55:37 2001 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: ah_output.c,v 1.14 2001/02/21 01:27:58 itojun Exp $    */
-/*     $KAME: ah_output.c,v 1.29 2001/02/21 00:35:59 itojun Exp $      */
+/*     $NetBSD: ah_output.c,v 1.15 2001/10/15 03:55:38 itojun Exp $    */
+/*     $KAME: ah_output.c,v 1.31 2001/07/26 06:53:15 jinmei Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -146,9 +146,9 @@
        u_int32_t spi;
        u_char *ahdrpos;
        u_char *ahsumpos = NULL;
-       size_t hlen = 0;        /*IP header+option in bytes*/
-       size_t plen = 0;        /*AH payload size in bytes*/
-       size_t ahlen = 0;       /*plen + sizeof(ah)*/
+       size_t hlen = 0;        /* IP header+option in bytes */
+       size_t plen = 0;        /* AH payload size in bytes */
+       size_t ahlen = 0;       /* plen + sizeof(ah) */
        struct ip *ip;
        struct in_addr dst;
        struct in_addr *finaldst;
@@ -184,11 +184,11 @@
         */
        if (sav->flags & SADB_X_EXT_OLD) {
                /* RFC 1826 */
-               plen = ((*algo->sumsiz)(sav) + 3) & ~(4 - 1); /*XXX pad to 8byte?*/
+               plen = ((*algo->sumsiz)(sav) + 3) & ~(4 - 1); /* XXX pad to 8byte? */
                ahlen = plen + sizeof(struct ah);
        } else {
                /* RFC 2402 */
-               plen = ((*algo->sumsiz)(sav) + 3) & ~(4 - 1); /*XXX pad to 8byte?*/
+               plen = ((*algo->sumsiz)(sav) + 3) & ~(4 - 1); /* XXX pad to 8byte? */
                ahlen = plen + sizeof(struct newah);
        }
 
@@ -225,7 +225,7 @@
                ahdrpos = mtod(m->m_next, u_char *);
        }
 
-       ip = mtod(m, struct ip *);      /*just to be sure*/
+       ip = mtod(m, struct ip *);      /* just to be sure */
 
        /*
         * initialize AH.
@@ -310,7 +310,7 @@
        }
 
        if (finaldst) {



Home | Main Index | Thread Index | Old Index