summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/icmp6.h4
-rw-r--r--sys/netinet/if_arc.h4
-rw-r--r--sys/netinet/if_atm.c22
-rw-r--r--sys/netinet/if_atm.h6
-rw-r--r--sys/netinet/if_ether.c12
-rw-r--r--sys/netinet/if_ether.h4
-rw-r--r--sys/netinet/igmp.c18
-rw-r--r--sys/netinet/in.c6
-rw-r--r--sys/netinet/in_cksum.c4
-rw-r--r--sys/netinet/in_gif.c4
-rw-r--r--sys/netinet/in_pcb.c28
-rw-r--r--sys/netinet/in_pcb.h8
-rw-r--r--sys/netinet/in_proto.c16
-rw-r--r--sys/netinet/ip_ah.h6
-rw-r--r--sys/netinet/ip_esp.h6
-rw-r--r--sys/netinet/ip_ether.c10
-rw-r--r--sys/netinet/ip_ether.h8
-rw-r--r--sys/netinet/ip_gre.c30
-rw-r--r--sys/netinet/ip_gre.h8
-rw-r--r--sys/netinet/ip_icmp.c50
-rw-r--r--sys/netinet/ip_icmp.h4
-rw-r--r--sys/netinet/ip_input.c22
-rw-r--r--sys/netinet/ip_ipcomp.c22
-rw-r--r--sys/netinet/ip_ipip.c16
-rw-r--r--sys/netinet/ip_ipip.h6
-rw-r--r--sys/netinet/ip_ipsp.c8
-rw-r--r--sys/netinet/ip_ipsp.h4
-rw-r--r--sys/netinet/ip_mroute.c122
-rw-r--r--sys/netinet/ip_mroute.h18
-rw-r--r--sys/netinet/ip_spd.c4
-rw-r--r--sys/netinet/ip_var.h4
-rw-r--r--sys/netinet/ipsec_input.c16
-rw-r--r--sys/netinet/ipsec_output.c10
-rw-r--r--sys/netinet/raw_ip.c10
-rw-r--r--sys/netinet/tcp.h4
-rw-r--r--sys/netinet/tcp_debug.c10
-rw-r--r--sys/netinet/tcp_input.c238
-rw-r--r--sys/netinet/tcp_output.c68
-rw-r--r--sys/netinet/tcp_subr.c36
-rw-r--r--sys/netinet/tcp_timer.c6
-rw-r--r--sys/netinet/tcp_usrreq.c4
-rw-r--r--sys/netinet/tcp_var.h16
-rw-r--r--sys/netinet/udp_usrreq.c20
43 files changed, 461 insertions, 461 deletions
diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h
index 183ae498e3a..75b7e412766 100644
--- a/sys/netinet/icmp6.h
+++ b/sys/netinet/icmp6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.h,v 1.24 2002/06/09 02:11:47 jsyn Exp $ */
+/* $OpenBSD: icmp6.h,v 1.25 2002/06/09 16:26:10 itojun Exp $ */
/* $KAME: icmp6.h,v 1.71 2002/05/27 04:18:29 itojun Exp $ */
/*
@@ -519,7 +519,7 @@ struct icmp6stat {
* for netinet6 code, it is already available in icp6s_outhist[].
*/
u_quad_t icp6s_reflect;
- u_quad_t icp6s_inhist[256];
+ u_quad_t icp6s_inhist[256];
u_quad_t icp6s_nd_toomanyopt; /* too many ND options */
struct icmp6errstat icp6s_outerrhist;
#define icp6s_odst_unreach_noroute \
diff --git a/sys/netinet/if_arc.h b/sys/netinet/if_arc.h
index 5f590f5a6cd..0891dba6c7f 100644
--- a/sys/netinet/if_arc.h
+++ b/sys/netinet/if_arc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_arc.h,v 1.5 2002/03/14 01:27:11 millert Exp $ */
+/* $OpenBSD: if_arc.h,v 1.6 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: if_arc.h,v 1.5 1995/06/07 00:14:04 cgd Exp $ */
/*
@@ -111,7 +111,7 @@ struct arccom {
struct ac_frag {
u_int8_t af_maxflag; /* from first packet */
u_int8_t af_lastseen; /* last split flag seen */
- u_int16_t af_seqid;
+ u_int16_t af_seqid;
struct mbuf *af_packet;
} ac_fragtab[256]; /* indexed by sender ll address */
diff --git a/sys/netinet/if_atm.c b/sys/netinet/if_atm.c
index aec9db09c58..16f1936bbf8 100644
--- a/sys/netinet/if_atm.c
+++ b/sys/netinet/if_atm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atm.c,v 1.8 2001/01/19 06:37:37 itojun Exp $ */
+/* $OpenBSD: if_atm.c,v 1.9 2002/06/09 16:26:10 itojun Exp $ */
/*
*
@@ -15,7 +15,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Charles D. Cranor and
+ * This product includes software developed by Charles D. Cranor and
* Washington University.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
@@ -108,7 +108,7 @@ atm_rtrequest(req, rt, info)
* case we are being called via "ifconfig" to set the address.
*/
- if ((rt->rt_flags & RTF_HOST) == 0) {
+ if ((rt->rt_flags & RTF_HOST) == 0) {
rt_setgate(rt,rt_key(rt),(struct sockaddr *)&null_sdl);
gate = rt->rt_gateway;
SDL(gate)->sdl_type = rt->rt_ifp->if_type;
@@ -139,9 +139,9 @@ atm_rtrequest(req, rt, info)
if (sin->sin_family != AF_INET)
goto failed;
aph = (struct atm_pseudohdr *) LLADDR(SDL(gate));
- npcb = npcb_add(NULL, rt->rt_ifp, ATM_PH_VCI(aph),
+ npcb = npcb_add(NULL, rt->rt_ifp, ATM_PH_VCI(aph),
ATM_PH_VPI(aph));
- if (npcb == NULL)
+ if (npcb == NULL)
goto failed;
npcb->npcb_flags |= NPCB_IP;
npcb->ipaddr.s_addr = sin->sin_addr.s_addr;
@@ -154,7 +154,7 @@ atm_rtrequest(req, rt, info)
*/
bcopy(LLADDR(SDL(gate)), &api.aph, sizeof(api.aph));
api.rxhand = NULL;
- if (rt->rt_ifp->if_ioctl(rt->rt_ifp, SIOCATMENA,
+ if (rt->rt_ifp->if_ioctl(rt->rt_ifp, SIOCATMENA,
(caddr_t)&api) != 0) {
printf("atm: couldn't add VC\n");
goto failed;
@@ -185,7 +185,7 @@ failed:
*/
if (rt->rt_flags & RTF_LLINFO) {
- npcb_free((struct natmpcb *)rt->rt_llinfo,
+ npcb_free((struct natmpcb *)rt->rt_llinfo,
NPCB_DESTROY);
rt->rt_llinfo = NULL;
rt->rt_flags &= ~RTF_LLINFO;
@@ -197,7 +197,7 @@ failed:
bcopy(LLADDR(SDL(gate)), &api.aph, sizeof(api.aph));
api.rxhand = NULL;
- (void)rt->rt_ifp->if_ioctl(rt->rt_ifp, SIOCATMDIS,
+ (void)rt->rt_ifp->if_ioctl(rt->rt_ifp, SIOCATMDIS,
(caddr_t)&api);
break;
@@ -212,7 +212,7 @@ failed:
* [3] "dst" = sockaddr_in (IP) address of dest.
* output:
* [4] "desten" = ATM pseudo header which we will fill in VPI/VCI info
- * return:
+ * return:
* 0 == resolve FAILED; note that "m" gets m_freem'd in this case
* 1 == resolve OK; desten contains result
*
@@ -241,7 +241,7 @@ register struct atm_pseudohdr *desten; /* OUT */
rt = RTALLOC1(dst, 0);
if (rt == NULL) goto bad; /* failed */
rt->rt_refcnt--; /* don't keep LL references */
- if ((rt->rt_flags & RTF_GATEWAY) != 0 ||
+ if ((rt->rt_flags & RTF_GATEWAY) != 0 ||
(rt->rt_flags & RTF_LLINFO) == 0 ||
/* XXX: are we using LLINFO? */
rt->rt_gateway->sa_family != AF_LINK) {
@@ -250,7 +250,7 @@ register struct atm_pseudohdr *desten; /* OUT */
}
/*
- * note that rt_gateway is a sockaddr_dl which contains the
+ * note that rt_gateway is a sockaddr_dl which contains the
* atm_pseudohdr data structure for this route. we currently
* don't need any rt_llinfo info (but will if we want to support
* ATM ARP [c.f. if_ether.c]).
diff --git a/sys/netinet/if_atm.h b/sys/netinet/if_atm.h
index a3263195b3d..42c73264643 100644
--- a/sys/netinet/if_atm.h
+++ b/sys/netinet/if_atm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atm.h,v 1.5 2002/03/14 01:27:11 millert Exp $ */
+/* $OpenBSD: if_atm.h,v 1.6 2002/06/09 16:26:10 itojun Exp $ */
/*
*
@@ -15,7 +15,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Charles D. Cranor and
+ * This product includes software developed by Charles D. Cranor and
* Washington University.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
@@ -37,5 +37,5 @@
*/
void atm_rtrequest(int, struct rtentry *, struct rt_addrinfo *);
-int atmresolve(struct rtentry *, struct mbuf *, struct sockaddr *,
+int atmresolve(struct rtentry *, struct mbuf *, struct sockaddr *,
struct atm_pseudohdr *);
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 24ec0fa84bd..f525f2e9f7e 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.44 2002/06/09 07:50:57 itojun Exp $ */
+/* $OpenBSD: if_ether.c,v 1.45 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -590,7 +590,7 @@ in_arpinput(m)
if (rt->rt_flags & RTF_PERMANENT_ARP) {
log(LOG_WARNING,
"arp: attempt to overwrite permanent "
- "entry for %s by %s on %s\n",
+ "entry for %s by %s on %s\n",
inet_ntoa(isaddr),
ether_sprintf(ea->arp_sha),
ac->ac_if.if_xname);
@@ -606,7 +606,7 @@ in_arpinput(m)
} else {
log(LOG_INFO,
"arp info overwritten for %s by %s on %s\n",
- inet_ntoa(isaddr),
+ inet_ntoa(isaddr),
ether_sprintf(ea->arp_sha),
ac->ac_if.if_xname);
rt->rt_expire = 1; /* no longer static */
@@ -888,8 +888,8 @@ revarpwhoarewe(ifp, serv_in, clnt_in)
struct in_addr *clnt_in;
{
int result, count = 20;
-
- if (myip_initialized)
+
+ if (myip_initialized)
return EIO;
myip_ifp = ifp;
@@ -903,7 +903,7 @@ revarpwhoarewe(ifp, serv_in, clnt_in)
revarp_in_progress = 0;
if (!myip_initialized)
return ENETUNREACH;
-
+
bcopy((caddr_t)&srv_ip, serv_in, sizeof(*serv_in));
bcopy((caddr_t)&myip, clnt_in, sizeof(*clnt_in));
return 0;
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h
index 69aeed8dce5..6f6be629b31 100644
--- a/sys/netinet/if_ether.h
+++ b/sys/netinet/if_ether.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.h,v 1.21 2002/06/08 07:59:20 chris Exp $ */
+/* $OpenBSD: if_ether.h,v 1.22 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: if_ether.h,v 1.22 1996/05/11 13:00:00 mycroft Exp $ */
/*
@@ -135,7 +135,7 @@ struct ether_header {
* Ethernet Address Resolution Protocol.
*
* See RFC 826 for protocol description. Structure below is adapted
- * to resolving internet addresses. Field names used correspond to
+ * to resolving internet addresses. Field names used correspond to
* RFC 826.
*/
struct ether_arp {
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index d1535c3f728..fea0c69bda1 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: igmp.c,v 1.14 2002/03/15 18:19:52 millert Exp $ */
+/* $OpenBSD: igmp.c,v 1.15 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */
/*
@@ -424,8 +424,8 @@ igmp_leavegroup(inm)
if (!IN_LOCAL_GROUP(inm->inm_addr.s_addr) &&
(inm->inm_ifp->if_flags & IFF_LOOPBACK) == 0)
if (inm->inm_rti->rti_type != IGMP_v1_ROUTER)
- igmp_sendpkt(inm, IGMP_HOST_LEAVE_MESSAGE,
- INADDR_ALLROUTERS_GROUP);
+ igmp_sendpkt(inm, IGMP_HOST_LEAVE_MESSAGE,
+ INADDR_ALLROUTERS_GROUP);
break;
case IGMP_LAZY_MEMBER:
case IGMP_AWAKENING_MEMBER:
@@ -492,7 +492,7 @@ void
igmp_sendpkt(inm, type, addr)
struct in_multi *inm;
int type;
- in_addr_t addr;
+ in_addr_t addr;
{
struct mbuf *m;
struct igmp *igmp;
@@ -519,11 +519,11 @@ igmp_sendpkt(inm, type, addr)
ip->ip_off = 0;
ip->ip_p = IPPROTO_IGMP;
ip->ip_src.s_addr = INADDR_ANY;
- if (addr) {
- ip->ip_dst.s_addr = addr;
- } else {
- ip->ip_dst = inm->inm_addr;
- }
+ if (addr) {
+ ip->ip_dst.s_addr = addr;
+ } else {
+ ip->ip_dst = inm->inm_addr;
+ }
m->m_data += sizeof(struct ip);
m->m_len -= sizeof(struct ip);
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 8db742a7056..ac9c739454c 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,9 +1,9 @@
-/* $OpenBSD: in.c,v 1.26 2002/04/24 00:51:51 dhartmei Exp $ */
+/* $OpenBSD: in.c,v 1.27 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
* Copyright (C) 2001 WIDE Project. All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -15,7 +15,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
diff --git a/sys/netinet/in_cksum.c b/sys/netinet/in_cksum.c
index d4855172ce0..6f8b1752bd1 100644
--- a/sys/netinet/in_cksum.c
+++ b/sys/netinet/in_cksum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_cksum.c,v 1.3 1997/02/24 14:06:35 niklas Exp $ */
+/* $OpenBSD: in_cksum.c,v 1.4 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: in_cksum.c,v 1.11 1996/04/08 19:55:37 jonathan Exp $ */
/*
@@ -80,7 +80,7 @@ in_cksum(m, len)
* of a word spanning between this mbuf and the
* last mbuf.
*
- * s_util.c[0] is already saved when scanning previous
+ * s_util.c[0] is already saved when scanning previous
* mbuf.
*/
s_util.c[1] = *(u_int8_t *)w;
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c
index c43449d9ab2..3583403749e 100644
--- a/sys/netinet/in_gif.c
+++ b/sys/netinet/in_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_gif.c,v 1.24 2002/05/30 04:19:44 itojun Exp $ */
+/* $OpenBSD: in_gif.c,v 1.25 2002/06/09 16:26:10 itojun Exp $ */
/* $KAME: in_gif.c,v 1.50 2001/01/22 07:27:16 itojun Exp $ */
/*
@@ -180,7 +180,7 @@ in_gif_input(struct mbuf *m, ...)
ip = mtod(m, struct ip *);
/* this code will be soon improved. */
-#define satosin(sa) ((struct sockaddr_in *)(sa))
+#define satosin(sa) ((struct sockaddr_in *)(sa))
for (i = 0, sc = gif_softc; i < ngif; i++, sc++) {
if (sc->gif_psrc == NULL || sc->gif_pdst == NULL ||
sc->gif_psrc->sa_family != AF_INET ||
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 0a65289a735..fff4e68b21f 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.61 2002/05/31 02:39:25 angelos Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.62 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -34,11 +34,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -53,7 +53,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -65,7 +65,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
@@ -133,7 +133,7 @@ in_pcbinit(table, hashsize)
}
struct baddynamicports baddynamicports;
-
+
/*
* Check if the specified port is invalid for dynamic allocation.
*/
@@ -432,7 +432,7 @@ in_pcbconnect(v, nam)
/* Cause an IPsec SA to be established. */
ipsp_spd_inp(NULL, AF_INET, 0, &error, IPSP_DIRECTION_OUT,
NULL, inp, NULL);
- }
+ }
#endif
return (0);
}
@@ -477,7 +477,7 @@ in_pcbdetach(v)
#ifdef INET6
if (inp->inp_flags & INP_IPV6)
ip6_freemoptions(inp->inp_moptions6);
- else
+ else
#endif
ip_freemoptions(inp->inp_moptions);
#ifdef IPSEC
@@ -510,7 +510,7 @@ in_setsockaddr(inp, nam)
struct mbuf *nam;
{
register struct sockaddr_in *sin;
-
+
nam->m_len = sizeof (*sin);
sin = mtod(nam, struct sockaddr_in *);
bzero((caddr_t)sin, sizeof (*sin));
@@ -526,7 +526,7 @@ in_setpeeraddr(inp, nam)
struct mbuf *nam;
{
register struct sockaddr_in *sin;
-
+
#ifdef INET6
if (sotopf(inp->inp_socket) == PF_INET6) {
in6_setpeeraddr(inp, nam);
@@ -670,9 +670,9 @@ in_losing(inp)
rt_missmsg(RTM_LOSING, &info, rt->rt_flags, 0);
if (rt->rt_flags & RTF_DYNAMIC)
(void) rtrequest(RTM_DELETE, rt_key(rt),
- rt->rt_gateway, rt_mask(rt), rt->rt_flags,
+ rt->rt_gateway, rt_mask(rt), rt->rt_flags,
(struct rtentry **)0);
- else
+ else
/*
* A new route can be allocated
* the next time output is attempted.
@@ -840,13 +840,13 @@ in_selectsrc(sin, ro, soopts, mopts, errorp)
struct in_ifaddr *ia;
ia = (struct in_ifaddr *)0;
- /*
+ /*
* If route is known or can be allocated now,
* our src addr is taken from the i/f, else punt.
*/
if (ro->ro_rt &&
(satosin(&ro->ro_dst)->sin_addr.s_addr !=
- sin->sin_addr.s_addr ||
+ sin->sin_addr.s_addr ||
soopts & SO_DONTROUTE)) {
RTFREE(ro->ro_rt);
ro->ro_rt = (struct rtentry *)0;
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index 6bca529057c..553d6a6c16d 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -1,10 +1,10 @@
-/* $OpenBSD: in_pcb.h,v 1.42 2002/06/08 21:22:02 itojun Exp $ */
+/* $OpenBSD: in_pcb.h,v 1.43 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: in_pcb.h,v 1.14 1996/02/13 23:42:00 christos Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -16,7 +16,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -185,7 +185,7 @@ struct inpcbtable {
* Flags in in6p_flags
* We define KAME's original flags in higher 16 bits as much as possible
* for compatibility with *bsd*s.
- * XXX: Should IN6P_HIGHPORT and IN6P_LOWPORT be moved as well?
+ * XXX: Should IN6P_HIGHPORT and IN6P_LOWPORT be moved as well?
*/
#define IN6P_RECVOPTS INP_RECVOPTS /* recv incoming IP6 options */
#define IN6P_RECVRETOPTS INP_RECVRETOPTS /* recv IP6 options for reply */
diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c
index e7c04fa2b38..4743bd61475 100644
--- a/sys/netinet/in_proto.c
+++ b/sys/netinet/in_proto.c
@@ -1,10 +1,10 @@
-/* $OpenBSD: in_proto.c,v 1.34 2002/03/01 22:29:29 provos Exp $ */
+/* $OpenBSD: in_proto.c,v 1.35 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: in_proto.c,v 1.14 1996/02/18 18:58:32 christos Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -16,7 +16,7 @@
* 3. Neither the name of the project nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -63,11 +63,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -82,7 +82,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -94,7 +94,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
@@ -312,7 +312,7 @@ struct protosw inetsw[] = {
};
struct domain inetdomain =
- { AF_INET, "internet", 0, 0, 0,
+ { AF_INET, "internet", 0, 0, 0,
inetsw, &inetsw[sizeof(inetsw)/sizeof(inetsw[0])], 0,
rn_inithead, 32, sizeof(struct sockaddr_in) };
diff --git a/sys/netinet/ip_ah.h b/sys/netinet/ip_ah.h
index ddc008be860..a0a353e1305 100644
--- a/sys/netinet/ip_ah.h
+++ b/sys/netinet/ip_ah.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: ip_ah.h,v 1.28 2001/06/25 05:11:58 angelos Exp $ */
+/* $OpenBSD: ip_ah.h,v 1.29 2002/06/09 16:26:10 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
- * Angelos D. Keromytis (kermit@csd.uch.gr) and
+ * Angelos D. Keromytis (kermit@csd.uch.gr) and
* Niels Provos (provos@physnet.uni-hamburg.de).
*
* The original version of this code was written by John Ioannidis
@@ -22,7 +22,7 @@
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
- * modification of this software.
+ * modification of this software.
* You may use this code under the GNU public license if you so wish. Please
* contribute changes back to the authors under this freer than GPL license
* so that we may further the use of strong encryption without limitations to
diff --git a/sys/netinet/ip_esp.h b/sys/netinet/ip_esp.h
index 848c56e7551..fb6a0f26228 100644
--- a/sys/netinet/ip_esp.h
+++ b/sys/netinet/ip_esp.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: ip_esp.h,v 1.36 2001/07/04 23:14:55 espie Exp $ */
+/* $OpenBSD: ip_esp.h,v 1.37 2002/06/09 16:26:10 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
- * Angelos D. Keromytis (kermit@csd.uch.gr) and
+ * Angelos D. Keromytis (kermit@csd.uch.gr) and
* Niels Provos (provos@physnet.uni-hamburg.de).
*
* The original version of this code was written by John Ioannidis
@@ -22,7 +22,7 @@
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
- * modification of this software.
+ * modification of this software.
* You may use this code under the GNU public license if you so wish. Please
* contribute changes back to the authors under this freer than GPL license
* so that we may further the use of strong encryption without limitations to
diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c
index 2f94d459e30..899bfc8d8a9 100644
--- a/sys/netinet/ip_ether.c
+++ b/sys/netinet/ip_ether.c
@@ -1,15 +1,15 @@
-/* $OpenBSD: ip_ether.c,v 1.39 2002/06/09 00:58:32 angelos Exp $ */
+/* $OpenBSD: ip_ether.c,v 1.40 2002/06/09 16:26:10 itojun Exp $ */
/*
* The author of this code is Angelos D. Keromytis (kermit@adk.gr)
*
* This code was written by Angelos D. Keromytis for OpenBSD in October 1999.
*
* Copyright (C) 1999-2001 Angelos D. Keromytis.
- *
+ *
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
- * modification of this software.
+ * modification of this software.
* You may use this code under the GNU public license if you so wish. Please
* contribute changes back to the authors under this freer than GPL license
* so that we may further the use of strong encryption without limitations to
@@ -69,7 +69,7 @@ struct etheripstat etheripstat;
/*
* etherip_input gets called when we receive an encapsulated packet,
* either because we got it at a real interface, or because AH or ESP
- * were being used in tunnel mode (in which case the rcvif element will
+ * were being used in tunnel mode (in which case the rcvif element will
* contain the address of the encX interface associated with the tunnel.
*/
@@ -368,7 +368,7 @@ etherip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
ipo->ip_sum = 0;
ipo->ip_id = htons(ip_randomid());
- /*
+ /*
* We should be keeping tunnel soft-state and send back
* ICMPs as needed.
*/
diff --git a/sys/netinet/ip_ether.h b/sys/netinet/ip_ether.h
index aa02b4ea83b..7bcde9799a7 100644
--- a/sys/netinet/ip_ether.h
+++ b/sys/netinet/ip_ether.h
@@ -1,15 +1,15 @@
-/* $OpenBSD: ip_ether.h,v 1.12 2002/03/14 01:27:11 millert Exp $ */
+/* $OpenBSD: ip_ether.h,v 1.13 2002/06/09 16:26:10 itojun Exp $ */
/*
- * The author of this code is Angelos D. Keromytis (angelos@adk.gr)
+ * The author of this code is Angelos D. Keromytis (angelos@adk.gr)
*
* This code was written by Angelos D. Keromytis in October 1999.
*
* Copyright (C) 1999-2001 Angelos D. Keromytis.
- *
+ *
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
- * modification of this software.
+ * modification of this software.
* You may use this code under the GNU public license if you so wish. Please
* contribute changes back to the authors under this freer than GPL license
* so that we may further the use of strong encryption without limitations to
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index 46d483da853..64158122dbf 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_gre.c,v 1.17 2002/04/03 20:37:28 angelos Exp $ */
+/* $OpenBSD: ip_gre.c,v 1.18 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: ip_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -23,7 +23,7 @@
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -90,7 +90,7 @@ static int gre_input2(struct mbuf *, int, u_char);
/*
* Decapsulate.
* Does the real work and is called from gre_input() (above)
- * returns 0 if packet is not yet processed
+ * returns 0 if packet is not yet processed
* and 1 if it needs no further processing
* proto is the protocol number of the "calling" foo_input()
* routine.
@@ -188,8 +188,8 @@ gre_input2(m , hlen, proto)
/* others not yet supported */
return (0);
}
-
- m->m_data += hlen;
+
+ m->m_data += hlen;
m->m_len -= hlen;
m->m_pkthdr.len -= hlen;
@@ -243,10 +243,10 @@ gre_input(struct mbuf *m, ...)
m_freem(m);
return;
}
-
+
ret = gre_input2(m, hlen, IPPROTO_GRE);
- /*
- * ret == 0: packet not processed, but input from here
+ /*
+ * ret == 0: packet not processed, but input from here
* means no matching tunnel that is up is found,
* so we can just free the mbuf and return. It is also
* possible that we received a WCCPv1-style GRE packet
@@ -258,7 +258,7 @@ gre_input(struct mbuf *m, ...)
/*
* Input routine for IPPRPOTO_MOBILE.
- * This is a little bit diffrent from the other modes, as the
+ * This is a little bit diffrent from the other modes, as the
* encapsulating header was not prepended, but instead inserted
* between IP header and payload.
*/
@@ -292,7 +292,7 @@ gre_mobile_input(struct mbuf *m, ...)
m->m_pkthdr.rcvif = &sc->sc_if;
- sc->sc_if.if_ipackets++;
+ sc->sc_if.if_ipackets++;
sc->sc_if.if_ibytes += m->m_pkthdr.len;
if(ntohs(mip->mh.proto) & MOB_H_SBIT) {
@@ -304,7 +304,7 @@ gre_mobile_input(struct mbuf *m, ...)
}
mip->mi.ip_dst.s_addr = mip->mh.odst;
mip->mi.ip_p = (ntohs(mip->mh.proto) >> 8);
-
+
if (gre_in_cksum((u_short *) &mip->mh,msiz) != 0) {
m_freem(m);
return;
@@ -347,8 +347,8 @@ gre_mobile_input(struct mbuf *m, ...)
if (IF_QFULL(ifq)) {
IF_DROP(ifq);
m_freem(m);
- } else {
- IF_ENQUEUE(ifq, m);
+ } else {
+ IF_ENQUEUE(ifq, m);
}
splx(s);
}
@@ -388,7 +388,7 @@ gre_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
/* All sysctl names at this level are terminal. */
if (namelen != 1)
return (ENOTDIR);
-
+
switch (name[0]) {
case GRECTL_ALLOW:
return (sysctl_int(oldp, oldlenp, newp, newlen, &gre_allow));
@@ -412,7 +412,7 @@ ipmobile_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
/* All sysctl names at this level are terminal. */
if (namelen != 1)
return (ENOTDIR);
-
+
switch (name[0]) {
case MOBILEIPCTL_ALLOW:
return (sysctl_int(oldp, oldlenp, newp, newlen,
diff --git a/sys/netinet/ip_gre.h b/sys/netinet/ip_gre.h
index 3b44362e3b5..00bd3b14bdb 100644
--- a/sys/netinet/ip_gre.h
+++ b/sys/netinet/ip_gre.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_gre.h,v 1.5 2002/04/03 20:37:28 angelos Exp $ */
+/* $OpenBSD: ip_gre.h,v 1.6 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: ip_gre.h,v 1.3 1998/10/07 23:33:02 thorpej Exp $ */
/*
@@ -23,7 +23,7 @@
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -52,12 +52,12 @@
#define GRECTL_ALLOW 1 /* accept incoming GRE packets */
#define GRECTL_WCCP 2 /* accept WCCPv1-style GRE packets */
#define GRECTL_MAXID 3
-
+
#define GRECTL_NAMES { \
{ 0, 0 }, \
{ "allow", CTLTYPE_INT }, \
{ "wccp", CTLTYPE_INT }, \
-}
+}
/*
* Names for MobileIP sysctl objects
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 622628d5834..f9625017fda 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.50 2002/06/08 21:53:53 jasoni Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.51 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -34,11 +34,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -53,7 +53,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -65,7 +65,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
@@ -118,12 +118,12 @@ extern struct protosw inetsw[];
void
icmp_init()
{
- /*
- * This is only useful if the user initializes redirtimeout to
+ /*
+ * This is only useful if the user initializes redirtimeout to
* something other than zero.
*/
if (icmp_redirtimeout != 0) {
- icmp_redirect_timeout_q =
+ icmp_redirect_timeout_q =
rt_timer_queue_create(icmp_redirtimeout);
}
}
@@ -167,7 +167,7 @@ icmp_do_error(n, type, code, dest, destifp)
/*
* First, do a rate limitation check.
- */
+ */
if (icmp_ratelimit(&oip->ip_src, type, code)) {
/* XXX stat */
goto freeit;
@@ -177,7 +177,7 @@ icmp_do_error(n, type, code, dest, destifp)
* Now, formulate icmp message
*/
icmplen = oiplen + min(8, oip->ip_len);
- /*
+ /*
* Defend against mbuf chains shorter than oip->ip_len:
*/
mblen = 0;
@@ -220,7 +220,7 @@ icmp_do_error(n, type, code, dest, destifp)
icp->icmp_gwaddr.s_addr = dest;
else {
icp->icmp_void = 0;
- /*
+ /*
* The following assignments assume an overlay with the
* zeroed icmp_void field.
*/
@@ -382,7 +382,7 @@ icmp_input(struct mbuf *m, ...)
case ICMP_UNREACH_NEEDFRAG:
code = PRC_MSGSIZE;
break;
-
+
case ICMP_UNREACH_NET_UNKNOWN:
case ICMP_UNREACH_NET_PROHIB:
case ICMP_UNREACH_TOSNET:
@@ -439,7 +439,7 @@ icmp_input(struct mbuf *m, ...)
#ifdef INET6
/* Get more contiguous data for a v6 in v4 ICMP message. */
if (icp->icmp_ip.ip_p == IPPROTO_IPV6) {
- if (icmplen < ICMP_V6ADVLENMIN ||
+ if (icmplen < ICMP_V6ADVLENMIN ||
icmplen < ICMP_V6ADVLEN(icp)) {
icmpstat.icps_badlen++;
goto freeit;
@@ -498,7 +498,7 @@ icmp_input(struct mbuf *m, ...)
icp->icmp_rtime = iptime();
icp->icmp_ttime = icp->icmp_rtime; /* bogus, do later! */
goto reflect;
-
+
case ICMP_MASKREQ:
if (icmpmaskrepl == 0)
break;
@@ -668,7 +668,7 @@ icmp_reflect(m)
dst->sin_addr = t;
rtalloc(&ro);
- if (ro.ro_rt == 0)
+ if (ro.ro_rt == 0)
{
ipstat.ips_noroute++;
goto done;
@@ -721,7 +721,7 @@ icmp_reflect(m)
/*
* Should check for overflow, but it "can't happen"
*/
- if (opt == IPOPT_RR || opt == IPOPT_TS ||
+ if (opt == IPOPT_RR || opt == IPOPT_TS ||
opt == IPOPT_SECURITY) {
bcopy((caddr_t)cp,
mtod(opts, caddr_t) + opts->m_len, len);
@@ -871,15 +871,15 @@ icmp_mtudisc_clone(struct sockaddr *dst)
rt = rtalloc1(dst, 1);
if (rt == 0)
return (NULL);
-
+
/* If we didn't get a host route, allocate one */
-
+
if ((rt->rt_flags & RTF_HOST) == 0) {
struct rtentry *nrt;
- error = rtrequest((int) RTM_ADD, dst,
+ error = rtrequest((int) RTM_ADD, dst,
(struct sockaddr *) rt->rt_gateway,
- (struct sockaddr *) 0,
+ (struct sockaddr *) 0,
RTF_GATEWAY | RTF_HOST | RTF_DYNAMIC, &nrt);
if (error) {
rtfree(rt);
@@ -905,10 +905,10 @@ icmp_mtudisc(icp)
struct rtentry *rt;
struct sockaddr *dst = sintosa(&icmpsrc);
u_long mtu = ntohs(icp->icmp_nextmtu); /* Why a long? IPv6 */
-
+
/* Table of common MTUs: */
- static u_short mtu_table[] = {65535, 65280, 32000, 17914, 9180, 8166,
+ static u_short mtu_table[] = {65535, 65280, 32000, 17914, 9180, 8166,
4352, 2002, 1492, 1006, 508, 296, 68, 0};
rt = icmp_mtudisc_clone(dst);
@@ -952,7 +952,7 @@ icmp_mtudisc(icp)
if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0) {
if (mtu < 296 || mtu > rt->rt_ifp->if_mtu)
rt->rt_rmx.rmx_locks |= RTV_MTU;
- else if (rt->rt_rmx.rmx_mtu > mtu ||
+ else if (rt->rt_rmx.rmx_mtu > mtu ||
rt->rt_rmx.rmx_mtu == 0)
rt->rt_rmx.rmx_mtu = mtu;
}
@@ -967,7 +967,7 @@ icmp_mtudisc_timeout(rt, r)
{
if (rt == NULL)
panic("icmp_mtudisc_timeout: bad route to timeout");
- if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) ==
+ if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) ==
(RTF_DYNAMIC | RTF_HOST)) {
void *(*ctlfunc)(int, struct sockaddr *, void *);
extern u_char ip_protox[];
@@ -1021,7 +1021,7 @@ icmp_redirect_timeout(rt, r)
{
if (rt == NULL)
panic("icmp_redirect_timeout: bad route to timeout");
- if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) ==
+ if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) ==
(RTF_DYNAMIC | RTF_HOST)) {
rtrequest((int) RTM_DELETE, (struct sockaddr *)rt_key(rt),
rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0);
diff --git a/sys/netinet/ip_icmp.h b/sys/netinet/ip_icmp.h
index 3b5110a8cc9..d6c0ceba7de 100644
--- a/sys/netinet/ip_icmp.h
+++ b/sys/netinet/ip_icmp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.h,v 1.17 2002/06/08 21:53:53 jasoni Exp $ */
+/* $OpenBSD: ip_icmp.h,v 1.18 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: ip_icmp.h,v 1.10 1996/02/13 23:42:28 christos Exp $ */
/*
@@ -77,7 +77,7 @@ struct icmp {
/* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
struct ih_pmtu {
- n_short ipm_void;
+ n_short ipm_void;
n_short ipm_nextmtu;
} ih_pmtu;
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index e2d47468fee..e6852cad8da 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.103 2002/06/07 23:50:10 jasoni Exp $ */
+/* $OpenBSD: ip_input.c,v 1.104 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -241,7 +241,7 @@ ip_init()
ipintrq.ifq_maxlen = ipqmaxlen;
TAILQ_INIT(&in_ifaddr);
if (ip_mtudisc != 0)
- ip_mtudisc_timeout_q =
+ ip_mtudisc_timeout_q =
rt_timer_queue_create(ip_mtudisc_timeout);
/* Fill in list of ports not to allocate dynamically. */
@@ -585,7 +585,7 @@ found:
ipq_unlock();
goto bad;
}
-
+
ipqe = pool_get(&ipqent_pool, PR_NOWAIT);
if (ipqe == NULL) {
ipstat.ips_rcvmemdrop++;
@@ -654,7 +654,7 @@ found:
* IPsec headers), and I don't think we lose much functionality
* that's needed in the real world (who uses bundles anyway ?).
*/
- mtag = m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL);
+ mtag = m_tag_find(m, PACKET_TAG_IPSEC_IN_DONE, NULL);
s = splnet();
if (mtag) {
tdbi = (struct tdb_ident *)(mtag + 1);
@@ -1270,9 +1270,9 @@ ip_weadvertise(addr)
rt = rtalloc1(sintosa(&sin), 0);
if (rt == 0)
return 0;
-
+
RTFREE(rt);
-
+
if ((rt->rt_flags & RTF_GATEWAY) || (rt->rt_flags & RTF_LLINFO) == 0 ||
rt->rt_gateway->sa_family != AF_LINK) {
RTFREE(rt);
@@ -1285,7 +1285,7 @@ ip_weadvertise(addr)
if (ifa->ifa_addr->sa_family != rt->rt_gateway->sa_family)
continue;
- if (!bcmp(LLADDR((struct sockaddr_dl *)ifa->ifa_addr),
+ if (!bcmp(LLADDR((struct sockaddr_dl *)ifa->ifa_addr),
LLADDR((struct sockaddr_dl *)rt->rt_gateway),
ETHER_ADDR_LEN)) {
RTFREE(rt);
@@ -1510,7 +1510,7 @@ ip_forward(m, srcrt)
}
error = ip_output(m, (struct mbuf *)0, &ipforward_rt,
- (IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
+ (IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
0, NULL, NULL);
if (error)
ipstat.ips_cantforward++;
@@ -1628,7 +1628,7 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
error = sysctl_int(oldp, oldlenp, newp, newlen,
&ip_mtudisc);
if (ip_mtudisc != 0 && ip_mtudisc_timeout_q == NULL) {
- ip_mtudisc_timeout_q =
+ ip_mtudisc_timeout_q =
rt_timer_queue_create(ip_mtudisc_timeout);
} else if (ip_mtudisc == 0 && ip_mtudisc_timeout_q != NULL) {
rt_timer_queue_destroy(ip_mtudisc_timeout_q, TRUE);
@@ -1640,7 +1640,7 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
error = sysctl_int(oldp, oldlenp, newp, newlen,
&ip_mtudisc_timeout);
if (ip_mtudisc_timeout_q != NULL)
- rt_timer_queue_change(ip_mtudisc_timeout_q,
+ rt_timer_queue_change(ip_mtudisc_timeout_q,
ip_mtudisc_timeout);
return (error);
case IPCTL_IPPORT_FIRSTAUTO:
@@ -1702,7 +1702,7 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
&ipsec_expire_acquire));
case IPCTL_IPSEC_IPCOMP_ALGORITHM:
return (sysctl_tstring(oldp, oldlenp, newp, newlen,
- ipsec_def_comp,
+ ipsec_def_comp,
sizeof(ipsec_def_comp)));
default:
return (EOPNOTSUPP);
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c
index 684a865f4de..2ddc5ff520c 100644
--- a/sys/netinet/ip_ipcomp.c
+++ b/sys/netinet/ip_ipcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipcomp.c,v 1.1 2001/07/05 12:08:52 jjbg Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.2 2002/06/09 16:26:10 itojun Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -228,7 +228,7 @@ ipcomp_input_cb(op)
m = (struct mbuf *) crp->crp_buf;
s = spltdb();
-
+
tdb = gettdb(tc->tc_spi, &tc->tc_dst, tc->tc_proto);
FREE(tc, M_XDATA);
if (tdb == NULL) {
@@ -338,7 +338,7 @@ ipcomp_input_cb(op)
/* Finally, let's relink */
m1->m_next = mo;
} else {
- bcopy(mtod(m1, u_char *) + roff + hlen,
+ bcopy(mtod(m1, u_char *) + roff + hlen,
mtod(m1, u_char *) + roff,
m1->m_len - (roff + hlen));
m1->m_len -= hlen;
@@ -452,8 +452,8 @@ ipcomp_output(m, tdb, mp, skip, protoff)
default:
DPRINTF(
- ("ipcomp_output(): unknown/unsupported protocol family %d, IPCA %s/%08x\n",
- tdb->tdb_dst.sa.sa_family, ipsp_address(tdb->tdb_dst),
+ ("ipcomp_output(): unknown/unsupported protocol family %d, IPCA %s/%08x\n",
+ tdb->tdb_dst.sa.sa_family, ipsp_address(tdb->tdb_dst),
ntohl(tdb->tdb_spi)));
m_freem(m);
ipcompstat.ipcomps_nopf++;
@@ -496,7 +496,7 @@ ipcomp_output(m, tdb, mp, skip, protoff)
if (n == NULL) {
DPRINTF(
- ("ipcomp_output(): bad mbuf chain, IPCA %s/%08x\n",
+ ("ipcomp_output(): bad mbuf chain, IPCA %s/%08x\n",
ipsp_address(tdb->tdb_dst), ntohl(tdb->tdb_spi)));
ipcompstat.ipcomps_hdrops++;
m_freem(m);
@@ -547,8 +547,8 @@ ipcomp_output(m, tdb, mp, skip, protoff)
default:
DPRINTF(
- ("ipcomp_output(): unknown/unsupported protocol family %d, IPCA %s/%08x\n",
- tdb->tdb_dst.sa.sa_family, ipsp_address(tdb->tdb_dst),
+ ("ipcomp_output(): unknown/unsupported protocol family %d, IPCA %s/%08x\n",
+ tdb->tdb_dst.sa.sa_family, ipsp_address(tdb->tdb_dst),
ntohl(tdb->tdb_spi)));
m_freem(m);
ipcompstat.ipcomps_nopf++;
@@ -655,7 +655,7 @@ ipcomp_output_cb(cp)
return crypto_dispatch(crp);
}
ipcompstat.ipcomps_noxform++;
- DPRINTF(("ipcomp_output_cb(): crypto error %d\n",
+ DPRINTF(("ipcomp_output_cb(): crypto error %d\n",
crp->crp_etype));
goto baddone;
@@ -698,8 +698,8 @@ ipcomp_output_cb(cp)
default:
DPRINTF(
- ("ipcomp_output(): unknown/unsupported protocol family %d, IPCA %s/%08x\n",
- tdb->tdb_dst.sa.sa_family, ipsp_address(tdb->tdb_dst),
+ ("ipcomp_output(): unknown/unsupported protocol family %d, IPCA %s/%08x\n",
+ tdb->tdb_dst.sa.sa_family, ipsp_address(tdb->tdb_dst),
ntohl(tdb->tdb_spi)));
m_freem(m);
ipcompstat.ipcomps_nopf++;
diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c
index 36f20ddb75a..89fba116068 100644
--- a/sys/netinet/ip_ipip.c
+++ b/sys/netinet/ip_ipip.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: ip_ipip.c,v 1.23 2002/05/16 14:10:51 kjc Exp $ */
+/* $OpenBSD: ip_ipip.c,v 1.24 2002/06/09 16:26:10 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
- * Angelos D. Keromytis (kermit@csd.uch.gr) and
+ * Angelos D. Keromytis (kermit@csd.uch.gr) and
* Niels Provos (provos@physnet.uni-hamburg.de).
*
* The original version of this code was written by John Ioannidis
@@ -22,7 +22,7 @@
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
- * modification of this software.
+ * modification of this software.
* You may use this code under the GNU public license if you so wish. Please
* contribute changes back to the authors under this freer than GPL license
* so that we may further the use of strong encryption without limitations to
@@ -130,7 +130,7 @@ ip4_input(struct mbuf *m, ...)
/*
* ipip_input gets called when we receive an IP{46} encapsulated packet,
* either because we got it at a real interface, or because AH or ESP
- * were being used in tunnel mode (in which case the rcvif element will
+ * were being used in tunnel mode (in which case the rcvif element will
* contain the address of the encX interface associated with the tunnel.
*/
@@ -164,7 +164,7 @@ ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp)
break;
#endif /* INET */
-#ifdef INET6
+#ifdef INET6
case 6:
hlen = sizeof(struct ip6_hdr);
break;
@@ -320,13 +320,13 @@ ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp)
}
}
}
-
+
/* Statistics */
ipipstat.ipips_ibytes += m->m_pkthdr.len - iphlen;
/*
* Interface pointer stays the same; if no IPsec processing has
- * been done (or will be done), this will point to a normal
+ * been done (or will be done), this will point to a normal
* interface. Otherwise, it'll point to an enc interface, which
* will allow a packet filter to distinguish between secure and
* untrusted packets.
@@ -394,7 +394,7 @@ ipip_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
struct ip *ipo;
#endif /* INET */
-#ifdef INET6
+#ifdef INET6
struct ip6_hdr *ip6, *ip6o;
#endif /* INET6 */
diff --git a/sys/netinet/ip_ipip.h b/sys/netinet/ip_ipip.h
index 6651000385b..60561001ef9 100644
--- a/sys/netinet/ip_ipip.h
+++ b/sys/netinet/ip_ipip.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: ip_ipip.h,v 1.4 2002/03/14 01:27:11 millert Exp $ */
+/* $OpenBSD: ip_ipip.h,v 1.5 2002/06/09 16:26:10 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
- * Angelos D. Keromytis (kermit@csd.uch.gr) and
+ * Angelos D. Keromytis (kermit@csd.uch.gr) and
* Niels Provos (provos@physnet.uni-hamburg.de).
*
* The original version of this code was written by John Ioannidis
@@ -22,7 +22,7 @@
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
- * modification of this software.
+ * modification of this software.
* You may use this code under the GNU public license if you so wish. Please
* contribute changes back to the authors under this freer than GPL license
* so that we may further the use of strong encryption without limitations to
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index 8e332a1b3d4..a9c8d1bd301 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.148 2002/06/09 04:22:40 angelos Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.149 2002/06/09 16:26:10 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -191,7 +191,7 @@ reserve_spi(u_int32_t sspi, u_int32_t tspi, union sockaddr_union *src,
int nums, s;
/* Don't accept ranges only encompassing reserved SPIs. */
- if (sproto != IPPROTO_IPCOMP &&
+ if (sproto != IPPROTO_IPCOMP &&
(tspi < sspi || tspi <= SPI_RESERVED_MAX)) {
(*errval) = EINVAL;
return 0;
@@ -1213,7 +1213,7 @@ ipsp_skipcrypto_mark(struct tdb_ident *tdbi)
{
struct tdb *tdb;
int s = spltdb();
-
+
tdb = gettdb(tdbi->spi, &tdbi->dst, tdbi->proto);
if (tdb != NULL) {
tdb->tdb_flags |= TDBF_SKIPCRYPTO;
@@ -1228,7 +1228,7 @@ ipsp_skipcrypto_unmark(struct tdb_ident *tdbi)
{
struct tdb *tdb;
int s = spltdb();
-
+
tdb = gettdb(tdbi->spi, &tdbi->dst, tdbi->proto);
if (tdb != NULL) {
tdb->tdb_flags &= ~TDBF_SKIPCRYPTO;
diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h
index 0e508c0ceae..7a6228af4d9 100644
--- a/sys/netinet/ip_ipsp.h
+++ b/sys/netinet/ip_ipsp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.h,v 1.120 2002/05/31 02:39:53 angelos Exp $ */
+/* $OpenBSD: ip_ipsp.h,v 1.121 2002/06/09 16:26:10 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -195,7 +195,7 @@ struct ipsec_policy {
u_int8_t ipo_sproto; /* ESP/AH; if zero, use system dflts */
int ipo_ref_count;
-
+
struct tdb *ipo_tdb; /* Cached entry */
struct ipsec_ref *ipo_srcid;
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index e8d374ed6bf..0a90adfd298 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_mroute.c,v 1.25 2002/03/15 18:19:52 millert Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.26 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: ip_mroute.c,v 1.27 1996/05/07 02:40:50 thorpej Exp $ */
/*
@@ -38,7 +38,7 @@
* SUCH DAMAGE.
*
* @(#)ip_mroute.c 8.2 (Berkeley) 11/15/93
- * $Id: ip_mroute.c,v 1.25 2002/03/15 18:19:52 millert Exp $
+ * $Id: ip_mroute.c,v 1.26 2002/06/09 16:26:10 itojun Exp $
*/
/*
@@ -130,7 +130,7 @@ struct timeout tbf_timeout;
/*
* Define the token bucket filter structures
- * qtable -> each interface has an associated queue of pkts
+ * qtable -> each interface has an associated queue of pkts
*/
struct pkt_queue qtable[MAXVIFS][MAXQSIZE];
@@ -197,7 +197,7 @@ struct ip multicast_encap_iphdr = {
sizeof(struct ip), /* total length */
0, /* id */
0, /* frag offset */
- ENCAP_TTL, ENCAP_PROTO,
+ ENCAP_TTL, ENCAP_PROTO,
0, /* checksum */
};
@@ -477,7 +477,7 @@ ip_mrouter_done()
register struct vif *vifp;
int i;
int s;
-
+
s = splsoftnet();
/* Clear out all the vifs currently in use. */
@@ -490,9 +490,9 @@ ip_mrouter_done()
bzero((caddr_t)qtable, sizeof(qtable));
numvifs = 0;
pim_assert = 0;
-
+
timeout_del(&upcalls_timeout);
-
+
/*
* Free all multicast forwarding cache entries.
*/
@@ -501,24 +501,24 @@ ip_mrouter_done()
for (rt = mfchashtbl[i].lh_first; rt; rt = nrt) {
nrt = rt->mfc_hash.le_next;
-
+
expire_mfc(rt);
}
}
free(mfchashtbl, M_MRTABLE);
mfchashtbl = 0;
-
+
/* Reset de-encapsulation cache. */
have_encap_tunnel = 0;
-
+
ip_mrouter = NULL;
-
+
splx(s);
-
+
if (mrtdebug)
log(LOG_DEBUG, "ip_mrouter_done\n");
-
+
return (0);
}
@@ -579,7 +579,7 @@ add_vif(m)
struct ifnet *ifp;
struct ifreq ifr;
int error, s;
-
+
if (m == 0 || m->m_len < sizeof(struct vifctl))
return (EINVAL);
@@ -590,13 +590,13 @@ add_vif(m)
vifp = &viftable[vifcp->vifc_vifi];
if (vifp->v_lcl_addr.s_addr != 0)
return (EADDRINUSE);
-
+
/* Find the interface with an address in AF_INET family. */
sin.sin_addr = vifcp->vifc_lcl_addr;
ifa = ifa_ifwithaddr(sintosa(&sin));
if (ifa == 0)
return (EADDRNOTAVAIL);
-
+
if (vifcp->vifc_flags & VIFF_TUNNEL) {
if (vifcp->vifc_flags & VIFF_SRCRT) {
log(LOG_ERR, "Source routed tunnels not supported.\n");
@@ -623,7 +623,7 @@ add_vif(m)
/* Make sure the interface supports multicast. */
if ((ifp->if_flags & IFF_MULTICAST) == 0)
return (EOPNOTSUPP);
-
+
/* Enable promiscuous reception of all IP multicasts. */
satosin(&ifr.ifr_addr)->sin_len = sizeof(struct sockaddr_in);
satosin(&ifr.ifr_addr)->sin_family = AF_INET;
@@ -632,13 +632,13 @@ add_vif(m)
if (error)
return (error);
}
-
+
s = splsoftnet();
/* Define parameters for the tbf structure. */
vifp->v_tbf.q_len = 0;
vifp->v_tbf.n_tok = 0;
vifp->v_tbf.last_pkt_t = 0;
-
+
vifp->v_flags = vifcp->vifc_flags;
vifp->v_threshold = vifcp->vifc_threshold;
vifp->v_lcl_addr = vifcp->vifc_lcl_addr;
@@ -655,20 +655,20 @@ add_vif(m)
vifp->v_bytes_in = 0;
vifp->v_bytes_out = 0;
splx(s);
-
+
/* Adjust numvifs up if the vifi is higher than numvifs. */
if (numvifs <= vifcp->vifc_vifi)
numvifs = vifcp->vifc_vifi + 1;
-
+
if (mrtdebug)
log(LOG_DEBUG, "add_vif #%d, lcladdr %x, %s %x, thresh %x, rate %d\n",
- vifcp->vifc_vifi,
+ vifcp->vifc_vifi,
ntohl(vifcp->vifc_lcl_addr.s_addr),
(vifcp->vifc_flags & VIFF_TUNNEL) ? "rmtaddr" : "mask",
ntohl(vifcp->vifc_rmt_addr.s_addr),
vifcp->vifc_threshold,
- vifcp->vifc_rate_limit);
-
+ vifcp->vifc_rate_limit);
+
return (0);
}
@@ -706,7 +706,7 @@ del_vif(m)
register struct vif *vifp;
register vifi_t vifi;
int s;
-
+
if (m == 0 || m->m_len < sizeof(vifi_t))
return (EINVAL);
@@ -717,24 +717,24 @@ del_vif(m)
vifp = &viftable[*vifip];
if (vifp->v_lcl_addr.s_addr == 0)
return (EADDRNOTAVAIL);
-
+
s = splsoftnet();
-
+
reset_vif(vifp);
-
+
bzero((caddr_t)qtable[*vifip], sizeof(qtable[*vifip]));
-
+
/* Adjust numvifs down */
for (vifi = numvifs; vifi > 0; vifi--)
if (viftable[vifi-1].v_lcl_addr.s_addr != 0)
break;
numvifs = vifi;
-
+
splx(s);
-
+
if (mrtdebug)
log(LOG_DEBUG, "del_vif %d, numvifs %d\n", *vifip, numvifs);
-
+
return (0);
}
@@ -826,7 +826,7 @@ add_mfc(m)
return (0);
}
- /*
+ /*
* Find the entry for which the upcall was made and update
*/
nstl = 0;
@@ -879,7 +879,7 @@ add_mfc(m)
ntohl(mfccp->mfcc_origin.s_addr),
ntohl(mfccp->mfcc_mcastgrp.s_addr),
mfccp->mfcc_parent);
-
+
rt = (struct mfc *)malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT);
if (rt == NULL) {
splx(s);
@@ -894,7 +894,7 @@ add_mfc(m)
rt->mfc_wrong_if = 0;
timerclear(&rt->mfc_last_assert);
update_mfc(mfccp, rt);
-
+
/* insert new entry at head of hash chain */
LIST_INSERT_HEAD(&mfchashtbl[hash], rt, mfc_hash);
}
@@ -905,7 +905,7 @@ add_mfc(m)
#ifdef UPCALL_TIMING
/*
- * collect delay statistics on the upcalls
+ * collect delay statistics on the upcalls
*/
static void collate(t)
register struct timeval *t;
@@ -913,16 +913,16 @@ register struct timeval *t;
register u_int32_t d;
register struct timeval tp;
register u_int32_t delta;
-
+
microtime(&tp);
-
+
if (timercmp(t, &tp, <)) {
TV_DELTA(tp, *t, delta);
-
+
d = delta >> 10;
if (d > 50)
d = 50;
-
+
++upcall_data[d];
}
}
@@ -1116,7 +1116,7 @@ ip_mforward(m, ifp)
splx(s);
return (ENOBUFS);
}
-
+
/* is there an upcall waiting for this packet? */
hash = MFCHASH(ip->ip_src.s_addr, ip->ip_dst.s_addr);
for (rt = mfchashtbl[hash].lh_first; rt; rt = rt->mfc_hash.le_next) {
@@ -1150,12 +1150,12 @@ ip_mforward(m, ifp)
return (ENOBUFS);
}
- /*
- * Send message to routing daemon to install
+ /*
+ * Send message to routing daemon to install
* a route into the kernel table
*/
sin.sin_addr = ip->ip_src;
-
+
im = mtod(mm, struct igmpmsg *);
im->im_msgtype = IGMPMSG_NOCACHE;
im->im_mbz = 0;
@@ -1313,7 +1313,7 @@ ip_mdq(m, ifp, rt)
/* came in the wrong interface */
if (mrtdebug & DEBUG_FORWARD)
log(LOG_DEBUG, "wrong if: ifp %p vifi %d vififp %p\n",
- ifp, vifi, vifi >= numvifs ? 0 : viftable[vifi].v_ifp);
+ ifp, vifi, vifi >= numvifs ? 0 : viftable[vifi].v_ifp);
++mrtstat.mrts_wrong_if;
++rt->mfc_wrong_if;
/*
@@ -1342,7 +1342,7 @@ ip_mdq(m, ifp, rt)
}
rt->mfc_last_assert = now;
-
+
im = mtod(mm, struct igmpmsg *);
im->im_msgtype = IGMPMSG_WRONGVIF;
im->im_mbz = 0;
@@ -1387,7 +1387,7 @@ ip_mdq(m, ifp, rt)
#ifdef RSVP_ISI
/*
* check if a vif number is legal/ok. This is used by ip_output, to export
- * numvifs there,
+ * numvifs there,
*/
int
legal_vif_num(vif)
@@ -1446,7 +1446,7 @@ encap_send(ip, vifp, m)
mb_copy->m_data += max_linkhdr;
mb_copy->m_pkthdr.len = len;
mb_copy->m_len = sizeof(multicast_encap_iphdr);
-
+
if ((mb_copy->m_next = m_copy(m, 0, M_COPYALL)) == NULL) {
m_freem(mb_copy);
return;
@@ -1457,7 +1457,7 @@ encap_send(ip, vifp, m)
mb_copy = m_pullup(mb_copy, i);
if (mb_copy == NULL)
return;
-
+
/*
* fill in the encapsulating IP header.
*/
@@ -1467,7 +1467,7 @@ encap_send(ip, vifp, m)
ip_copy->ip_len = len;
ip_copy->ip_src = vifp->v_lcl_addr;
ip_copy->ip_dst = vifp->v_rmt_addr;
-
+
/*
* turn the encapsulated IP header back into a valid one.
*/
@@ -1483,7 +1483,7 @@ encap_send(ip, vifp, m)
ip->ip_sum = in_cksum(mb_copy, ip->ip_hl << 2);
mb_copy->m_data -= sizeof(multicast_encap_iphdr);
#endif
-
+
if (vifp->v_rate_limit <= 0)
tbf_send_packet(vifp, mb_copy);
else
@@ -1523,7 +1523,7 @@ ipip_mroute_input(struct mbuf *m, ...)
*/
if (ip->ip_src.s_addr != last_encap_src) {
register struct vif *vife;
-
+
vifp = viftable;
vife = vifp + numvifs;
for (; vifp < vife; vifp++)
@@ -1611,11 +1611,11 @@ tbf_control(vifp, m, ip, p_len)
}
}
-/*
+/*
* adds a packet to the queue at the interface
*/
static void
-tbf_queue(vifp, m, ip)
+tbf_queue(vifp, m, ip)
register struct vif *vifp;
register struct mbuf *m;
register struct ip *ip;
@@ -1635,7 +1635,7 @@ tbf_queue(vifp, m, ip)
}
-/*
+/*
* processes the queue at the interface
*/
static void
@@ -1669,7 +1669,7 @@ tbf_process_q(vifp)
splx(s);
}
-/*
+/*
* removes the jth packet from the queue at the interface
*/
static void
@@ -1682,7 +1682,7 @@ tbf_dequeue(vifp, j)
for (i=j+1; i <= vifp->v_tbf.q_len - 1; i++) {
qtable[index][i-1] = qtable[index][i];
- }
+ }
qtable[index][i-1].pkt_m = NULL;
qtable[index][i-1].pkt_len = NULL;
qtable[index][i-1].pkt_ip = NULL;
@@ -1699,7 +1699,7 @@ tbf_reprocess_q(arg)
{
register struct vif *vifp = arg;
- if (ip_mrouter == NULL)
+ if (ip_mrouter == NULL)
return;
tbf_update_tokens(vifp);
@@ -1803,7 +1803,7 @@ priority(vifp, ip)
register int prio;
/* temporary hack; may add general packet classifier some day */
-
+
/*
* The UDP port space is divided up into four priority ranges:
* [0, 16384) : unclassified - lowest priority
@@ -1838,7 +1838,7 @@ priority(vifp, ip)
}
/*
- * End of token bucket filter modifications
+ * End of token bucket filter modifications
*/
#ifdef RSVP_ISI
@@ -2050,7 +2050,7 @@ rsvp_input(m, ifp)
else
if (rsvpdebug)
printf("rsvp_input: send packet up\n");
-
+
splx(s);
}
#endif /* RSVP_ISI */
diff --git a/sys/netinet/ip_mroute.h b/sys/netinet/ip_mroute.h
index a4e7fdccc01..4e834b005bc 100644
--- a/sys/netinet/ip_mroute.h
+++ b/sys/netinet/ip_mroute.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_mroute.h,v 1.8 2002/03/14 01:27:11 millert Exp $ */
+/* $OpenBSD: ip_mroute.h,v 1.9 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: ip_mroute.h,v 1.10 1996/02/13 23:42:55 christos Exp $ */
#ifndef _NETINET_IP_MROUTE_H_
@@ -71,7 +71,7 @@ struct mfcctl {
vifi_t mfcc_parent; /* incoming vif */
u_int8_t mfcc_ttls[MAXVIFS]; /* forwarding ttls on vifs */
};
-
+
/*
* Argument structure used by mrouted to get src-grp pkt counts.
*/
@@ -82,7 +82,7 @@ struct sioc_sg_req {
u_long bytecnt;
u_long wrong_if;
};
-
+
/*
* Argument structure used by mrouted to get vif pkt counts.
*/
@@ -113,7 +113,7 @@ struct mrtstat {
u_long mrts_pkt2large; /* pkts dropped - size > BKT SIZE */
u_long mrts_upq_sockfull; /* upcalls dropped - socket full */
};
-
+
#ifdef _KERNEL
@@ -150,7 +150,7 @@ struct vif {
/*
* The kernel's multicast forwarding cache entry structure.
- * (A field for the type of service (mfc_tos) is to be added
+ * (A field for the type of service (mfc_tos) is to be added
* at a future point.)
*/
struct mfc {
@@ -197,13 +197,13 @@ struct rtdetq {
#define MFCTBLSIZ 256
#define MAX_UPQ 4 /* max. no of pkts in upcall Q */
-
+
/*
- * Token bucket filter code
+ * Token bucket filter code
*/
#define MAX_BKT_SIZE 10000 /* 10K bytes size */
#define MAXQSIZE 10 /* max. no of pkts in token queue */
-
+
/*
* Queue structure at each vif
*/
@@ -212,7 +212,7 @@ struct pkt_queue {
struct mbuf *pkt_m; /* pointer to packet mbuf */
struct ip *pkt_ip; /* pointer to ip header */
};
-
+
int ip_mrouter_set(int, struct socket *, struct mbuf **);
int ip_mrouter_get(int, struct socket *, struct mbuf **);
int mrt_ioctl(u_long, caddr_t);
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c
index 3de13ae2522..a9939dd10d7 100644
--- a/sys/netinet/ip_spd.c
+++ b/sys/netinet/ip_spd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_spd.c,v 1.45 2002/05/31 02:42:22 angelos Exp $ */
+/* $OpenBSD: ip_spd.c,v 1.46 2002/06/09 16:26:10 itojun Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -466,7 +466,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction,
tdbp, inp, ipo);
nomatchin: /* Nothing needed here, falling through */
- ;
+ ;
}
/* Check whether cached entry applies. */
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
index bb7aa89d6d1..4d98cfadb8a 100644
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_var.h,v 1.24 2002/05/31 20:58:25 itojun Exp $ */
+/* $OpenBSD: ip_var.h,v 1.25 2002/06/09 16:26:10 itojun Exp $ */
/* $NetBSD: ip_var.h,v 1.16 1996/02/13 23:43:20 christos Exp $ */
/*
@@ -187,7 +187,7 @@ struct in_ifaddr *
in_iawithaddr(struct in_addr, struct mbuf *);
struct in_ifaddr *
ip_rtaddr(struct in_addr);
-u_int16_t
+u_int16_t
ip_randomid(void);
int ip_setmoptions(int, struct ip_moptions **, struct mbuf *);
void ip_slowtimo(void);
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c
index 5344af62e7d..496fb676039 100644
--- a/sys/netinet/ipsec_input.c
+++ b/sys/netinet/ipsec_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_input.c,v 1.56 2002/06/09 00:58:33 angelos Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.57 2002/06/09 16:26:10 itojun Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -219,7 +219,7 @@ ipsec_common_input(struct mbuf *m, int skip, int protoff, int af, int sproto)
return ENXIO;
}
- if (tdbp->tdb_dst.sa.sa_family == AF_INET &&
+ if (tdbp->tdb_dst.sa.sa_family == AF_INET &&
sproto != IPPROTO_IPCOMP) {
/*
* XXX The fragment conflicts with scoped nature of
@@ -645,13 +645,13 @@ ipcomp_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlen, void *newp,
/* All sysctl names at this level are terminal. */
if (namelen != 1)
return ENOTDIR;
-
+
switch (name[0]) {
case IPCOMPCTL_ENABLE:
return sysctl_int(oldp, oldlen, newp, newlen, &ipcomp_enable);
default:
return ENOPROTOOPT;
- }
+ }
/* NOTREACHED */
}
@@ -775,7 +775,7 @@ ipcomp4_input_cb(struct mbuf *m, ...)
{
struct ifqueue *ifq = &ipintrq;
int s = splimp();
-
+
/*
* Interface pointer is already in first mbuf; chop off the
* `outer' header and reschedule.
@@ -784,7 +784,7 @@ ipcomp4_input_cb(struct mbuf *m, ...)
IF_DROP(ifq);
ipcompstat.ipcomps_qfull++;
splx(s);
-
+
m_freem(m);
DPRINTF(("ipcomp4_input_cb(): dropped packet because of full IP queue\n"));
return ENOBUFS;
@@ -811,7 +811,7 @@ ipsec_common_ctlinput(int cmd, struct sockaddr *sa, void *v, int proto)
int hlen = ip->ip_hl << 2;
u_int32_t spi, mtu;
ssize_t adjust;
-
+
/* Find the right MTU. */
icp = (struct icmp *)((caddr_t) ip -
offsetof(struct icmp, icmp_ip));
@@ -1030,7 +1030,7 @@ ipcomp6_input(struct mbuf **mp, int *offp, int proto)
do {
protoff += l;
- m_copydata(*mp, protoff, sizeof(ip6e),
+ m_copydata(*mp, protoff, sizeof(ip6e),
(caddr_t) &ip6e);
if (ip6e.ip6e_nxt == IPPROTO_AH)
l = (ip6e.ip6e_len + 2) << 2;
diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c
index c2b7cf728c7..a3625c7327b 100644
--- a/sys/netinet/ipsec_output.c
+++ b/sys/netinet/ipsec_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_output.c,v 1.21 2002/02/19 21:11:22 miod Exp $ */
+/* $OpenBSD: ipsec_output.c,v 1.22 2002/06/09 16:26:11 itojun Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -234,7 +234,7 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready)
return ENXIO; /*?*/
}
ip6 = mtod(m, struct ip6_hdr *);
- ip6->ip6_plen = htons(m->m_pkthdr.len
+ ip6->ip6_plen = htons(m->m_pkthdr.len
- sizeof(*ip6));
}
#endif /* INET6 */
@@ -261,7 +261,7 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready)
if ((m = m_pullup(m,
sizeof(struct ip))) == NULL)
return ENOBUFS;
-
+
NTOHS(ip->ip_off);
ip->ip_off |= IP_DF;
HTONS(ip->ip_off);
@@ -445,7 +445,7 @@ ipsec_hdrsz(struct tdb *tdbp)
else
adjust = 2 * sizeof(u_int32_t) + tdbp->tdb_ivlen;
/* Authenticator */
- if (tdbp->tdb_authalgxform != NULL)
+ if (tdbp->tdb_authalgxform != NULL)
adjust += AH_HMAC_HASHLEN;
/* Padding */
adjust += tdbp->tdb_encalgxform->blocksize;
@@ -496,7 +496,7 @@ ipsec_adjust_mtu(struct mbuf *m, u_int32_t mtu)
int s;
s = spltdb();
-
+
for (mtag = m_tag_find(m, PACKET_TAG_IPSEC_OUT_DONE, NULL); mtag;
mtag = m_tag_find(m, PACKET_TAG_IPSEC_OUT_DONE, mtag)) {
tdbi = (struct tdb_ident *)(mtag + 1);
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 1af29e3b207..99b863b91a4 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip.c,v 1.25 2002/03/15 18:19:52 millert Exp $ */
+/* $OpenBSD: raw_ip.c,v 1.26 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */
/*
@@ -34,11 +34,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -53,7 +53,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -65,7 +65,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h
index 5eacb39a45a..704e7f0f913 100644
--- a/sys/netinet/tcp.h
+++ b/sys/netinet/tcp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp.h,v 1.10 2002/05/16 14:10:51 kjc Exp $ */
+/* $OpenBSD: tcp.h,v 1.11 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: tcp.h,v 1.8 1995/04/17 05:32:58 cgd Exp $ */
/*
@@ -71,7 +71,7 @@ struct tcphdr {
u_int16_t th_sum; /* checksum */
u_int16_t th_urp; /* urgent pointer */
};
-#define th_reseqlen th_urp /* TCP data length for
+#define th_reseqlen th_urp /* TCP data length for
resequencing/reassembly */
#define TCPOPT_EOL 0
diff --git a/sys/netinet/tcp_debug.c b/sys/netinet/tcp_debug.c
index ba1cf2d203f..c87a30c8727 100644
--- a/sys/netinet/tcp_debug.c
+++ b/sys/netinet/tcp_debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_debug.c,v 1.11 2002/06/07 16:18:02 itojun Exp $ */
+/* $OpenBSD: tcp_debug.c,v 1.12 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: tcp_debug.c,v 1.10 1996/02/13 23:43:36 christos Exp $ */
/*
@@ -34,11 +34,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -53,7 +53,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -65,7 +65,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index a307b6ac266..5b1e2bb9e33 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.116 2002/06/07 16:18:02 itojun Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.117 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -34,11 +34,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -53,7 +53,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -65,7 +65,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
@@ -444,7 +444,7 @@ tcp_input(struct mbuf *m, ...)
/*
* Before we do ANYTHING, we have to figure out if it's TCP/IPv6 or
* TCP/IPv4.
- */
+ */
switch (mtod(m, struct ip *)->ip_v) {
#ifdef INET6
case 6:
@@ -629,7 +629,7 @@ tcp_input(struct mbuf *m, ...)
}
optlen = off - sizeof(struct tcphdr);
optp = mtod(m, caddr_t) + iphlen + sizeof(struct tcphdr);
- /*
+ /*
* Do quick retrieval of timestamp options ("options
* prediction?"). If timestamp is the only option and it's
* formatted as recommended in RFC 1323 appendix A, we
@@ -705,7 +705,7 @@ findpcb:
goto dropwithreset_ratelim;
if (tp->t_state == TCPS_CLOSED)
goto drop;
-
+
/* Unscale the window into a 32-bit value. */
if ((tiflags & TH_SYN) == 0)
tiwin = th->th_win << tp->snd_scale;
@@ -751,7 +751,7 @@ findpcb:
*/
dropsocket++;
#ifdef IPSEC
- /*
+ /*
* We need to copy the required security levels
* from the old pcb. Ditto for any other
* IPsec-related information.
@@ -783,19 +783,19 @@ findpcb:
* done particularly for the case where an AF_INET6
* socket is bound only to a port, and a v4 connection
* comes in on that port.
- * we also copy the flowinfo from the original pcb
+ * we also copy the flowinfo from the original pcb
* to the new one.
*/
{
int flags = inp->inp_flags;
struct inpcb *oldinpcb = inp;
-
+
inp = (struct inpcb *)so->so_pcb;
inp->inp_flags |= (flags & INP_IPV6);
if ((inp->inp_flags & INP_IPV6) != 0) {
- inp->inp_ipv6.ip6_hlim =
+ inp->inp_ipv6.ip6_hlim =
oldinpcb->inp_ipv6.ip6_hlim;
- inp->inp_ipv6.ip6_flow =
+ inp->inp_ipv6.ip6_flow =
oldinpcb->inp_ipv6.ip6_flow;
}
}
@@ -807,7 +807,7 @@ findpcb:
#ifdef INET6
case AF_INET6:
inp->inp_laddr6 = ipv6->ip6_dst;
-
+
/*inp->inp_options = ip6_srcroute();*/ /* soon. */
/*
* still need to tweak outbound options
@@ -920,7 +920,7 @@ findpcb:
tcpstat.tcps_ecn_rcvce++;
}
#endif
- /*
+ /*
* Header prediction: check for the two common cases
* of a uni-directional data xfer. If the packet has
* no control flags, is in-sequence, the window didn't
@@ -945,7 +945,7 @@ findpcb:
tiwin && tiwin == tp->snd_wnd &&
tp->snd_nxt == tp->snd_max) {
- /*
+ /*
* If last ACK falls within this segment's sequence numbers,
* record the timestamp.
* Fix from Braden, see Stevens p. 870
@@ -977,7 +977,7 @@ findpcb:
sbdrop(&so->so_snd, acked);
tp->snd_una = th->th_ack;
#if defined(TCP_SACK) || defined(TCP_ECN)
- /*
+ /*
* We want snd_last to track snd_una so
* as to avoid sequence wraparound problems
* for very large transfers.
@@ -1201,11 +1201,11 @@ findpcb:
#ifdef TCP_SACK
/*
* If peer did not send a SACK_PERMITTED option (i.e., if
- * tcp_dooptions() did not set TF_SACK_PERMIT), set
+ * tcp_dooptions() did not set TF_SACK_PERMIT), set
* sack_disable to 1 if it is currently 0.
*/
if (!tp->sack_disable)
- if ((tp->t_flags & TF_SACK_PERMIT) == 0)
+ if ((tp->t_flags & TF_SACK_PERMIT) == 0)
tp->sack_disable = 1;
#endif
@@ -1252,7 +1252,7 @@ findpcb:
* If the state is SYN_RECEIVED:
* if seg contains SYN/ACK, send an RST.
* if seg contains an ACK, but not for our SYN/ACK, send an RST
- */
+ */
case TCPS_SYN_RECEIVED:
if (tiflags & TH_ACK) {
@@ -1311,7 +1311,7 @@ findpcb:
* been set in tcp_dooptions(). If it was not, disable SACKs.
*/
if (!tp->sack_disable)
- if ((tp->t_flags & TF_SACK_PERMIT) == 0)
+ if ((tp->t_flags & TF_SACK_PERMIT) == 0)
tp->sack_disable = 1;
#endif
#ifdef TCP_ECN
@@ -1385,10 +1385,10 @@ trimthenstep6:
/*
* States other than LISTEN or SYN_SENT.
* First check timestamp, if present.
- * Then check that at least some bytes of segment are within
+ * Then check that at least some bytes of segment are within
* receive window. If segment begins before rcv_nxt,
* drop leading data (and SYN); if nothing left, just ack.
- *
+ *
* RFC 1323 PAWS: If we have a timestamp reply on this segment
* and it's less than ts_recent, drop it.
*/
@@ -1422,7 +1422,7 @@ trimthenstep6:
if (tiflags & TH_SYN) {
tiflags &= ~TH_SYN;
th->th_seq++;
- if (th->th_urp > 1)
+ if (th->th_urp > 1)
th->th_urp--;
else
tiflags &= ~TH_URG;
@@ -1581,7 +1581,7 @@ trimthenstep6:
else
goto drop;
}
-
+
/*
* Ack processing.
*/
@@ -1701,7 +1701,7 @@ trimthenstep6:
* the new ssthresh).
*
* Dup acks mean that packets have left the
- * network (they're now cached at the receiver)
+ * network (they're now cached at the receiver)
* so bump cwnd by the amount in the receiver
* to keep a constant cwnd packets in the
* network.
@@ -1709,12 +1709,12 @@ trimthenstep6:
if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0)
tp->t_dupacks = 0;
#if defined(TCP_SACK) && defined(TCP_FACK)
- /*
+ /*
* In FACK, can enter fast rec. if the receiver
* reports a reass. queue longer than 3 segs.
*/
else if (++tp->t_dupacks == tcprexmtthresh ||
- ((SEQ_GT(tp->snd_fack, tcprexmtthresh *
+ ((SEQ_GT(tp->snd_fack, tcprexmtthresh *
tp->t_maxseg + tp->snd_una)) &&
SEQ_GT(tp->snd_una, tp->snd_last))) {
#else
@@ -1727,8 +1727,8 @@ trimthenstep6:
#if defined(TCP_SACK) || defined(TCP_ECN)
if (SEQ_LT(th->th_ack, tp->snd_last)){
- /*
- * False fast retx after
+ /*
+ * False fast retx after
* timeout. Do not cut window.
*/
tp->t_dupacks = 0;
@@ -1752,7 +1752,7 @@ trimthenstep6:
tcpstat.tcps_cwr_frecovery++;
#endif
tcpstat.tcps_sndrexmitfast++;
-#if defined(TCP_SACK) && defined(TCP_FACK)
+#if defined(TCP_SACK) && defined(TCP_FACK)
tp->t_dupacks = tcprexmtthresh;
(void) tcp_output(tp);
/*
@@ -1761,7 +1761,7 @@ trimthenstep6:
*/
tp->snd_cwnd = tp->snd_ssthresh;
#else
- /*
+ /*
* tcp_output() will send
* oldest SACK-eligible rtx.
*/
@@ -1792,9 +1792,9 @@ trimthenstep6:
goto drop;
} else if (tp->t_dupacks > tcprexmtthresh) {
#if defined(TCP_SACK) && defined(TCP_FACK)
- /*
- * while (awnd < cwnd)
- * sendsomething();
+ /*
+ * while (awnd < cwnd)
+ * sendsomething();
*/
if (!tp->sack_disable) {
if (tp->snd_awnd < tp->snd_cwnd)
@@ -1828,7 +1828,7 @@ trimthenstep6:
if (tcp_sack_partialack(tp, th)) {
#if defined(TCP_SACK) && defined(TCP_FACK)
/* Force call to tcp_output */
- if (tp->snd_awnd < tp->snd_cwnd)
+ if (tp->snd_awnd < tp->snd_cwnd)
needoutput = 1;
#else
tp->snd_cwnd += tp->t_maxseg;
@@ -1837,9 +1837,9 @@ trimthenstep6:
} else {
/* Out of fast recovery */
tp->snd_cwnd = tp->snd_ssthresh;
- if (tcp_seq_subtract(tp->snd_max,
+ if (tcp_seq_subtract(tp->snd_max,
th->th_ack) < tp->snd_ssthresh)
- tp->snd_cwnd =
+ tp->snd_cwnd =
tcp_seq_subtract(tp->snd_max,
th->th_ack);
tp->t_dupacks = 0;
@@ -1848,15 +1848,15 @@ trimthenstep6:
tp->snd_fack = th->th_ack;
#endif /* TCP_FACK */
}
- }
+ }
} else {
- if (tp->t_dupacks >= tcprexmtthresh &&
+ if (tp->t_dupacks >= tcprexmtthresh &&
!tcp_newreno(tp, th)) {
/* Out of fast recovery */
tp->snd_cwnd = tp->snd_ssthresh;
if (tcp_seq_subtract(tp->snd_max, th->th_ack) <
tp->snd_ssthresh)
- tp->snd_cwnd =
+ tp->snd_cwnd =
tcp_seq_subtract(tp->snd_max,
th->th_ack);
tp->t_dupacks = 0;
@@ -2055,14 +2055,14 @@ step6:
* If this segment advances the known urgent pointer,
* then mark the data stream. This should not happen
* in CLOSE_WAIT, CLOSING, LAST_ACK or TIME_WAIT STATES since
- * a FIN has been received from the remote side.
+ * a FIN has been received from the remote side.
* In these states we ignore the URG.
*
* According to RFC961 (Assigned Protocols),
* the urgent pointer points to the last octet
* of urgent data. We continue, however,
* to consider it to indicate the first octet
- * of data past the urgent section as the original
+ * of data past the urgent section as the original
* spec states (in one of two places).
*/
if (SEQ_GT(th->th_seq+th->th_urp, tp->rcv_up)) {
@@ -2124,10 +2124,10 @@ dodata: /* XXX */
}
#ifdef TCP_SACK
if (!tp->sack_disable)
- tcp_update_sack_list(tp);
-#endif
+ tcp_update_sack_list(tp);
+#endif
- /*
+ /*
* variable len never referenced again in modern BSD,
* so why bother computing it ??
*/
@@ -2174,7 +2174,7 @@ dodata: /* XXX */
/*
* In FIN_WAIT_2 state enter the TIME_WAIT state,
- * starting the time-wait timer, turning off the other
+ * starting the time-wait timer, turning off the other
* standard timers.
*/
case TCPS_FIN_WAIT_2:
@@ -2360,7 +2360,7 @@ tcp_dooptions(tp, cp, cnt, th, ts_present, ts_val, ts_ecr)
bcopy((char *)cp + 6, (char *) ts_ecr, sizeof(*ts_ecr));
NTOHL(*ts_ecr);
- /*
+ /*
* A timestamp received in a SYN makes
* it ok to send timestamp requests and replies.
*/
@@ -2370,8 +2370,8 @@ tcp_dooptions(tp, cp, cnt, th, ts_present, ts_val, ts_ecr)
tp->ts_recent_age = tcp_now;
}
break;
-
-#ifdef TCP_SACK
+
+#ifdef TCP_SACK
case TCPOPT_SACK_PERMITTED:
if (tp->sack_disable || optlen!=TCPOLEN_SACK_PERMITTED)
continue;
@@ -2383,7 +2383,7 @@ tcp_dooptions(tp, cp, cnt, th, ts_present, ts_val, ts_ecr)
if (tcp_sack_option(tp, th, cp, optlen))
continue;
break;
-#endif
+#endif
}
}
/* Update t_maxopd and t_maxseg after all options are processed */
@@ -2396,33 +2396,33 @@ tcp_dooptions(tp, cp, cnt, th, ts_present, ts_val, ts_ecr)
}
#if defined(TCP_SACK)
-u_long
+u_long
tcp_seq_subtract(a, b)
u_long a, b;
-{
- return ((long)(a - b));
+{
+ return ((long)(a - b));
}
#endif
-#ifdef TCP_SACK
+#ifdef TCP_SACK
/*
* This function is called upon receipt of new valid data (while not in header
- * prediction mode), and it updates the ordered list of sacks.
+ * prediction mode), and it updates the ordered list of sacks.
*/
-void
+void
tcp_update_sack_list(tp)
- struct tcpcb *tp;
-{
- /*
+ struct tcpcb *tp;
+{
+ /*
* First reported block MUST be the most recent one. Subsequent
* blocks SHOULD be in the order in which they arrived at the
* receiver. These two conditions make the implementation fully
* compliant with RFC 2018.
- */
+ */
int i, j = 0, count = 0, lastpos = -1;
struct sackblk sack, firstsack, temp[MAX_SACK_BLKS];
-
+
/* First clean up current list of sacks */
for (i = 0; i < tp->rcv_numsacks; i++) {
sack = tp->sackblks[i];
@@ -2433,11 +2433,11 @@ tcp_update_sack_list(tp)
if (SEQ_LEQ(sack.end, tp->rcv_nxt)) {
tp->sackblks[i].start = tp->sackblks[i].end = 0;
count++;
- } else {
+ } else {
temp[j].start = tp->sackblks[i].start;
temp[j++].end = tp->sackblks[i].end;
}
- }
+ }
tp->rcv_numsacks -= count;
if (tp->rcv_numsacks == 0) { /* no sack blocks currently (fast path) */
tcp_clean_sackreport(tp);
@@ -2452,9 +2452,9 @@ tcp_update_sack_list(tp)
/* Otherwise, sack blocks are already present. */
for (i = 0; i < tp->rcv_numsacks; i++)
tp->sackblks[i] = temp[i]; /* first copy back sack list */
- if (SEQ_GEQ(tp->rcv_nxt, tp->rcv_lastend))
+ if (SEQ_GEQ(tp->rcv_nxt, tp->rcv_lastend))
return; /* sack list remains unchanged */
- /*
+ /*
* From here, segment just received should be (part of) the 1st sack.
* Go through list, possibly coalescing sack block entries.
*/
@@ -2466,7 +2466,7 @@ tcp_update_sack_list(tp)
SEQ_GT(sack.start, firstsack.end))
continue; /* no overlap */
if (sack.start == firstsack.start && sack.end == firstsack.end){
- /*
+ /*
* identical block; delete it here since we will
* move it to the front of the list.
*/
@@ -2499,23 +2499,23 @@ tcp_update_sack_list(tp)
}
tp->sackblks[0] = firstsack;
return;
-}
+}
/*
* Process the TCP SACK option. Returns 1 if tcp_dooptions() should continue,
* and 0 otherwise, if the option was fine. tp->snd_holes is an ordered list
- * of holes (oldest to newest, in terms of the sequence space).
- */
+ * of holes (oldest to newest, in terms of the sequence space).
+ */
int
tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
-{
+{
int tmp_olen;
u_char *tmp_cp;
struct sackhole *cur, *p, *temp;
-
+
if (tp->sack_disable)
return (1);
-
+
/* Note: TCPOLEN_SACK must be 2*sizeof(tcp_seq) */
if (optlen <= 2 || (optlen - 2) % TCPOLEN_SACK != 0)
return (1);
@@ -2527,9 +2527,9 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
panic("tcp_sack_option"); /* Should never happen */
while (tmp_olen > 0) {
struct sackblk sack;
-
+
bcopy(tmp_cp, (char *) &(sack.start), sizeof(tcp_seq));
- NTOHL(sack.start);
+ NTOHL(sack.start);
bcopy(tmp_cp + sizeof(tcp_seq),
(char *) &(sack.end), sizeof(tcp_seq));
NTOHL(sack.end);
@@ -2537,7 +2537,7 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
tmp_cp += TCPOLEN_SACK;
if (SEQ_LEQ(sack.end, sack.start))
continue; /* bad SACK fields */
- if (SEQ_LEQ(sack.end, tp->snd_una))
+ if (SEQ_LEQ(sack.end, tp->snd_una))
continue; /* old block */
#if defined(TCP_SACK) && defined(TCP_FACK)
/* Updates snd_fack. */
@@ -2555,7 +2555,7 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
pool_get(&sackhl_pool, PR_NOWAIT);
if (tp->snd_holes == NULL) {
/* ENOBUFS, so ignore SACKed block for now*/
- continue;
+ continue;
}
cur = tp->snd_holes;
cur->start = th->th_ack;
@@ -2564,11 +2564,11 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
cur->next = NULL;
tp->snd_numholes = 1;
tp->rcv_lastsack = sack.end;
- /*
- * dups is at least one. If more data has been
+ /*
+ * dups is at least one. If more data has been
* SACKed, it can be greater than one.
*/
- cur->dups = min(tcprexmtthresh,
+ cur->dups = min(tcprexmtthresh,
((sack.end - cur->end)/tp->t_maxseg));
if (cur->dups < 1)
cur->dups = 1;
@@ -2577,8 +2577,8 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
/* Go thru list of holes: p = previous, cur = current */
p = cur = tp->snd_holes;
while (cur) {
- if (SEQ_LEQ(sack.end, cur->start))
- /* SACKs data before the current hole */
+ if (SEQ_LEQ(sack.end, cur->start))
+ /* SACKs data before the current hole */
break; /* no use going through more holes */
if (SEQ_GEQ(sack.start, cur->end)) {
/* SACKs data beyond the current hole */
@@ -2594,12 +2594,12 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
/* Data acks at least the beginning of hole */
#if defined(TCP_SACK) && defined(TCP_FACK)
if (SEQ_GT(sack.end, cur->rxmit))
- tp->retran_data -=
- tcp_seq_subtract(cur->rxmit,
+ tp->retran_data -=
+ tcp_seq_subtract(cur->rxmit,
cur->start);
else
tp->retran_data -=
- tcp_seq_subtract(sack.end,
+ tcp_seq_subtract(sack.end,
cur->start);
#endif /* TCP_FACK */
if (SEQ_GEQ(sack.end, cur->end)) {
@@ -2627,9 +2627,9 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
/* move end of hole backward */
if (SEQ_GEQ(sack.end, cur->end)) {
#if defined(TCP_SACK) && defined(TCP_FACK)
- if (SEQ_GT(cur->rxmit, sack.start))
- tp->retran_data -=
- tcp_seq_subtract(cur->rxmit,
+ if (SEQ_GT(cur->rxmit, sack.start))
+ tp->retran_data -=
+ tcp_seq_subtract(cur->rxmit,
sack.start);
#endif /* TCP_FACK */
cur->end = sack.start;
@@ -2644,22 +2644,22 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
}
if (SEQ_LT(cur->start, sack.start) &&
SEQ_GT(cur->end, sack.end)) {
- /*
- * ACKs some data in middle of a hole; need to
+ /*
+ * ACKs some data in middle of a hole; need to
* split current hole
*/
temp = (struct sackhole *)
pool_get(&sackhl_pool, PR_NOWAIT);
- if (temp == NULL)
+ if (temp == NULL)
continue; /* ENOBUFS */
#if defined(TCP_SACK) && defined(TCP_FACK)
- if (SEQ_GT(cur->rxmit, sack.end))
- tp->retran_data -=
- tcp_seq_subtract(sack.end,
+ if (SEQ_GT(cur->rxmit, sack.end))
+ tp->retran_data -=
+ tcp_seq_subtract(sack.end,
sack.start);
else if (SEQ_GT(cur->rxmit, sack.start))
- tp->retran_data -=
- tcp_seq_subtract(cur->rxmit,
+ tp->retran_data -=
+ tcp_seq_subtract(cur->rxmit,
sack.start);
#endif /* TCP_FACK */
temp->next = cur->next;
@@ -2687,11 +2687,11 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
*/
temp = (struct sackhole *)
pool_get(&sackhl_pool, PR_NOWAIT);
- if (temp == NULL)
+ if (temp == NULL)
continue; /* ENOBUFS */
temp->start = tp->rcv_lastsack;
temp->end = sack.start;
- temp->dups = min(tcprexmtthresh,
+ temp->dups = min(tcprexmtthresh,
((sack.end - sack.start)/tp->t_maxseg));
if (temp->dups < 1)
temp->dups = 1;
@@ -2703,8 +2703,8 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
}
}
#if defined(TCP_SACK) && defined(TCP_FACK)
- /*
- * Update retran_data and snd_awnd. Go through the list of
+ /*
+ * Update retran_data and snd_awnd. Go through the list of
* holes. Increment retran_data by (hole->rxmit - hole->start).
*/
tp->retran_data = 0;
@@ -2713,16 +2713,16 @@ tcp_sack_option(struct tcpcb *tp, struct tcphdr *th, u_char *cp, int optlen)
tp->retran_data += cur->rxmit - cur->start;
cur = cur->next;
}
- tp->snd_awnd = tcp_seq_subtract(tp->snd_nxt, tp->snd_fack) +
+ tp->snd_awnd = tcp_seq_subtract(tp->snd_nxt, tp->snd_fack) +
tp->retran_data;
#endif /* TCP_FACK */
return (0);
-}
+}
/*
* Delete stale (i.e, cumulatively ack'd) holes. Hole is deleted only if
- * it is completely acked; otherwise, tcp_sack_option(), called from
+ * it is completely acked; otherwise, tcp_sack_option(), called from
* tcp_dooptions(), will fix up the hole.
*/
void
@@ -2753,7 +2753,7 @@ tcp_del_sackholes(tp, th)
}
}
-/*
+/*
* Delete all receiver-side SACK information.
*/
void
@@ -2768,7 +2768,7 @@ tcp_clean_sackreport(tp)
}
-/*
+/*
* Checks for partial ack. If partial ack arrives, turn off retransmission
* timer, deflate the window, do not clear tp->t_dupacks, and return 1.
* If the ack advances at least to tp->snd_last, return 0.
@@ -2783,8 +2783,8 @@ tcp_sack_partialack(tp, th)
TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp->t_rtttime = 0;
#ifndef TCP_FACK
- /*
- * Partial window deflation. This statement relies on the
+ /*
+ * Partial window deflation. This statement relies on the
* fact that tp->snd_una has not been updated yet. In FACK
* hold snd_cwnd constant during fast recovery.
*/
@@ -2814,7 +2814,7 @@ tcp_pulloutofband(so, urgent, m, off)
int off;
{
int cnt = off + urgent - 1;
-
+
while (cnt >= 0) {
if (m->m_len > cnt) {
char *cp = mtod(m, caddr_t) + cnt;
@@ -2875,7 +2875,7 @@ tcp_xmit_timer(tp, rtt)
if ((tp->t_rttvar += delta) <= 0)
tp->t_rttvar = 1;
} else {
- /*
+ /*
* No rtt measurement yet - use the unsmoothed rtt.
* Set the variance to half the rtt (so our first
* retransmit happens at 3*rtt).
@@ -2902,7 +2902,7 @@ tcp_xmit_timer(tp, rtt)
else
rttmin = rtt + 2;
TCPT_RANGESET(tp->t_rxtcur, TCP_REXMTVAL(tp), rttmin, TCPTV_REXMTMAX);
-
+
/*
* We received an ack for a packet that wasn't retransmitted;
* it is probably safe to discard any error indications we've
@@ -2989,7 +2989,7 @@ tcp_mss(tp, offer)
if (!ifp)
/*
* ifp may be null and rmx_mtu may be zero in certain
- * v6 cases (e.g., if ND wasn't able to resolve the
+ * v6 cases (e.g., if ND wasn't able to resolve the
* destination host.
*/
goto out;
@@ -3041,7 +3041,7 @@ tcp_mss(tp, offer)
*/
tp->t_maxopd = mss;
- if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
+ if ((tp->t_flags & (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP &&
(tp->t_flags & TF_RCVD_TSTMP) == TF_RCVD_TSTMP)
mss -= TCPOLEN_TSTAMP_APPA;
@@ -3055,7 +3055,7 @@ tcp_mss(tp, offer)
*/
tp->snd_cwnd = ulmax((tp->snd_cwnd / tp->t_maxseg) *
mss, mss);
- }
+ }
} else
tp->snd_cwnd = mss;
@@ -3171,7 +3171,7 @@ tcp_mss_update(tp)
#endif /* TUBA_INCLUDE */
#if defined (TCP_SACK)
-/*
+/*
* Checks for partial ack. If partial ack arrives, force the retransmission
* of the next unacknowledged segment, do not clear tp->t_dupacks, and return
* 1. By setting snd_nxt to ti_ack, this forces retransmission timer to
@@ -3194,18 +3194,18 @@ tcp_newreno(tp, th)
TCP_TIMER_DISARM(tp, TCPT_REXMT);
tp->t_rtttime = 0;
tp->snd_nxt = th->th_ack;
- /*
+ /*
* Set snd_cwnd to one segment beyond acknowledged offset
* (tp->snd_una not yet updated when this function is called)
- */
+ */
tp->snd_cwnd = tp->t_maxseg + (th->th_ack - tp->snd_una);
(void) tcp_output(tp);
tp->snd_cwnd = ocwnd;
if (SEQ_GT(onxt, tp->snd_nxt))
tp->snd_nxt = onxt;
- /*
- * Partial window deflation. Relies on fact that tp->snd_una
- * not updated yet.
+ /*
+ * Partial window deflation. Relies on fact that tp->snd_una
+ * not updated yet.
*/
tp->snd_cwnd -= (th->th_ack - tp->snd_una - tp->t_maxseg);
return 1;
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 344f4a1317e..1b4897d9ae1 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_output.c,v 1.51 2002/06/07 16:18:02 itojun Exp $ */
+/* $OpenBSD: tcp_output.c,v 1.52 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: tcp_output.c,v 1.16 1997/06/03 16:17:09 kml Exp $ */
/*
@@ -34,11 +34,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -53,7 +53,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -65,7 +65,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
@@ -190,15 +190,15 @@ tcp_sack_adjust(struct tcpcb *tp)
return; /* No holes */
if (SEQ_GEQ(tp->snd_nxt, tp->rcv_lastsack))
return; /* We're already beyond any SACKed blocks */
- /*
- * Two cases for which we want to advance snd_nxt:
+ /*
+ * Two cases for which we want to advance snd_nxt:
* i) snd_nxt lies between end of one hole and beginning of another
* ii) snd_nxt lies between end of last hole and rcv_lastsack
*/
while (cur->next) {
if (SEQ_LT(tp->snd_nxt, cur->end))
return;
- if (SEQ_GEQ(tp->snd_nxt, cur->next->start))
+ if (SEQ_GEQ(tp->snd_nxt, cur->next->start))
cur = cur->next;
else {
tp->snd_nxt = cur->next->start;
@@ -285,11 +285,11 @@ again:
flags = tcp_outflags[tp->t_state];
#ifdef TCP_SACK
- /*
+ /*
* Send any SACK-generated retransmissions. If we're explicitly trying
* to send out new data (when sendalot is 1), bypass this function.
* If we retransmit in fast recovery mode, decrement snd_cwnd, since
- * we're replacing a (future) new transmission with a retransmission
+ * we're replacing a (future) new transmission with a retransmission
* now, and we previously incremented snd_cwnd in tcp_input().
*/
if (!tp->sack_disable && !sendalot) {
@@ -350,13 +350,13 @@ again:
len = ulmin(so->so_snd.sb_cc, win) - off;
#if defined(TCP_SACK) && defined(TCP_FACK)
- /*
- * If we're in fast recovery (SEQ_GT(tp->snd_last, tp->snd_una)), and
+ /*
+ * If we're in fast recovery (SEQ_GT(tp->snd_last, tp->snd_una)), and
* amount of outstanding data (snd_awnd) is >= snd_cwnd, then
* do not send data (like zero window conditions)
*/
- if (!tp->sack_disable && len && SEQ_GT(tp->snd_last, tp->snd_una) &&
- (tp->snd_awnd >= tp->snd_cwnd))
+ if (!tp->sack_disable && len && SEQ_GT(tp->snd_last, tp->snd_una) &&
+ (tp->snd_awnd >= tp->snd_cwnd))
len = 0;
#endif /* TCP_FACK */
#ifdef TCP_SACK
@@ -428,7 +428,7 @@ again:
* window, then want to send a window update to peer.
*/
if (win > 0) {
- /*
+ /*
* "adv" is the amount we can increase the window,
* taking into account that we are limited by
* TCP_MAXWIN << tp->rcv_scale.
@@ -461,7 +461,7 @@ again:
goto send;
#ifdef TCP_SACK
/*
- * In SACK, it is possible for tcp_output to fail to send a segment
+ * In SACK, it is possible for tcp_output to fail to send a segment
* after the retransmission timer has been turned off. Make sure
* that the retransmission timer is set.
*/
@@ -548,10 +548,10 @@ send:
if (flags & TH_ACK)
tcp_mss_update(tp);
#ifdef TCP_SACK
- /*
- * If this is the first SYN of connection (not a SYN
- * ACK), include SACK_PERMIT_HDR option. If this is a
- * SYN ACK, include SACK_PERMIT_HDR option if peer has
+ /*
+ * If this is the first SYN of connection (not a SYN
+ * ACK), include SACK_PERMIT_HDR option. If this is a
+ * SYN ACK, include SACK_PERMIT_HDR option if peer has
* already done so.
*/
if (!tp->sack_disable && ((flags & TH_ACK) == 0 ||
@@ -561,7 +561,7 @@ send:
optlen += 4;
}
#endif
-
+
if ((tp->t_flags & TF_REQ_SCALE) &&
((flags & TH_ACK) == 0 ||
(tp->t_flags & TF_RCVD_SCALE))) {
@@ -574,9 +574,9 @@ send:
}
}
}
-
+
/*
- * Send a timestamp and echo-reply if this is a SYN and our side
+ * Send a timestamp and echo-reply if this is a SYN and our side
* wants to use timestamps (TF_REQ_TSTMP is set) or both our side
* and our peer have sent timestamps in our SYN's.
*/
@@ -585,7 +585,7 @@ send:
((flags & (TH_SYN|TH_ACK)) == TH_SYN ||
(tp->t_flags & TF_RCVD_TSTMP))) {
u_int32_t *lp = (u_int32_t *)(opt + optlen);
-
+
/* Form timestamp option as shown in appendix A of RFC 1323. */
*lp++ = htonl(TCPOPT_TSTAMP_HDR);
*lp++ = htonl(tcp_now);
@@ -611,7 +611,7 @@ send:
optlen += TCPOLEN_SIGNATURE;
- /* Pad options list to the next 32 bit boundary and
+ /* Pad options list to the next 32 bit boundary and
* terminate it.
*/
*bp++ = TCPOPT_NOP;
@@ -654,7 +654,7 @@ send:
#endif /* DIAGNOSTIC */
hdrlen += optlen;
-
+
/*
* Adjust data length if insertion of options will
* bump the packet length beyond the t_maxopd length.
@@ -775,7 +775,7 @@ send:
* window for use in delaying messages about window sizes.
* If resending a FIN, be sure not to use a new sequence number.
*/
- if ((flags & TH_FIN) && (tp->t_flags & TF_SENTFIN) &&
+ if ((flags & TH_FIN) && (tp->t_flags & TF_SENTFIN) &&
(tp->snd_nxt == tp->snd_max))
tp->snd_nxt--;
/*
@@ -798,10 +798,10 @@ send:
#ifdef TCP_SACK
if (sack_rxmit) {
- /*
- * If sendalot was turned on (due to option stuffing), turn it
- * off. Properly set th_seq field. Advance the ret'x pointer
- * by len.
+ /*
+ * If sendalot was turned on (due to option stuffing), turn it
+ * off. Properly set th_seq field. Advance the ret'x pointer
+ * by len.
*/
if (sendalot)
sendalot = 0;
@@ -981,7 +981,7 @@ send:
#ifdef INET6
case AF_INET6:
m->m_pkthdr.len = hdrlen + len;
- th->th_sum = in6_cksum(m, IPPROTO_TCP, sizeof(struct ip6_hdr),
+ th->th_sum = in6_cksum(m, IPPROTO_TCP, sizeof(struct ip6_hdr),
hdrlen - sizeof(struct ip6_hdr) + len);
break;
#endif /* INET6 */
@@ -1118,7 +1118,7 @@ send:
case AF_INET6:
{
struct ip6_hdr *ip6;
-
+
ip6 = mtod(m, struct ip6_hdr *);
ip6->ip6_plen = m->m_pkthdr.len -
sizeof(struct ip6_hdr);
@@ -1145,7 +1145,7 @@ send:
#if defined(TCP_SACK) && defined(TCP_FACK)
/* Update snd_awnd to reflect the new data that was sent. */
tp->snd_awnd = tcp_seq_subtract(tp->snd_max, tp->snd_fack) +
- tp->retran_data;
+ tp->retran_data;
#endif /* defined(TCP_SACK) && defined(TCP_FACK) */
if (error) {
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 93251f3c079..0224280f9e1 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.63 2002/06/07 16:18:02 itojun Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.64 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -34,11 +34,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -53,7 +53,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -65,7 +65,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
@@ -198,7 +198,7 @@ tcp_init()
*
* To support IPv6 in addition to IPv4 and considering that the sizes of
* the IPv4 and IPv6 headers are not the same, we now use a separate pointer
- * for the TCP header. Also, we made the former tcpiphdr header pointer
+ * for the TCP header. Also, we made the former tcpiphdr header pointer
* into just an IP overlay pointer, with casting as appropriate for v6. rja
*/
struct mbuf *
@@ -233,7 +233,7 @@ tcp_template(tp)
* The link header, network header, TCP header, and TCP options
* all must fit in this mbuf. For now, assume the worst case of
* TCP options size. Eventually, compute this from tp flags.
- */
+ */
if (m->m_len + MAX_TCPOPTLEN + max_linkhdr >= MHLEN) {
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
@@ -275,8 +275,8 @@ tcp_template(tp)
ip6->ip6_src = inp->inp_laddr6;
ip6->ip6_dst = inp->inp_faddr6;
ip6->ip6_flow = htonl(0x60000000) |
- (inp->inp_ipv6.ip6_flow & htonl(0x0fffffff));
-
+ (inp->inp_ipv6.ip6_flow & htonl(0x0fffffff));
+
ip6->ip6_nxt = IPPROTO_TCP;
ip6->ip6_plen = htons(sizeof(struct tcphdr)); /*XXX*/
ip6->ip6_hlim = in6_selecthlim(inp, NULL); /*XXX*/
@@ -399,7 +399,7 @@ tcp_respond(tp, template, m, ack, seq, flags)
switch (af) {
#ifdef INET6
case AF_INET6:
- tlen += sizeof(struct tcphdr) + sizeof(struct ip6_hdr);
+ tlen += sizeof(struct tcphdr) + sizeof(struct ip6_hdr);
th = (struct tcphdr *)((caddr_t)ti + sizeof(struct ip6_hdr));
break;
#endif /* INET6 */
@@ -511,7 +511,7 @@ tcp_newtcpcb(struct inpcb *inp)
#endif
#ifdef INET6
- if (inp->inp_flags & INP_IPV6)
+ if (inp->inp_flags & INP_IPV6)
inp->inp_ipv6.ip6_hlim = ip6_defhlim;
else
#endif /* INET6 */
@@ -588,7 +588,7 @@ tcp_close(struct tcpcb *tp)
/*
* If we sent enough data to get some meaningful characteristics,
- * save them in the routing entry. 'Enough' is arbitrarily
+ * save them in the routing entry. 'Enough' is arbitrarily
* defined as the sendpipesize (default 4K) * 16. This would
* give us 16 rtt samples assuming we only get one sample per
* window (the usual case on a long haul net). 16 samples is
@@ -717,7 +717,7 @@ tcp_drain()
}
/*
- * Compute proper scaling value for receiver window from buffer space
+ * Compute proper scaling value for receiver window from buffer space
*/
void
@@ -756,7 +756,7 @@ tcp_notify(inp, error)
} else if (TCPS_HAVEESTABLISHED(tp->t_state) == 0 &&
tp->t_rxtshift > 3 && tp->t_softerror)
so->so_error = error;
- else
+ else
tp->t_softerror = error;
wakeup((caddr_t) &so->so_timeo);
sorwakeup(so);
@@ -1010,7 +1010,7 @@ tcp_mtudisc_increase(inp, errno)
*/
if (rt->rt_flags & RTF_HOST)
in_rtchange(inp, errno);
-
+
/* also takes care of congestion window */
tcp_mss(tp, -1);
}
@@ -1120,7 +1120,7 @@ tcp_rndiss_encrypt(val)
u_int16_t val;
{
u_int16_t sum = 0, i;
-
+
for (i = 0; i < TCP_RNDISS_ROUNDS; i++) {
sum += 0x79b9;
val ^= ((u_int16_t)tcp_rndiss_sbox[(val^sum) & 0x7f]) << 7;
@@ -1136,7 +1136,7 @@ tcp_rndiss_init()
get_random_bytes(tcp_rndiss_sbox, sizeof(tcp_rndiss_sbox));
tcp_rndiss_reseed = time.tv_sec + TCP_RNDISS_OUT;
- tcp_rndiss_msb = tcp_rndiss_msb == 0x8000 ? 0 : 0x8000;
+ tcp_rndiss_msb = tcp_rndiss_msb == 0x8000 ? 0 : 0x8000;
tcp_rndiss_cnt = 0;
}
@@ -1146,7 +1146,7 @@ tcp_rndiss_next()
if (tcp_rndiss_cnt >= TCP_RNDISS_MAX ||
time.tv_sec > tcp_rndiss_reseed)
tcp_rndiss_init();
-
+
/* (arc4random() & 0x7fff) ensures a 32768 byte gap between ISS */
return ((tcp_rndiss_encrypt(tcp_rndiss_cnt++) | tcp_rndiss_msb) <<16) |
(arc4random() & 0x7fff);
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index 36a3716f769..ea4d237e80e 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_timer.c,v 1.29 2002/05/16 14:10:51 kjc Exp $ */
+/* $OpenBSD: tcp_timer.c,v 1.30 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */
/*
@@ -217,7 +217,7 @@ tcp_timer_rexmt(void *arg)
tp->t_rttmin, TCPTV_REXMTMAX);
TCP_TIMER_ARM(tp, TCPT_REXMT, tp->t_rxtcur);
- /*
+ /*
* If we are losing and we are trying path MTU discovery,
* try turning it off. This will avoid black holes in
* the network which suppress or fail to send "packet
@@ -312,7 +312,7 @@ tcp_timer_rexmt(void *arg)
* size increase exponentially with time. If the
* window is larger than the path can handle, this
* exponential growth results in dropped packet(s)
- * almost immediately. To get more time between
+ * almost immediately. To get more time between
* drops but still "push" the network to take advantage
* of improving conditions, we switch from exponential
* to linear window opening at some threshhold size.
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index d4740fdfb9b..48704cb5a35 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.62 2002/06/07 16:18:02 itojun Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.63 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -608,7 +608,7 @@ tcp_ctloutput(op, so, level, optname, mp)
tp->t_flags &= ~TF_SIGNATURE;
break;
#endif /* TCP_SIGNATURE */
- default:
+ default:
error = ENOPROTOOPT;
break;
}
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h
index 2be685a288d..45cb0bdcd18 100644
--- a/sys/netinet/tcp_var.h
+++ b/sys/netinet/tcp_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_var.h,v 1.43 2002/05/16 14:10:51 kjc Exp $ */
+/* $OpenBSD: tcp_var.h,v 1.44 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: tcp_var.h,v 1.17 1996/02/13 23:44:24 christos Exp $ */
/*
@@ -42,10 +42,10 @@
struct sackblk {
tcp_seq start; /* start seq no. of sack block */
tcp_seq end; /* end seq no. */
-};
+};
struct sackhole {
- tcp_seq start; /* start seq no. of hole */
+ tcp_seq start; /* start seq no. of hole */
tcp_seq end; /* end seq no. */
int dups; /* number of dup(s)acks for this hole */
tcp_seq rxmit; /* next seq. no in hole to be retransmitted */
@@ -328,13 +328,13 @@ struct tcpstat {
/*
* Names for TCP sysctl objects.
*/
-
+
#define TCPCTL_RFC1323 1 /* enable/disable RFC1323 timestamps/scaling */
#define TCPCTL_KEEPINITTIME 2 /* TCPT_KEEP value */
#define TCPCTL_KEEPIDLE 3 /* allow tcp_keepidle to be changed */
#define TCPCTL_KEEPINTVL 4 /* allow tcp_keepintvl to be changed */
-#define TCPCTL_SLOWHZ 5 /* return kernel idea of PR_SLOWHZ */
-#define TCPCTL_BADDYNAMIC 6 /* return bad dynamic port bitmap */
+#define TCPCTL_SLOWHZ 5 /* return kernel idea of PR_SLOWHZ */
+#define TCPCTL_BADDYNAMIC 6 /* return bad dynamic port bitmap */
#define TCPCTL_RECVSPACE 7 /* receive buffer space */
#define TCPCTL_SENDSPACE 8 /* send buffer space */
#define TCPCTL_IDENT 9 /* get connection owner */
@@ -395,7 +395,7 @@ struct tcpcb *
struct tcpcb *
tcp_drop(struct tcpcb *, int);
void tcp_dooptions(struct tcpcb *, u_char *, int, struct tcphdr *,
- int *, u_int32_t *, u_int32_t *);
+ int *, u_int32_t *, u_int32_t *);
void tcp_drain(void);
void tcp_init(void);
#if defined(INET6) && !defined(TCP6)
@@ -451,7 +451,7 @@ void tcp_print_holes(struct tcpcb *tp);
#endif /* TCP_SACK */
#if defined(TCP_SACK)
int tcp_newreno(struct tcpcb *, struct tcphdr *);
-u_long tcp_seq_subtract(u_long, u_long );
+u_long tcp_seq_subtract(u_long, u_long );
#endif /* TCP_SACK */
#ifdef TCP_SIGNATURE
int tcp_signature_apply(caddr_t, caddr_t, unsigned int);
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 1403e97ed29..87d4eb2261c 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.77 2002/05/31 04:43:26 angelos Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.78 2002/06/09 16:26:11 itojun Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -34,11 +34,11 @@
* SUCH DAMAGE.
*
* @(#)COPYRIGHT 1.1 (NRL) 17 January 1995
- *
+ *
* NRL grants permission for redistribution and use in source and binary
* forms, with or without modification, of the software and documentation
* created at NRL provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -53,7 +53,7 @@
* 4. Neither the name of the NRL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
- *
+ *
* THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
@@ -65,7 +65,7 @@
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
* official policies, either expressed or implied, of the US Naval
@@ -299,7 +299,7 @@ udp_input(struct mbuf *m, ...)
bzero(((struct ipovly *)ip)->ih_x1,
sizeof ((struct ipovly *)ip)->ih_x1);
((struct ipovly *)ip)->ih_len = uh->uh_ulen;
-
+
if ((uh->uh_sum = in_cksum(m, len +
sizeof (struct ip))) != 0) {
udpstat.udps_badsum++;
@@ -475,7 +475,7 @@ udp_input(struct mbuf *m, ...)
ip6_savecontrol(inp, &opts, ipv6, m);
#endif /* INET6 */
m_adj(m, iphlen);
- if (sbappendaddr(&last->so_rcv,
+ if (sbappendaddr(&last->so_rcv,
&srcsa.sa, m, opts) == 0) {
udpstat.udps_fullsock++;
goto bad;
@@ -966,7 +966,7 @@ udp_output(struct mbuf *m, ...)
} else
ui->ui_sum = 0;
((struct ip *)ui)->ip_len = sizeof (struct udpiphdr) + len;
- ((struct ip *)ui)->ip_ttl = inp->inp_ip.ip_ttl;
+ ((struct ip *)ui)->ip_ttl = inp->inp_ip.ip_ttl;
((struct ip *)ui)->ip_tos = inp->inp_ip.ip_tos;
udpstat.udps_opackets++;
@@ -1084,7 +1084,7 @@ udp_usrreq(so, req, m, addr, control)
break;
case PRU_CONNECT:
-#ifdef INET6
+#ifdef INET6
if (inp->inp_flags & INP_IPV6) {
if (!IN6_IS_ADDR_UNSPECIFIED(&inp->inp_faddr6)) {
error = EISCONN;
@@ -1118,7 +1118,7 @@ udp_usrreq(so, req, m, addr, control)
break;
case PRU_DISCONNECT:
-#ifdef INET6
+#ifdef INET6
if (inp->inp_flags & INP_IPV6) {
if (IN6_IS_ADDR_UNSPECIFIED(&inp->inp_faddr6)) {
error = ENOTCONN;