Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet rename toff -> off



details:   https://anonhg.NetBSD.org/src/rev/67982b394add
branches:  trunk
changeset: 993474:67982b394add
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Sep 14 04:29:46 2018 +0000

description:
rename toff -> off

diffstat:

 sys/netinet/tcp_input.c |  30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diffs (135 lines):

diff -r 89ecd78af039 -r 67982b394add sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Fri Sep 14 04:25:16 2018 +0000
+++ b/sys/netinet/tcp_input.c   Fri Sep 14 04:29:46 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_input.c,v 1.410 2018/09/14 04:25:16 maxv Exp $     */
+/*     $NetBSD: tcp_input.c,v 1.411 2018/09/14 04:29:46 maxv Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.410 2018/09/14 04:25:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.411 2018/09/14 04:29:46 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1183,7 +1183,7 @@
 #endif
        u_int8_t *optp = NULL;
        int optlen = 0;
-       int len, tlen, toff, hdroptlen = 0;
+       int len, tlen, off, hdroptlen = 0;
        struct tcpcb *tp = NULL;
        int tiflags;
        struct socket *so = NULL;
@@ -1207,7 +1207,7 @@
 
        MCLAIM(m, &tcp_rx_mowner);
        va_start(ap, m);
-       toff = va_arg(ap, int);
+       off = va_arg(ap, int);
        (void)va_arg(ap, int);          /* ignore value, advance ap */
        va_end(ap);
 
@@ -1237,7 +1237,7 @@
        }
 #endif
 
-       M_REGION_GET(th, struct tcphdr *, m, toff, sizeof(struct tcphdr));
+       M_REGION_GET(th, struct tcphdr *, m, off, sizeof(struct tcphdr));
        if (th == NULL) {
                TCP_STATINC(TCP_STAT_RCVSHORT);
                return;
@@ -1262,7 +1262,7 @@
 
                /* We do the checksum after PCB lookup... */
                len = ntohs(ip->ip_len);
-               tlen = len - toff;
+               tlen = len - off;
                iptos = ip->ip_tos;
                break;
 #ifdef INET6
@@ -1296,7 +1296,7 @@
 
                /* We do the checksum after PCB lookup... */
                len = m->m_pkthdr.len;
-               tlen = len - toff;
+               tlen = len - off;
                iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff;
                break;
 #endif
@@ -1310,7 +1310,7 @@
         * some cases, see kern/50766 for details.
         */
        if (TCP_HDR_ALIGNED_P(th) == 0) {
-               m = m_copyup(m, toff + sizeof(struct tcphdr), 0);
+               m = m_copyup(m, off + sizeof(struct tcphdr), 0);
                if (m == NULL) {
                        TCP_STATINC(TCP_STAT_RCVSHORT);
                        return;
@@ -1319,7 +1319,7 @@
 #ifdef INET6
                ip6 = mtod(m, struct ip6_hdr *);
 #endif
-               th = (struct tcphdr *)(mtod(m, char *) + toff);
+               th = (struct tcphdr *)(mtod(m, char *) + off);
        }
        KASSERT(TCP_HDR_ALIGNED_P(th));
 
@@ -1335,7 +1335,7 @@
        tlen -= thlen;
 
        if (thlen > sizeof(struct tcphdr)) {
-               M_REGION_GET(th, struct tcphdr *, m, toff, thlen);
+               M_REGION_GET(th, struct tcphdr *, m, off, thlen);
                if (th == NULL) {
                        TCP_STATINC(TCP_STAT_RCVSHORT);
                        return;
@@ -1368,7 +1368,7 @@
        /*
         * Checksum extended TCP header and data
         */
-       if (tcp_input_checksum(af, m, th, toff, thlen, tlen))
+       if (tcp_input_checksum(af, m, th, off, thlen, tlen))
                goto badcsum;
 
        /*
@@ -1743,7 +1743,7 @@
                         * state for it.
                         */
                        if (so->so_qlen <= so->so_qlimit &&
-                           syn_cache_add(&src.sa, &dst.sa, th, toff,
+                           syn_cache_add(&src.sa, &dst.sa, th, off,
                            so, m, optp, optlen, &opti))
                                m = NULL;
                }
@@ -1773,7 +1773,7 @@
 #else
        if (optp)
 #endif
-               if (tcp_dooptions(tp, optp, optlen, th, m, toff, &opti) < 0)
+               if (tcp_dooptions(tp, optp, optlen, th, m, off, &opti) < 0)
                        goto drop;
 
        if (TCP_SACK_ENABLED(tp)) {
@@ -2020,7 +2020,7 @@
                                        if (!sbreserve(&so->so_rcv,
                                            newsize, so))
                                                so->so_rcv.sb_flags &= ~SB_AUTOSIZE;
-                               m_adj(m, toff + thlen);
+                               m_adj(m, off + thlen);
                                sbappendstream(&so->so_rcv, m);
                        }
                        sorwakeup(so);
@@ -2039,7 +2039,7 @@
        /*
         * Compute mbuf offset to TCP data segment.
         */
-       hdroptlen = toff + thlen;
+       hdroptlen = off + thlen;
 
        /*
         * Calculate amount of space in receive window. Receive window is



Home | Main Index | Thread Index | Old Index