aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2020-09-01 21:19:14 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2020-09-01 21:19:14 +0000
commit662c13053f4bf2d6245ba7e2b66c10d1cd5c1fb9 (patch)
tree5cffe4473640975abc443ef4b8047b34cdb4a039 /sys/netinet
parent586ee69f09c5060621486b34722a4a806581f93d (diff)
downloadsrc-662c13053f4bf2d6245ba7e2b66c10d1cd5c1fb9.tar.gz
src-662c13053f4bf2d6245ba7e2b66c10d1cd5c1fb9.zip
net: clean up empty lines in .c and .h files
Notes
Notes: svn path=/head/; revision=365071
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/accf_http.c1
-rw-r--r--sys/netinet/cc/cc_cubic.c2
-rw-r--r--sys/netinet/cc/cc_htcp.c1
-rw-r--r--sys/netinet/icmp_var.h1
-rw-r--r--sys/netinet/if_ether.c4
-rw-r--r--sys/netinet/igmp.c2
-rw-r--r--sys/netinet/in.c2
-rw-r--r--sys/netinet/in_fib.c2
-rw-r--r--sys/netinet/in_fib.h1
-rw-r--r--sys/netinet/in_gif.c1
-rw-r--r--sys/netinet/in_mcast.c1
-rw-r--r--sys/netinet/in_pcb.c4
-rw-r--r--sys/netinet/in_rmx.c3
-rw-r--r--sys/netinet/ip_carp.c1
-rw-r--r--sys/netinet/ip_dummynet.h2
-rw-r--r--sys/netinet/ip_fw.h3
-rw-r--r--sys/netinet/ip_icmp.c5
-rw-r--r--sys/netinet/ip_input.c2
-rw-r--r--sys/netinet/ip_mroute.c3
-rw-r--r--sys/netinet/ip_mroute.h1
-rw-r--r--sys/netinet/ip_options.c3
-rw-r--r--sys/netinet/ip_output.c3
-rw-r--r--sys/netinet/libalias/alias.c25
-rw-r--r--sys/netinet/libalias/alias.h1
-rw-r--r--sys/netinet/libalias/alias_db.c79
-rw-r--r--sys/netinet/libalias/alias_dummy.c3
-rw-r--r--sys/netinet/libalias/alias_ftp.c2
-rw-r--r--sys/netinet/libalias/alias_irc.c1
-rw-r--r--sys/netinet/libalias/alias_local.h9
-rw-r--r--sys/netinet/libalias/alias_nbt.c9
-rw-r--r--sys/netinet/libalias/alias_pptp.c5
-rw-r--r--sys/netinet/libalias/alias_proxy.c8
-rw-r--r--sys/netinet/libalias/alias_sctp.c10
-rw-r--r--sys/netinet/libalias/alias_sctp.h8
-rw-r--r--sys/netinet/libalias/alias_skinny.c3
-rw-r--r--sys/netinet/libalias/alias_smedia.c11
-rw-r--r--sys/netinet/libalias/alias_util.c1
-rw-r--r--sys/netinet/sctp.h7
-rw-r--r--sys/netinet/sctp_asconf.c6
-rw-r--r--sys/netinet/sctp_asconf.h2
-rw-r--r--sys/netinet/sctp_auth.c10
-rw-r--r--sys/netinet/sctp_auth.h3
-rw-r--r--sys/netinet/sctp_bsd_addr.c9
-rw-r--r--sys/netinet/sctp_bsd_addr.h1
-rw-r--r--sys/netinet/sctp_cc_functions.c12
-rw-r--r--sys/netinet/sctp_constants.h15
-rw-r--r--sys/netinet/sctp_header.h16
-rw-r--r--sys/netinet/sctp_indata.c27
-rw-r--r--sys/netinet/sctp_indata.h3
-rw-r--r--sys/netinet/sctp_input.c17
-rw-r--r--sys/netinet/sctp_input.h1
-rw-r--r--sys/netinet/sctp_lock_bsd.h9
-rw-r--r--sys/netinet/sctp_os.h3
-rw-r--r--sys/netinet/sctp_os_bsd.h6
-rw-r--r--sys/netinet/sctp_output.c39
-rw-r--r--sys/netinet/sctp_output.h8
-rw-r--r--sys/netinet/sctp_pcb.c54
-rw-r--r--sys/netinet/sctp_pcb.h11
-rw-r--r--sys/netinet/sctp_ss_functions.c4
-rw-r--r--sys/netinet/sctp_structs.h9
-rw-r--r--sys/netinet/sctp_sysctl.c2
-rw-r--r--sys/netinet/sctp_sysctl.h4
-rw-r--r--sys/netinet/sctp_timer.c2
-rw-r--r--sys/netinet/sctp_timer.h1
-rw-r--r--sys/netinet/sctp_uio.h9
-rw-r--r--sys/netinet/sctp_usrreq.c14
-rw-r--r--sys/netinet/sctp_var.h4
-rw-r--r--sys/netinet/sctputil.c24
-rw-r--r--sys/netinet/sctputil.h5
-rw-r--r--sys/netinet/siftr.c16
-rw-r--r--sys/netinet/tcp.h2
-rw-r--r--sys/netinet/tcp_fastopen.c5
-rw-r--r--sys/netinet/tcp_hpts.c3
-rw-r--r--sys/netinet/tcp_hpts.h1
-rw-r--r--sys/netinet/tcp_input.c11
-rw-r--r--sys/netinet/tcp_log_buf.c4
-rw-r--r--sys/netinet/tcp_log_buf.h1
-rw-r--r--sys/netinet/tcp_lro.c1
-rw-r--r--sys/netinet/tcp_output.c1
-rw-r--r--sys/netinet/tcp_ratelimit.c3
-rw-r--r--sys/netinet/tcp_reass.c2
-rw-r--r--sys/netinet/tcp_sack.c1
-rw-r--r--sys/netinet/tcp_stacks/bbr.c30
-rw-r--r--sys/netinet/tcp_stacks/rack.c38
-rw-r--r--sys/netinet/tcp_stacks/rack_bbr_common.c2
-rw-r--r--sys/netinet/tcp_stacks/tcp_bbr.h9
-rw-r--r--sys/netinet/tcp_stacks/tcp_rack.h1
-rw-r--r--sys/netinet/tcp_subr.c3
-rw-r--r--sys/netinet/tcp_syncache.c1
-rw-r--r--sys/netinet/tcp_usrreq.c1
-rw-r--r--sys/netinet/toecore.c4
-rw-r--r--sys/netinet/udp_usrreq.c1
92 files changed, 18 insertions, 683 deletions
diff --git a/sys/netinet/accf_http.c b/sys/netinet/accf_http.c
index 1bab9836d64f..85761c2502b3 100644
--- a/sys/netinet/accf_http.c
+++ b/sys/netinet/accf_http.c
@@ -273,7 +273,6 @@ fallout:
return (SU_ISCONNECTED);
}
-
#define NCHRS 3
static int
diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c
index ec3874eb0817..c3a52cef1002 100644
--- a/sys/netinet/cc/cc_cubic.c
+++ b/sys/netinet/cc/cc_cubic.c
@@ -231,7 +231,6 @@ cubic_after_idle(struct cc_var *ccv)
cubic_data->t_last_cong = ticks;
}
-
static void
cubic_cb_destroy(struct cc_var *ccv)
{
@@ -464,6 +463,5 @@ cubic_ssthresh_update(struct cc_var *ccv)
CCV(ccv, snd_ssthresh) = max(ssthresh, 2 * CCV(ccv, t_maxseg));
}
-
DECLARE_CC_MODULE(cubic, &cubic_cc_algo);
MODULE_VERSION(cubic, 1);
diff --git a/sys/netinet/cc/cc_htcp.c b/sys/netinet/cc/cc_htcp.c
index a528f18d0453..1782e0c89458 100644
--- a/sys/netinet/cc/cc_htcp.c
+++ b/sys/netinet/cc/cc_htcp.c
@@ -518,7 +518,6 @@ htcp_ssthresh_update(struct cc_var *ccv)
}
}
-
SYSCTL_DECL(_net_inet_tcp_cc_htcp);
SYSCTL_NODE(_net_inet_tcp_cc, OID_AUTO, htcp, CTLFLAG_RW | CTLFLAG_MPSAFE, NULL,
"H-TCP related settings");
diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h
index 6b421f2df445..c1ed83e54048 100644
--- a/sys/netinet/icmp_var.h
+++ b/sys/netinet/icmp_var.h
@@ -35,7 +35,6 @@
#ifndef _NETINET_ICMP_VAR_H_
#define _NETINET_ICMP_VAR_H_
-
/*
* Variables related to this implementation
* of the internet control message protocol.
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 0a8bb90fd52b..972701369d13 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -179,7 +179,6 @@ SYSCTL_INT(_net_link_ether_arp, OID_AUTO, log_level, CTLFLAG_VNET | CTLFLAG_RW,
log((pri), "arp: " __VA_ARGS__); \
} while (0)
-
static void arpintr(struct mbuf *);
static void arptimer(void *);
#ifdef INET
@@ -351,7 +350,6 @@ arp_fillheader(struct ifnet *ifp, struct arphdr *ah, int bcast, u_char *buf,
return (error);
}
-
/*
* Broadcast an ARP request. Caller specifies:
* - arp header source ip address
@@ -986,7 +984,6 @@ match:
/* Allocate new entry */
la = lltable_alloc_entry(LLTABLE(ifp), 0, dst);
if (la == NULL) {
-
/*
* lle creation may fail if source address belongs
* to non-directly connected subnet. However, we
@@ -1059,7 +1056,6 @@ reply:
(void)memcpy(ar_sha(ah), lle->ll_addr, ah->ar_hln);
LLE_RUNLOCK(lle);
} else {
-
if (lle != NULL)
LLE_RUNLOCK(lle);
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index d619cfc5160e..b95f8b9be560 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -1650,7 +1650,6 @@ igmp_input(struct mbuf **mp, int *offp, int proto)
return (rip_input(mp, offp, proto));
}
-
/*
* Fast timeout handler (global).
* VIMAGE: Timeout handlers are expected to service all vimages.
@@ -1951,7 +1950,6 @@ igmp_v3_process_group_timers(struct in_multi_head *inmh,
}
}
-
/*
* Suppress a group's pending response to a group or source/group query.
*
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 4f4e47916f66..5553530628bf 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -755,7 +755,6 @@ in_scrubprefixlle(struct in_ifaddr *ia, int all, u_int flags)
ifp = ia->ia_ifp;
if (all) {
-
/*
* Remove all L2 entries matching given prefix.
* Convert address to host representation to avoid
@@ -1138,7 +1137,6 @@ in_lltable_match_prefix(const struct sockaddr *saddr,
return (0);
if (lle->la_flags & LLE_IFADDR) {
-
/*
* Delete LLE_IFADDR records IFF address & flag matches.
* Note that addr is the interface address within prefix
diff --git a/sys/netinet/in_fib.c b/sys/netinet/in_fib.c
index dd69d9cb61b2..c46c55bd7d00 100644
--- a/sys/netinet/in_fib.c
+++ b/sys/netinet/in_fib.c
@@ -142,7 +142,7 @@ inline static int
check_urpf_mpath(struct rtentry *rt, uint32_t flags,
const struct ifnet *src_if)
{
-
+
while (rt != NULL) {
if (check_urpf(rt->rt_nhop, flags, src_if) != 0)
return (1);
diff --git a/sys/netinet/in_fib.h b/sys/netinet/in_fib.h
index 93565e9f10b0..bc2a2ad6a30e 100644
--- a/sys/netinet/in_fib.h
+++ b/sys/netinet/in_fib.h
@@ -52,4 +52,3 @@ int fib4_check_urpf(uint32_t fibnum, struct in_addr dst, uint32_t scopeid,
struct nhop_object *fib4_lookup_debugnet(uint32_t fibnum, struct in_addr dst,
uint32_t scopeid, uint32_t flags);
#endif
-
diff --git a/sys/netinet/in_gif.c b/sys/netinet/in_gif.c
index 46752534626d..a9f3d384fb5a 100644
--- a/sys/netinet/in_gif.c
+++ b/sys/netinet/in_gif.c
@@ -458,4 +458,3 @@ in_gif_uninit(void)
gif_hashdestroy(V_ipv4_srchashtbl);
}
}
-
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index 99efb4bdb3e4..3f41d998631c 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -1273,7 +1273,6 @@ in_joingroup_locked(struct ifnet *ifp, const struct in_addr *gina,
out_inm_release:
if (error) {
-
CTR2(KTR_IGMPV3, "%s: dropping ref on %p", __func__, inm);
IF_ADDR_WLOCK(ifp);
inm_release_deferred(inm);
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 626ff976f4f0..30bf72f83e33 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -726,7 +726,6 @@ in_pcb_lport_dest(struct inpcb *inp, struct sockaddr *lsa, u_short *lportp,
lport = htons(*lastport);
if (fsa != NULL) {
-
#ifdef INET
if (lsa->sa_family == AF_INET) {
tmpinp = in_pcblookup_hash_locked(pcbinfo,
@@ -1005,7 +1004,6 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *nam, in_addr_t *laddrp,
error = in_pcb_lport(inp, &laddr, &lport, cred, lookupflags);
if (error != 0)
return (error);
-
}
*laddrp = laddr.s_addr;
*lportp = lport;
@@ -1132,7 +1130,6 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
if (ia == NULL) {
ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0,
inp->inp_socket->so_fibnum));
-
}
if (ia == NULL) {
error = ENETUNREACH;
@@ -1147,7 +1144,6 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
ifp = ia->ia_ifp;
ia = NULL;
CK_STAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
-
sa = ifa->ifa_addr;
if (sa->sa_family != AF_INET)
continue;
diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c
index e46959881718..ef40fdc6af6c 100644
--- a/sys/netinet/in_rmx.c
+++ b/sys/netinet/in_rmx.c
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/ip_icmp.h>
#include <netinet/ip_var.h>
-
static int
rib4_preadd(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *mask,
struct nhop_object *nh)
@@ -67,7 +66,6 @@ rib4_preadd(u_int fibnum, const struct sockaddr *addr, const struct sockaddr *ma
rt_flags = nhop_get_rtflags(nh);
if (rt_flags & RTF_HOST) {
-
/*
* Backward compatibility:
* if the destination is broadcast,
@@ -188,4 +186,3 @@ in_ifadown(struct ifaddr *ifa, int delete)
rt_foreach_fib_walk_del(AF_INET, in_ifadownkill, &arg);
ifa->ifa_flags &= ~IFA_ROUTE; /* XXXlocking? */
}
-
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index e71140fa6b1e..1fe3f16a92c8 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -580,7 +580,6 @@ carp6_input(struct mbuf **mp, int *offp, int proto)
}
ch = (struct carp_header *)(mtod(m, char *) + *offp);
-
/* verify the CARP checksum */
m->m_data += *offp;
if (in_cksum(m, sizeof(*ch))) {
diff --git a/sys/netinet/ip_dummynet.h b/sys/netinet/ip_dummynet.h
index 173debdaccc0..de38ed9fbedf 100644
--- a/sys/netinet/ip_dummynet.h
+++ b/sys/netinet/ip_dummynet.h
@@ -188,7 +188,6 @@ struct dn_flow {
uint32_t drops;
};
-
/*
* Scheduler template, mostly indicating the name, number,
* sched_mask and buckets.
@@ -204,7 +203,6 @@ struct dn_sch {
struct ipfw_flow_id sched_mask; /* M */
};
-
/* A delay profile is attached to a link.
* Note that a profile, as any other object, cannot be longer than 2^16
*/
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index 751505172928..57d2a4c607e8 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -516,7 +516,6 @@ struct cfg_nat {
#endif /* ifndef _KERNEL */
-
struct nat44_cfg_spool {
struct in_addr addr;
uint16_t port;
@@ -638,7 +637,6 @@ struct ip_fw_bcounter {
uint64_t bcnt; /* Byte counter */
};
-
#ifndef _KERNEL
/*
* Legacy rule format
@@ -669,7 +667,6 @@ struct ip_fw {
#define RULESIZE(rule) (sizeof(*(rule)) + (rule)->cmd_len * 4 - 4)
-
#if 1 // should be moved to in.h
/*
* This structure is used as a flow mask and a flow id for various
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 94daae43fd20..f8dfc21df8f3 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -71,7 +71,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/tcpip.h>
#include <netinet/icmp_var.h>
-
#ifdef INET
#include <machine/in_cksum.h>
@@ -478,7 +477,6 @@ icmp_input(struct mbuf **mp, int *offp, int proto)
ICMPSTAT_INC(icps_inhist[icp->icmp_type]);
code = icp->icmp_code;
switch (icp->icmp_type) {
-
case ICMP_UNREACH:
switch (code) {
case ICMP_UNREACH_NET:
@@ -618,7 +616,6 @@ icmp_input(struct mbuf **mp, int *offp, int proto)
if (icmplen < ICMP_MASKLEN)
break;
switch (ip->ip_dst.s_addr) {
-
case INADDR_BROADCAST:
case INADDR_ANY:
icmpdst.sin_addr = ip->ip_src;
@@ -987,7 +984,6 @@ icmp_verify_redirect_gateway(struct sockaddr_in *src, struct sockaddr_in *dst,
return (0);
}
-
/*
* Send an icmp packet back to the ip level,
* after supplying a checksum.
@@ -1065,7 +1061,6 @@ ip_next_mtu(int mtu, int dir)
}
#endif /* INET */
-
/*
* badport_bandlim() - check for ICMP bandwidth limit
*
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 851a2488b8a5..bbc81977ccef 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1090,9 +1090,7 @@ ip_forward(struct mbuf *m, int srcrt)
if (mcopy == NULL)
return;
-
switch (error) {
-
case 0: /* forwarded, but need redirect */
/* type, code set above */
break;
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index e7daf12b4b6a..0b5038dd723b 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1533,7 +1533,6 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif)
*/
if (V_pim_assert_enabled && (vifi < V_numvifs) &&
V_viftable[vifi].v_ifp) {
-
if (ifp == &V_multicast_register_if)
PIMSTAT_INC(pims_rcv_registers_wrongiif);
@@ -1576,7 +1575,6 @@ ip_mdq(struct mbuf *m, struct ifnet *ifp, struct mfc *rt, vifi_t xmt_vif)
return 0;
}
-
/* If I sourced this packet, it counts as output, else it was input. */
if (in_hosteq(ip->ip_src, V_viftable[vifi].v_lcl_addr)) {
V_viftable[vifi].v_pkt_out++;
@@ -2192,7 +2190,6 @@ unschedule_bw_meter(struct bw_meter *x)
x->bm_time_hash = BW_METER_BUCKETS;
}
-
/*
* Process all "<=" type of bw_meter that should be processed now,
* and for each entry prepare an upcall if necessary. Each processed
diff --git a/sys/netinet/ip_mroute.h b/sys/netinet/ip_mroute.h
index 11329fd164cb..054eb921d3df 100644
--- a/sys/netinet/ip_mroute.h
+++ b/sys/netinet/ip_mroute.h
@@ -251,7 +251,6 @@ struct sioc_vif_req {
u_long obytes; /* Output byte count on vif */
};
-
/*
* The kernel's virtual-interface structure.
*/
diff --git a/sys/netinet/ip_options.c b/sys/netinet/ip_options.c
index d49a8ba1125e..98bef9f844df 100644
--- a/sys/netinet/ip_options.c
+++ b/sys/netinet/ip_options.c
@@ -143,7 +143,6 @@ ip_dooptions(struct mbuf *m, int pass)
}
}
switch (opt) {
-
default:
break;
@@ -338,7 +337,6 @@ dropit:
off--; /* 0 origin */
sin = (struct in_addr *)(cp + off);
switch (cp[IPOPT_OFFSET + 1] & 0x0f) {
-
case IPOPT_TS_TSONLY:
break;
@@ -652,7 +650,6 @@ ip_pcbopts(struct inpcb *inp, int optname, struct mbuf *m)
goto bad;
}
switch (opt) {
-
default:
break;
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 790945e8ec13..a37201ed237f 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -105,7 +105,6 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_frag_size, CTLFLAG_RW,
static void ip_mloopback(struct ifnet *, const struct mbuf *, int);
-
extern int in_mcast_loop;
extern struct protosw inetsw[];
@@ -721,7 +720,6 @@ sendit:
gw = dst;
ip = mtod(m, struct ip *);
goto again;
-
}
}
@@ -1428,7 +1426,6 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt)
case IP_RECVRSSBUCKETID:
#endif
switch (sopt->sopt_name) {
-
case IP_TOS:
optval = inp->inp_ip_tos;
break;
diff --git a/sys/netinet/libalias/alias.c b/sys/netinet/libalias/alias.c
index 0c3aa7c61141..267bd2118222 100644
--- a/sys/netinet/libalias/alias.c
+++ b/sys/netinet/libalias/alias.c
@@ -189,7 +189,6 @@ static void TcpMonitorIn(u_char, struct alias_link *);
static void TcpMonitorOut(u_char, struct alias_link *);
-
static void
TcpMonitorIn(u_char th_flags, struct alias_link *lnk)
{
@@ -226,10 +225,6 @@ TcpMonitorOut(u_char th_flags, struct alias_link *lnk)
}
}
-
-
-
-
/* Protocol Specific Packet Aliasing Routines
IcmpAliasIn(), IcmpAliasIn1(), IcmpAliasIn2()
@@ -269,7 +264,6 @@ All packets go through the aliasing mechanism, whether they come from
the gateway machine or other machines on a local area network.
*/
-
/* Local prototypes */
static int IcmpAliasIn1(struct libalias *, struct ip *);
static int IcmpAliasIn2(struct libalias *, struct ip *);
@@ -291,7 +285,6 @@ static int UdpAliasOut(struct libalias *, struct ip *, int, int create);
static int TcpAliasIn(struct libalias *, struct ip *);
static int TcpAliasOut(struct libalias *, struct ip *, int, int create);
-
static int
IcmpAliasIn1(struct libalias *la, struct ip *pip)
{
@@ -438,7 +431,6 @@ fragment contained in ICMP data section */
return (PKT_ALIAS_IGNORED);
}
-
static int
IcmpAliasIn(struct libalias *la, struct ip *pip)
{
@@ -482,7 +474,6 @@ IcmpAliasIn(struct libalias *la, struct ip *pip)
return (iresult);
}
-
static int
IcmpAliasOut1(struct libalias *la, struct ip *pip, int create)
{
@@ -527,7 +518,6 @@ IcmpAliasOut1(struct libalias *la, struct ip *pip, int create)
return (PKT_ALIAS_IGNORED);
}
-
static int
IcmpAliasOut2(struct libalias *la, struct ip *pip)
{
@@ -628,7 +618,6 @@ fragment contained in ICMP data section */
return (PKT_ALIAS_IGNORED);
}
-
static int
IcmpAliasOut(struct libalias *la, struct ip *pip, int create)
{
@@ -734,7 +723,6 @@ ProtoAliasOut(struct libalias *la, struct in_addr *ip_src,
return (PKT_ALIAS_IGNORED);
}
-
static int
UdpAliasIn(struct libalias *la, struct ip *pip)
{
@@ -937,8 +925,6 @@ UdpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create)
return (PKT_ALIAS_IGNORED);
}
-
-
static int
TcpAliasIn(struct libalias *la, struct ip *pip)
{
@@ -1185,9 +1171,6 @@ TcpAliasOut(struct libalias *la, struct ip *pip, int maxpacketsize, int create)
return (PKT_ALIAS_IGNORED);
}
-
-
-
/* Fragment Handling
FragmentIn()
@@ -1242,11 +1225,6 @@ FragmentOut(struct libalias *la, struct in_addr *ip_src, u_short *ip_sum)
return (PKT_ALIAS_OK);
}
-
-
-
-
-
/* Outside World Access
PacketAliasSaveFragment()
@@ -1429,8 +1407,6 @@ getout:
return (iresult);
}
-
-
/* Unregistered address ranges */
/* 10.0.0.0 -> 10.255.255.255 */
@@ -1650,7 +1626,6 @@ LibAliasUnaliasOut(struct libalias *la, char *ptr, /* valid IP packet */
iresult = PKT_ALIAS_OK;
} else if (pip->ip_p == IPPROTO_ICMP) {
-
int accumulate;
struct in_addr original_address;
u_short original_id;
diff --git a/sys/netinet/libalias/alias.h b/sys/netinet/libalias/alias.h
index 41cd7b2c23d1..a9935f7aa812 100644
--- a/sys/netinet/libalias/alias.h
+++ b/sys/netinet/libalias/alias.h
@@ -144,7 +144,6 @@ struct mbuf *m_megapullup(struct mbuf *, int);
* Mode flags and other constants.
*/
-
/* Mode flags, set using PacketAliasSetMode() */
/*
diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c
index b5ae64a7e33b..e05cc3da948f 100644
--- a/sys/netinet/libalias/alias_db.c
+++ b/sys/netinet/libalias/alias_db.c
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
there is an incomplete connection, in which case the link
can be deleted after a certain amount of time.
-
Initial version: August, 1996 (cjm)
Version 1.4: September 16, 1996 (cjm)
@@ -178,7 +177,6 @@ __FBSDID("$FreeBSD$");
static LIST_HEAD(, libalias) instancehead = LIST_HEAD_INITIALIZER(instancehead);
-
/*
Constants (note: constants are also defined
near relevant functions or structs)
@@ -219,7 +217,6 @@ static LIST_HEAD(, libalias) instancehead = LIST_HEAD_INITIALIZER(instancehead)
#define TCP_EXPIRE_CONNECTED 86400
#endif
-
/* Dummy port number codes used for FindLinkIn/Out() and AddLink().
These constants can be anything except zero, which indicates an
unknown port number. */
@@ -227,8 +224,6 @@ static LIST_HEAD(, libalias) instancehead = LIST_HEAD_INITIALIZER(instancehead)
#define NO_DEST_PORT 1
#define NO_SRC_PORT 1
-
-
/* Data Structures
The fundamental data structure used in this program is
@@ -383,7 +378,6 @@ Miscellaneous:
ShowAliasStats() -- send alias statistics to a monitor file
*/
-
/* Local prototypes */
static u_int StartPointIn(struct in_addr, u_short, int);
@@ -422,7 +416,6 @@ StartPointIn(struct in_addr alias_addr,
return (n % LINK_TABLE_IN_SIZE);
}
-
static u_int
StartPointOut(struct in_addr src_addr, struct in_addr dst_addr,
u_short src_port, u_short dst_port, int link_type)
@@ -440,7 +433,6 @@ StartPointOut(struct in_addr src_addr, struct in_addr dst_addr,
return (n % LINK_TABLE_OUT_SIZE);
}
-
static int
SeqDiff(u_long x, u_long y)
{
@@ -460,7 +452,7 @@ static void
AliasLog(char *str, const char *format, ...)
{
va_list ap;
-
+
va_start(ap, format);
vsnprintf(str, LIBALIAS_BUF_SIZE, format, ap);
va_end(ap);
@@ -470,7 +462,7 @@ static void
AliasLog(FILE *stream, const char *format, ...)
{
va_list ap;
-
+
va_start(ap, format);
vfprintf(stream, format, ap);
va_end(ap);
@@ -513,7 +505,6 @@ void SctpShowAliasStats(struct libalias *la)
ShowAliasStats(la);
}
-
/* Internal routines for finding, deleting and adding links
Port Allocation:
@@ -557,7 +548,6 @@ static struct alias_link *
static struct alias_link *
FindLinkIn (struct libalias *, struct in_addr, struct in_addr, u_short, u_short, int, int);
-
#define ALIAS_PORT_BASE 0x08000
#define ALIAS_PORT_MASK 0x07fff
#define ALIAS_PORT_MASK_EVEN 0x07ffe
@@ -622,7 +612,6 @@ GetNewPort(struct libalias *la, struct alias_link *lnk, int alias_port_param)
return (-1);
}
-
/* Port number search */
for (i = 0; i < max_trials; i++) {
int go_ahead;
@@ -770,7 +759,6 @@ FindNewPortGroup(struct libalias *la,
port_sys = ntohs(src_port);
} else {
-
/* First trial and all subsequent are random. */
if (align == FIND_EVEN_ALIAS_BASE)
port_sys = arc4random() & ALIAS_PORT_MASK_EVEN;
@@ -782,7 +770,6 @@ FindNewPortGroup(struct libalias *la,
/* Port number search */
for (i = 0; i < max_trials; i++) {
-
struct alias_link *search_result;
for (j = 0; j < port_count; j++)
@@ -831,7 +818,6 @@ CleanupAliasData(struct libalias *la)
la->cleanupIndex = 0;
}
-
static void
IncrementalCleanup(struct libalias *la)
{
@@ -924,7 +910,6 @@ DeleteLink(struct alias_link *lnk)
}
}
-
struct alias_link *
AddLink(struct libalias *la, struct in_addr src_addr, struct in_addr dst_addr,
struct in_addr alias_addr, u_short src_port, u_short dst_port,
@@ -1169,7 +1154,6 @@ FindLinkOut(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
static struct alias_link *
_FindLinkIn(struct libalias *la, struct in_addr dst_addr,
struct in_addr alias_addr,
@@ -1244,8 +1228,6 @@ _FindLinkIn(struct libalias *la, struct in_addr dst_addr,
}
}
-
-
if (lnk_fully_specified != NULL) {
lnk_fully_specified->timestamp = la->timeStamp;
lnk = lnk_fully_specified;
@@ -1315,9 +1297,6 @@ FindLinkIn(struct libalias *la, struct in_addr dst_addr,
return (lnk);
}
-
-
-
/* External routines for finding/adding links
-- "external" means outside alias_db.c, but within alias*.c --
@@ -1334,7 +1313,6 @@ FindLinkIn(struct libalias *la, struct in_addr dst_addr,
(prototypes in alias_local.h)
*/
-
struct alias_link *
FindIcmpIn(struct libalias *la, struct in_addr dst_addr,
struct in_addr alias_addr,
@@ -1358,7 +1336,6 @@ FindIcmpIn(struct libalias *la, struct in_addr dst_addr,
return (lnk);
}
-
struct alias_link *
FindIcmpOut(struct libalias *la, struct in_addr src_addr,
struct in_addr dst_addr,
@@ -1382,7 +1359,6 @@ FindIcmpOut(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
struct alias_link *
FindFragmentIn1(struct libalias *la, struct in_addr dst_addr,
struct in_addr alias_addr,
@@ -1403,21 +1379,19 @@ FindFragmentIn1(struct libalias *la, struct in_addr dst_addr,
return (lnk);
}
-
struct alias_link *
FindFragmentIn2(struct libalias *la, struct in_addr dst_addr, /* Doesn't add a link if
* one */
struct in_addr alias_addr, /* is not found. */
u_short ip_id)
{
-
+
LIBALIAS_LOCK_ASSERT(la);
return FindLinkIn(la, dst_addr, alias_addr,
NO_DEST_PORT, ip_id,
LINK_FRAGMENT_ID, 0);
}
-
struct alias_link *
AddFragmentPtrLink(struct libalias *la, struct in_addr dst_addr,
u_short ip_id)
@@ -1429,7 +1403,6 @@ AddFragmentPtrLink(struct libalias *la, struct in_addr dst_addr,
LINK_FRAGMENT_PTR);
}
-
struct alias_link *
FindFragmentPtr(struct libalias *la, struct in_addr dst_addr,
u_short ip_id)
@@ -1441,7 +1414,6 @@ FindFragmentPtr(struct libalias *la, struct in_addr dst_addr,
LINK_FRAGMENT_PTR, 0);
}
-
struct alias_link *
FindProtoIn(struct libalias *la, struct in_addr dst_addr,
struct in_addr alias_addr,
@@ -1465,7 +1437,6 @@ FindProtoIn(struct libalias *la, struct in_addr dst_addr,
return (lnk);
}
-
struct alias_link *
FindProtoOut(struct libalias *la, struct in_addr src_addr,
struct in_addr dst_addr,
@@ -1489,7 +1460,6 @@ FindProtoOut(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
struct alias_link *
FindUdpTcpIn(struct libalias *la, struct in_addr dst_addr,
struct in_addr alias_addr,
@@ -1529,7 +1499,6 @@ FindUdpTcpIn(struct libalias *la, struct in_addr dst_addr,
return (lnk);
}
-
struct alias_link *
FindUdpTcpOut(struct libalias *la, struct in_addr src_addr,
struct in_addr dst_addr,
@@ -1567,7 +1536,6 @@ FindUdpTcpOut(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
struct alias_link *
AddPptp(struct libalias *la, struct in_addr src_addr,
struct in_addr dst_addr,
@@ -1584,7 +1552,6 @@ AddPptp(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
struct alias_link *
FindPptpOutByCallId(struct libalias *la, struct in_addr src_addr,
struct in_addr dst_addr,
@@ -1605,7 +1572,6 @@ FindPptpOutByCallId(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
struct alias_link *
FindPptpOutByPeerCallId(struct libalias *la, struct in_addr src_addr,
struct in_addr dst_addr,
@@ -1626,7 +1592,6 @@ FindPptpOutByPeerCallId(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
struct alias_link *
FindPptpInByCallId(struct libalias *la, struct in_addr dst_addr,
struct in_addr alias_addr,
@@ -1647,7 +1612,6 @@ FindPptpInByCallId(struct libalias *la, struct in_addr dst_addr,
return (lnk);
}
-
struct alias_link *
FindPptpInByPeerCallId(struct libalias *la, struct in_addr dst_addr,
struct in_addr alias_addr,
@@ -1660,11 +1624,9 @@ FindPptpInByPeerCallId(struct libalias *la, struct in_addr dst_addr,
0 /* any */ , alias_call_id,
LINK_PPTP, 0);
-
return (lnk);
}
-
struct alias_link *
FindRtspOut(struct libalias *la, struct in_addr src_addr,
struct in_addr dst_addr,
@@ -1701,7 +1663,6 @@ FindRtspOut(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
struct in_addr
FindOriginalAddress(struct libalias *la, struct in_addr alias_addr)
{
@@ -1734,7 +1695,6 @@ FindOriginalAddress(struct libalias *la, struct in_addr alias_addr)
}
}
-
struct in_addr
FindAliasAddress(struct libalias *la, struct in_addr original_addr)
{
@@ -1755,7 +1715,6 @@ FindAliasAddress(struct libalias *la, struct in_addr original_addr)
}
}
-
/* External routines for getting or changing link data
(external to alias_db.c, but internal to alias*.c)
@@ -1770,35 +1729,30 @@ FindAliasAddress(struct libalias *la, struct in_addr original_addr)
SetDestCallId()
*/
-
void
SetFragmentAddr(struct alias_link *lnk, struct in_addr src_addr)
{
lnk->data.frag_addr = src_addr;
}
-
void
GetFragmentAddr(struct alias_link *lnk, struct in_addr *src_addr)
{
*src_addr = lnk->data.frag_addr;
}
-
void
SetFragmentPtr(struct alias_link *lnk, char *fptr)
{
lnk->data.frag_ptr = fptr;
}
-
void
GetFragmentPtr(struct alias_link *lnk, char **fptr)
{
*fptr = lnk->data.frag_ptr;
}
-
void
SetStateIn(struct alias_link *lnk, int state)
{
@@ -1824,7 +1778,6 @@ SetStateIn(struct alias_link *lnk, int state)
lnk->data.tcp->state.in = state;
}
-
void
SetStateOut(struct alias_link *lnk, int state)
{
@@ -1850,7 +1803,6 @@ SetStateOut(struct alias_link *lnk, int state)
lnk->data.tcp->state.out = state;
}
-
int
GetStateIn(struct alias_link *lnk)
{
@@ -1858,7 +1810,6 @@ GetStateIn(struct alias_link *lnk)
return (lnk->data.tcp->state.in);
}
-
int
GetStateOut(struct alias_link *lnk)
{
@@ -1866,7 +1817,6 @@ GetStateOut(struct alias_link *lnk)
return (lnk->data.tcp->state.out);
}
-
struct in_addr
GetOriginalAddress(struct alias_link *lnk)
{
@@ -1876,14 +1826,12 @@ GetOriginalAddress(struct alias_link *lnk)
return (lnk->src_addr);
}
-
struct in_addr
GetDestAddress(struct alias_link *lnk)
{
return (lnk->dst_addr);
}
-
struct in_addr
GetAliasAddress(struct alias_link *lnk)
{
@@ -1893,16 +1841,14 @@ GetAliasAddress(struct alias_link *lnk)
return (lnk->alias_addr);
}
-
struct in_addr
GetDefaultAliasAddress(struct libalias *la)
{
-
+
LIBALIAS_LOCK_ASSERT(la);
return (la->aliasAddress);
}
-
void
SetDefaultAliasAddress(struct libalias *la, struct in_addr alias_addr)
{
@@ -1911,14 +1857,12 @@ SetDefaultAliasAddress(struct libalias *la, struct in_addr alias_addr)
la->aliasAddress = alias_addr;
}
-
u_short
GetOriginalPort(struct alias_link *lnk)
{
return (lnk->src_port);
}
-
u_short
GetAliasPort(struct alias_link *lnk)
{
@@ -1941,35 +1885,30 @@ SetAckModified(struct alias_link *lnk)
lnk->data.tcp->state.ack_modified = 1;
}
-
struct in_addr
GetProxyAddress(struct alias_link *lnk)
{
return (lnk->proxy_addr);
}
-
void
SetProxyAddress(struct alias_link *lnk, struct in_addr addr)
{
lnk->proxy_addr = addr;
}
-
u_short
GetProxyPort(struct alias_link *lnk)
{
return (lnk->proxy_port);
}
-
void
SetProxyPort(struct alias_link *lnk, u_short port)
{
lnk->proxy_port = port;
}
-
int
GetAckModified(struct alias_link *lnk)
{
@@ -2110,7 +2049,7 @@ SetExpire(struct alias_link *lnk, int expire)
void
ClearCheckNewLink(struct libalias *la)
{
-
+
LIBALIAS_LOCK_ASSERT(la);
la->newDefaultLink = 0;
}
@@ -2141,7 +2080,6 @@ SetDestCallId(struct alias_link *lnk, u_int16_t cid)
la->deleteAllLinks = 0;
}
-
/* Miscellaneous Functions
HouseKeeping()
@@ -2398,7 +2336,6 @@ LibAliasRedirectAddr(struct libalias *la, struct in_addr src_addr,
return (lnk);
}
-
/* Mark the aliasing link dynamic */
int
LibAliasRedirectDynamic(struct libalias *la, struct alias_link *lnk)
@@ -2418,7 +2355,6 @@ LibAliasRedirectDynamic(struct libalias *la, struct alias_link *lnk)
return (res);
}
-
void
LibAliasRedirectDelete(struct libalias *la, struct alias_link *lnk)
{
@@ -2432,7 +2368,6 @@ LibAliasRedirectDelete(struct libalias *la, struct alias_link *lnk)
LIBALIAS_UNLOCK(la);
}
-
void
LibAliasSetAddress(struct libalias *la, struct in_addr addr)
{
@@ -2446,7 +2381,6 @@ LibAliasSetAddress(struct libalias *la, struct in_addr addr)
LIBALIAS_UNLOCK(la);
}
-
void
LibAliasSetTarget(struct libalias *la, struct in_addr target_addr)
{
@@ -2609,7 +2543,6 @@ getout:
return (res);
}
-
int
LibAliasCheckNewLink(struct libalias *la)
{
@@ -2621,7 +2554,6 @@ LibAliasCheckNewLink(struct libalias *la)
return (res);
}
-
#ifndef NO_FW_PUNCH
/*****************
@@ -2707,7 +2639,6 @@ fill_rule(void *buf, int bufsize, int rulenum,
static void ClearAllFWHoles(struct libalias *la);
-
#define fw_setfield(la, field, num) \
do { \
(field)[(num) - la->fireWallBaseNum] = 1; \
diff --git a/sys/netinet/libalias/alias_dummy.c b/sys/netinet/libalias/alias_dummy.c
index 084436cc4ea1..375dbc9f5b4c 100644
--- a/sys/netinet/libalias/alias_dummy.c
+++ b/sys/netinet/libalias/alias_dummy.c
@@ -90,7 +90,7 @@ fingerprint(struct libalias *la, struct alias_data *ah)
static int
protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
-
+
AliasHandleDummy(la, pip, ah);
return (0);
}
@@ -152,4 +152,3 @@ AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah)
{
; /* Dummy. */
}
-
diff --git a/sys/netinet/libalias/alias_ftp.c b/sys/netinet/libalias/alias_ftp.c
index f8e0a703345d..e74093f6e5dd 100644
--- a/sys/netinet/libalias/alias_ftp.c
+++ b/sys/netinet/libalias/alias_ftp.c
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
changes of sequence and acknowledgment numbers, since the client
machine is totally unaware of the modification to the TCP stream.
-
References: RFC 959, RFC 2428.
Initial version: August, 1996 (cjm)
@@ -140,7 +139,6 @@ protohandler_out(struct libalias *la, struct ip *pip, struct alias_data *ah)
return (0);
}
-
static int
protohandler_in(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
diff --git a/sys/netinet/libalias/alias_irc.c b/sys/netinet/libalias/alias_irc.c
index d44aaf16fc7b..ed8e9a95926d 100644
--- a/sys/netinet/libalias/alias_irc.c
+++ b/sys/netinet/libalias/alias_irc.c
@@ -349,7 +349,6 @@ lCTCP_START:
struct alias_link *dcc_lnk;
struct in_addr destaddr;
-
true_port = htons(org_port);
true_addr.s_addr = htonl(org_addr);
destaddr.s_addr = 0;
diff --git a/sys/netinet/libalias/alias_local.h b/sys/netinet/libalias/alias_local.h
index c29294256413..ff6c16f7d9eb 100644
--- a/sys/netinet/libalias/alias_local.h
+++ b/sys/netinet/libalias/alias_local.h
@@ -127,7 +127,7 @@ struct libalias {
int deleteAllLinks; /* If equal to zero, DeleteLink() */
/* will not remove permanent links */
-
+
/* log descriptor */
#ifdef _KERNEL
char *logDesc;
@@ -172,10 +172,10 @@ struct libalias {
#ifdef _KERNEL
/* timing queue for keeping track of association timeouts */
struct sctp_nat_timer sctpNatTimer;
-
+
/* size of hash table used in this instance */
u_int sctpNatTableSize;
-
+
/*
* local look up table sorted by l_vtag/l_port
*/
@@ -184,7 +184,7 @@ struct libalias {
* global look up table sorted by g_vtag/g_port
*/
LIST_HEAD(sctpNatTableG, sctp_nat_assoc) *sctpTableGlobal;
-
+
/*
* avoid races in libalias: every public function has to use it.
*/
@@ -232,7 +232,6 @@ struct libalias {
} \
} while (0)
-
/* Prototypes */
/*
diff --git a/sys/netinet/libalias/alias_nbt.c b/sys/netinet/libalias/alias_nbt.c
index 5a747f0507d3..e29dc4789248 100644
--- a/sys/netinet/libalias/alias_nbt.c
+++ b/sys/netinet/libalias/alias_nbt.c
@@ -94,7 +94,7 @@ fingerprint1(struct libalias *la, struct alias_data *ah)
static int
protohandler1(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
-
+
return (AliasHandleUdpNbt(la, pip, ah->lnk, ah->aaddr, *ah->aport));
}
@@ -114,7 +114,7 @@ fingerprint2(struct libalias *la, struct alias_data *ah)
static int
protohandler2in(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
-
+
AliasHandleUdpNbtNS(la, pip, ah->lnk, ah->aaddr, ah->aport,
ah->oaddr, ah->dport);
return (0);
@@ -123,7 +123,7 @@ protohandler2in(struct libalias *la, struct ip *pip, struct alias_data *ah)
static int
protohandler2out(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
-
+
return (AliasHandleUdpNbtNS(la, pip, ah->lnk, &pip->ip_src, ah->sport,
ah->aaddr, ah->aport));
}
@@ -227,7 +227,6 @@ typedef struct {
#define ACT_ERR 0x6
#define CFT_ERR 0x7
-
#ifdef LIBALIAS_DEBUG
static void
PrintRcode(u_char rcode)
@@ -248,13 +247,11 @@ PrintRcode(u_char rcode)
printf("\nName in conflict error.\n");
default:
printf("\n?%c?=%0x\n", '?', rcode);
-
}
}
#endif
-
/* Handling Name field */
static u_char *
AliasHandleName(u_char * p, char *pmax)
diff --git a/sys/netinet/libalias/alias_pptp.c b/sys/netinet/libalias/alias_pptp.c
index 897eb74900aa..b28462ce5f75 100644
--- a/sys/netinet/libalias/alias_pptp.c
+++ b/sys/netinet/libalias/alias_pptp.c
@@ -100,7 +100,7 @@ fingerprintgre(struct libalias *la, struct alias_data *ah)
static int
protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
-
+
AliasHandlePptpIn(la, pip, ah->lnk);
return (0);
}
@@ -108,7 +108,7 @@ protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah)
static int
protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
-
+
AliasHandlePptpOut(la, pip, ah->lnk);
return (0);
}
@@ -295,7 +295,6 @@ typedef struct pptpCallIds *PptpCallId;
static PptpCallId AliasVerifyPptp(struct ip *, u_int16_t *);
-
static void
AliasHandlePptpOut(struct libalias *la,
struct ip *pip, /* IP packet to examine/patch */
diff --git a/sys/netinet/libalias/alias_proxy.c b/sys/netinet/libalias/alias_proxy.c
index a7b6b0371d01..fc8e148d62d0 100644
--- a/sys/netinet/libalias/alias_proxy.c
+++ b/sys/netinet/libalias/alias_proxy.c
@@ -50,11 +50,9 @@ __FBSDID("$FreeBSD$");
Rules are stored in a linear linked list, so lookup efficiency
won't be too good for large lists.
-
Initial development: April, 1998 (cjm)
*/
-
/* System includes */
#ifdef _KERNEL
#include <sys/param.h>
@@ -113,14 +111,10 @@ struct proxy_entry {
struct proxy_entry *last;
};
-
-
/*
File scope variables
*/
-
-
/* Local (static) functions:
IpMask() -- Utility function for creating IP
@@ -452,7 +446,6 @@ ProxyEncodeIpHeader(struct ip *pip,
#endif
}
-
/* Functions by other packet alias source files
ProxyCheck() -- Checks whether an outgoing packet should
@@ -520,7 +513,6 @@ ProxyModify(struct libalias *la, struct alias_link *lnk,
}
}
-
/*
Public API functions
*/
diff --git a/sys/netinet/libalias/alias_sctp.c b/sys/netinet/libalias/alias_sctp.c
index d476c00bb881..83290148bfa6 100644
--- a/sys/netinet/libalias/alias_sctp.c
+++ b/sys/netinet/libalias/alias_sctp.c
@@ -150,7 +150,6 @@ static void sctp_RmTimeOut(struct libalias *la, struct sctp_nat_assoc *assoc);
static void sctp_ResetTimeOut(struct libalias *la, struct sctp_nat_assoc *assoc, int newexp);
void sctp_CheckTimers(struct libalias *la);
-
/* Logging Functions */
static void logsctperror(char* errormsg, uint32_t vtag, int error, int direction);
static void logsctpparse(int direction, struct sctp_nat_msg *sm);
@@ -243,7 +242,6 @@ static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs");
#define SN_SCTP_ASCONF 0x0100 /**< a packet containing an ASCONF chunk */
#define SN_SCTP_ASCONFACK 0x0200 /**< a packet containing an ASCONF-ACK chunk */
#define SN_SCTP_OTHER 0xFFFF /**< a packet containing a chunk that is not of interest */
-
/** @}
* @defgroup state_machine SCTP NAT State Machine
*
@@ -255,7 +253,6 @@ static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs");
#define SN_UP 0x0100 /**< Association in UP state */
#define SN_CL 0x1000 /**< Closing state */
#define SN_RM 0x2000 /**< Removing state */
-
/** @}
* @defgroup Logging Logging Functionality
*
@@ -270,7 +267,6 @@ static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs");
#define SN_LOG_DEBUG_MAX 5
#define SN_LOG(level, action) if (sysctl_log_level >= level) { action; } /**< Perform log action ONLY if the current log level meets the specified log level */
-
/** @}
* @defgroup Hash Hash Table Macros and Functions
*
@@ -292,7 +288,6 @@ static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs");
#define SN_ADD_CLASH 1 /**< Clash when trying to add the assoc. info to the table */
#define SN_TABLE_HASH(vtag, port, size) (((u_int) vtag + (u_int) port) % (u_int) size) /**< Calculate the hash table lookup position */
-
/** @}
* @defgroup Timer Timer Queue Macros and Functions
*
@@ -307,7 +302,6 @@ static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs");
#define SN_U_T(la) (la->timeStamp + sysctl_up_timer) /**< UP State expiration time in seconds */
#define SN_C_T(la) (la->timeStamp + sysctl_shutdown_timer) /**< CL State expiration time in seconds */
#define SN_X_T(la) (la->timeStamp + sysctl_holddown_timer) /**< Wait after a shutdown complete in seconds */
-
/** @}
* @defgroup sysctl SysCtl Variable and callback function declarations
*
@@ -431,7 +425,6 @@ SYSCTL_PROC(_net_inet_ip_alias_sctp, OID_AUTO, track_global_addresses,
"\t> 0 - enables tracking but limits the number of global IP addresses to this value");
#endif /* SYSCTL_NODE */
-
/** @}
* @ingroup sysctl
* @brief sysctl callback for changing net.inet.ip.fw.sctp.log_level
@@ -591,7 +584,6 @@ int sysctl_chg_chunk_proc_limit(SYSCTL_HANDLER_ARGS)
return (0);
}
-
/** @ingroup sysctl
* @brief sysctl callback for changing net.inet.ip.alias.sctp.param_proc_limit
*
@@ -633,7 +625,6 @@ int sysctl_chg_track_global_addresses(SYSCTL_HANDLER_ARGS)
return (0);
}
-
/* ----------------------------------------------------------------------
* CODE BEGINS HERE
* ----------------------------------------------------------------------
@@ -2438,7 +2429,6 @@ sctp_RmTimeOut(struct libalias *la, struct sctp_nat_assoc *assoc)
LIST_REMOVE(assoc, timer_Q);/* Note this is O(1) */
}
-
/** @ingroup Timer
* @brief Reset timer in timer queue
*
diff --git a/sys/netinet/libalias/alias_sctp.h b/sys/netinet/libalias/alias_sctp.h
index df6e583fe6d6..37f44a96e752 100644
--- a/sys/netinet/libalias/alias_sctp.h
+++ b/sys/netinet/libalias/alias_sctp.h
@@ -86,7 +86,6 @@
#define SCTP_UNUSED __attribute__((unused))
#endif //#ifndef SCTP_UNUSED
-
#include <netinet/sctp.h>
//#include <netinet/sctp_os_bsd.h> --might be needed later for mbuf stuff
#include <netinet/sctp_header.h>
@@ -96,10 +95,8 @@
#include <stdio.h>
#endif //#ifdef _KERNEL
-
#define LINK_SCTP IPPROTO_SCTP
-
#define SN_TO_LOCAL 0 /**< packet traveling from global to local */
#define SN_TO_GLOBAL 1 /**< packet traveling from local to global */
#define SN_TO_NODIR 99 /**< used where direction is not important */
@@ -114,7 +111,6 @@
#define SN_REPLY_ERROR 0x0200 /**< Reply with ERROR to sender on ASCONF clash */
#define SN_TX_ERROR 0x0300 /**< mask for transmitting error */
-
#define PKT_ALIAS_RESPOND 0x1000 /**< Signal to libalias that there is a response packet to send */
/*
* Data structures
@@ -162,7 +158,6 @@ union sctpChunkOfInt {
struct sctp_paramhdr *Asconf; /**< Pointer to ASCONF chunk */
};
-
/**
* @brief SCTP message
*
@@ -180,7 +175,6 @@ struct sctp_nat_msg {
int chunk_length; /**< length of chunk of interest */
};
-
/**
* @brief sctp nat timer queue structure
*
@@ -192,6 +186,4 @@ struct sctp_nat_timer {
LIST_HEAD(sctpTimerQ,sctp_nat_assoc) *TimerQ; /**< List of associations at this position in the timer Q */
};
-
-
#endif //#ifndef _ALIAS_SCTP_H
diff --git a/sys/netinet/libalias/alias_skinny.c b/sys/netinet/libalias/alias_skinny.c
index 62dcff9febc9..c18410ba4191 100644
--- a/sys/netinet/libalias/alias_skinny.c
+++ b/sys/netinet/libalias/alias_skinny.c
@@ -73,7 +73,7 @@ fingerprint(struct libalias *la, struct alias_data *ah)
static int
protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
-
+
AliasHandleSkinny(la, pip, ah->lnk);
return (0);
}
@@ -207,7 +207,6 @@ typedef enum {
ServerToClient = 1
} ConvDirection;
-
static int
alias_skinny_reg_msg(struct RegisterMessage *reg_msg, struct ip *pip,
struct tcphdr *tc, struct alias_link *lnk,
diff --git a/sys/netinet/libalias/alias_smedia.c b/sys/netinet/libalias/alias_smedia.c
index 13b16d09d6dd..f28a0fc1f344 100644
--- a/sys/netinet/libalias/alias_smedia.c
+++ b/sys/netinet/libalias/alias_smedia.c
@@ -154,7 +154,7 @@ fingerprint(struct libalias *la, struct alias_data *ah)
static int
protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah)
{
-
+
if (ntohs(*ah->dport) == TFTP_PORT_NUMBER)
FindRtspOut(la, pip->ip_src, pip->ip_dst,
*ah->sport, *ah->aport, IPPROTO_UDP);
@@ -312,7 +312,6 @@ alias_rtsp_out(struct libalias *la, struct ip *pip,
eport = htons(p[1]);
if (!links_created) {
-
links_created = 1;
/*
* Find an even numbered port
@@ -331,7 +330,6 @@ alias_rtsp_out(struct libalias *la, struct ip *pip,
"PacketAlias/RTSP: Cannot find contiguous RTSP data ports\n");
#endif
} else {
-
base_alias = ntohs(salias);
for (j = 0; j < RTSP_PORT_GROUP; j++) {
/*
@@ -363,7 +361,6 @@ alias_rtsp_out(struct libalias *la, struct ip *pip,
ealias = htons(base_alias + (RTSP_PORT_GROUP - 1));
}
if (salias && rtsp_lnk) {
-
pkt_updated = 1;
/* Copy into IP packet */
@@ -504,7 +501,6 @@ AliasHandleRtspOut(struct libalias *la, struct ip *pip, struct alias_link *lnk,
/* When aliasing a client, check for the SETUP request */
if ((ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_1) ||
(ntohs(tc->th_dport) == RTSP_CONTROL_PORT_NUMBER_2)) {
-
if (dlen >= (int)strlen(setup)) {
if (memcmp(data, setup, strlen(setup)) == 0) {
alias_rtsp_out(la, pip, lnk, data, client_port_str);
@@ -517,14 +513,12 @@ AliasHandleRtspOut(struct libalias *la, struct ip *pip, struct alias_link *lnk,
}
}
} else {
-
/*
* When aliasing a server, check for the 200 reply
* Accommodate varying number of blanks between 200 & OK
*/
if (dlen >= (int)strlen(str200)) {
-
for (parseOk = 0, i = 0;
i <= dlen - (int)strlen(str200);
i++) {
@@ -534,16 +528,13 @@ AliasHandleRtspOut(struct libalias *la, struct ip *pip, struct alias_link *lnk,
}
}
if (parseOk) {
-
i += strlen(str200); /* skip string found */
while (data[i] == ' ') /* skip blank(s) */
i++;
if ((dlen - i) >= (int)strlen(okstr)) {
-
if (memcmp(&data[i], okstr, strlen(okstr)) == 0)
alias_rtsp_out(la, pip, lnk, data, server_port_str);
-
}
}
}
diff --git a/sys/netinet/libalias/alias_util.c b/sys/netinet/libalias/alias_util.c
index 8c2e708a8e24..0f1557533b0b 100644
--- a/sys/netinet/libalias/alias_util.c
+++ b/sys/netinet/libalias/alias_util.c
@@ -29,7 +29,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-
/*
Alias_util.c contains general utilities used by other functions
in the packet aliasing module. At the moment, there are functions
diff --git a/sys/netinet/sctp.h b/sys/netinet/sctp.h
index 023481a1ef85..2709c69a1359 100644
--- a/sys/netinet/sctp.h
+++ b/sys/netinet/sctp.h
@@ -38,10 +38,8 @@ __FBSDID("$FreeBSD$");
#ifndef _NETINET_SCTP_H_
#define _NETINET_SCTP_H_
-
#include <sys/types.h>
-
#define SCTP_PACKED __attribute__((packed))
/*
@@ -184,7 +182,6 @@ struct sctp_paramhdr {
#define SCTP_STREAM_RESET_INCOMING 0x00000001
#define SCTP_STREAM_RESET_OUTGOING 0x00000002
-
/* here on down are more implementation specific */
#define SCTP_SET_DEBUG_LEVEL 0x00001005
#define SCTP_CLR_STAT_LOG 0x00001007
@@ -207,7 +204,6 @@ struct sctp_paramhdr {
#define SCTP_PCB_STATUS 0x00001104
#define SCTP_GET_NONCE_VALUES 0x00001105
-
/* Special hook for dynamically setting primary for all assoc's,
* this is a write only option that requires root privilege.
*/
@@ -322,7 +318,6 @@ struct sctp_paramhdr {
/* First-come, first-serve */
#define SCTP_SS_FIRST_COME 0x00000005
-
/* fragment interleave constants
* setting must be one of these or
* EINVAL returned.
@@ -583,7 +578,6 @@ struct sctp_error_auth_invalid_hmac {
#define SCTP_MOBILITY_FASTHANDOFF 0x00000002
#define SCTP_MOBILITY_PRIM_DELETED 0x00000004
-
/* Smallest PMTU allowed when disabling PMTU discovery */
#define SCTP_SMALLEST_PMTU 512
/* Largest PMTU allowed when disabling PMTU discovery */
@@ -607,7 +601,6 @@ struct sctp_error_auth_invalid_hmac {
#define SCTP_MAX_HB_INTERVAL 14400000 /* 4 hours in ms */
#define SCTP_MAX_COOKIE_LIFE 3600000 /* 1 hour in ms */
-
/* Types of logging/KTR tracing that can be enabled via the
* sysctl net.inet.sctp.sctp_logging. You must also enable
* SUBSYS tracing.
diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c
index 7258a0822956..3e425afef81a 100644
--- a/sys/netinet/sctp_asconf.c
+++ b/sys/netinet/sctp_asconf.c
@@ -570,7 +570,6 @@ sctp_process_asconf_set_primary(struct sockaddr *src,
SCTP_MOBILITY_PRIM_DELETED) &&
(stcb->asoc.primary_destination->dest_state &
SCTP_ADDR_UNCONFIRMED) == 0) {
-
sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED,
stcb->sctp_ep, stcb, NULL,
SCTP_FROM_SCTP_ASCONF + SCTP_LOC_1);
@@ -990,7 +989,6 @@ sctp_asconf_nets_cleanup(struct sctp_tcb *stcb, struct sctp_ifn *ifn)
}
}
-
void
sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, struct sctp_nets *dstnet)
{
@@ -1333,7 +1331,6 @@ sctp_asconf_queue_mgmt(struct sctp_tcb *stcb, struct sctp_ifa *ifa,
return (0);
}
-
/*
* add an asconf operation for the given ifa and type.
* type = SCTP_ADD_IP_ADDRESS, SCTP_DEL_IP_ADDRESS, SCTP_SET_PRIM_ADDR.
@@ -2023,7 +2020,6 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
}
}
-
int
sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP_UNUSED)
{
@@ -2087,7 +2083,6 @@ sctp_asconf_iterator_ep_end(struct sctp_inpcb *inp, void *ptr, uint32_t val SCTP
laddr->action = 0;
break;
}
-
}
} else if (l->action == SCTP_DEL_IP_ADDRESS) {
LIST_FOREACH_SAFE(laddr, &inp->sctp_addr_list, sctp_nxt_addr, nladdr) {
@@ -2224,7 +2219,6 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
*/
stcb->asoc.cc_functions.sctp_set_initial_cc_param(stcb, net);
net->RTO = 0;
-
}
}
} else if (type == SCTP_SET_PRIM_ADDR) {
diff --git a/sys/netinet/sctp_asconf.h b/sys/netinet/sctp_asconf.h
index 7f226bd00540..b5232f0297e6 100644
--- a/sys/netinet/sctp_asconf.h
+++ b/sys/netinet/sctp_asconf.h
@@ -59,7 +59,6 @@ extern uint32_t
sctp_addr_mgmt_ep_sa(struct sctp_inpcb *, struct sockaddr *, uint32_t,
uint32_t);
-
extern int
sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void *ptr,
uint32_t val);
@@ -69,7 +68,6 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp,
void *ptr, uint32_t type);
extern void sctp_asconf_iterator_end(void *ptr, uint32_t val);
-
extern int32_t
sctp_set_primary_ip_address_sa(struct sctp_tcb *,
struct sockaddr *);
diff --git a/sys/netinet/sctp_auth.c b/sys/netinet/sctp_auth.c
index c9fc3e6c68ee..29ad584ccd84 100644
--- a/sys/netinet/sctp_auth.c
+++ b/sys/netinet/sctp_auth.c
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_AUTH_DEBUG2 (SCTP_BASE_SYSCTL(sctp_debug_on) & SCTP_DEBUG_AUTH2)
#endif /* SCTP_DEBUG */
-
void
sctp_clear_chunklist(sctp_auth_chklist_t *chklist)
{
@@ -99,7 +98,6 @@ sctp_copy_chunklist(sctp_auth_chklist_t *list)
return (new_list);
}
-
/*
* add a chunk to the required chunks list
*/
@@ -239,7 +237,6 @@ sctp_unpack_auth_chunks(const uint8_t *ptr, uint8_t num_chunks,
return (size);
}
-
/*
* allocate structure space for a key of length keylen
*/
@@ -456,7 +453,6 @@ sctp_compute_hashkey(sctp_key_t *key1, sctp_key_t *key2, sctp_key_t *shared)
return (new_key);
}
-
sctp_sharedkey_t *
sctp_alloc_sharedkey(void)
{
@@ -630,7 +626,6 @@ sctp_copy_skeylist(const struct sctp_keyhead *src, struct sctp_keyhead *dest)
return (count);
}
-
sctp_hmaclist_t *
sctp_alloc_hmaclist(uint16_t num_hmacs)
{
@@ -815,7 +810,6 @@ sctp_free_authinfo(sctp_authinfo_t *authinfo)
/* SCTP_FREE(authinfo, SCTP_M_AUTH_??); */
}
-
uint32_t
sctp_get_auth_chunk_len(uint16_t hmac_algo)
{
@@ -1142,7 +1136,6 @@ sctp_auth_is_supported_hmac(sctp_hmaclist_t *list, uint16_t id)
return (0);
}
-
/*-
* clear any cached key(s) if they match the given key id on an association.
* the cached key(s) will be recomputed and re-cached at next use.
@@ -1555,7 +1548,6 @@ sctp_fill_hmac_digest_m(struct mbuf *m, uint32_t auth_offset,
m, auth_offset, auth->hmac);
}
-
static void
sctp_zero_m(struct mbuf *m, uint32_t m_offset, uint32_t size)
{
@@ -1771,7 +1763,6 @@ sctp_notify_authentication(struct sctp_tcb *stcb, uint32_t indication,
&stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked);
}
-
/*-
* validates the AUTHentication related parameters in an INIT/INIT-ACK
* Note: currently only used for INIT as INIT-ACK is handled inline
@@ -1886,7 +1877,6 @@ sctp_validate_init_auth_params(struct mbuf *m, int offset, int limit)
saw_asconf = 1;
if (chunks->chunk_types[i] == SCTP_ASCONF_ACK)
saw_asconf_ack = 1;
-
}
if (num_chunks)
got_chklist = 1;
diff --git a/sys/netinet/sctp_auth.h b/sys/netinet/sctp_auth.h
index 5c22cc749c65..1056bcdcd13c 100644
--- a/sys/netinet/sctp_auth.h
+++ b/sys/netinet/sctp_auth.h
@@ -95,8 +95,6 @@ typedef struct sctp_authinformation {
uint16_t recv_keyid; /* last recv keyid (cached) */
} sctp_authinfo_t;
-
-
/*
* Macros
*/
@@ -154,7 +152,6 @@ extern void
sctp_auth_key_release(struct sctp_tcb *stcb, uint16_t keyid,
int so_locked);
-
/* hmac list handling */
extern sctp_hmaclist_t *sctp_alloc_hmaclist(uint16_t num_hmacs);
extern void sctp_free_hmaclist(sctp_hmaclist_t *list);
diff --git a/sys/netinet/sctp_bsd_addr.c b/sys/netinet/sctp_bsd_addr.c
index 52517cce280c..b54825b6471d 100644
--- a/sys/netinet/sctp_bsd_addr.c
+++ b/sys/netinet/sctp_bsd_addr.c
@@ -75,7 +75,6 @@ MALLOC_DEFINE(SCTP_M_MCORE, "sctp_mcore", "sctp mcore queue");
/* Global NON-VNET structure that controls the iterator */
struct iterator_control sctp_it_ctl;
-
void
sctp_wakeup_iterator(void)
{
@@ -144,7 +143,6 @@ sctp_gather_internal_ifa_flags(struct sctp_ifa *ifa)
}
#endif /* INET6 */
-
static uint32_t
sctp_is_desired_interface_type(struct ifnet *ifn)
{
@@ -187,9 +185,6 @@ sctp_is_desired_interface_type(struct ifnet *ifn)
return (result);
}
-
-
-
static void
sctp_init_ifns_for_vrf(int vrfid)
{
@@ -345,7 +340,6 @@ sctp_addr_change(struct ifaddr *ifa, int cmd)
ifa->ifa_ifp->if_index, ifa->ifa_ifp->if_type, ifa->ifa_ifp->if_xname,
(void *)ifa, ifa->ifa_addr, ifa_flags, 1);
} else {
-
sctp_del_addr_from_vrf(SCTP_DEFAULT_VRFID, ifa->ifa_addr,
ifa->ifa_ifp->if_index,
ifa->ifa_ifp->if_xname);
@@ -389,7 +383,6 @@ sctp_get_mbuf_for_msg(unsigned int space_needed, int want_header,
return (m);
}
-
#ifdef SCTP_PACKET_LOGGING
void
sctp_packet_log(struct mbuf *m)
@@ -461,7 +454,6 @@ again_locked:
SCTP_BASE_VAR(packet_log_end));
SCTP_BASE_VAR(packet_log_end) = 0;
goto no_log;
-
}
lenat = (int *)&SCTP_BASE_VAR(packet_log_buffer)[thisbegin];
*lenat = total_len;
@@ -487,7 +479,6 @@ no_log:
atomic_subtract_int(&SCTP_BASE_VAR(packet_log_writers), 1);
}
-
int
sctp_copy_out_packet_log(uint8_t *target, int length)
{
diff --git a/sys/netinet/sctp_bsd_addr.h b/sys/netinet/sctp_bsd_addr.h
index 21c4a6b6610a..dbe2301d008a 100644
--- a/sys/netinet/sctp_bsd_addr.h
+++ b/sys/netinet/sctp_bsd_addr.h
@@ -47,7 +47,6 @@ void sctp_wakeup_iterator(void);
void sctp_startup_iterator(void);
-
#ifdef INET6
void sctp_gather_internal_ifa_flags(struct sctp_ifa *ifa);
#endif
diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c
index db3da3ae8169..bb8103288db3 100644
--- a/sys/netinet/sctp_cc_functions.c
+++ b/sys/netinet/sctp_cc_functions.c
@@ -157,7 +157,6 @@ sctp_cwnd_update_after_fr(struct sctp_tcb *stcb,
(uint64_t)net->mtu *
(uint64_t)net->ssthresh) /
(uint64_t)t_ssthresh);
-
}
if (asoc->sctp_cmt_on_off == SCTP_CMT_RPV2) {
uint32_t srtt;
@@ -249,7 +248,6 @@ sctp_cwnd_update_after_fr(struct sctp_tcb *stcb,
#define SCTP_INST_NEUTRAL 2 /* Neutral, no indication */
#define SCTP_INST_GAINING 3 /* Gaining, step down possible */
-
static int
cc_bw_same(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw,
uint64_t rtt_offset, uint64_t vtag, uint8_t inst_ind)
@@ -738,7 +736,6 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb,
/* update cwnd and Early FR */
/******************************/
TAILQ_FOREACH(net, &asoc->nets, sctp_next) {
-
#ifdef JANA_CMT_FAST_RECOVERY
/*
* CMT fast recovery code. Need to debug.
@@ -1011,7 +1008,6 @@ sctp_cwnd_update_exit_pf_common(struct sctp_tcb *stcb, struct sctp_nets *net)
(void *)net, net->cwnd);
}
-
static void
sctp_cwnd_update_after_timeout(struct sctp_tcb *stcb, struct sctp_nets *net)
{
@@ -1120,7 +1116,6 @@ sctp_cwnd_update_after_ecn_echo_common(struct sctp_tcb *stcb, struct sctp_nets *
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_CWND_MONITOR_ENABLE) {
sctp_log_cwnd(stcb, net, (net->cwnd - old_cwnd), SCTP_CWND_LOG_FROM_SAT);
}
-
}
SCTP_STAT_INCR(sctps_ecnereducedcwnd);
} else {
@@ -1318,7 +1313,6 @@ sctp_cwnd_update_rtcc_after_ecn_echo(struct sctp_tcb *stcb, struct sctp_nets *ne
sctp_cwnd_update_after_ecn_echo_common(stcb, net, in_window, num_pkt_lost, 1);
}
-
static
void
sctp_cwnd_update_rtcc_tsn_acknowledged(struct sctp_nets *net,
@@ -1438,7 +1432,6 @@ sctp_set_rtcc_initial_cc_param(struct sctp_tcb *stcb,
net->cc_mod.rtcc.step_cnt = 0;
net->cc_mod.rtcc.last_step_state = 0;
-
}
static int
@@ -1763,7 +1756,6 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
/* update cwnd and Early FR */
/******************************/
TAILQ_FOREACH(net, &asoc->nets, sctp_next) {
-
#ifdef JANA_CMT_FAST_RECOVERY
/*
* CMT fast recovery code. Need to debug.
@@ -1848,7 +1840,6 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
}
}
-
/*
* H-TCP congestion control. The algorithm is detailed in:
* R.N.Shorten, D.J.Leith:
@@ -1857,7 +1848,6 @@ sctp_hs_cwnd_update_after_sack(struct sctp_tcb *stcb,
* http://www.hamilton.ie/net/htcp3.pdf
*/
-
static int use_rtt_scaling = 1;
static int use_bandwidth_switch = 1;
@@ -2070,7 +2060,6 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_nets *net)
sctp_log_cwnd(stcb, net, net->net_ack,
SCTP_CWND_LOG_FROM_SS);
}
-
}
sctp_enforce_cwnd_limit(&stcb->asoc, net);
} else {
@@ -2159,7 +2148,6 @@ sctp_htcp_cwnd_update_after_sack(struct sctp_tcb *stcb,
/* update cwnd and Early FR */
/******************************/
TAILQ_FOREACH(net, &asoc->nets, sctp_next) {
-
#ifdef JANA_CMT_FAST_RECOVERY
/*
* CMT fast recovery code. Need to debug.
diff --git a/sys/netinet/sctp_constants.h b/sys/netinet/sctp_constants.h
index 158d49a75a6b..28c543f88045 100644
--- a/sys/netinet/sctp_constants.h
+++ b/sys/netinet/sctp_constants.h
@@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
#ifndef _NETINET_SCTP_CONSTANTS_H_
#define _NETINET_SCTP_CONSTANTS_H_
-
/* IANA assigned port number for SCTP over UDP encapsulation */
#define SCTP_OVER_UDP_TUNNELING_PORT 9899
@@ -87,13 +86,11 @@ __FBSDID("$FreeBSD$");
/* #define SCTP_AUDITING_ENABLED 1 used for debug/auditing */
#define SCTP_AUDIT_SIZE 256
-
#define SCTP_KTRHEAD_NAME "sctp_iterator"
#define SCTP_KTHREAD_PAGES 0
#define SCTP_MCORE_NAME "sctp_core_worker"
-
/* If you support Multi-VRF how big to
* make the initial array of VRF's to.
*/
@@ -263,7 +260,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_LOCK_UNKNOWN 2
-
/* number of associations by default for zone allocation */
#define SCTP_MAX_NUM_OF_ASOC 40000
/* how many addresses per assoc remote and local */
@@ -388,7 +384,6 @@ __FBSDID("$FreeBSD$");
#define IS_SCTP_CONTROL(a) (((a)->chunk_type != SCTP_DATA) && ((a)->chunk_type != SCTP_IDATA))
#define IS_SCTP_DATA(a) (((a)->chunk_type == SCTP_DATA) || ((a)->chunk_type == SCTP_IDATA))
-
/* SCTP parameter types */
/*************0x0000 series*************/
#define SCTP_HEARTBEAT_INFO 0x0001
@@ -450,7 +445,6 @@ __FBSDID("$FreeBSD$");
/* mask to get sticky */
#define SCTP_STICKY_OPTIONS_MASK 0x0c
-
/*
* SCTP states for internal state machine
*/
@@ -554,8 +548,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_IS_TIMER_TYPE_VALID(t) (((t) > SCTP_TIMER_TYPE_NONE) && \
((t) < SCTP_TIMER_TYPE_LAST))
-
-
/* max number of TSN's dup'd that I will hold */
#define SCTP_MAX_DUP_TSNS 20
@@ -606,7 +598,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_RTO_LOWER_BOUND (1000) /* 1 sec is ms */
#define SCTP_RTO_INITIAL (3000) /* 3 sec in ms */
-
#define SCTP_INP_KILL_TIMEOUT 20 /* number of ms to retry kill of inpcb */
#define SCTP_ASOC_KILL_TIMEOUT 10 /* number of ms to retry kill of inpcb */
@@ -617,7 +608,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_DEF_PMTU_RAISE_SEC 600 /* 10 min between raise attempts */
-
/* How many streams I request initially by default */
#define SCTP_OSTREAM_INITIAL 10
#define SCTP_ISTREAM_INITIAL 2048
@@ -696,7 +686,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_NUMBER_OF_SECRETS 8 /* or 8 * 4 = 32 octets */
#define SCTP_SECRET_SIZE 32 /* number of octets in a 256 bits */
-
/*
* SCTP upper layer notifications
*/
@@ -815,7 +804,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_DONOT_SETSCOPE 0
#define SCTP_DO_SETSCOPE 1
-
/* This value determines the default for when
* we try to add more on the send queue., if
* there is room. This prevents us from cycling
@@ -893,7 +881,6 @@ __FBSDID("$FreeBSD$");
} \
} while (0)
-
#define SCTP_RETRAN_DONE -1
#define SCTP_RETRAN_EXIT -2
@@ -949,7 +936,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_SO_LOCKED 1
#define SCTP_SO_NOT_LOCKED 0
-
/*-
* For address locks, do we hold the lock?
*/
@@ -974,7 +960,6 @@ __FBSDID("$FreeBSD$");
/* Maximum size of optval for IPPROTO_SCTP level socket options. */
#define SCTP_SOCKET_OPTION_LIMIT (64 * 1024)
-
#if defined(_KERNEL)
#define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x))
#define SCTP_GETPTIME_TIMEVAL(x) (microuptime(x))
diff --git a/sys/netinet/sctp_header.h b/sys/netinet/sctp_header.h
index 8c4137a50ca7..843c3c0d9d57 100644
--- a/sys/netinet/sctp_header.h
+++ b/sys/netinet/sctp_header.h
@@ -54,7 +54,6 @@ struct sctp_ipv4addr_param {
#define SCTP_V6_ADDR_BYTES 16
-
struct sctp_ipv6addr_param {
struct sctp_paramhdr ph; /* type=SCTP_IPV6_PARAM_TYPE, len=20 */
uint8_t addr[SCTP_V6_ADDR_BYTES]; /* IPV6 address */
@@ -98,14 +97,12 @@ struct sctp_heartbeat_info_param {
char address[SCTP_ADDRMAX];
} SCTP_PACKED;
-
/* draft-ietf-tsvwg-prsctp */
/* PR-SCTP supported parameter */
struct sctp_prsctp_supported_param {
struct sctp_paramhdr ph;
} SCTP_PACKED;
-
/* draft-ietf-tsvwg-addip-sctp */
struct sctp_asconf_paramhdr { /* an ASCONF "parameter" */
struct sctp_paramhdr ph; /* a SCTP parameter header */
@@ -117,14 +114,12 @@ struct sctp_asconf_addr_param { /* an ASCONF address parameter */
struct sctp_ipv6addr_param addrp; /* max storage size */
} SCTP_PACKED;
-
struct sctp_asconf_tag_param { /* an ASCONF NAT-Vtag parameter */
struct sctp_asconf_paramhdr aph; /* asconf "parameter" */
uint32_t local_vtag;
uint32_t remote_vtag;
} SCTP_PACKED;
-
struct sctp_asconf_addrv4_param { /* an ASCONF address (v4) parameter */
struct sctp_asconf_paramhdr aph; /* asconf "parameter" */
struct sctp_ipv4addr_param addrp; /* max storage size */
@@ -137,7 +132,6 @@ struct sctp_supported_chunk_types_param {
uint8_t chunk_types[];
} SCTP_PACKED;
-
/*
* Structures for DATA chunks
*/
@@ -241,7 +235,6 @@ struct sctp_init_msg {
#define sctp_init_ack_chunk sctp_init_chunk
#define sctp_init_ack_msg sctp_init_msg
-
/* Selective Ack (SACK) */
struct sctp_gap_ack_block {
uint16_t start; /* Gap Ack block start */
@@ -278,7 +271,6 @@ struct sctp_nr_sack_chunk {
struct sctp_nr_sack nr_sack;
} SCTP_PACKED;
-
/* Heartbeat Request (HEARTBEAT) */
struct sctp_heartbeat {
struct sctp_heartbeat_info_param hb_info;
@@ -293,7 +285,6 @@ struct sctp_heartbeat_chunk {
#define sctp_heartbeat_ack sctp_heartbeat
#define sctp_heartbeat_ack_chunk sctp_heartbeat_chunk
-
/* Abort Asssociation (ABORT) */
struct sctp_abort_chunk {
struct sctp_chunkhdr ch;
@@ -305,27 +296,23 @@ struct sctp_abort_msg {
struct sctp_abort_chunk msg;
} SCTP_PACKED;
-
/* Shutdown Association (SHUTDOWN) */
struct sctp_shutdown_chunk {
struct sctp_chunkhdr ch;
uint32_t cumulative_tsn_ack;
} SCTP_PACKED;
-
/* Shutdown Acknowledgment (SHUTDOWN ACK) */
struct sctp_shutdown_ack_chunk {
struct sctp_chunkhdr ch;
} SCTP_PACKED;
-
/* Operation Error (ERROR) */
struct sctp_error_chunk {
struct sctp_chunkhdr ch;
/* optional error causes follow */
} SCTP_PACKED;
-
/* Cookie Echo (COOKIE ECHO) */
struct sctp_cookie_echo_chunk {
struct sctp_chunkhdr ch;
@@ -417,7 +404,6 @@ struct sctp_chunk_desc {
uint32_t tsn_ifany;
} SCTP_PACKED;
-
struct sctp_pktdrop_chunk {
struct sctp_chunkhdr ch;
uint32_t bottle_bw;
@@ -553,7 +539,6 @@ struct sctp_auth_chunk {
sizeof(struct sctphdr) + \
sizeof(struct ip6_hdr))
-
#define SCTP_MIN_OVERHEAD (sizeof(struct ip6_hdr) + \
sizeof(struct sctphdr))
@@ -568,7 +553,6 @@ struct sctp_auth_chunk {
sizeof(struct sctphdr) + \
sizeof(struct ip))
-
#define SCTP_MIN_OVERHEAD (sizeof(struct ip) + \
sizeof(struct sctphdr))
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index 9f3bbe8a1b75..f10c356252d9 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -68,7 +68,6 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *control,
struct sctp_association *asoc,
struct sctp_tmit_chunk *chk, int hold_rlock);
-
void
sctp_set_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc)
{
@@ -129,8 +128,6 @@ sctp_calc_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc)
return (calc);
}
-
-
/*
* Build out our readq entry based on the incoming packet.
*/
@@ -285,7 +282,6 @@ sctp_build_ctl_nchunk(struct sctp_inpcb *inp, struct sctp_sndrcvinfo *sinfo)
return (ret);
}
-
static void
sctp_mark_non_revokable(struct sctp_association *asoc, uint32_t tsn)
{
@@ -548,7 +544,6 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, SCTP_SO_NOT_LOCKED);
*abort_flag = 1;
return;
-
}
queue_needed = 1;
asoc->size_on_all_streams += control->length;
@@ -642,7 +637,6 @@ sctp_queue_data_to_stream(struct sctp_tcb *stcb,
}
}
-
static void
sctp_setup_tail_pointer(struct sctp_queued_to_read *control)
{
@@ -1051,7 +1045,6 @@ place_chunk:
SCTP_FROM_SCTP_INDATA + SCTP_LOC_5);
return;
}
-
}
if (inserted == 0) {
/* Its at the end */
@@ -1296,7 +1289,6 @@ out:
return (ret);
}
-
uint32_t
sctp_add_chk_to_control(struct sctp_queued_to_read *control,
struct sctp_stream_in *strm,
@@ -2232,7 +2224,6 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
TAILQ_FOREACH_SAFE(lcontrol, &asoc->pending_reply_queue, next, nlcontrol) {
if (SCTP_TSN_GT(control->sinfo_tsn, lcontrol->sinfo_tsn)) {
-
continue;
} else {
/* found it */
@@ -2408,7 +2399,6 @@ static const int8_t sctp_map_lookup_tab[256] = {
0, 1, 0, 2, 0, 1, 0, 8
};
-
void
sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
{
@@ -2554,7 +2544,6 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb)
for (ii = 0; ii < distance; ii++) {
asoc->mapping_array[ii] = asoc->mapping_array[slide_from + ii];
asoc->nr_mapping_array[ii] = asoc->nr_mapping_array[slide_from + ii];
-
}
for (ii = distance; ii < asoc->mapping_array_size; ii++) {
asoc->mapping_array[ii] = 0;
@@ -2629,14 +2618,12 @@ sctp_sack_check(struct sctp_tcb *stcb, int was_a_gap)
(stcb->asoc.delayed_ack == 0) || /* Delayed sack disabled */
(stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) /* hit limit of pkts */
) {
-
if ((stcb->asoc.sctp_cmt_on_off > 0) &&
(SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) &&
(stcb->asoc.send_sack == 0) &&
(stcb->asoc.numduptsns == 0) &&
(stcb->asoc.delayed_ack) &&
(!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer))) {
-
/*
* CMT DAC algorithm: With CMT, delay acks
* even in the face of
@@ -3123,7 +3110,6 @@ sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1
tp1->do_rtt = 0;
}
}
-
}
if (tp1->sent <= SCTP_DATAGRAM_RESEND) {
if (SCTP_TSN_GT(tp1->rec.data.tsn,
@@ -3201,7 +3187,6 @@ sctp_process_segment_range(struct sctp_tcb *stcb, struct sctp_tmit_chunk **p_tp1
return (wake_him); /* Return value only used for nr-sack */
}
-
static int
sctp_handle_segments(struct mbuf *m, int *offset, struct sctp_tcb *stcb, struct sctp_association *asoc,
uint32_t last_tsn, uint32_t *biggest_tsn_acked,
@@ -3324,7 +3309,6 @@ sctp_check_for_revoked(struct sctp_tcb *stcb,
}
}
-
static void
sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
uint32_t biggest_tsn_acked, uint32_t biggest_tsn_newly_acked, uint32_t this_sack_lowest_newack, int accum_moved)
@@ -3389,7 +3373,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
continue;
}
}
-
}
if (SCTP_TSN_GT(tp1->rec.data.tsn, asoc->this_sack_highest_gap) &&
!(accum_moved && asoc->fast_retran_loss_recovery)) {
@@ -3501,7 +3484,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
(1)
#endif
) {
-
if (SCTP_TSN_GE(biggest_tsn_newly_acked,
tp1->rec.data.fast_retran_tsn)) {
/*
@@ -3916,7 +3898,6 @@ sctp_fs_audit(struct sctp_association *asoc)
return (ret);
}
-
static void
sctp_window_probe_recovery(struct sctp_tcb *stcb,
struct sctp_association *asoc,
@@ -4165,7 +4146,6 @@ sctp_express_handle_sack(struct sctp_tcb *stcb, uint32_t cumack,
break;
}
}
-
}
/* sa_ignore NO_NULL_CHK */
if (stcb->sctp_socket) {
@@ -4717,7 +4697,6 @@ hopeless_peer:
tp1->whoTo->find_pseudo_cumack = 1;
tp1->whoTo->find_rtx_pseudo_cumack = 1;
-
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SACK_LOGGING_ENABLE) {
sctp_log_sack(asoc->last_acked_seq,
cum_ack,
@@ -4755,7 +4734,6 @@ hopeless_peer:
asoc->this_sack_highest_gap = last_tsn;
if ((num_seg > 0) || (num_nr_seg > 0)) {
-
/*
* thisSackHighestGap will increase while handling NEW
* segments this_sack_highest_newack will increase while
@@ -4790,7 +4768,6 @@ hopeless_peer:
sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep,
stcb, net,
SCTP_FROM_SCTP_INDATA + SCTP_LOC_31);
-
}
} else {
if (accum_moved) {
@@ -5166,7 +5143,6 @@ again:
if (!SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
sctp_timer_start(SCTP_TIMER_TYPE_SEND,
stcb->sctp_ep, stcb, net);
-
}
} else if (SCTP_OS_TIMER_PENDING(&net->rxt_timer.timer)) {
sctp_timer_stop(SCTP_TIMER_TYPE_SEND, stcb->sctp_ep,
@@ -5395,7 +5371,6 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
control,
&stcb->sctp_socket->so_rcv, 1,
SCTP_READ_LOCK_HELD, SCTP_SO_NOT_LOCKED);
-
}
mid = strmin->last_mid_delivered + 1;
} else {
@@ -5419,8 +5394,6 @@ sctp_kick_prsctp_reorder_queue(struct sctp_tcb *stcb,
}
}
-
-
static void
sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb,
struct sctp_association *asoc, struct sctp_stream_in *strm,
diff --git a/sys/netinet/sctp_indata.h b/sys/netinet/sctp_indata.h
index 0dcb4951e709..ac8e6f318fe1 100644
--- a/sys/netinet/sctp_indata.h
+++ b/sys/netinet/sctp_indata.h
@@ -48,7 +48,6 @@ sctp_build_readq_entry(struct sctp_tcb *stcb,
uint32_t mid, uint8_t flags,
struct mbuf *dm);
-
#define sctp_build_readq_entry_mac(_ctl, in_it, context, net, tsn, ppid, sid, flags, dm, tfsn, mid) do { \
if (_ctl) { \
atomic_add_int(&((net)->ref_count), 1); \
@@ -74,8 +73,6 @@ sctp_build_readq_entry(struct sctp_tcb *stcb,
} \
} while (0)
-
-
struct mbuf *
sctp_build_ctl_nchunk(struct sctp_inpcb *inp,
struct sctp_sndrcvinfo *sinfo);
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c
index 6b5ef69439c2..94baaa24e9a3 100644
--- a/sys/netinet/sctp_input.c
+++ b/sys/netinet/sctp_input.c
@@ -300,7 +300,6 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb)
if (SCTP_BASE_SYSCTL(sctp_logging_level) & (SCTP_CWND_MONITOR_ENABLE | SCTP_CWND_LOGGING_ENABLE)) {
sctp_log_cwnd(stcb, lnet, 0, SCTP_CWND_INITIALIZATION);
}
-
}
}
SCTP_TCB_SEND_LOCK(stcb);
@@ -683,7 +682,6 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *cp,
SCTP_MOBILITY_FASTHANDOFF)) &&
sctp_is_mobility_feature_on(stcb->sctp_ep,
SCTP_MOBILITY_PRIM_DELETED)) {
-
sctp_timer_stop(SCTP_TIMER_TYPE_PRIM_DELETED,
stcb->sctp_ep, stcb, NULL,
SCTP_FROM_SCTP_INPUT + SCTP_LOC_6);
@@ -776,7 +774,6 @@ sctp_handle_nat_missing_state(struct sctp_tcb *stcb,
return (1);
}
-
/* Returns 1 if the stcb was aborted, 0 otherwise */
static int
sctp_handle_abort(struct sctp_abort_chunk *abort,
@@ -863,7 +860,6 @@ sctp_start_net_timers(struct sctp_tcb *stcb)
}
}
-
static void
sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
struct sctp_tcb *stcb, struct sctp_nets *net, int *abort_flag)
@@ -1416,7 +1412,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
uint8_t mflowtype, uint32_t mflowid,
uint32_t vrf_id, uint16_t port);
-
/*
* handle a state cookie for an existing association m: input packet mbuf
* chain-- assumes a pullup on IP/SCTP/COOKIE-ECHO chunk note: this is a
@@ -1524,7 +1519,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
if (how_indx < sizeof(asoc->cookie_how))
asoc->cookie_how[how_indx] = 17;
return (NULL);
-
}
switch (SCTP_GET_STATE(stcb)) {
case SCTP_STATE_COOKIE_WAIT:
@@ -1725,7 +1719,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
spec_flag++;
}
}
-
}
/* process the INIT info (peer's info) */
retval = sctp_process_init(init_cp, stcb);
@@ -1939,7 +1932,6 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset,
return (NULL);
}
-
/*
* handle a state cookie for a new association m: input packet mbuf chain--
* assumes a pullup on IP/SCTP/COOKIE-ECHO chunk note: this is a "split" mbuf
@@ -2229,7 +2221,6 @@ sctp_process_cookie_new(struct mbuf *m, int iphlen, int offset,
&store.sa, cookie->local_scope, cookie->site_scope,
cookie->ipv4_scope, cookie->loopback_scope);
-
return (stcb);
}
@@ -2687,7 +2678,6 @@ sctp_handle_cookie_echo(struct mbuf *m, int iphlen, int offset,
SCTP_TCB_LOCK((*stcb));
atomic_subtract_int(&(*stcb)->asoc.refcnt, 1);
-
/*
* now we must check to see if we were aborted while
* the move was going on and the lock/unlock
@@ -2762,7 +2752,6 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED,
if (asoc->state & SCTP_STATE_SHUTDOWN_PENDING) {
sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD,
stcb->sctp_ep, stcb, NULL);
-
}
/* update RTO */
SCTP_STAT_INCR_COUNTER32(sctps_activeestab);
@@ -2797,7 +2786,6 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED,
sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, stcb->sctp_ep,
stcb, net);
-
if (stcb->asoc.sctp_autoclose_ticks &&
sctp_is_feature_on(stcb->sctp_ep, SCTP_PCB_FLAGS_AUTOCLOSE)) {
sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE,
@@ -3352,7 +3340,6 @@ sctp_reset_clear_pending(struct sctp_tcb *stcb, uint32_t number_entries, uint16_
}
}
-
struct sctp_stream_reset_request *
sctp_find_stream_reset(struct sctp_tcb *stcb, uint32_t seq, struct sctp_tmit_chunk **bchk)
{
@@ -3421,7 +3408,6 @@ sctp_clean_up_stream_reset(struct sctp_tcb *stcb)
sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED);
}
-
static int
sctp_handle_stream_reset_response(struct sctp_tcb *stcb,
uint32_t seq, uint32_t action,
@@ -3886,7 +3872,6 @@ sctp_handle_str_reset_add_strm(struct sctp_tcb *stcb, struct sctp_tmit_chunk *ch
sctp_add_stream_reset_result(chk, seq, asoc->last_reset_action[1]);
} else {
sctp_add_stream_reset_result(chk, seq, SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO);
-
}
}
@@ -5246,7 +5231,6 @@ process_control_chunks:
break;
} /* switch (ch->chunk_type) */
-
next_chunk:
/* get the next chunk */
*offset += SCTP_SIZE32(chk_length);
@@ -5268,7 +5252,6 @@ next_chunk:
return (stcb);
}
-
/*
* common input chunk processing (v4 and v6)
*/
diff --git a/sys/netinet/sctp_input.h b/sys/netinet/sctp_input.h
index 72908e1157e3..ca6cfff005bc 100644
--- a/sys/netinet/sctp_input.h
+++ b/sys/netinet/sctp_input.h
@@ -56,7 +56,6 @@ void
sctp_reset_in_stream(struct sctp_tcb *stcb, uint32_t number_entries,
uint16_t *list);
-
int sctp_is_there_unsent_data(struct sctp_tcb *stcb, int so_locked);
#endif
diff --git a/sys/netinet/sctp_lock_bsd.h b/sys/netinet/sctp_lock_bsd.h
index 96fc335570cc..ef15719bb429 100644
--- a/sys/netinet/sctp_lock_bsd.h
+++ b/sys/netinet/sctp_lock_bsd.h
@@ -107,7 +107,6 @@ __FBSDID("$FreeBSD$");
rw_wunlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \
} while (0)
-
#define SCTP_MCORE_QLOCK_INIT(cpstr) do { \
mtx_init(&(cpstr)->que_mtx, "sctp-mcore_queue","queue_lock", \
MTX_DEF | MTX_DUPOK); \
@@ -128,7 +127,6 @@ __FBSDID("$FreeBSD$");
mtx_unlock(&(cpstr)->que_mtx); \
} while (0)
-
#define SCTP_MCORE_LOCK_INIT(cpstr) do { \
mtx_init(&(cpstr)->core_mtx, "sctp-cpulck","cpu_proc_lock", \
MTX_DEF | MTX_DUPOK); \
@@ -149,7 +147,6 @@ __FBSDID("$FreeBSD$");
mtx_unlock(&(cpstr)->core_mtx); \
} while (0)
-
#define SCTP_IPI_ADDR_INIT() do { \
rw_init(&SCTP_BASE_INFO(ipi_addr_mtx), "sctp-addr"); \
} while (0)
@@ -202,7 +199,6 @@ __FBSDID("$FreeBSD$");
mtx_unlock(&sctp_it_ctl.ipi_iterator_wq_mtx); \
} while (0)
-
#define SCTP_IP_PKTLOG_INIT() do { \
mtx_init(&SCTP_BASE_INFO(ipi_pktlog_mtx), "sctp-pktlog", \
"packetlog", MTX_DEF); \
@@ -220,7 +216,6 @@ __FBSDID("$FreeBSD$");
mtx_unlock(&SCTP_BASE_INFO(ipi_pktlog_mtx)); \
} while (0)
-
/*
* The INP locks we will use for locking an SCTP endpoint, so for example if
* we want to change something at the endpoint level for example random_store
@@ -244,7 +239,6 @@ __FBSDID("$FreeBSD$");
mtx_unlock(&(_inp)->inp_rdata_mtx); \
} while (0)
-
#define SCTP_INP_LOCK_INIT(_inp) do { \
mtx_init(&(_inp)->inp_mtx, "sctp-inp", "inp", \
MTX_DEF | MTX_DUPOK); \
@@ -331,7 +325,6 @@ __FBSDID("$FreeBSD$");
#define SCTP_ASOC_CREATE_LOCK_CONTENDED(_inp) \
((_inp)->inp_create_mtx.mtx_lock & MTX_CONTESTED)
-
#define SCTP_TCB_SEND_LOCK_INIT(_tcb) do { \
mtx_init(&(_tcb)->tcb_send_mtx, "sctp-send-tcb", "tcbs", \
MTX_DEF | MTX_DUPOK); \
@@ -396,7 +389,6 @@ __FBSDID("$FreeBSD$");
("Don't own TCB lock")); \
} while (0)
-
#define SCTP_ITERATOR_LOCK_INIT() do { \
mtx_init(&sctp_it_ctl.it_mtx, "sctp-it", "iterator", MTX_DEF); \
} while (0)
@@ -416,7 +408,6 @@ __FBSDID("$FreeBSD$");
mtx_unlock(&sctp_it_ctl.it_mtx); \
} while (0)
-
#define SCTP_WQ_ADDR_INIT() do { \
mtx_init(&SCTP_BASE_INFO(wq_addr_mtx), \
"sctp-addr-wq","sctp_addr_wq", MTX_DEF); \
diff --git a/sys/netinet/sctp_os.h b/sys/netinet/sctp_os.h
index 83be9c67d412..6964ff0857a1 100644
--- a/sys/netinet/sctp_os.h
+++ b/sys/netinet/sctp_os.h
@@ -64,9 +64,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/sctp_os_bsd.h>
-
-
-
/* All os's must implement this address gatherer. If
* no VRF's exist, then vrf 0 is the only one and all
* addresses and ifn's live here.
diff --git a/sys/netinet/sctp_os_bsd.h b/sys/netinet/sctp_os_bsd.h
index 932a1efb004d..12a666b8eead 100644
--- a/sys/netinet/sctp_os_bsd.h
+++ b/sys/netinet/sctp_os_bsd.h
@@ -191,7 +191,6 @@ MALLOC_DECLARE(SCTP_M_MCORE);
#define SCTP_LTRACE_ERR_RET(inp, stcb, net, file, err)
#endif
-
/*
* Local address and interface list handling
*/
@@ -267,7 +266,6 @@ typedef struct uma_zone *sctp_zone_t;
#include <sys/callout.h>
typedef struct callout sctp_os_timer_t;
-
#define SCTP_OS_TIMER_INIT(tmr) callout_init(tmr, 1)
/*
* NOTE: The next two shouldn't be called directly outside of sctp_timer_start()
@@ -349,8 +347,6 @@ typedef struct callout sctp_os_timer_t;
#define SCTP_GET_PKT_VRFID(m, vrf_id) ((vrf_id = SCTP_DEFAULT_VRFID) != SCTP_DEFAULT_VRFID)
-
-
/* Attach the chain of data into the sendable packet. */
#define SCTP_ATTACH_CHAIN(pak, m, packet_length) do { \
pak = m; \
@@ -361,7 +357,6 @@ typedef struct callout sctp_os_timer_t;
#define SCTP_IS_IT_BROADCAST(dst, m) ((m->m_flags & M_PKTHDR) ? in_broadcast(dst, m->m_pkthdr.rcvif) : 0)
#define SCTP_IS_IT_LOOPBACK(m) ((m->m_flags & M_PKTHDR) && ((m->m_pkthdr.rcvif == NULL) || (m->m_pkthdr.rcvif->if_type == IFT_LOOP)))
-
/* This converts any input packet header
* into the chain of data holders, for BSD
* its a NOP.
@@ -444,7 +439,6 @@ struct mbuf *
sctp_get_mbuf_for_msg(unsigned int space_needed,
int want_header, int how, int allonebuf, int type);
-
/*
* SCTP AUTH
*/
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index ac258281f138..6e06bf02e6c4 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/udp_var.h>
#include <machine/in_cksum.h>
-
#define SCTP_MAX_GAPS_INARRAY 4
struct sack_track {
uint8_t right_edge; /* mergable on the right edge */
@@ -1864,7 +1863,6 @@ const struct sack_track sack_array[256] = {
}
};
-
int
sctp_is_address_in_scope(struct sctp_ifa *ifa,
struct sctp_scoping *scope,
@@ -2025,7 +2023,6 @@ sctp_add_addr_to_mbuf(struct mbuf *m, struct sctp_ifa *ifa, uint16_t *len)
#endif
}
-
struct mbuf *
sctp_add_addresses_to_i_ia(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
struct sctp_scoping *scope,
@@ -2429,7 +2426,6 @@ sctp_is_addr_restricted(struct sctp_tcb *stcb, struct sctp_ifa *ifa)
return (0);
}
-
int
sctp_is_addr_in_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa)
{
@@ -2450,8 +2446,6 @@ sctp_is_addr_in_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa)
return (0);
}
-
-
static struct sctp_ifa *
sctp_choose_boundspecific_inp(struct sctp_inpcb *inp,
sctp_route_t *ro,
@@ -2584,8 +2578,6 @@ once_again_too:
return (NULL);
}
-
-
static struct sctp_ifa *
sctp_choose_boundspecific_stcb(struct sctp_inpcb *inp,
struct sctp_tcb *stcb,
@@ -2690,7 +2682,6 @@ sctp_choose_boundspecific_stcb(struct sctp_inpcb *inp,
return (sifa);
}
}
-
}
/*
* if we can't find one like that then we must look at all addresses
@@ -2893,7 +2884,6 @@ sctp_select_nth_preferred_addr_from_ifn_boundall(struct sctp_ifn *ifn,
return (NULL);
}
-
static int
sctp_count_num_preferred_boundall(struct sctp_ifn *ifn,
struct sctp_inpcb *inp,
@@ -3303,8 +3293,6 @@ out:
return (sifa);
}
-
-
/* tcb may be NULL */
struct sctp_ifa *
sctp_source_address_selection(struct sctp_inpcb *inp,
@@ -4626,7 +4614,6 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp,
}
}
-
void
sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked)
{
@@ -5204,7 +5191,6 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_initpkt,
at += SCTP_SIZE32(plen);
}
break;
-
}
phdr = sctp_get_next_param(mat, at, &params, sizeof(params));
}
@@ -5740,7 +5726,6 @@ do_a_abort:
}
net->src_addr_selected = 1;
-
}
stc.laddress[0] = net->ro._s_addr->address.sin.sin_addr.s_addr;
stc.laddress[1] = 0;
@@ -6124,7 +6109,6 @@ do_a_abort:
SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks);
}
-
static void
sctp_prune_prsctp(struct sctp_tcb *stcb,
struct sctp_association *asoc,
@@ -6400,7 +6384,6 @@ out_now:
return (error);
}
-
static struct mbuf *
sctp_copy_mbufchain(struct mbuf *clonechain,
struct mbuf *outchain,
@@ -6717,7 +6700,6 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr,
NULL);
}
}
-
}
}
un_sent = ((stcb->asoc.total_output_queue_size - stcb->asoc.total_flight) +
@@ -6879,7 +6861,6 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, struct mbuf *m,
return (0);
}
-
void
sctp_toss_old_cookies(struct sctp_tcb *stcb, struct sctp_association *asoc)
{
@@ -6927,7 +6908,6 @@ sctp_toss_old_asconf(struct sctp_tcb *stcb)
}
}
-
static void
sctp_clean_up_datalist(struct sctp_tcb *stcb,
struct sctp_association *asoc,
@@ -7392,7 +7372,6 @@ dont_do_it:
sp->tail_mbuf = sp->data = NULL;
sp->length = 0;
#endif
-
}
sctp_m_free(m);
m = sp->data;
@@ -7650,7 +7629,6 @@ out_of:
return (to_move);
}
-
static void
sctp_fill_outqueue(struct sctp_tcb *stcb,
struct sctp_nets *net, int frag_point, int eeor_mode, int *quit_now, int so_locked)
@@ -7888,7 +7866,6 @@ nothing_to_send:
break;
}
}
-
}
if ((no_data_chunks == 0) &&
(skip_fill_up == 0) &&
@@ -9131,7 +9108,6 @@ sctp_send_cookie_ack(struct sctp_tcb *stcb)
return;
}
-
void
sctp_send_shutdown_ack(struct sctp_tcb *stcb, struct sctp_nets *net)
{
@@ -9382,7 +9358,6 @@ sctp_send_asconf_ack(struct sctp_tcb *stcb)
return;
}
-
static int
sctp_chunk_retransmission(struct sctp_inpcb *inp,
struct sctp_tcb *stcb,
@@ -9839,7 +9814,6 @@ one_chunk_around:
atomic_add_int(&((asoc)->total_output_queue_size), data_list[i]->book_size);
data_list[i]->book_size *= 2;
-
} else {
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_RWND_ENABLE) {
sctp_log_rwnd(SCTP_DECREASE_PEER_RWND,
@@ -10120,7 +10094,6 @@ do_it_again:
}
}
}
-
}
burst_cnt = 0;
do {
@@ -10210,7 +10183,6 @@ do_it_again:
return;
}
-
int
sctp_output(
struct sctp_inpcb *inp,
@@ -10718,7 +10690,6 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked)
}
if ((type == SCTP_NR_SELECTIVE_ACK) &&
(limit_reached == 0)) {
-
mergeable = 0;
if (asoc->highest_tsn_inside_nr_map > asoc->mapping_array_base_tsn) {
@@ -12184,7 +12155,6 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb,
TAILQ_REMOVE(&oldstream[i].outqueue, sp, next);
TAILQ_INSERT_TAIL(&stcb->asoc.strmout[i].outqueue, sp, next);
}
-
}
/* now the new streams */
stcb->asoc.ss_functions.sctp_ss_init(stcb, &stcb->asoc, 1);
@@ -12314,8 +12284,6 @@ sctp_copy_one(struct sctp_stream_queue_pending *sp,
return (0);
}
-
-
static struct sctp_stream_queue_pending *
sctp_copy_it_in(struct sctp_tcb *stcb,
struct sctp_association *asoc,
@@ -12408,7 +12376,6 @@ out_now:
return (sp);
}
-
int
sctp_sosend(struct socket *so,
struct sockaddr *addr,
@@ -12455,7 +12422,6 @@ sctp_sosend(struct socket *so,
return (error);
}
-
int
sctp_lower_sosend(struct socket *so,
struct sockaddr *addr,
@@ -12647,7 +12613,6 @@ sctp_lower_sosend(struct socket *so,
SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL);
error = EINVAL;
goto out_unlocked;
-
}
if (((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) == 0) &&
(addr->sa_family == AF_INET6)) {
@@ -13161,7 +13126,6 @@ skip_preblock:
strm->last_msg_incomplete = 0;
#endif
goto do_a_copy_in;
-
}
if (sp->processing) {
SCTP_TCB_SEND_UNLOCK(stcb);
@@ -13319,7 +13283,6 @@ skip_preblock:
(stcb->asoc.total_flight > 0) &&
(stcb->asoc.stream_queue_cnt < SCTP_MAX_DATA_BUNDLING) &&
(un_sent < (int)(stcb->asoc.smallest_mtu - SCTP_MIN_OVERHEAD))) {
-
/*-
* Ok, Nagle is set on and we have data outstanding.
* Don't send anything and let SACKs drive out the
@@ -13339,7 +13302,6 @@ skip_preblock:
nagle_applies = 0;
}
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
-
sctp_misc_ints(SCTP_CWNDLOG_PRESEND, queue_only_for_init, queue_only,
nagle_applies, un_sent);
sctp_misc_ints(SCTP_CWNDLOG_PRESEND, stcb->asoc.total_output_queue_size,
@@ -13705,7 +13667,6 @@ out_unlocked:
return (error);
}
-
/*
* generate an AUTHentication chunk, if required
*/
diff --git a/sys/netinet/sctp_output.h b/sys/netinet/sctp_output.h
index 26173a6a7475..3c157d3f7f67 100644
--- a/sys/netinet/sctp_output.h
+++ b/sys/netinet/sctp_output.h
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
#if defined(_KERNEL) || defined(__Userspace__)
-
struct mbuf *
sctp_add_addresses_to_i_ia(struct sctp_inpcb *inp,
struct sctp_tcb *stcb,
@@ -51,10 +50,8 @@ sctp_add_addresses_to_i_ia(struct sctp_inpcb *inp,
int cnt_inits_to,
uint16_t *padding_len, uint16_t *chunk_len);
-
int sctp_is_addr_restricted(struct sctp_tcb *, struct sctp_ifa *);
-
int
sctp_is_address_in_scope(struct sctp_ifa *ifa,
struct sctp_scoping *scope,
@@ -105,7 +102,6 @@ sctp_remove_from_wheel(struct sctp_tcb *stcb,
struct sctp_association *asoc,
struct sctp_stream_out *strq, int holds_lock);
-
void sctp_send_shutdown(struct sctp_tcb *, struct sctp_nets *);
void sctp_send_shutdown_ack(struct sctp_tcb *, struct sctp_nets *);
@@ -132,7 +128,6 @@ void sctp_fix_ecn_echo(struct sctp_association *);
void sctp_move_chunks_from_net(struct sctp_tcb *stcb, struct sctp_nets *net);
-
#define SCTP_DATA_CHUNK_OVERHEAD(stcb) ((stcb)->asoc.idata_supported ? \
sizeof(struct sctp_idata_chunk) : \
sizeof(struct sctp_data_chunk))
@@ -157,11 +152,8 @@ void
sctp_send_packet_dropped(struct sctp_tcb *, struct sctp_nets *, struct mbuf *,
int, int, int);
-
-
void sctp_send_cwr(struct sctp_tcb *, struct sctp_nets *, uint32_t, uint8_t);
-
void
sctp_add_stream_reset_result(struct sctp_tmit_chunk *, uint32_t, uint32_t);
diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index aa70abbe7dec..ff1aba0d67f0 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -189,7 +189,6 @@ sctp_allocate_vrf(int vrf_id)
return (vrf);
}
-
struct sctp_ifn *
sctp_find_ifn(void *ifn, uint32_t ifn_index)
{
@@ -213,7 +212,6 @@ sctp_find_ifn(void *ifn, uint32_t ifn_index)
return (NULL);
}
-
struct sctp_vrf *
sctp_find_vrf(uint32_t vrf_id)
{
@@ -229,7 +227,6 @@ sctp_find_vrf(uint32_t vrf_id)
return (NULL);
}
-
void
sctp_free_vrf(struct sctp_vrf *vrf)
{
@@ -245,7 +242,6 @@ sctp_free_vrf(struct sctp_vrf *vrf)
}
}
-
void
sctp_free_ifn(struct sctp_ifn *sctp_ifnp)
{
@@ -259,7 +255,6 @@ sctp_free_ifn(struct sctp_ifn *sctp_ifnp)
}
}
-
void
sctp_update_ifn_mtu(uint32_t ifn_index, uint32_t mtu)
{
@@ -271,7 +266,6 @@ sctp_update_ifn_mtu(uint32_t ifn_index, uint32_t mtu)
}
}
-
void
sctp_free_ifa(struct sctp_ifa *sctp_ifap)
{
@@ -285,7 +279,6 @@ sctp_free_ifa(struct sctp_ifa *sctp_ifap)
}
}
-
static void
sctp_delete_ifn(struct sctp_ifn *sctp_ifnp, int hold_addr_lock)
{
@@ -310,7 +303,6 @@ sctp_delete_ifn(struct sctp_ifn *sctp_ifnp, int hold_addr_lock)
sctp_free_ifn(sctp_ifnp);
}
-
void
sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr,
const char *if_name, uint32_t ifn_index)
@@ -323,7 +315,6 @@ sctp_mark_ifa_addr_down(uint32_t vrf_id, struct sockaddr *addr,
if (vrf == NULL) {
SCTPDBG(SCTP_DEBUG_PCB4, "Can't find vrf_id 0x%x\n", vrf_id);
goto out;
-
}
sctp_ifap = sctp_find_ifa_by_addr(addr, vrf->vrf_id, SCTP_ADDR_LOCKED);
if (sctp_ifap == NULL) {
@@ -354,7 +345,6 @@ out:
SCTP_IPI_ADDR_RUNLOCK();
}
-
void
sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr,
const char *if_name, uint32_t ifn_index)
@@ -367,7 +357,6 @@ sctp_mark_ifa_addr_up(uint32_t vrf_id, struct sockaddr *addr,
if (vrf == NULL) {
SCTPDBG(SCTP_DEBUG_PCB4, "Can't find vrf_id 0x%x\n", vrf_id);
goto out;
-
}
sctp_ifap = sctp_find_ifa_by_addr(addr, vrf->vrf_id, SCTP_ADDR_LOCKED);
if (sctp_ifap == NULL) {
@@ -398,7 +387,6 @@ out:
SCTP_IPI_ADDR_RUNLOCK();
}
-
/*-
* Add an ifa to an ifn.
* Register the interface as necessary.
@@ -435,7 +423,6 @@ sctp_add_ifa_to_ifn(struct sctp_ifn *sctp_ifnp, struct sctp_ifa *sctp_ifap)
}
}
-
/*-
* Remove an ifa from its ifn.
* If no more addresses exist, remove the ifn too. Otherwise, re-register
@@ -483,7 +470,6 @@ sctp_remove_ifa_from_ifn(struct sctp_ifa *sctp_ifap)
}
}
-
struct sctp_ifa *
sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index,
uint32_t ifn_type, const char *if_name, void *ifa,
@@ -836,7 +822,6 @@ out_now:
return;
}
-
static int
sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to)
{
@@ -1004,14 +989,12 @@ sctp_does_stcb_own_this_addr(struct sctp_tcb *stcb, struct sockaddr *to)
/* TSNH */
break;
}
-
}
}
SCTP_IPI_ADDR_RUNLOCK();
return (0);
}
-
static struct sctp_tcb *
sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from,
struct sockaddr *to, struct sctp_nets **netp, uint32_t vrf_id)
@@ -1116,7 +1099,6 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from,
int match = 0;
LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) {
-
if (laddr->ifa == NULL) {
SCTPDBG(SCTP_DEBUG_PCB1, "%s: NULL ifa\n", __func__);
continue;
@@ -1200,7 +1182,6 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from,
}
/* Does this TCB have a matching address? */
TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) {
-
if (net->ro._l_addr.sa.sa_family != from->sa_family) {
/* not the same family, can't be a match */
continue;
@@ -1265,7 +1246,6 @@ sctp_tcb_special_locate(struct sctp_inpcb **inp_p, struct sockaddr *from,
return (NULL);
}
-
/*
* rules for use
*
@@ -1552,7 +1532,6 @@ null_return:
return (NULL);
}
-
/*
* Find an association for a specific endpoint using the association id given
* out in the COMM_UP notification
@@ -1604,7 +1583,6 @@ sctp_findasoc_ep_asocid_locked(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int
return (NULL);
}
-
struct sctp_tcb *
sctp_findassociation_ep_asocid(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int want_lock)
{
@@ -1616,7 +1594,6 @@ sctp_findassociation_ep_asocid(struct sctp_inpcb *inp, sctp_assoc_t asoc_id, int
return (stcb);
}
-
/*
* Endpoint probe expects that the INP_INFO is locked.
*/
@@ -1813,7 +1790,6 @@ sctp_endpoint_probe(struct sockaddr *nam, struct sctppcbhead *head,
return (NULL);
}
-
static struct sctp_inpcb *
sctp_isport_inuse(struct sctp_inpcb *inp, uint16_t lport, uint32_t vrf_id)
{
@@ -1862,7 +1838,6 @@ sctp_isport_inuse(struct sctp_inpcb *inp, uint16_t lport, uint32_t vrf_id)
return (NULL);
}
-
int
sctp_swap_inpcb_for_listen(struct sctp_inpcb *inp)
{
@@ -1914,7 +1889,6 @@ sctp_swap_inpcb_for_listen(struct sctp_inpcb *inp)
return (0);
}
-
struct sctp_inpcb *
sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock,
uint32_t vrf_id)
@@ -1991,7 +1965,6 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock,
return (inp);
}
-
/*
* Find an association for an endpoint with the pointer to whom you want to
* send to and the endpoint pointer. The address can be IPv4 or IPv6. We may
@@ -2043,7 +2016,6 @@ sctp_findassociation_addr_sa(struct sockaddr *from, struct sockaddr *to,
return (stcb);
}
-
/*
* This routine will grub through the mbuf that is a INIT or INIT-ACK and
* find all addresses that the sender has specified in any address list. Each
@@ -2238,7 +2210,6 @@ sctp_findassoc_by_vtag(struct sockaddr *from, struct sockaddr *to, uint32_t vtag
return (NULL);
}
-
/*
* Find an association with the pointer to the inbound IP packet. This can be
* a IPv4 or IPv6 packet.
@@ -2404,7 +2375,6 @@ sctp_findassociation_ep_asconf(struct mbuf *m, int offset,
return (stcb);
}
-
/*
* allocate a sctp_inpcb and setup a temporary binding to a port/all
* addresses. This way if we don't get a bind we by default pick a ephemeral
@@ -2640,7 +2610,6 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id)
return (error);
}
-
void
sctp_move_pcb_and_assoc(struct sctp_inpcb *old_inp, struct sctp_inpcb *new_inp,
struct sctp_tcb *stcb)
@@ -2832,8 +2801,6 @@ sctp_remove_laddr(struct sctp_laddr *laddr)
SCTP_DECR_LADDR_COUNT();
}
-
-
/* sctp_ifap is used to bypass normal local address validation checks */
int
sctp_inpcb_bind(struct socket *so, struct sockaddr *addr,
@@ -3254,7 +3221,6 @@ continue_anyway:
return (0);
}
-
static void
sctp_iterator_inp_being_freed(struct sctp_inpcb *inp)
{
@@ -3345,7 +3311,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
int cnt;
sctp_sharedkey_t *shared_key, *nshared_key;
-
#ifdef SCTP_LOG_CLOSING
sctp_log_closing(inp, NULL, 0);
#endif
@@ -3372,7 +3337,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
inp->sctp_flags |= SCTP_PCB_FLAGS_DONT_WAKE;
inp->sctp_flags &= ~SCTP_PCB_FLAGS_WAKEINPUT;
inp->sctp_flags &= ~SCTP_PCB_FLAGS_WAKEOUTPUT;
-
}
/* First time through we have the socket lock, after that no more. */
sctp_timer_stop(SCTP_TIMER_TYPE_NEWCOOKIE, inp, NULL, NULL,
@@ -3625,7 +3589,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
sctp_log_closing(inp, NULL, 5);
#endif
-
if ((inp->sctp_asocidhash) != NULL) {
SCTP_HASH_FREE(inp->sctp_asocidhash, inp->hashasocidmark);
inp->sctp_asocidhash = NULL;
@@ -3661,7 +3624,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
ip_pcb->inp_options = 0;
}
-
#ifdef INET6
if (ip_pcb->inp_vflag & INP_IPV6) {
ip6_freepcbopts(ip_pcb->in6p_outputopts);
@@ -3713,7 +3675,6 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from)
SCTP_DECR_EP_COUNT();
}
-
struct sctp_nets *
sctp_findnet(struct sctp_tcb *stcb, struct sockaddr *addr)
{
@@ -3727,7 +3688,6 @@ sctp_findnet(struct sctp_tcb *stcb, struct sockaddr *addr)
return (NULL);
}
-
int
sctp_is_address_on_local_host(struct sockaddr *addr, uint32_t vrf_id)
{
@@ -4158,7 +4118,6 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr,
return (0);
}
-
static uint32_t
sctp_aloc_a_assoc_id(struct sctp_inpcb *inp, struct sctp_tcb *stcb)
{
@@ -4433,7 +4392,6 @@ sctp_aloc_assoc(struct sctp_inpcb *inp, struct sockaddr *firstaddr,
return (stcb);
}
-
void
sctp_remove_net(struct sctp_tcb *stcb, struct sctp_nets *net)
{
@@ -4589,7 +4547,6 @@ sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport)
return (found);
}
-
void
sctp_add_vtag_to_timewait(uint32_t tag, uint32_t time, uint16_t lport, uint16_t rport)
{
@@ -5238,8 +5195,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int from_inpcbfre
return (1);
}
-
-
/*
* determine if a destination is "reachable" based upon the addresses bound
* to the current endpoint (e.g. only v4 or v6 currently bound)
@@ -5394,7 +5349,6 @@ sctp_add_local_addr_ep(struct sctp_inpcb *inp, struct sctp_ifa *ifa, uint32_t ac
return;
}
-
/*
* select a new (hopefully reachable) destination net (should only be used
* when we deleted an ep addr that is the only usable source address to reach
@@ -5418,7 +5372,6 @@ sctp_select_primary_destination(struct sctp_tcb *stcb)
/* I can't there from here! ...we're gonna die shortly... */
}
-
/*
* Delete the address from the endpoint local address list. There is nothing
* to be done if we are bound to all addresses
@@ -5764,7 +5717,6 @@ sctp_pcb_init(void)
/* init the empty list of (All) Endpoints */
LIST_INIT(&SCTP_BASE_INFO(listhead));
-
/* init the hash table of endpoints */
TUNABLE_INT_FETCH("net.inet.sctp.tcbhashsize", &SCTP_BASE_SYSCTL(sctp_hashtblsize));
TUNABLE_INT_FETCH("net.inet.sctp.pcbhashsize", &SCTP_BASE_SYSCTL(sctp_pcbtblsize));
@@ -5777,7 +5729,6 @@ sctp_pcb_init(void)
&SCTP_BASE_INFO(hashtcpmark));
SCTP_BASE_INFO(hashtblsize) = SCTP_BASE_SYSCTL(sctp_hashtblsize);
-
SCTP_BASE_INFO(sctp_vrfhash) = SCTP_HASH_INIT(SCTP_SIZE_OF_VRF_HASH,
&SCTP_BASE_INFO(hashvrfmark));
@@ -5822,7 +5773,6 @@ sctp_pcb_init(void)
sizeof(struct sctp_asconf_ack),
(sctp_max_number_of_assoc * SCTP_BASE_SYSCTL(sctp_chunkscale)));
-
/* Master Lock INIT for info structure */
SCTP_INP_INFO_LOCK_INIT();
SCTP_STATLOG_INIT_LOCK();
@@ -6025,7 +5975,6 @@ retry:
#endif
}
-
int
sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
int offset, int limit,
@@ -6485,7 +6434,6 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
default:
/* one I have not learned yet */
break;
-
}
}
} else if (ptype == SCTP_RANDOM) {
@@ -6568,7 +6516,6 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
saw_asconf = 1;
if (chunks->chunk_types[i] == SCTP_ASCONF_ACK)
saw_asconf_ack = 1;
-
}
got_chklist = 1;
} else if ((ptype == SCTP_HEARTBEAT_INFO) ||
@@ -7123,7 +7070,6 @@ sctp_initiate_iterator(inp_func inpf,
}
SCTP_INP_INFO_RUNLOCK();
it->iterator_flags = SCTP_ITERATOR_DO_ALL_INP;
-
}
SCTP_IPI_ITERATOR_WQ_LOCK();
if (SCTP_BASE_VAR(sctp_pcb_initialized) == 0) {
diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h
index c1a0ed295bef..08ca30a45803 100644
--- a/sys/netinet/sctp_pcb.h
+++ b/sys/netinet/sctp_pcb.h
@@ -144,7 +144,6 @@ struct sctp_tagblock {
struct sctp_timewait vtag_block[SCTP_NUMBER_IN_VTAG_BLOCK];
};
-
struct sctp_epinfo {
#ifdef INET
struct socket *udp4_tun_socket;
@@ -240,7 +239,6 @@ struct sctp_epinfo {
};
-
struct sctp_base_info {
/*
* All static structures that anchor the system must be here.
@@ -355,7 +353,6 @@ struct sctp_pcbtsn_rlog {
};
#define SCTP_READ_LOG_SIZE 135 /* we choose the number to make a pcb a page */
-
struct sctp_inpcb {
/*-
* put an inpcb in front of it all, kind of a waste but we need to
@@ -367,7 +364,6 @@ struct sctp_inpcb {
~SCTP_ALIGNM1];
} ip_inp;
-
/* Socket buffer lock protects read_queue and of course sb_cc */
struct sctp_readhead read_queue;
@@ -473,11 +469,8 @@ struct sctp_tcb {
struct mtx tcb_send_mtx;
};
-
-
#include <netinet/sctp_lock_bsd.h>
-
#if defined(_KERNEL) || defined(__Userspace__)
/* Attention Julian, this is the extern that
@@ -522,13 +515,10 @@ void sctp_update_ifn_mtu(uint32_t ifn_index, uint32_t mtu);
void sctp_free_ifn(struct sctp_ifn *sctp_ifnp);
void sctp_free_ifa(struct sctp_ifa *sctp_ifap);
-
void
sctp_del_addr_from_vrf(uint32_t vrfid, struct sockaddr *addr,
uint32_t ifn_index, const char *if_name);
-
-
struct sctp_nets *sctp_findnet(struct sctp_tcb *, struct sockaddr *);
struct sctp_inpcb *sctp_pcb_findep(struct sockaddr *, int, int, uint32_t);
@@ -588,7 +578,6 @@ sctp_aloc_assoc(struct sctp_inpcb *, struct sockaddr *,
int sctp_free_assoc(struct sctp_inpcb *, struct sctp_tcb *, int, int);
-
void sctp_delete_from_timewait(uint32_t, uint16_t, uint16_t);
int sctp_is_in_timewait(uint32_t tag, uint16_t lport, uint16_t rport);
diff --git a/sys/netinet/sctp_ss_functions.c b/sys/netinet/sctp_ss_functions.c
index e4fb71209483..5f10d3e9bcb7 100644
--- a/sys/netinet/sctp_ss_functions.c
+++ b/sys/netinet/sctp_ss_functions.c
@@ -182,7 +182,6 @@ sctp_ss_default_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
return;
}
-
static struct sctp_stream_out *
sctp_ss_default_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
struct sctp_association *asoc)
@@ -389,7 +388,6 @@ rrp_again:
return;
}
-
/*
* Priority algorithm.
* Always prefers streams based on their priority id.
@@ -411,7 +409,6 @@ sctp_ss_prio_clear(struct sctp_tcb *stcb, struct sctp_association *asoc,
TAILQ_REMOVE(&asoc->ss_data.out.wheel, strq, ss_params.prio.next_spoke);
strq->ss_params.prio.next_spoke.tqe_next = NULL;
strq->ss_params.prio.next_spoke.tqe_prev = NULL;
-
}
asoc->ss_data.last_out_stream = NULL;
if (holds_lock == 0) {
@@ -898,7 +895,6 @@ sctp_ss_fcfs_remove(struct sctp_tcb *stcb, struct sctp_association *asoc,
return;
}
-
static struct sctp_stream_out *
sctp_ss_fcfs_select(struct sctp_tcb *stcb SCTP_UNUSED, struct sctp_nets *net,
struct sctp_association *asoc)
diff --git a/sys/netinet/sctp_structs.h b/sys/netinet/sctp_structs.h
index d35388d31a48..52fe30098ad7 100644
--- a/sys/netinet/sctp_structs.h
+++ b/sys/netinet/sctp_structs.h
@@ -61,7 +61,6 @@ struct sctp_timer {
uint32_t stopped_from;
};
-
struct sctp_foo_stuff {
struct sctp_inpcb *inp;
uint32_t lineno;
@@ -69,7 +68,6 @@ struct sctp_foo_stuff {
int updown;
};
-
/*
* This is the information we track on each interface that we know about from
* the distant end.
@@ -156,7 +154,6 @@ struct sctp_iterator {
#define SCTP_ITERATOR_DO_ALL_INP 0x00000001
#define SCTP_ITERATOR_DO_SINGLE_INP 0x00000002
-
TAILQ_HEAD(sctpiterators, sctp_iterator);
struct sctp_copy_all {
@@ -244,7 +241,6 @@ struct rtcc_cc {
uint8_t last_inst_ind; /* Last saved inst indication */
};
-
struct sctp_nets {
TAILQ_ENTRY(sctp_nets) sctp_next; /* next link */
@@ -386,7 +382,6 @@ struct sctp_nets {
uint8_t flowtype;
};
-
struct sctp_data_chunkrec {
uint32_t tsn; /* the TSN of this transmit */
uint32_t mid; /* the message identifier of this transmit */
@@ -424,7 +419,6 @@ struct chk_id {
uint8_t can_take_data;
};
-
struct sctp_tmit_chunk {
union {
struct sctp_data_chunkrec data;
@@ -554,7 +548,6 @@ struct sctp_stream_in {
TAILQ_HEAD(sctpwheel_listhead, sctp_stream_out);
TAILQ_HEAD(sctplist_listhead, sctp_stream_queue_pending);
-
/* Round-robin schedulers */
struct ss_rr {
/* next link in wheel */
@@ -869,7 +862,6 @@ struct sctp_association {
/* last place I got a control from */
struct sctp_nets *last_control_chunk_from;
-
/*
* wait to the point the cum-ack passes req->send_reset_at_tsn for
* any req on the list.
@@ -936,7 +928,6 @@ struct sctp_association {
/* Original seq number I used ??questionable to keep?? */
uint32_t init_seq_number;
-
/* The Advanced Peer Ack Point, as required by the PR-SCTP */
/* (A1 in Section 4.2) */
uint32_t advanced_peer_ack_point;
diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c
index 0eb449acdfec..4acca03792c0 100644
--- a/sys/netinet/sctp_sysctl.c
+++ b/sys/netinet/sctp_sysctl.c
@@ -132,7 +132,6 @@ sctp_init_sysctls()
#endif
}
-
/* It returns an upper limit. No filtering is done here */
static unsigned int
sctp_sysctl_number_of_addresses(struct sctp_inpcb *inp)
@@ -597,7 +596,6 @@ sctp_sysctl_handle_udp_tunneling(SYSCTL_HANDLER_ARGS)
return (error);
}
-
static int
sctp_sysctl_handle_auth(SYSCTL_HANDLER_ARGS)
{
diff --git a/sys/netinet/sctp_sysctl.h b/sys/netinet/sctp_sysctl.h
index f5b68d4500ce..18cf37520048 100644
--- a/sys/netinet/sctp_sysctl.h
+++ b/sys/netinet/sctp_sysctl.h
@@ -215,7 +215,6 @@ struct sctp_sysctl {
#define SCTPCTL_FRMAXBURST_MAX 0xFFFFFFFF
#define SCTPCTL_FRMAXBURST_DEFAULT SCTP_DEF_FRMAX_BURST
-
/* maxchunks: Default max chunks on queue per asoc */
#define SCTPCTL_MAXCHUNKS_DESC "Default max chunks on queue per asoc"
#define SCTPCTL_MAXCHUNKS_MIN 0
@@ -555,9 +554,6 @@ struct sctp_sysctl {
#define SCTPCTL_DEBUG_DEFAULT 0
#endif
-
-
-
#if defined(_KERNEL) || defined(__Userspace__)
#if defined(SYSCTL_DECL)
SYSCTL_DECL(_net_inet_sctp);
diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c
index d1c4852e5475..bce1f5cd166d 100644
--- a/sys/netinet/sctp_timer.c
+++ b/sys/netinet/sctp_timer.c
@@ -496,7 +496,6 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb,
uint32_t tsnlast, tsnfirst;
int recovery_cnt = 0;
-
/* none in flight now */
audit_tf = 0;
fir = 0;
@@ -800,7 +799,6 @@ start_again:
return (0);
}
-
int
sctp_t3rxt_timer(struct sctp_inpcb *inp,
struct sctp_tcb *stcb,
diff --git a/sys/netinet/sctp_timer.h b/sys/netinet/sctp_timer.h
index 35be6c51b266..6c6d37c88f99 100644
--- a/sys/netinet/sctp_timer.h
+++ b/sys/netinet/sctp_timer.h
@@ -89,6 +89,5 @@ void sctp_audit_retranmission_queue(struct sctp_association *);
void sctp_iterator_timer(struct sctp_iterator *it);
-
#endif
#endif
diff --git a/sys/netinet/sctp_uio.h b/sys/netinet/sctp_uio.h
index a57197ee2364..e974d88a333b 100644
--- a/sys/netinet/sctp_uio.h
+++ b/sys/netinet/sctp_uio.h
@@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$");
#ifndef _NETINET_SCTP_UIO_H_
#define _NETINET_SCTP_UIO_H_
-
#if !defined(_KERNEL)
#include <stdint.h>
#endif
@@ -111,7 +110,6 @@ struct sctp_initmsg {
* all sendrcvinfo's need a verfid for SENDING only.
*/
-
#define SCTP_ALIGN_RESV_PAD 92
#define SCTP_ALIGN_RESV_PAD_SHORT 76
@@ -424,7 +422,6 @@ struct sctp_setadaption {
uint32_t ssb_adaption_ind;
};
-
/*
* Partial Delivery API event
*/
@@ -441,7 +438,6 @@ struct sctp_pdapi_event {
/* indication values */
#define SCTP_PARTIAL_DELIVERY_ABORTED 0x0001
-
/*
* authentication key event
*/
@@ -461,7 +457,6 @@ struct sctp_authkey_event {
#define SCTP_AUTH_NO_AUTH 0x0002
#define SCTP_AUTH_FREE_KEY 0x0003
-
struct sctp_sender_dry_event {
uint16_t sender_dry_type;
uint16_t sender_dry_flags;
@@ -469,7 +464,6 @@ struct sctp_sender_dry_event {
sctp_assoc_t sender_dry_assoc_id;
};
-
/*
* Stream reset event - subscribe to SCTP_STREAM_RESET_EVENT
*/
@@ -517,7 +511,6 @@ struct sctp_stream_change_event {
#define SCTP_STREAM_CHANGE_DENIED 0x0004
#define SCTP_STREAM_CHANGE_FAILED 0x0008
-
/* SCTP notification event */
struct sctp_tlv {
uint16_t sn_type;
@@ -1148,7 +1141,6 @@ struct sctpstat {
#define SCTP_STAT_DECR_COUNTER64(_x) SCTP_STAT_DECR(_x)
#define SCTP_STAT_DECR_GAUGE32(_x) SCTP_STAT_DECR(_x)
-
/***********************************/
/* And something for us old timers */
/***********************************/
@@ -1164,7 +1156,6 @@ struct sctpstat {
#endif
/***********************************/
-
struct xsctp_inpcb {
uint32_t last;
uint32_t flags;
diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index 728ba0b850d6..8f78956978d0 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/udp.h>
#include <sys/eventhandler.h>
-
extern const struct sctp_cc_functions sctp_cc_functions[];
extern const struct sctp_ss_functions sctp_ss_functions[];
@@ -411,7 +410,6 @@ SYSCTL_PROC(_net_inet_sctp, OID_AUTO, getcred,
0, 0, sctp_getcred, "S,ucred",
"Get the ucred of a SCTP connection");
-
#ifdef INET
static void
sctp_abort(struct socket *so)
@@ -574,12 +572,10 @@ sctp_must_try_again:
return;
}
-
int
sctp_sendm(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
struct mbuf *control, struct thread *p);
-
int
sctp_sendm(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
struct mbuf *control, struct thread *p)
@@ -855,7 +851,6 @@ sctp_flush(struct socket *so, int how)
so->so_snd.sb_cc = 0;
so->so_snd.sb_mbcnt = 0;
so->so_snd.sb_mb = NULL;
-
}
return (0);
}
@@ -1002,8 +997,6 @@ sctp_fill_user_address(struct sockaddr *dst, struct sockaddr *src)
return (0);
}
-
-
static size_t
sctp_fill_up_addresses_vrf(struct sctp_inpcb *inp,
struct sctp_tcb *stcb,
@@ -1433,7 +1426,6 @@ sctp_do_connect_x(struct socket *so, struct sctp_inpcb *inp, void *optval,
/* FIX ME: do we want to pass in a vrf on the connect call? */
vrf_id = inp->def_vrf_id;
-
/* We are GOOD to go */
stcb = sctp_aloc_assoc(inp, sa, &error, 0, vrf_id,
inp->sctp_ep.pre_open_stream_count,
@@ -1513,7 +1505,6 @@ out_now:
} \
}
-
#define SCTP_CHECK_AND_CAST(destp, srcp, type, size) {\
if (size < sizeof(type)) { \
SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); \
@@ -2630,7 +2621,6 @@ flags_out:
sstat->sstat_penddata = (stcb->asoc.cnt_on_reasm_queue +
stcb->asoc.cnt_on_all_streams);
-
sstat->sstat_instrms = stcb->asoc.streamincnt;
sstat->sstat_outstrms = stcb->asoc.streamoutcnt;
sstat->sstat_fragmentation_point = sctp_get_frag_point(stcb, &stcb->asoc);
@@ -4641,7 +4631,6 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
}
SCTP_INP_RUNLOCK(inp);
}
-
}
break;
}
@@ -5309,7 +5298,6 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
if ((stcb != NULL) && (net == NULL)) {
#ifdef INET
if (addr->sa_family == AF_INET) {
-
struct sockaddr_in *sin;
sin = (struct sockaddr_in *)addr;
@@ -6384,7 +6372,6 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
if ((stcb != NULL) && (net == NULL)) {
#ifdef INET
if (addr->sa_family == AF_INET) {
-
struct sockaddr_in *sin;
sin = (struct sockaddr_in *)addr;
@@ -6556,7 +6543,6 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
if ((stcb != NULL) && (net == NULL)) {
#ifdef INET
if (addr->sa_family == AF_INET) {
-
struct sockaddr_in *sin;
sin = (struct sockaddr_in *)addr;
diff --git a/sys/netinet/sctp_var.h b/sys/netinet/sctp_var.h
index b15721099e5a..ed01de7d7014 100644
--- a/sys/netinet/sctp_var.h
+++ b/sys/netinet/sctp_var.h
@@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$");
extern struct pr_usrreqs sctp_usrreqs;
-
#define sctp_feature_on(inp, feature) (inp->sctp_features |= feature)
#define sctp_feature_off(inp, feature) (inp->sctp_features &= ~feature)
#define sctp_is_feature_on(inp, feature) ((inp->sctp_features & feature) == feature)
@@ -182,7 +181,6 @@ extern struct pr_usrreqs sctp_usrreqs;
} \
}
-
#define sctp_free_remote_addr(__net) { \
if ((__net)) { \
if (SCTP_DECREMENT_AND_CHECK_REFCOUNT(&(__net)->ref_count)) { \
@@ -223,7 +221,6 @@ extern struct pr_usrreqs sctp_usrreqs;
atomic_add_int(&(sb)->sb_ctl,SCTP_BUF_LEN((m))); \
}
-
#define sctp_ucount_incr(val) { \
val++; \
}
@@ -323,7 +320,6 @@ struct sctp_inpcb;
struct sctp_tcb;
struct sctphdr;
-
void sctp_close(struct socket *so);
int sctp_disconnect(struct socket *so);
void sctp_ctlinput(int, struct sockaddr *, void *);
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index a4072561e81f..ed09e48d0aae 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -736,7 +736,6 @@ sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
stcb->asoc.total_flight, tot_out);
/* now corrective action */
TAILQ_FOREACH(lnet, &stcb->asoc.nets, sctp_next) {
-
tot_out = 0;
TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) {
if ((chk->whoTo == lnet) &&
@@ -1439,7 +1438,6 @@ sctp_expand_mapping_array(struct sctp_association *asoc, uint32_t needed)
return (0);
}
-
static void
sctp_iterator_work(struct sctp_iterator *it)
{
@@ -1620,7 +1618,6 @@ sctp_iterator_worker(void)
return;
}
-
static void
sctp_handle_addr_wq(void)
{
@@ -2924,7 +2921,6 @@ sctp_mtu_size_reset(struct sctp_inpcb *inp,
}
}
-
/*
* Given an association and starting time of the current RTT period, update
* RTO in number of msecs. net should point to the current network.
@@ -3089,8 +3085,6 @@ sctp_m_getptr(struct mbuf *m, int off, int len, uint8_t *in_ptr)
}
}
-
-
struct sctp_paramhdr *
sctp_get_next_param(struct mbuf *m,
int offset,
@@ -3102,7 +3096,6 @@ sctp_get_next_param(struct mbuf *m,
(uint8_t *)pull));
}
-
struct mbuf *
sctp_add_pad_tombuf(struct mbuf *m, int padlen)
{
@@ -3375,7 +3368,6 @@ sctp_notify_peer_addr_change(struct sctp_tcb *stcb, uint32_t state,
so_locked);
}
-
static void
sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error,
struct sctp_tmit_chunk *chk, int so_locked)
@@ -3507,7 +3499,6 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error,
so_locked);
}
-
static void
sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error,
struct sctp_stream_queue_pending *sp, int so_locked)
@@ -3604,8 +3595,6 @@ sctp_notify_send_failed2(struct sctp_tcb *stcb, uint32_t error,
&stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked);
}
-
-
static void
sctp_notify_adaptation_layer(struct sctp_tcb *stcb)
{
@@ -3822,7 +3811,6 @@ sctp_notify_sender_dry_event(struct sctp_tcb *stcb,
&stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, so_locked);
}
-
void
sctp_notify_stream_reset_add(struct sctp_tcb *stcb, uint16_t numberin, uint16_t numberout, int flag)
{
@@ -3929,8 +3917,6 @@ sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, uint32_t sending_tsn, uint32
&stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED);
}
-
-
static void
sctp_notify_stream_reset(struct sctp_tcb *stcb,
int number_entries, uint16_t *list, int flag)
@@ -3995,7 +3981,6 @@ sctp_notify_stream_reset(struct sctp_tcb *stcb,
&stcb->sctp_socket->so_rcv, 1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED);
}
-
static void
sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, struct sctp_error_chunk *chunk)
{
@@ -4061,7 +4046,6 @@ sctp_notify_remote_error(struct sctp_tcb *stcb, uint16_t error, struct sctp_erro
}
}
-
void
sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb,
uint32_t error, void *data, int so_locked)
@@ -5014,7 +4998,6 @@ sctp_free_bufspace(struct sctp_tcb *stcb, struct sctp_association *asoc,
stcb->sctp_socket->so_snd.sb_cc -= tp1->book_size;
} else {
stcb->sctp_socket->so_snd.sb_cc = 0;
-
}
}
}
@@ -5556,7 +5539,6 @@ sctp_sorecvmsg(struct socket *so,
rwnd_req, block_allowed, so->so_rcv.sb_cc, (uint32_t)uio->uio_resid);
}
-
error = sblock(&so->so_rcv, (block_allowed ? SBL_WAIT : 0));
if (error) {
goto release_unlocked;
@@ -6433,7 +6415,6 @@ stage_left:
return (error);
}
-
#ifdef SCTP_MBUF_LOGGING
struct mbuf *
sctp_m_free(struct mbuf *m)
@@ -6500,7 +6481,6 @@ sctp_dynamic_set_primary(struct sockaddr *sa, uint32_t vrf_id)
return (0);
}
-
int
sctp_soreceive(struct socket *so,
struct sockaddr **psa,
@@ -6572,10 +6552,6 @@ sctp_soreceive(struct socket *so,
return (error);
}
-
-
-
-
int
sctp_connectx_helper_add(struct sctp_tcb *stcb, struct sockaddr *addr,
int totaddr, int *error)
diff --git a/sys/netinet/sctputil.h b/sys/netinet/sctputil.h
index 7a6d3b8e5b9b..2e054c9d37e3 100644
--- a/sys/netinet/sctputil.h
+++ b/sys/netinet/sctputil.h
@@ -62,7 +62,6 @@ void
#define sctp_get_associd(stcb) ((sctp_assoc_t)stcb->asoc.assoc_id)
-
/*
* Function prototypes
*/
@@ -158,7 +157,6 @@ sctp_pull_off_control_to_new_inp(struct sctp_inpcb *old_inp,
struct sctp_inpcb *new_inp,
struct sctp_tcb *stcb, int waitflags);
-
void sctp_stop_timers_for_shutdown(struct sctp_tcb *);
/* Stop all timers for association and remote addresses. */
@@ -180,7 +178,6 @@ sctp_abort_association(struct sctp_inpcb *, struct sctp_tcb *, struct mbuf *,
uint8_t, uint32_t,
uint32_t, uint16_t);
-
/* We choose to abort via user input */
void
sctp_abort_an_association(struct sctp_inpcb *, struct sctp_tcb *,
@@ -324,7 +321,6 @@ void sctp_log_strm_del_alt(struct sctp_tcb *stcb, uint32_t, uint16_t, uint16_t,
void sctp_log_nagle_event(struct sctp_tcb *stcb, int action);
-
#ifdef SCTP_MBUF_LOGGING
void
sctp_log_mb(struct mbuf *m, int from);
@@ -358,7 +354,6 @@ void sctp_log_map(uint32_t, uint32_t, uint32_t, int);
void sctp_print_mapping_array(struct sctp_association *asoc);
void sctp_clr_stat_log(void);
-
#ifdef SCTP_AUDITING_ENABLED
void
sctp_auditing(int, struct sctp_inpcb *, struct sctp_tcb *,
diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c
index a8bda27073b3..2a6bf5e71151 100644
--- a/sys/netinet/siftr.c
+++ b/sys/netinet/siftr.c
@@ -295,7 +295,6 @@ static char direction[2] = {'i','o'};
static int siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS);
static int siftr_sysctl_logfile_name_handler(SYSCTL_HANDLER_ARGS);
-
/* Declare the net.inet.siftr sysctl tree and populate it. */
SYSCTL_DECL(_net_inet_siftr);
@@ -331,7 +330,6 @@ SYSCTL_UINT(_net_inet_siftr, OID_AUTO, binary, CTLFLAG_RW,
"write log files in binary instead of ascii");
*/
-
/* Begin functions. */
static void
@@ -560,7 +558,6 @@ siftr_process_pkt(struct pkt_node * pkt_node)
alq_post_flags(siftr_alq, log_buf, 0);
}
-
static void
siftr_pkt_manager_thread(void *arg)
{
@@ -638,7 +635,6 @@ siftr_pkt_manager_thread(void *arg)
kthread_exit();
}
-
static uint32_t
hash_pkt(struct mbuf *m, uint32_t offset)
{
@@ -669,7 +665,6 @@ hash_pkt(struct mbuf *m, uint32_t offset)
return (hash);
}
-
/*
* Check if a given mbuf has the SIFTR mbuf tag. If it does, log the fact that
* it's a reinjected packet and return. If it doesn't, tag the mbuf and return.
@@ -704,7 +699,6 @@ siftr_chkreinject(struct mbuf *m, int dir, struct siftr_stats *ss)
return (0);
}
-
/*
* Look up an inpcb for a packet. Return the inpcb pointer if found, or NULL
* otherwise.
@@ -759,7 +753,6 @@ siftr_findinpcb(int ipver, struct ip *ip, struct mbuf *m, uint16_t sport,
return (inp);
}
-
static inline void
siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp,
int ipver, int dir, int inp_locally_locked)
@@ -825,7 +818,6 @@ siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp,
}
-
/*
* pfil hook that is called for each IPv4 packet making its way through the
* stack in either direction.
@@ -1014,7 +1006,6 @@ ret:
return (PFIL_PASS);
}
-
#ifdef SIFTR_IPV6
static int
siftr_chkpkt6(struct mbuf **m, struct ifnet *ifp, int flags, struct inpcb *inp)
@@ -1197,7 +1188,6 @@ siftr_pfil(int action)
return (0);
}
-
static int
siftr_sysctl_logfile_name_handler(SYSCTL_HANDLER_ARGS)
{
@@ -1481,7 +1471,6 @@ siftr_manage_ops(uint8_t action)
return (error);
}
-
static int
siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS)
{
@@ -1505,7 +1494,6 @@ siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS)
return (error);
}
-
static void
siftr_shutdown_handler(void *arg)
{
@@ -1514,7 +1502,6 @@ siftr_shutdown_handler(void *arg)
}
}
-
/*
* Module is being unloaded or machine is shutting down. Take care of cleanup.
*/
@@ -1530,7 +1517,6 @@ deinit_siftr(void)
return (0);
}
-
/*
* Module has just been loaded into the kernel.
*/
@@ -1555,7 +1541,6 @@ init_siftr(void)
return (0);
}
-
/*
* This is the function that is called to load and unload the module.
* When the module is loaded, this function is called once with
@@ -1594,7 +1579,6 @@ siftr_load_handler(module_t mod, int what, void *arg)
return (ret);
}
-
static moduledata_t siftr_mod = {
.name = "siftr",
.evhand = siftr_load_handler,
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h
index 5dc13eca217d..0a5226836f0f 100644
--- a/sys/netinet/tcp.h
+++ b/sys/netinet/tcp.h
@@ -107,7 +107,6 @@ struct tcphdr {
#define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at receiver side */
#define TCP_MAX_SACK 4 /* MAX # SACKs sent in any segment */
-
/*
* The default maximum segment size (MSS) to be used for new TCP connections
* when path MTU discovery is not enabled.
@@ -282,7 +281,6 @@ struct tcphdr {
#define TCP_SHARED_CWND_TIME_LIMIT 1128 /* we should limit to low time values the scwnd life */
#define TCP_RACK_PROFILE 1129 /* Select a profile that sets multiple options */
-
/* Start of reserved space for third-party user-settable options. */
#define TCP_VENDOR SO_VENDOR
diff --git a/sys/netinet/tcp_fastopen.c b/sys/netinet/tcp_fastopen.c
index dc46bf1cb96a..9b6334529513 100644
--- a/sys/netinet/tcp_fastopen.c
+++ b/sys/netinet/tcp_fastopen.c
@@ -191,7 +191,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/tcp_var.h>
#include <netinet/tcp_fastopen.h>
-
#define TCP_FASTOPEN_KEY_LEN SIPHASH_KEY_LENGTH
#if TCP_FASTOPEN_PSK_LEN != TCP_FASTOPEN_KEY_LEN
@@ -382,7 +381,6 @@ VNET_DEFINE_STATIC(struct tcp_fastopen_ccache, tcp_fastopen_ccache);
#define CCB_UNLOCK(ccb) mtx_unlock(&(ccb)->ccb_mtx)
#define CCB_LOCK_ASSERT(ccb) mtx_assert(&(ccb)->ccb_mtx, MA_OWNED)
-
void
tcp_fastopen_init(void)
{
@@ -533,7 +531,6 @@ tcp_fastopen_autokey_callout(void *arg)
CURVNET_RESTORE();
}
-
static uint64_t
tcp_fastopen_make_cookie(uint8_t key[SIPHASH_KEY_LENGTH], struct in_conninfo *inc)
{
@@ -824,7 +821,6 @@ sysctl_net_inet_tcp_fastopen_ccache_bucket_limit(SYSCTL_HANDLER_ARGS)
}
V_tcp_fastopen_ccache.bucket_limit = new;
}
-
}
return (error);
}
@@ -1223,4 +1219,3 @@ sysctl_net_inet_tcp_fastopen_ccache_list(SYSCTL_HANDLER_ARGS)
sbuf_delete(&sb);
return (error);
}
-
diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c
index 5196b6a92d8c..fd8b66b9ccdb 100644
--- a/sys/netinet/tcp_hpts.c
+++ b/sys/netinet/tcp_hpts.c
@@ -187,7 +187,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/tcp_offload.h>
#endif
-
MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts");
#ifdef RSS
static int tcp_bind_threads = 1;
@@ -246,7 +245,6 @@ counter_u64_t hpts_loops;
SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, loops, CTLFLAG_RD,
&hpts_loops, "Number of times hpts had to loop to catch up");
-
counter_u64_t back_tosleep;
SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, no_tcbsfound, CTLFLAG_RD,
@@ -280,7 +278,6 @@ SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, loopmax, CTLFLAG_RW,
static uint32_t hpts_sleep_max = HPTS_MAX_SLEEP_ALLOWED;
-
static int
sysctl_net_inet_tcp_hpts_max_sleep(SYSCTL_HANDLER_ARGS)
{
diff --git a/sys/netinet/tcp_hpts.h b/sys/netinet/tcp_hpts.h
index 8599a4393517..772a7ec67202 100644
--- a/sys/netinet/tcp_hpts.h
+++ b/sys/netinet/tcp_hpts.h
@@ -51,7 +51,6 @@ TAILQ_HEAD(hptsh, inpcb);
#define HPTS_MSEC_IN_SEC 1000
#define HPTS_USEC_IN_MSEC 1000
-
struct hpts_diag {
uint32_t p_hpts_active; /* bbr->flex7 x */
uint32_t p_nxt_slot; /* bbr->flex1 x */
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 6d7915657019..9192e52b9285 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -590,7 +590,6 @@ tcp6_input(struct mbuf **mp, int *offp, int proto)
ip6 = mtod(m, struct ip6_hdr *);
ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */);
if (ia6 && (ia6->ia6_flags & IN6_IFF_ANYCAST)) {
-
ifa_free(&ia6->ia_ifa);
icmp6_error(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADDR,
(caddr_t)&ip6->ip6_dst - (caddr_t)ip6);
@@ -659,7 +658,6 @@ tcp_input(struct mbuf **mp, int *offp, int proto)
#ifdef INET6
if (isipv6) {
-
ip6 = mtod(m, struct ip6_hdr *);
th = (struct tcphdr *)((caddr_t)ip6 + off0);
tlen = sizeof(*ip6) + ntohs(ip6->ip6_plen) - off0;
@@ -1066,7 +1064,6 @@ findpcb:
* socket appended to the listen queue in SYN_RECEIVED state.
*/
if ((thflags & (TH_RST|TH_ACK|TH_SYN)) == TH_ACK) {
-
/*
* Parse the TCP options here because
* syncookies need access to the reflected
@@ -1710,7 +1707,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
SEGQ_EMPTY(tp) &&
((to.to_flags & TOF_TS) == 0 ||
TSTMP_GEQ(to.to_tsval, tp->ts_recent)) ) {
-
/*
* If last ACK falls within this segment's sequence numbers,
* record the timestamp.
@@ -1910,7 +1906,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
tp->rcv_wnd = imax(win, (int)(tp->rcv_adv - tp->rcv_nxt));
switch (tp->t_state) {
-
/*
* If the state is SYN_RECEIVED:
* if seg contains an ACK, but not for our SYN/ACK, send a RST.
@@ -2117,7 +2112,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
if ((SEQ_GEQ(th->th_seq, tp->last_ack_sent) &&
SEQ_LT(th->th_seq, tp->last_ack_sent + tp->rcv_wnd)) ||
(tp->rcv_wnd == 0 && tp->last_ack_sent == th->th_seq)) {
-
KASSERT(tp->t_state != TCPS_SYN_SENT,
("%s: TH_RST for TCPS_SYN_SENT th %p tp %p",
__func__, th, tp));
@@ -2182,7 +2176,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
*/
if ((to.to_flags & TOF_TS) != 0 && tp->ts_recent &&
TSTMP_LT(to.to_tsval, tp->ts_recent)) {
-
/* Check to see if ts_recent is over 24 days old. */
if (tcp_ts_getticks() - tp->ts_recent_age > TCP_PAWS_IDLE) {
/*
@@ -2374,7 +2367,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
* Ack processing.
*/
switch (tp->t_state) {
-
/*
* In SYN_RECEIVED state, the ack ACKs our SYN, so enter
* ESTABLISHED state and continue processing.
@@ -2847,7 +2839,6 @@ process_ACK:
tp->snd_nxt = tp->snd_una;
switch (tp->t_state) {
-
/*
* In FIN_WAIT_1 STATE in addition to the processing
* for the ESTABLISHED state if our FIN is now acknowledged
@@ -3130,7 +3121,6 @@ dodata: /* XXX */
tp->rcv_nxt++;
}
switch (tp->t_state) {
-
/*
* In SYN_RECEIVED and ESTABLISHED STATES
* enter the CLOSE_WAIT state.
@@ -3816,7 +3806,6 @@ tcp_mssopt(struct in_conninfo *inc)
return (mss);
}
-
/*
* On a partial ack arrives, force the retransmission of the
* next unacknowledged segment. Do not clear tp->t_dupacks.
diff --git a/sys/netinet/tcp_log_buf.c b/sys/netinet/tcp_log_buf.c
index 3213271b9689..0e0b6a35013b 100644
--- a/sys/netinet/tcp_log_buf.c
+++ b/sys/netinet/tcp_log_buf.c
@@ -1192,7 +1192,6 @@ tcp_log_tcpcbinit(struct tcpcb *tp)
}
}
-
/* Remove entries */
static void
tcp_log_expire(void *unused __unused)
@@ -2339,7 +2338,6 @@ tcp_log_dump_node_logbuf(struct tcp_log_id_node *tln, char *reason, int how)
return (0);
}
-
/*
* Queue the log buffers for all sessions in a bucket for transmissions via
* the log buffer facility.
@@ -2577,7 +2575,6 @@ done:
}
#undef LOCAL_SAVE
-
/*
* Queue the log buffers for all sessions in a bucket for transmissions via
* the log buffer facility.
@@ -2639,4 +2636,3 @@ tcp_log_flowend(struct tcpcb *tp)
TCP_LOG_FLOWEND, 0, 0, NULL, false);
}
}
-
diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h
index 29598ba36284..0d9b14a08f53 100644
--- a/sys/netinet/tcp_log_buf.h
+++ b/sys/netinet/tcp_log_buf.h
@@ -347,7 +347,6 @@ struct tcp_log_dev_log_queue {
NULL, NULL, 0, tv); \
} while (0)
-
#ifdef TCP_BLACKBOX
extern bool tcp_log_verbose;
void tcp_log_drain(struct tcpcb *tp);
diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c
index fcd0c36ad83c..baa2fe522e90 100644
--- a/sys/netinet/tcp_lro.c
+++ b/sys/netinet/tcp_lro.c
@@ -1424,7 +1424,6 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb)
/* check if packet is not LRO capable */
if (__predict_false(mb->m_pkthdr.csum_flags == 0 ||
(lc->ifp->if_capenable & IFCAP_LRO) == 0)) {
-
/* input packet to network layer */
(*lc->ifp->if_input) (lc->ifp, mb);
return;
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 38e3e3fdc2be..2485651df6e7 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -1901,7 +1901,6 @@ tcp_m_copym(struct mbuf *m, int32_t off0, int32_t *plen,
uint32_t mlen, frags;
bool copyhdr;
-
KASSERT(off >= 0, ("tcp_m_copym, negative off %d", off));
KASSERT(len >= 0, ("tcp_m_copym, negative len %d", len));
if (off == 0 && m->m_flags & M_PKTHDR)
diff --git a/sys/netinet/tcp_ratelimit.c b/sys/netinet/tcp_ratelimit.c
index da4f109ba859..0ca2aad26324 100644
--- a/sys/netinet/tcp_ratelimit.c
+++ b/sys/netinet/tcp_ratelimit.c
@@ -917,7 +917,6 @@ tcp_find_suitable_rate(const struct tcp_rate_set *rs, uint64_t bytes_per_sec, ui
int i, matched;
struct tcp_hwrate_limit_table *rte = NULL;
-
if ((rs->rs_flags & RS_INT_TBL) &&
(rs->rs_rate_cnt >= ALL_HARDWARE_RATES)) {
/*
@@ -1265,7 +1264,6 @@ tcp_chg_pacing_rate(const struct tcp_hwrate_limit_table *crte,
int is_indirect = 0;
int err;
-
if ((tp->t_inpcb->inp_snd_tag == NULL) ||
(crte == NULL)) {
/* Wrong interface */
@@ -1366,7 +1364,6 @@ tcp_rel_pacing_rate(const struct tcp_hwrate_limit_table *crte, struct tcpcb *tp)
#define FIVE_HUNDRED_MBPS 62500000 /* 500Mbps in bytes per second */
#define MAX_MSS_SENT 43 /* 43 mss = 43 x 1500 = 64,500 bytes */
-
uint32_t
tcp_get_pacing_burst_size (uint64_t bw, uint32_t segsiz, int can_use_1mss,
const struct tcp_hwrate_limit_table *te, int *err)
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 757a9daf42fa..d57cb4318a94 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -106,7 +106,6 @@ static SYSCTL_NODE(_net_inet_tcp_reass, OID_AUTO, stats,
CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"TCP Segment Reassembly stats");
-
static int tcp_reass_maxseg = 0;
SYSCTL_INT(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN,
&tcp_reass_maxseg, 0,
@@ -512,7 +511,6 @@ tcp_reass_overhead_of_chain(struct mbuf *m, struct mbuf **mlast)
return (len);
}
-
/*
* NOTE!!! the new tcp-reassembly code *must not* use
* m_adj() with a negative index. That alters the chain
diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c
index b7879269966d..514a1324594a 100644
--- a/sys/netinet/tcp_sack.c
+++ b/sys/netinet/tcp_sack.c
@@ -150,7 +150,6 @@ SYSCTL_INT(_net_inet_tcp_sack, OID_AUTO, globalholes, CTLFLAG_VNET | CTLFLAG_RD,
&VNET_NAME(tcp_sack_globalholes), 0,
"Global number of TCP SACK holes currently allocated");
-
/*
* This function will find overlaps with the currently stored sackblocks
* and add any overlap as a dsack block upfront
diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 3d89dd1b8efb..e90ec4828100 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -160,7 +160,6 @@ static int32_t bbr_hardware_pacing_limit = 8000;
static int32_t bbr_quanta = 3; /* How much extra quanta do we get? */
static int32_t bbr_no_retran = 0;
-
static int32_t bbr_error_base_paceout = 10000; /* usec to pace */
static int32_t bbr_max_net_error_cnt = 10;
/* Should the following be dynamic too -- loss wise */
@@ -218,7 +217,6 @@ static int32_t bbr_target_cwnd_mult_limit = 8;
*/
static int32_t bbr_cwnd_min_val = BBR_PROBERTT_NUM_MSS;
-
static int32_t bbr_cwnd_min_val_hs = BBR_HIGHSPEED_NUM_MSS;
static int32_t bbr_gain_to_target = 1;
@@ -516,7 +514,6 @@ static void
static void
bbr_timer_cancel(struct tcp_bbr *bbr, int32_t line, uint32_t cts);
-
static void
bbr_log_pacing_delay_calc(struct tcp_bbr *bbr, uint16_t gain, uint32_t len,
uint32_t cts, uint32_t usecs, uint64_t bw, uint32_t override, int mod);
@@ -1128,8 +1125,6 @@ bbr_calc_time(uint32_t cts, uint32_t earlier_time) {
return (cts - earlier_time);
}
-
-
static int
sysctl_bbr_clear_lost(SYSCTL_HANDLER_ARGS)
{
@@ -1806,7 +1801,6 @@ bbr_init_sysctls(void)
&bbr_nohdwr_pacing_enobuf,
"Total number of enobufs for non-hardware paced flows");
-
bbr_flows_whdwr_pacing = counter_u64_alloc(M_WAITOK);
SYSCTL_ADD_COUNTER_U64(&bbr_sysctl_ctx,
SYSCTL_CHILDREN(bbr_sysctl_root),
@@ -1933,8 +1927,6 @@ bbr_log_type_rwnd_collapse(struct tcp_bbr *bbr, int seq, int mode, uint32_t coun
}
}
-
-
static void
bbr_log_type_just_return(struct tcp_bbr *bbr, uint32_t cts, uint32_t tlen, uint8_t hpts_calling,
uint8_t reason, uint32_t p_maxseg, int len)
@@ -1961,7 +1953,6 @@ bbr_log_type_just_return(struct tcp_bbr *bbr, uint32_t cts, uint32_t tlen, uint8
}
}
-
static void
bbr_log_type_enter_rec(struct tcp_bbr *bbr, uint32_t seq)
{
@@ -2569,7 +2560,6 @@ bbr_log_to_cancel(struct tcp_bbr *bbr, int32_t line, uint32_t cts, uint8_t hpts_
}
}
-
static void
bbr_log_tstmp_validation(struct tcp_bbr *bbr, uint64_t peer_delta, uint64_t delta)
{
@@ -2589,7 +2579,6 @@ bbr_log_tstmp_validation(struct tcp_bbr *bbr, uint64_t peer_delta, uint64_t delt
&bbr->rc_inp->inp_socket->so_snd,
BBR_LOG_TSTMP_VAL, 0,
0, &log, false, &bbr->rc_tv);
-
}
}
@@ -2680,7 +2669,6 @@ bbr_log_type_bbrupd(struct tcp_bbr *bbr, uint8_t flex8, uint32_t cts,
}
}
-
static void
bbr_log_type_ltbw(struct tcp_bbr *bbr, uint32_t cts, int32_t reason,
uint32_t newbw, uint32_t obw, uint32_t diff,
@@ -2916,7 +2904,6 @@ bbr_set_epoch(struct tcp_bbr *bbr, uint32_t cts, int32_t line)
bbr->r_ctl.rc_rcv_epoch_start = cts;
}
-
static inline void
bbr_isit_a_pkt_epoch(struct tcp_bbr *bbr, uint32_t cts, struct bbr_sendmap *rsm, int32_t line, int32_t cum_acked)
{
@@ -3333,7 +3320,6 @@ bbr_alloc_full_limit(struct tcp_bbr *bbr)
return (bbr_alloc(bbr));
}
-
/* wrapper to allocate a sendmap entry, subject to a specific limit */
static struct bbr_sendmap *
bbr_alloc_limit(struct tcp_bbr *bbr, uint8_t limit_type)
@@ -3540,7 +3526,6 @@ bbr_get_header_oh(struct tcp_bbr *bbr)
return(seg_oh);
}
-
static uint32_t
bbr_get_pacing_length(struct tcp_bbr *bbr, uint16_t gain, uint32_t useconds_time, uint64_t bw)
{
@@ -4299,7 +4284,6 @@ bbr_is_lost(struct tcp_bbr *bbr, struct bbr_sendmap *rsm, uint32_t cts)
{
uint32_t thresh;
-
thresh = bbr_calc_thresh_rack(bbr, bbr_get_rtt(bbr, BBR_RTT_RACK),
cts, rsm);
if ((cts - rsm->r_tim_lastsent[(rsm->r_rtr_cnt - 1)]) >= thresh) {
@@ -5085,7 +5069,6 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts)
(V_tcp_pmtud_blackhole_detect == 3 && isipv6)) &&
((tp->t_state == TCPS_ESTABLISHED) ||
(tp->t_state == TCPS_FIN_WAIT_1))) {
-
/*
* Idea here is that at each stage of mtu probe (usually,
* 1448 -> 1188 -> 524) should be given 2 chances to recover
@@ -6154,7 +6137,6 @@ bbr_collapse_rtt(struct tcpcb *tp, struct tcp_bbr *bbr, int32_t rtt)
tp->t_softerror = 0;
}
-
static void
tcp_bbr_xmit_timer(struct tcp_bbr *bbr, uint32_t rtt_usecs, uint32_t rsm_send_time, uint32_t r_start, uint32_t tsin)
{
@@ -6301,7 +6283,6 @@ tcp_bbr_xmit_timer_commit(struct tcp_bbr *bbr, struct tcpcb *tp, uint32_t cts)
uint32_t rtt, tsin;
int32_t rtt_ticks;
-
if (bbr->rtt_valid == 0)
/* No valid sample */
return;
@@ -6507,7 +6488,6 @@ bbr_earlier_retran(struct tcpcb *tp, struct tcp_bbr *bbr, struct bbr_sendmap *rs
BBR_STAT_ADD(bbr_badfr_bytes, (rsm->r_end - rsm->r_start));
}
-
static void
bbr_set_reduced_rtt(struct tcp_bbr *bbr, uint32_t cts, uint32_t line)
{
@@ -6762,7 +6742,6 @@ bbr_google_measurement(struct tcp_bbr *bbr, struct bbr_sendmap *rsm, uint32_t rt
}
}
-
static void
bbr_update_bbr_info(struct tcp_bbr *bbr, struct bbr_sendmap *rsm, uint32_t rtt, uint32_t cts, uint32_t tsin,
uint32_t uts, int32_t match, uint32_t rsm_send_time, int32_t ack_type, struct tcpopt *to)
@@ -6911,7 +6890,6 @@ bbr_update_rtt(struct tcpcb *tp, struct tcp_bbr *bbr,
(ack_type == BBR_CUM_ACKED) &&
(to->to_flags & TOF_TS) &&
(to->to_tsecr != 0)) {
-
t = tcp_tv_to_mssectick(&bbr->rc_tv) - to->to_tsecr;
if (t < 1)
t = 1;
@@ -7308,7 +7286,6 @@ out:
return (changed);
}
-
static void inline
bbr_peer_reneges(struct tcp_bbr *bbr, struct bbr_sendmap *rsm, tcp_seq th_ack)
{
@@ -7481,7 +7458,6 @@ bbr_log_ack(struct tcpcb *tp, struct tcpopt *to, struct tcphdr *th,
bbr->r_wanted_output = 1;
more:
if (rsm == NULL) {
-
if (tp->t_flags & TF_SENTFIN) {
/* if we send a FIN we will not hav a map */
goto proc_sack;
@@ -8455,7 +8431,6 @@ bbr_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so,
tp->rcv_nxt++;
}
switch (tp->t_state) {
-
/*
* In SYN_RECEIVED and ESTABLISHED STATES enter the
* CLOSE_WAIT state.
@@ -9194,7 +9169,6 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so,
if (thflags & TH_ACK)
bbr_log_syn(tp, to);
if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) {
-
tcp_fastopen_decrement_counter(tp->t_tfo_pending);
tp->t_tfo_pending = NULL;
}
@@ -9876,7 +9850,6 @@ bbr_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so,
tiwin, thflags, nxt_pkt));
}
-
/*
* Return value of 1, the TCB is unlocked and most
* likely gone, return value of 0, the TCB is still
@@ -10420,7 +10393,6 @@ bbr_substate_change(struct tcp_bbr *bbr, uint32_t cts, int32_t line, int dolog)
*/
int32_t old_state, old_gain;
-
old_state = bbr_state_val(bbr);
old_gain = bbr->r_ctl.rc_bbr_hptsi_gain;
if (bbr_state_val(bbr) == BBR_SUB_LEVEL1) {
@@ -11011,7 +10983,6 @@ bbr_should_enter_probe_rtt(struct tcp_bbr *bbr, uint32_t cts)
return (0);
}
-
static int32_t
bbr_google_startup(struct tcp_bbr *bbr, uint32_t cts, int32_t pkt_epoch)
{
@@ -11204,7 +11175,6 @@ bbr_state_change(struct tcp_bbr *bbr, uint32_t cts, int32_t epoch, int32_t pkt_e
bbr->rc_filled_pipe = 1;
bbr->r_ctl.bbr_lost_at_state = bbr->r_ctl.rc_lost;
if (SEQ_GT(cts, bbr->r_ctl.rc_bbr_state_time)) {
-
time_in = cts - bbr->r_ctl.rc_bbr_state_time;
counter_u64_add(bbr_state_time[bbr->rc_bbr_state], time_in);
} else
diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 5e9a568bd6ba..e18528a4463d 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -259,7 +259,6 @@ static int32_t rack_probertt_clear_is = 1;
static int32_t rack_max_drain_hbp = 1; /* Extra drain times gpsrtt for highly buffered paths */
static int32_t rack_hbp_thresh = 3; /* what is the divisor max_rtt/min_rtt to decided a hbp */
-
/* Part of pacing */
static int32_t rack_max_per_above = 30; /* When we go to increment stop if above 100+this% */
@@ -501,7 +500,6 @@ static void
int32_t rack_clear_counter=0;
-
static int
sysctl_rack_clear(SYSCTL_HANDLER_ARGS)
{
@@ -568,14 +566,11 @@ sysctl_rack_clear(SYSCTL_HANDLER_ARGS)
counter_u64_zero(rack_tlp_does_nada);
counter_u64_zero(rack_try_scwnd);
counter_u64_zero(rack_collapsed_win);
-
}
rack_clear_counter = 0;
return (0);
}
-
-
static void
rack_init_sysctls(void)
{
@@ -1671,8 +1666,6 @@ rack_log_retran_reason(struct tcp_rack *rack, struct rack_sendmap *rsm, uint32_t
}
}
-
-
static void
rack_log_to_start(struct tcp_rack *rack, uint32_t cts, uint32_t to, int32_t slot, uint8_t which)
{
@@ -1768,7 +1761,6 @@ rack_log_rtt_upd(struct tcpcb *tp, struct tcp_rack *rack, uint32_t t, uint32_t l
log.u_bbr.lost = rsm->r_end;
log.u_bbr.cwnd_gain = rsm->r_rtr_cnt;
} else {
-
/* Its a SYN */
log.u_bbr.pkt_epoch = rack->rc_tp->iss;
log.u_bbr.lost = 0;
@@ -1833,7 +1825,6 @@ rack_log_rtt_sample(struct tcp_rack *rack, uint32_t rtt)
}
}
-
static inline void
rack_log_progress_event(struct tcp_rack *rack, struct tcpcb *tp, uint32_t tick, int event, int line)
{
@@ -2414,7 +2405,6 @@ rack_enough_for_measurement(struct tcpcb *tp, struct tcp_rack *rack, tcp_seq th_
return (0);
}
-
static void
rack_log_timely(struct tcp_rack *rack,
uint32_t logged, uint64_t cur_bw, uint64_t low_bnd,
@@ -2711,7 +2701,6 @@ rack_decrease_highrtt(struct tcp_rack *rack, uint32_t curper, uint32_t rtt)
return (perf);
}
-
static void
rack_decrease_bw_mul(struct tcp_rack *rack, int timely_says, uint32_t rtt, int32_t rtt_diff)
{
@@ -3301,7 +3290,6 @@ rack_update_multiplier(struct tcp_rack *rack, int32_t timely_says, uint64_t last
/* Log it stays the same */
rack_log_timely(rack, 0, last_bw_est, low_bnd, 0,
__LINE__, 11);
-
}
rack->rc_gp_timely_dec_cnt++;
/* We are not incrementing really no-count */
@@ -3354,7 +3342,6 @@ rack_update_multiplier(struct tcp_rack *rack, int32_t timely_says, uint64_t last
/* Log it stays the same */
rack_log_timely(rack, 0, last_bw_est, up_bnd, 0,
__LINE__, 12);
-
}
return;
} else {
@@ -3966,7 +3953,6 @@ rack_post_recovery(struct tcpcb *tp, struct tcphdr *th)
struct tcp_rack *rack;
uint32_t orig_cwnd;
-
orig_cwnd = tp->snd_cwnd;
INP_WLOCK_ASSERT(tp->t_inpcb);
rack = (struct tcp_rack *)tp->t_fb_ptr;
@@ -4102,8 +4088,6 @@ rack_cong_signal(struct tcpcb *tp, struct tcphdr *th, uint32_t type)
}
}
-
-
static inline void
rack_cc_after_idle(struct tcp_rack *rack, struct tcpcb *tp)
{
@@ -4134,7 +4118,6 @@ rack_cc_after_idle(struct tcp_rack *rack, struct tcpcb *tp)
}
}
-
/*
* Indicate whether this ack should be delayed. We can delay the ack if
* following conditions are met:
@@ -4193,7 +4176,6 @@ rack_find_high_nonack(struct tcp_rack *rack, struct rack_sendmap *rsm)
return (NULL);
}
-
static uint32_t
rack_calc_thresh_rack(struct tcp_rack *rack, uint32_t srtt, uint32_t cts)
{
@@ -4697,7 +4679,6 @@ rack_exit_persist(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts)
rack_exit_probertt(rack, us_cts);
}
}
-
}
rack->rc_in_persist = 0;
rack->r_ctl.rc_went_idle_time = 0;
@@ -4811,7 +4792,6 @@ rack_start_hpts_timer(struct tcp_rack *rack, struct tcpcb *tp, uint32_t cts,
slot = HPTS_TICKS_PER_USEC;
}
} else {
-
slot -= rack->r_ctl.rc_agg_delayed;
rack->r_ctl.rc_agg_delayed = 0;
/* Make sure we have 100 useconds at minimum */
@@ -5295,7 +5275,6 @@ need_retran:
*/
struct rack_sendmap *nrsm;
-
nrsm = rack_alloc_full_limit(rack);
if (nrsm == NULL) {
/*
@@ -5569,7 +5548,6 @@ rack_cc_conn_init(struct tcpcb *tp)
{
struct tcp_rack *rack;
-
rack = (struct tcp_rack *)tp->t_fb_ptr;
cc_conn_init(tp);
/*
@@ -5699,7 +5677,6 @@ rack_timeout_rxt(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts)
(V_tcp_pmtud_blackhole_detect == 3 && isipv6)) &&
((tp->t_state == TCPS_ESTABLISHED) ||
(tp->t_state == TCPS_FIN_WAIT_1))) {
-
/*
* Idea here is that at each stage of mtu probe (usually,
* 1448 -> 1188 -> 524) should be given 2 chances to recover
@@ -5894,7 +5871,6 @@ rack_timer_cancel(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts, int lin
uint32_t us_cts, flags_on_entry;
uint8_t hpts_removed = 0;
-
flags_on_entry = rack->r_ctl.rc_hpts_flags;
us_cts = tcp_get_usecs(&tv);
if ((rack->r_ctl.rc_hpts_flags & PACE_PKT_OUTPUT) &&
@@ -6008,7 +5984,6 @@ rack_update_rsm(struct tcpcb *tp, struct tcp_rack *rack,
}
}
-
static uint32_t
rack_update_entry(struct tcpcb *tp, struct tcp_rack *rack,
struct rack_sendmap *rsm, uint32_t ts, int32_t *lenp)
@@ -6081,7 +6056,6 @@ rack_update_entry(struct tcpcb *tp, struct tcp_rack *rack,
return (0);
}
-
static void
rack_log_output(struct tcpcb *tp, struct tcpopt *to, int32_t len,
uint32_t seq_out, uint8_t th_flags, int32_t err, uint32_t ts,
@@ -6392,7 +6366,6 @@ tcp_rack_xmit_timer(struct tcp_rack *rack, int32_t rtt, uint32_t len, uint32_t u
rack->r_ctl.rack_rs.confidence = confidence;
rack->r_ctl.rack_rs.rs_us_rtrcnt = rtrcnt;
}
-
}
rack_log_rtt_upd(rack->rc_tp, rack, us_rtt, len, rsm, confidence);
rack->r_ctl.rack_rs.rs_flags = RACK_RTT_VALID;
@@ -7487,7 +7460,6 @@ rack_log_ack(struct tcpcb *tp, struct tcpopt *to, struct tcphdr *th)
int loop_start = 0, moved_two = 0;
uint32_t tsused;
-
INP_WLOCK_ASSERT(tp->t_inpcb);
if (th->th_flags & TH_RST) {
/* We don't log resets */
@@ -7652,7 +7624,6 @@ more:
rsm->r_start = th_ack;
if (rack->app_limited_needs_set)
rack_need_set_test(tp, rack, rsm, tp->snd_una, __LINE__, RACK_USE_BEG);
-
}
proc_sack:
/* Check for reneging */
@@ -7704,7 +7675,6 @@ proc_sack:
tcp_record_dsack(sack.start, sack.end);
#endif
}
-
}
/*
* Sort the SACK blocks so we can update the rack scoreboard with
@@ -8428,7 +8398,6 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so,
tp = tcp_close(tp);
ctf_do_dropwithreset(m, tp, th, BANDLIM_UNLIMITED, tlen);
return (1);
-
}
}
if (ofia)
@@ -8779,7 +8748,6 @@ rack_process_data(struct mbuf *m, struct tcphdr *th, struct socket *so,
tp->rcv_nxt++;
}
switch (tp->t_state) {
-
/*
* In SYN_RECEIVED and ESTABLISHED STATES enter the
* CLOSE_WAIT state.
@@ -9681,7 +9649,6 @@ rack_do_established(struct mbuf *m, struct tcphdr *th, struct socket *so,
*/
if ((thflags & TH_ACK) == 0) {
if (tp->t_flags & TF_NEEDSYN) {
-
return (rack_process_data(m, th, so, tp, drop_hdrlen, tlen,
tiwin, thflags, nxt_pkt));
@@ -10177,7 +10144,6 @@ rack_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so,
tiwin, thflags, nxt_pkt));
}
-
/*
* Return value of 1, the TCB is unlocked and most
* likely gone, return value of 0, the TCP is still
@@ -10625,7 +10591,6 @@ rack_fini(struct tcpcb *tp, int32_t tcb_is_purged)
tp->snd_nxt = tp->snd_max;
}
-
static void
rack_set_state(struct tcpcb *tp, struct tcp_rack *rack)
{
@@ -10671,7 +10636,6 @@ rack_set_state(struct tcpcb *tp, struct tcp_rack *rack)
};
}
-
static void
rack_timer_audit(struct tcpcb *tp, struct tcp_rack *rack, struct sockbuf *sb)
{
@@ -11608,7 +11572,6 @@ rack_get_pacing_delay(struct tcp_rack *rack, struct tcpcb *tp, uint32_t len, str
rate_wanted, rack->r_ctl.crte->rate, __LINE__,
err);
}
-
}
}
if (rack_limit_time_with_srtt &&
@@ -14117,7 +14080,6 @@ rack_set_sockopt(struct socket *so, struct sockopt *sopt,
int32_t error = 0, optval;
uint16_t ca, ss;
-
switch (sopt->sopt_name) {
case TCP_RACK_PROP_RATE: /* URL:prop_rate */
case TCP_RACK_PROP : /* URL:prop */
diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c
index e8b3494081c7..b7d758f5fcd8 100644
--- a/sys/netinet/tcp_stacks/rack_bbr_common.c
+++ b/sys/netinet/tcp_stacks/rack_bbr_common.c
@@ -161,7 +161,6 @@ again:
}
#endif
-
/*
* The function ctf_process_inbound_raw() is used by
* transport developers to do the steps needed to
@@ -674,7 +673,6 @@ ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, struct tcp
if ((SEQ_GEQ(th->th_seq, (tp->last_ack_sent - 1)) &&
SEQ_LT(th->th_seq, tp->last_ack_sent + tp->rcv_wnd)) ||
(tp->rcv_wnd == 0 && tp->last_ack_sent == th->th_seq)) {
-
KASSERT(tp->t_state != TCPS_SYN_SENT,
("%s: TH_RST for TCPS_SYN_SENT th %p tp %p",
__func__, th, tp));
diff --git a/sys/netinet/tcp_stacks/tcp_bbr.h b/sys/netinet/tcp_stacks/tcp_bbr.h
index 0ba22e17e4f2..30b897cff218 100644
--- a/sys/netinet/tcp_stacks/tcp_bbr.h
+++ b/sys/netinet/tcp_stacks/tcp_bbr.h
@@ -226,7 +226,6 @@ struct bbr_rtt_sample {
#define BBR_RT_SET_GRADIENT 0x200
#define BBR_RT_TS_VALID 0x400
-
struct bbr_log {
union {
struct bbr_sendmap *rsm; /* For alloc/free */
@@ -294,7 +293,6 @@ struct bbr_log_sysctl_out {
#define BBR_SEES_STRETCH_ACK 1
#define BBR_SEES_COMPRESSED_ACKS 2
-
/*
* As we get each SACK we wade through the
* rc_map and mark off what is acked.
@@ -345,7 +343,6 @@ struct bbr_log_sysctl_out {
#define BBR_TIME_TO_SECONDS(a) (a / USECS_IN_SECOND)
#define BBR_TIME_TO_MILLI(a) (a / MS_IN_USEC)
-
/* BBR keeps time in usec's so we divide by 1000 and round up */
#define BBR_TS_TO_MS(t) ((t+999)/MS_IN_USEC)
@@ -504,7 +501,6 @@ struct bbr_opts_stats {
uint64_t tcp_policer_det;
};
-
#ifdef _KERNEL
#define BBR_STAT_SIZE (sizeof(struct bbr_stats)/sizeof(uint64_t))
extern counter_u64_t bbr_stat_arry[BBR_STAT_SIZE];
@@ -524,7 +520,6 @@ extern counter_u64_t bbr_opts_arry[BBR_OPTS_SIZE];
#define BBR_RECOVERY_HIGHRTT 3
#define BBR_RECOVERY_EXTREMERTT 4
-
struct bbr_control {
/*******************************/
/* Cache line 2 from bbr start */
@@ -561,7 +556,6 @@ struct bbr_control {
uint32_t cur_rtt; /* Last RTT from ack */
-
uint32_t rc_went_idle_time; /* Used for persits to see if its
* probe-rtt qualified */
uint32_t rc_pace_max_segs:17, /* How much in any single TSO we send Lock(a) */
@@ -580,7 +574,6 @@ struct bbr_control {
* pkt-epoch */
uint32_t r_measurement_count; /* count of measurement applied lock(a) */
-
uint32_t rc_last_tlp_seq; /* Last tlp sequence Lock(a) */
uint16_t rc_reorder_shift; /* Socket option value Lock(a) */
uint16_t rc_pkt_delay; /* Socket option value Lock(a) */
@@ -664,7 +657,6 @@ struct bbr_control {
uint64_t rc_bbr_lastbtlbw; /* For startup, what was last btlbw I
* saw to check the 20% gain Lock(a) */
-
uint32_t rc_bbr_cwnd_gain; /* Current cwnd gain Lock(a) */
uint32_t rc_pkt_epoch_loss_rate; /* pkt-epoch loss rate */
@@ -740,7 +732,6 @@ struct bbr_control {
};
-
struct socket;
struct tcp_bbr {
/* First cache line 0x00 */
diff --git a/sys/netinet/tcp_stacks/tcp_rack.h b/sys/netinet/tcp_stacks/tcp_rack.h
index f60e49b65e6c..c45b7c75cd56 100644
--- a/sys/netinet/tcp_stacks/tcp_rack.h
+++ b/sys/netinet/tcp_stacks/tcp_rack.h
@@ -99,7 +99,6 @@ struct rack_rtt_sample {
#define RACK_LOG_TYPE_ALLOC 0x04
#define RACK_LOG_TYPE_FREE 0x05
-
struct rack_log {
union {
struct rack_sendmap *rsm; /* For alloc/free */
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index bf4b413bd4de..7e2ffe543a1a 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -340,7 +340,6 @@ static void tcp_mtudisc(struct inpcb *, int);
static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th,
void *ip4hdr, const void *ip6hdr);
-
static struct tcp_function_block tcp_def_funcblk = {
.tfb_tcp_block_name = "freebsd",
.tfb_tcp_output = tcp_output,
@@ -2437,7 +2436,6 @@ SYSCTL_PROC(_net_inet6_tcp6, OID_AUTO, getcred,
"Get the xucred of a TCP6 connection");
#endif /* INET6 */
-
#ifdef INET
void
tcp_ctlinput(int cmd, struct sockaddr *sa, void *vip)
@@ -2934,7 +2932,6 @@ tcp_maxmtu(struct in_conninfo *inc, struct tcp_ifcap *cap)
KASSERT(inc != NULL, ("tcp_maxmtu with NULL in_conninfo pointer"));
if (inc->inc_faddr.s_addr != INADDR_ANY) {
-
nh = fib4_lookup(inc->inc_fibnum, inc->inc_faddr, 0, NHR_NONE, 0);
if (nh == NULL)
return (0);
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index a9c7dea39954..9ea63dc723d2 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -337,7 +337,6 @@ syncache_destroy(void)
/* Cleanup hash buckets: stop timers, free entries, destroy locks. */
for (i = 0; i < V_tcp_syncache.hashsize; i++) {
-
sch = &V_tcp_syncache.hashbase[i];
callout_drain(&sch->sch_timer);
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index e82d0f81f867..ffee58b9043f 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -2809,7 +2809,6 @@ db_print_tflags2(u_int t_flags2)
}
}
-
static void
db_print_toobflags(char t_oobflags)
{
diff --git a/sys/netinet/toecore.c b/sys/netinet/toecore.c
index 5b4e85cca0a3..28cbd8b43e4f 100644
--- a/sys/netinet/toecore.c
+++ b/sys/netinet/toecore.c
@@ -436,7 +436,6 @@ toe_lle_event(void *arg __unused, struct llentry *lle, int evt)
vid = 0xfff;
pcp = 0;
if (evt != LLENTRY_RESOLVED) {
-
/*
* LLENTRY_TIMEDOUT, LLENTRY_DELETED, LLENTRY_EXPIRED all mean
* this entry is going to be deleted.
@@ -444,7 +443,6 @@ toe_lle_event(void *arg __unused, struct llentry *lle, int evt)
lladdr = NULL;
} else {
-
KASSERT(lle->la_flags & LLE_VALID,
("%s: %p resolved but not valid?", __func__, lle));
@@ -513,7 +511,6 @@ toe_connect_failed(struct toedev *tod, struct inpcb *inp, int err)
("%s: tp %p not offloaded.", __func__, tp));
if (err == EAGAIN) {
-
/*
* Temporary failure during offload, take this PCB back.
* Detach from the TOE driver and do the rest of what
@@ -527,7 +524,6 @@ toe_connect_failed(struct toedev *tod, struct inpcb *inp, int err)
tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp));
(void) tp->t_fb->tfb_tcp_output(tp);
} else {
-
tp = tcp_drop(tp, err);
if (tp == NULL)
INP_WLOCK(inp); /* re-acquire */
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 0eea51cba697..0c8578de3dca 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1123,7 +1123,6 @@ udp_v4mapped_pktinfo(struct cmsghdr *cm, struct sockaddr_in * src,
return (ENXIO);
}
if (ifp != NULL && !IN6_IS_ADDR_UNSPECIFIED(&pktinfo->ipi6_addr)) {
-
ia.s_addr = pktinfo->ipi6_addr.s6_addr32[3];
if (in_ifhasaddr(ifp, ia) == 0)
return (EADDRNOTAVAIL);