Source-Changes-HG archive

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

[src/trunk]: src/sys/netipsec Use inph for variable name of struct inpcb_hdr ...



details:   https://anonhg.NetBSD.org/src/rev/4286c50fdb05
branches:  trunk
changeset: 823378:4286c50fdb05
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Apr 21 08:39:06 2017 +0000

description:
Use inph for variable name of struct inpcb_hdr (NFC)

diffstat:

 sys/netipsec/ipsec.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (72 lines):

diff -r 2bb5ce36cdaf -r 4286c50fdb05 sys/netipsec/ipsec.c
--- a/sys/netipsec/ipsec.c      Fri Apr 21 08:38:18 2017 +0000
+++ b/sys/netipsec/ipsec.c      Fri Apr 21 08:39:06 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec.c,v 1.82 2017/04/20 08:46:07 ozaki-r Exp $       */
+/*     $NetBSD: ipsec.c,v 1.83 2017/04/21 08:39:06 ozaki-r Exp $       */
 /*     $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $       */
 /*     $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
 
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.82 2017/04/20 08:46:07 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.83 2017/04/21 08:39:06 ozaki-r Exp $");
 
 /*
  * IPsec controller part.
@@ -433,7 +433,7 @@
  * NOTE: IPv6 mapped address concern is implemented here.
  */
 static struct secpolicy *
-ipsec_getpolicybysock(struct mbuf *m, u_int dir, struct inpcb_hdr *inp,
+ipsec_getpolicybysock(struct mbuf *m, u_int dir, struct inpcb_hdr *inph,
     int *error)
 {
        struct inpcbpolicy *pcbsp = NULL;
@@ -442,21 +442,21 @@
        int af;
 
        KASSERT(m != NULL);
-       KASSERT(inp != NULL);
+       KASSERT(inph != NULL);
        KASSERT(error != NULL);
        KASSERTMSG(IPSEC_DIR_IS_INOROUT(dir), "invalid direction %u", dir);
 
-       KASSERT(inp->inph_socket != NULL);
+       KASSERT(inph->inph_socket != NULL);
 
        /* XXX FIXME inpcb/in6pcb  vs socket*/
-       af = inp->inph_af;
+       af = inph->inph_af;
        KASSERTMSG(af == AF_INET || af == AF_INET6,
            "unexpected protocol family %u", af);
 
-       KASSERT(inp->inph_sp != NULL);
+       KASSERT(inph->inph_sp != NULL);
        /* If we have a cached entry, and if it is still valid, use it. */
        IPSEC_STATINC(IPSEC_STAT_SPDCACHELOOKUP);
-       currsp = ipsec_checkpcbcache(m, /*inpcb_hdr*/inp->inph_sp, dir);
+       currsp = ipsec_checkpcbcache(m, inph->inph_sp, dir);
        if (currsp) {
                *error = 0;
                return currsp;
@@ -465,7 +465,7 @@
 
        switch (af) {
        case AF_INET: {
-               struct inpcb *in4p = (struct inpcb *)inp;
+               struct inpcb *in4p = (struct inpcb *)inph;
                /* set spidx in pcb */
                *error = ipsec4_setspidx_inpcb(m, in4p);
                pcbsp = in4p->inp_sp;
@@ -474,7 +474,7 @@
 
 #if defined(INET6)
        case AF_INET6: {
-               struct in6pcb *in6p = (struct in6pcb *)inp;
+               struct in6pcb *in6p = (struct in6pcb *)inph;
                /* set spidx in pcb */
                *error = ipsec6_setspidx_in6pcb(m, in6p);
                pcbsp = in6p->in6p_sp;



Home | Main Index | Thread Index | Old Index