Module Name:    src
Committed By:   maxv
Date:           Fri Sep 14 04:29:46 UTC 2018

Modified Files:
        src/sys/netinet: tcp_input.c

Log Message:
rename toff -> off


To generate a diff of this commit:
cvs rdiff -u -r1.410 -r1.411 src/sys/netinet/tcp_input.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.410 src/sys/netinet/tcp_input.c:1.411
--- src/sys/netinet/tcp_input.c:1.410	Fri Sep 14 04:25:16 2018
+++ src/sys/netinet/tcp_input.c	Fri Sep 14 04:29:46 2018
@@ -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 @@ tcp_input(struct mbuf *m, ...)
 #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 @@ tcp_input(struct mbuf *m, ...)
 
 	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 @@ tcp_input(struct mbuf *m, ...)
 	}
 #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 @@ tcp_input(struct mbuf *m, ...)
 
 		/* 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 @@ tcp_input(struct mbuf *m, ...)
 
 		/* 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 @@ tcp_input(struct mbuf *m, ...)
 	 * 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 @@ tcp_input(struct mbuf *m, ...)
 #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 @@ tcp_input(struct mbuf *m, ...)
 	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 @@ tcp_input(struct mbuf *m, ...)
 	/*
 	 * 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 @@ nosave:;
 			 * 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 @@ after_listen:
 #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 @@ after_listen:
 					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 @@ after_listen:
 	/*
 	 * Compute mbuf offset to TCP data segment.
 	 */
-	hdroptlen = toff + thlen;
+	hdroptlen = off + thlen;
 
 	/*
 	 * Calculate amount of space in receive window. Receive window is

Reply via email to