aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--sys/net/altq/altq.h6
-rw-r--r--sys/net/altq/altq_cbq.c1
-rw-r--r--sys/net/altq/altq_cbq.h2
-rw-r--r--sys/net/altq/altq_codel.c1
-rw-r--r--sys/net/altq/altq_fairq.c1
-rw-r--r--sys/net/altq/altq_hfsc.c12
-rw-r--r--sys/net/altq/altq_hfsc.h3
-rw-r--r--sys/net/altq/altq_priq.c3
-rw-r--r--sys/net/altq/altq_priq.h3
-rw-r--r--sys/net/altq/altq_red.c3
-rw-r--r--sys/net/altq/altq_red.h5
-rw-r--r--sys/net/altq/altq_rio.c1
-rw-r--r--sys/net/altq/altq_rio.h3
-rw-r--r--sys/net/altq/altq_rmclass.c2
-rw-r--r--sys/net/altq/altq_subr.c8
-rw-r--r--sys/net/altq/if_altq.h1
-rw-r--r--sys/net/bpf.c2
-rw-r--r--sys/net/bridgestp.c1
-rw-r--r--sys/net/bridgestp.h1
-rw-r--r--sys/net/debugnet_inet.c1
-rw-r--r--sys/net/ieee8023ad_lacp.c5
-rw-r--r--sys/net/if.c19
-rw-r--r--sys/net/if.h1
-rw-r--r--sys/net/if_bridge.c2
-rw-r--r--sys/net/if_clone.c5
-rw-r--r--sys/net/if_dl.h1
-rw-r--r--sys/net/if_epair.c11
-rw-r--r--sys/net/if_ethersubr.c7
-rw-r--r--sys/net/if_gif.c2
-rw-r--r--sys/net/if_ipsec.c1
-rw-r--r--sys/net/if_lagg.c3
-rw-r--r--sys/net/if_llatbl.c1
-rw-r--r--sys/net/if_loop.c1
-rw-r--r--sys/net/if_media.c3
-rw-r--r--sys/net/if_media.h1
-rw-r--r--sys/net/if_mib.c1
-rw-r--r--sys/net/if_pfsync.h1
-rw-r--r--sys/net/if_spppsubr.c14
-rw-r--r--sys/net/if_tuntap.c4
-rw-r--r--sys/net/if_vlan.c7
-rw-r--r--sys/net/iflib.c21
-rw-r--r--sys/net/iflib.h2
-rw-r--r--sys/net/iflib_clone.c1
-rw-r--r--sys/net/ifq.h1
-rw-r--r--sys/net/mp_ring.c4
-rw-r--r--sys/net/netisr.c4
-rw-r--r--sys/net/netmap.h2
-rw-r--r--sys/net/netmap_legacy.h2
-rw-r--r--sys/net/netmap_user.h11
-rw-r--r--sys/net/pfvar.h5
-rw-r--r--sys/net/radix.c5
-rw-r--r--sys/net/radix_mpath.c3
-rw-r--r--sys/net/route.c12
-rw-r--r--sys/net/route/nhop.c2
-rw-r--r--sys/net/route/nhop.h4
-rw-r--r--sys/net/route/nhop_ctl.c6
-rw-r--r--sys/net/route/nhop_utils.c3
-rw-r--r--sys/net/route/nhop_utils.h4
-rw-r--r--sys/net/route/nhop_var.h3
-rw-r--r--sys/net/route/route_ctl.c10
-rw-r--r--sys/net/route/route_ctl.h2
-rw-r--r--sys/net/route/route_helpers.c1
-rw-r--r--sys/net/route/route_tables.c1
-rw-r--r--sys/net/route/route_temporal.c2
-rw-r--r--sys/net/route/route_var.h3
-rw-r--r--sys/net/rss_config.c2
-rw-r--r--sys/net/rtsock.c7
-rw-r--r--sys/net/sff8436.h2
-rw-r--r--sys/net/sff8472.h1
-rw-r--r--sys/net/slcompress.c4
-rw-r--r--sys/net/slcompress.h1
-rw-r--r--sys/net/vnet.h8
-rw-r--r--sys/net80211/ieee80211.h2
-rw-r--r--sys/net80211/ieee80211_action.c2
-rw-r--r--sys/net80211/ieee80211_ageq.c2
-rw-r--r--sys/net80211/ieee80211_crypto.c1
-rw-r--r--sys/net80211/ieee80211_crypto_tkip.c7
-rw-r--r--sys/net80211/ieee80211_freebsd.c2
-rw-r--r--sys/net80211/ieee80211_freebsd.h2
-rw-r--r--sys/net80211/ieee80211_hostap.c6
-rw-r--r--sys/net80211/ieee80211_ht.c3
-rw-r--r--sys/net80211/ieee80211_hwmp.c3
-rw-r--r--sys/net80211/ieee80211_input.c4
-rw-r--r--sys/net80211/ieee80211_ioctl.c2
-rw-r--r--sys/net80211/ieee80211_ioctl.h1
-rw-r--r--sys/net80211/ieee80211_mesh.c14
-rw-r--r--sys/net80211/ieee80211_mesh.h1
-rw-r--r--sys/net80211/ieee80211_node.c3
-rw-r--r--sys/net80211/ieee80211_output.c8
-rw-r--r--sys/net80211/ieee80211_phy.c1
-rw-r--r--sys/net80211/ieee80211_power.c2
-rw-r--r--sys/net80211/ieee80211_proto.c5
-rw-r--r--sys/net80211/ieee80211_radiotap.c4
-rw-r--r--sys/net80211/ieee80211_radiotap.h1
-rw-r--r--sys/net80211/ieee80211_scan.c2
-rw-r--r--sys/net80211/ieee80211_scan_sta.c2
-rw-r--r--sys/net80211/ieee80211_scan_sw.c3
-rw-r--r--sys/net80211/ieee80211_sta.c1
-rw-r--r--sys/net80211/ieee80211_superg.c3
-rw-r--r--sys/net80211/ieee80211_tdma.h2
-rw-r--r--sys/net80211/ieee80211_vht.c2
-rw-r--r--sys/netgraph/atm/ccatm/ng_ccatm.c5
-rw-r--r--sys/netgraph/atm/ng_sscop.h1
-rw-r--r--sys/netgraph/atm/ngatmbase.c1
-rw-r--r--sys/netgraph/atm/sscfu/ng_sscfu.c5
-rw-r--r--sys/netgraph/atm/sscfu/ng_sscfu_cust.h2
-rw-r--r--sys/netgraph/atm/sscop/ng_sscop.c7
-rw-r--r--sys/netgraph/atm/sscop/ng_sscop_cust.h1
-rw-r--r--sys/netgraph/atm/uni/ng_uni.c9
-rw-r--r--sys/netgraph/bluetooth/common/ng_bluetooth.c1
-rw-r--r--sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c10
-rw-r--r--sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h1
-rw-r--r--sys/netgraph/bluetooth/drivers/h4/ng_h4.c1
-rw-r--r--sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h1
-rw-r--r--sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h3
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c4
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h3
-rw-r--r--sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c1
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_cmds.c12
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_cmds.h1
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_evnt.c12
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_evnt.h1
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_main.c3
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_misc.c3
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_misc.h1
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_prse.h1
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_ulpi.c13
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_ulpi.h1
-rw-r--r--sys/netgraph/bluetooth/hci/ng_hci_var.h1
-rw-r--r--sys/netgraph/bluetooth/include/ng_bluetooth.h1
-rw-r--r--sys/netgraph/bluetooth/include/ng_bt3c.h1
-rw-r--r--sys/netgraph/bluetooth/include/ng_btsocket.h3
-rw-r--r--sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h3
-rw-r--r--sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h3
-rw-r--r--sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h1
-rw-r--r--sys/netgraph/bluetooth/include/ng_btsocket_sco.h1
-rw-r--r--sys/netgraph/bluetooth/include/ng_h4.h1
-rw-r--r--sys/netgraph/bluetooth/include/ng_hci.h19
-rw-r--r--sys/netgraph/bluetooth/include/ng_l2cap.h2
-rw-r--r--sys/netgraph/bluetooth/include/ng_ubt.h1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c11
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c9
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c13
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c14
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h1
-rw-r--r--sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h3
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c14
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c21
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c14
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c11
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_sco.c4
-rw-r--r--sys/netgraph/netflow/netflow.c6
-rw-r--r--sys/netgraph/netflow/netflow.h1
-rw-r--r--sys/netgraph/netflow/netflow_v9.c9
-rw-r--r--sys/netgraph/netflow/ng_netflow.c13
-rw-r--r--sys/netgraph/netflow/ng_netflow.h5
-rw-r--r--sys/netgraph/netgraph.h6
-rw-r--r--sys/netgraph/ng_UI.c2
-rw-r--r--sys/netgraph/ng_UI.h1
-rw-r--r--sys/netgraph/ng_async.c4
-rw-r--r--sys/netgraph/ng_base.c5
-rw-r--r--sys/netgraph/ng_bpf.c1
-rw-r--r--sys/netgraph/ng_bridge.c10
-rw-r--r--sys/netgraph/ng_bridge.h1
-rw-r--r--sys/netgraph/ng_car.c2
-rw-r--r--sys/netgraph/ng_checksum.c1
-rw-r--r--sys/netgraph/ng_cisco.c1
-rw-r--r--sys/netgraph/ng_cisco.h1
-rw-r--r--sys/netgraph/ng_deflate.c1
-rw-r--r--sys/netgraph/ng_deflate.h1
-rw-r--r--sys/netgraph/ng_device.c1
-rw-r--r--sys/netgraph/ng_echo.c1
-rw-r--r--sys/netgraph/ng_eiface.c3
-rw-r--r--sys/netgraph/ng_etf.c3
-rw-r--r--sys/netgraph/ng_ether.c1
-rw-r--r--sys/netgraph/ng_ether_echo.c1
-rw-r--r--sys/netgraph/ng_frame_relay.c1
-rw-r--r--sys/netgraph/ng_gif.c1
-rw-r--r--sys/netgraph/ng_hub.c1
-rw-r--r--sys/netgraph/ng_iface.c2
-rw-r--r--sys/netgraph/ng_ipfw.c1
-rw-r--r--sys/netgraph/ng_ksocket.c3
-rw-r--r--sys/netgraph/ng_l2tp.c7
-rw-r--r--sys/netgraph/ng_lmi.c1
-rw-r--r--sys/netgraph/ng_message.h1
-rw-r--r--sys/netgraph/ng_mppc.c4
-rw-r--r--sys/netgraph/ng_mppc.h1
-rw-r--r--sys/netgraph/ng_nat.c4
-rw-r--r--sys/netgraph/ng_one2many.h1
-rw-r--r--sys/netgraph/ng_parse.c2
-rw-r--r--sys/netgraph/ng_parse.h2
-rw-r--r--sys/netgraph/ng_patch.c2
-rw-r--r--sys/netgraph/ng_pipe.c4
-rw-r--r--sys/netgraph/ng_ppp.c11
-rw-r--r--sys/netgraph/ng_pppoe.c4
-rw-r--r--sys/netgraph/ng_pppoe.h2
-rw-r--r--sys/netgraph/ng_pptpgre.c3
-rw-r--r--sys/netgraph/ng_pred1.c1
-rw-r--r--sys/netgraph/ng_pred1.h1
-rw-r--r--sys/netgraph/ng_rfc1490.c1
-rw-r--r--sys/netgraph/ng_sample.c3
-rw-r--r--sys/netgraph/ng_socket.c3
-rw-r--r--sys/netgraph/ng_socket.h1
-rw-r--r--sys/netgraph/ng_split.c2
-rw-r--r--sys/netgraph/ng_split.h1
-rw-r--r--sys/netgraph/ng_sppp.c8
-rw-r--r--sys/netgraph/ng_tag.c9
-rw-r--r--sys/netgraph/ng_tcpmss.c3
-rw-r--r--sys/netgraph/ng_tcpmss.h1
-rw-r--r--sys/netgraph/ng_tty.c1
-rw-r--r--sys/netgraph/ng_vjc.c1
-rw-r--r--sys/netgraph/ng_vlan.c3
-rw-r--r--sys/netgraph/ng_vlan.h1
-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
-rw-r--r--sys/netinet6/frag6.c7
-rw-r--r--sys/netinet6/in6.c11
-rw-r--r--sys/netinet6/in6_cksum.c2
-rw-r--r--sys/netinet6/in6_fib.c3
-rw-r--r--sys/netinet6/in6_fib.h1
-rw-r--r--sys/netinet6/in6_mcast.c3
-rw-r--r--sys/netinet6/in6_rmx.c1
-rw-r--r--sys/netinet6/in6_src.c1
-rw-r--r--sys/netinet6/ip6_fastfwd.c1
-rw-r--r--sys/netinet6/ip6_input.c2
-rw-r--r--sys/netinet6/ip6_mroute.c4
-rw-r--r--sys/netinet6/ip6_output.c9
-rw-r--r--sys/netinet6/ip_fw_nptv6.h1
-rw-r--r--sys/netinet6/mld6.c5
-rw-r--r--sys/netinet6/nd6.c18
-rw-r--r--sys/netinet6/nd6_nbr.c1
-rw-r--r--sys/netinet6/nd6_rtr.c2
-rw-r--r--sys/netinet6/scope6.c2
-rw-r--r--sys/netinet6/sctp6_usrreq.c6
-rw-r--r--sys/netinet6/udp6_usrreq.c2
-rw-r--r--sys/netipsec/esp.h2
-rw-r--r--sys/netipsec/ipsec.c2
-rw-r--r--sys/netipsec/ipsec_input.c2
-rw-r--r--sys/netipsec/ipsec_output.c1
-rw-r--r--sys/netipsec/ipsec_pcb.c1
-rw-r--r--sys/netipsec/key.c8
-rw-r--r--sys/netipsec/key_debug.c2
-rw-r--r--sys/netipsec/udpencap.c1
-rw-r--r--sys/netpfil/ipfw/dn_aqm.h8
-rw-r--r--sys/netpfil/ipfw/dn_aqm_codel.c6
-rw-r--r--sys/netpfil/ipfw/dn_aqm_codel.h9
-rw-r--r--sys/netpfil/ipfw/dn_aqm_pie.c18
-rw-r--r--sys/netpfil/ipfw/dn_aqm_pie.h2
-rw-r--r--sys/netpfil/ipfw/dn_sched_fq_codel.c17
-rw-r--r--sys/netpfil/ipfw/dn_sched_fq_codel.h1
-rw-r--r--sys/netpfil/ipfw/dn_sched_fq_codel_helper.h2
-rw-r--r--sys/netpfil/ipfw/dn_sched_fq_pie.c34
-rw-r--r--sys/netpfil/ipfw/dn_sched_prio.c2
-rw-r--r--sys/netpfil/ipfw/dn_sched_qfq.c2
-rw-r--r--sys/netpfil/ipfw/dn_sched_rr.c2
-rw-r--r--sys/netpfil/ipfw/dn_sched_wf2q.c1
-rw-r--r--sys/netpfil/ipfw/ip_dn_glue.c7
-rw-r--r--sys/netpfil/ipfw/ip_dn_io.c3
-rw-r--r--sys/netpfil/ipfw/ip_dn_private.h2
-rw-r--r--sys/netpfil/ipfw/ip_dummynet.c7
-rw-r--r--sys/netpfil/ipfw/ip_fw2.c6
-rw-r--r--sys/netpfil/ipfw/ip_fw_bpf.c1
-rw-r--r--sys/netpfil/ipfw/ip_fw_dynamic.c4
-rw-r--r--sys/netpfil/ipfw/ip_fw_iface.c4
-rw-r--r--sys/netpfil/ipfw/ip_fw_nat.c10
-rw-r--r--sys/netpfil/ipfw/ip_fw_private.h3
-rw-r--r--sys/netpfil/ipfw/ip_fw_sockopt.c28
-rw-r--r--sys/netpfil/ipfw/ip_fw_table.c29
-rw-r--r--sys/netpfil/ipfw/ip_fw_table.h1
-rw-r--r--sys/netpfil/ipfw/ip_fw_table_algo.c31
-rw-r--r--sys/netpfil/ipfw/ip_fw_table_value.c6
-rw-r--r--sys/netpfil/ipfw/nat64/nat64_translate.c2
-rw-r--r--sys/netpfil/ipfw/nat64/nat64_translate.h1
-rw-r--r--sys/netpfil/ipfw/nat64/nat64clat_control.c2
-rw-r--r--sys/netpfil/ipfw/nat64/nat64lsn.c2
-rw-r--r--sys/netpfil/ipfw/nat64/nat64lsn_control.c1
-rw-r--r--sys/netpfil/ipfw/nat64/nat64stl.c2
-rw-r--r--sys/netpfil/ipfw/nat64/nat64stl.h1
-rw-r--r--sys/netpfil/ipfw/nat64/nat64stl_control.c3
-rw-r--r--sys/netpfil/ipfw/nptv6/nptv6.c1
-rw-r--r--sys/netpfil/ipfw/nptv6/nptv6.h1
-rw-r--r--sys/netpfil/ipfw/pmod/pmod.h1
-rw-r--r--sys/netpfil/ipfw/pmod/tcpmod.c1
-rw-r--r--sys/netpfil/ipfw/test/dn_test.h1
-rw-r--r--sys/netpfil/ipfw/test/main.c3
-rw-r--r--sys/netpfil/ipfw/test/mylist.h2
-rw-r--r--sys/netpfil/pf/if_pfsync.c4
-rw-r--r--sys/netpfil/pf/pf.c16
-rw-r--r--sys/netpfil/pf/pf_ioctl.c26
-rw-r--r--sys/netpfil/pf/pf_norm.c6
-rw-r--r--sys/netpfil/pf/pf_osfp.c6
-rw-r--r--sys/netpfil/pf/pf_ruleset.c1
-rw-r--r--sys/netpfil/pf/pf_table.c1
-rw-r--r--sys/netsmb/smb.h2
-rw-r--r--sys/netsmb/smb_conn.c8
-rw-r--r--sys/netsmb/smb_conn.h2
-rw-r--r--sys/netsmb/smb_crypt.c2
-rw-r--r--sys/netsmb/smb_dev.c7
-rw-r--r--sys/netsmb/smb_dev.h1
-rw-r--r--sys/netsmb/smb_iod.c7
-rw-r--r--sys/netsmb/smb_rq.c1
-rw-r--r--sys/netsmb/smb_rq.h1
-rw-r--r--sys/netsmb/smb_smb.c2
-rw-r--r--sys/netsmb/smb_subr.h1
-rw-r--r--sys/netsmb/smb_trantcp.c3
-rw-r--r--sys/netsmb/smb_trantcp.h1
403 files changed, 297 insertions, 1695 deletions
diff --git a/sys/net/altq/altq.h b/sys/net/altq/altq.h
index 731fead4e55f..e9109c478220 100644
--- a/sys/net/altq/altq.h
+++ b/sys/net/altq/altq.h
@@ -38,7 +38,6 @@
#define ALTQ3_CLFIER_COMPAT /* for compatibility with altq-3 classifier */
#endif
-
/* altq discipline type */
#define ALTQT_NONE 0 /* reserved */
#define ALTQT_CBQ 1 /* cbq */
@@ -57,14 +56,12 @@
#define ALTQT_CODEL 14 /* CoDel */
#define ALTQT_MAX 15 /* should be max discipline type + 1 */
-
/* simple token backet meter profile */
struct tb_profile {
u_int64_t rate; /* rate in bit-per-sec */
u_int32_t depth; /* depth in bytes */
};
-
/*
* generic packet counter
*/
@@ -76,7 +73,6 @@ struct pktcntr {
#define PKTCNTR_ADD(cntr, len) \
do { (cntr)->packets++; (cntr)->bytes += len; } while (/*CONSTCOND*/ 0)
-
#ifdef _KERNEL
#include <net/altq/altq_var.h>
#endif
@@ -105,5 +101,5 @@ static inline int altq_stats_version(int scheduler)
default: return (0);
}
}
-
+
#endif /* _ALTQ_ALTQ_H_ */
diff --git a/sys/net/altq/altq_cbq.c b/sys/net/altq/altq_cbq.c
index fd05955bb966..6c6557725354 100644
--- a/sys/net/altq/altq_cbq.c
+++ b/sys/net/altq/altq_cbq.c
@@ -55,7 +55,6 @@
#include <net/altq/altq.h>
#include <net/altq/altq_cbq.h>
-
/*
* Forward Declarations.
*/
diff --git a/sys/net/altq/altq_cbq.h b/sys/net/altq/altq_cbq.h
index 70974715ac67..a319edb72e97 100644
--- a/sys/net/altq/altq_cbq.h
+++ b/sys/net/altq/altq_cbq.h
@@ -111,7 +111,6 @@ typedef struct _cbq_class_stats_ {
* header.
*/
-
#ifdef _KERNEL
/*
* Define macros only good for kernel drivers and modules.
@@ -122,7 +121,6 @@ typedef struct _cbq_class_stats_ {
#define CBQ_MAX_CLASSES 256
-
/*
* Define State structures.
*/
diff --git a/sys/net/altq/altq_codel.c b/sys/net/altq/altq_codel.c
index a98553aa52f4..cca75a70b4c6 100644
--- a/sys/net/altq/altq_codel.c
+++ b/sys/net/altq/altq_codel.c
@@ -246,7 +246,6 @@ codel_dequeue(struct ifaltq *ifq, int op)
if (op == ALTDQ_POLL)
return (qhead(cif->cl_q));
-
m = codel_getq(&cif->codel, cif->cl_q);
if (m != NULL) {
IFQ_DEC_LEN(ifq);
diff --git a/sys/net/altq/altq_fairq.c b/sys/net/altq/altq_fairq.c
index c6ccea2b5dee..a8f96daeed36 100644
--- a/sys/net/altq/altq_fairq.c
+++ b/sys/net/altq/altq_fairq.c
@@ -157,7 +157,6 @@ fairq_add_altq(struct ifnet *ifp, struct pf_altq *a)
if (!ALTQ_IS_READY(&ifp->if_snd))
return (ENODEV);
-
pif = malloc(sizeof(struct fairq_if),
M_DEVBUF, M_WAITOK | M_ZERO);
pif->pif_bandwidth = a->ifbandwidth;
diff --git a/sys/net/altq/altq_hfsc.c b/sys/net/altq/altq_hfsc.c
index 5a5f56fcd2fe..2dbf571cdbb9 100644
--- a/sys/net/altq/altq_hfsc.c
+++ b/sys/net/altq/altq_hfsc.c
@@ -133,8 +133,6 @@ static void get_class_stats_v1(struct hfsc_classstats_v1 *,
struct hfsc_class *);
static struct hfsc_class *clh_to_clp(struct hfsc_if *, u_int32_t);
-
-
/*
* macros
*/
@@ -142,7 +140,6 @@ static struct hfsc_class *clh_to_clp(struct hfsc_if *, u_int32_t);
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
-
int
hfsc_pfattach(struct pf_altq *a)
{
@@ -307,7 +304,6 @@ hfsc_clear_interface(struct hfsc_if *hif)
{
struct hfsc_class *cl;
-
/* clear out the classes */
while (hif->hif_rootclass != NULL &&
(cl = hif->hif_rootclass->cl_children) != NULL) {
@@ -569,7 +565,6 @@ hfsc_class_destroy(struct hfsc_class *cl)
s = splnet();
IFQ_LOCK(cl->cl_hif->hif_ifq);
-
if (!qempty(cl->cl_q))
hfsc_purgeq(cl);
@@ -729,7 +724,6 @@ hfsc_dequeue(struct ifaltq *ifq, int op)
cur_time = read_machclk();
if (op == ALTDQ_REMOVE && hif->hif_pollcache != NULL) {
-
cl = hif->hif_pollcache;
hif->hif_pollcache = NULL;
/* check if the class was scheduled by real-time criteria */
@@ -754,7 +748,6 @@ hfsc_dequeue(struct ifaltq *ifq, int op)
*/
cl = hif->hif_rootclass;
while (is_a_parent_class(cl)) {
-
cl = actlist_firstfit(cl, cur_time);
if (cl == NULL) {
#ifdef ALTQ_DEBUG
@@ -962,7 +955,6 @@ init_vf(struct hfsc_class *cl, int len)
cur_time = 0;
go_active = 1;
for ( ; cl->cl_parent != NULL; cl = cl->cl_parent) {
-
if (go_active && cl->cl_nactive++ == 0)
go_active = 1;
else
@@ -1052,7 +1044,6 @@ update_vf(struct hfsc_class *cl, int len, u_int64_t cur_time)
go_passive = qempty(cl->cl_q);
for (; cl->cl_parent != NULL; cl = cl->cl_parent) {
-
cl->cl_total += len;
if (cl->cl_fsc == NULL || cl->cl_nactive == 0)
@@ -1596,7 +1587,7 @@ get_class_stats_v0(struct hfsc_classstats_v0 *sp, struct hfsc_class *cl)
}
#undef SATU32
-
+
sp->total = cl->cl_total;
sp->cumul = cl->cl_cumul;
@@ -1742,5 +1733,4 @@ clh_to_clp(struct hfsc_if *hif, u_int32_t chandle)
return (NULL);
}
-
#endif /* ALTQ_HFSC */
diff --git a/sys/net/altq/altq_hfsc.h b/sys/net/altq/altq_hfsc.h
index c43c6671ca59..9a4f14ae8fdc 100644
--- a/sys/net/altq/altq_hfsc.h
+++ b/sys/net/altq/altq_hfsc.h
@@ -57,7 +57,7 @@ struct service_curve_v1 {
/* Latest version of struct service_curve_vX */
#define HFSC_SERVICE_CURVE_VERSION 1
-
+
/* special class handles */
#define HFSC_NULLCLASS_HANDLE 0
#define HFSC_MAX_CLASSES 64
@@ -167,7 +167,6 @@ struct hfsc_classstats_v1 {
* from mixing of public-API and internal bits in each scheduler-specific
* header.
*/
-
#ifdef _KERNEL
/*
diff --git a/sys/net/altq/altq_priq.c b/sys/net/altq/altq_priq.c
index 578745023a9b..e0c3e0f6ee80 100644
--- a/sys/net/altq/altq_priq.c
+++ b/sys/net/altq/altq_priq.c
@@ -74,11 +74,9 @@ static struct mbuf *priq_getq(struct priq_class *);
static struct mbuf *priq_pollq(struct priq_class *);
static void priq_purgeq(struct priq_class *);
-
static void get_class_stats(struct priq_classstats *, struct priq_class *);
static struct priq_class *clh_to_clp(struct priq_if *, u_int32_t);
-
int
priq_pfattach(struct pf_altq *a)
{
@@ -640,5 +638,4 @@ clh_to_clp(struct priq_if *pif, u_int32_t chandle)
return (NULL);
}
-
#endif /* ALTQ_PRIQ */
diff --git a/sys/net/altq/altq_priq.h b/sys/net/altq/altq_priq.h
index a5ee3289fb66..08231f64b75c 100644
--- a/sys/net/altq/altq_priq.h
+++ b/sys/net/altq/altq_priq.h
@@ -42,7 +42,6 @@ extern "C" {
#define PRIQ_MAXPRI 16 /* upper limit of the number of priorities */
-
/* priq class flags */
#define PRCF_RED 0x0001 /* use RED */
#define PRCF_ECN 0x0002 /* use RED/ECN */
@@ -54,7 +53,6 @@ extern "C" {
/* special class handles */
#define PRIQ_NULLCLASS_HANDLE 0
-
struct priq_classstats {
u_int32_t class_handle;
@@ -76,7 +74,6 @@ struct priq_classstats {
* header.
*/
-
#ifdef _KERNEL
struct priq_class {
diff --git a/sys/net/altq/altq_red.c b/sys/net/altq/altq_red.c
index 4e84284e5107..cd180f4fca2f 100644
--- a/sys/net/altq/altq_red.c
+++ b/sys/net/altq/altq_red.c
@@ -162,13 +162,11 @@
* to switch to the random-drop policy, define "RED_RANDOM_DROP".
*/
-
/* default red parameter values */
static int default_th_min = TH_MIN;
static int default_th_max = TH_MAX;
static int default_inv_pmax = INV_P_MAX;
-
/*
* red support routines
*/
@@ -629,5 +627,4 @@ pow_w(struct wtab *w, int n)
return (val);
}
-
#endif /* ALTQ_RED */
diff --git a/sys/net/altq/altq_red.h b/sys/net/altq/altq_red.h
index d4cd3d8b3d51..39ba43ca2edb 100644
--- a/sys/net/altq/altq_red.h
+++ b/sys/net/altq/altq_red.h
@@ -32,7 +32,6 @@
#include <net/altq/altq_classq.h>
-
/* red flags */
#define REDF_ECN4 0x01 /* use packet marking for IPv4 packets */
#define REDF_ECN6 0x02 /* use packet marking for IPv6 packets */
@@ -58,10 +57,8 @@ struct redstats {
u_int marked_packets;
};
-
#ifdef _KERNEL
-
/* weight table structure for idle time calibration */
struct wtab {
struct wtab *w_next;
@@ -96,7 +93,6 @@ typedef struct red {
struct wtab *red_wtab; /* weight table */
struct timeval red_last; /* time when the queue becomes idle */
-
struct {
struct pktcntr xmit_cnt;
struct pktcntr drop_cnt;
@@ -106,7 +102,6 @@ typedef struct red {
} red_stats;
} red_t;
-
/* red drop types */
#define DTYPE_NODROP 0 /* no drop */
#define DTYPE_FORCED 1 /* a "forced" drop */
diff --git a/sys/net/altq/altq_rio.c b/sys/net/altq/altq_rio.c
index bd22685c66c0..a4256e2881d1 100644
--- a/sys/net/altq/altq_rio.c
+++ b/sys/net/altq/altq_rio.c
@@ -447,5 +447,4 @@ rio_getq(rio_t *rp, class_queue_t *q)
return (m);
}
-
#endif /* ALTQ_RIO */
diff --git a/sys/net/altq/altq_rio.h b/sys/net/altq/altq_rio.h
index 2ae713940774..0ac54269bc30 100644
--- a/sys/net/altq/altq_rio.h
+++ b/sys/net/altq/altq_rio.h
@@ -38,14 +38,12 @@
*/
#define RIO_NDROPPREC 3 /* number of drop precedence values */
-
/* rio flags */
#define RIOF_ECN4 0x01 /* use packet marking for IPv4 packets */
#define RIOF_ECN6 0x02 /* use packet marking for IPv6 packets */
#define RIOF_ECN (RIOF_ECN4 | RIOF_ECN6)
#define RIOF_CLEARDSCP 0x200 /* clear diffserv codepoint */
-
#ifdef _KERNEL
typedef struct rio {
@@ -84,7 +82,6 @@ typedef struct rio {
struct redstats q_stats[RIO_NDROPPREC]; /* statistics */
} rio_t;
-
extern rio_t *rio_alloc(int, struct redparams *, int, int);
extern void rio_destroy(rio_t *);
extern void rio_getstats(rio_t *, struct redstats *);
diff --git a/sys/net/altq/altq_rmclass.c b/sys/net/altq/altq_rmclass.c
index 3dd6a8899258..a6ede6feebe2 100644
--- a/sys/net/altq/altq_rmclass.c
+++ b/sys/net/altq/altq_rmclass.c
@@ -64,7 +64,6 @@
/*
* Local Macros
*/
-
#define reset_cutoff(ifd) { ifd->cutoff_ = RM_MAXDEPTH; }
/*
@@ -652,7 +651,6 @@ rmc_delete_class(struct rm_ifdat *ifd, struct rm_class *cl)
free(cl, M_DEVBUF);
}
-
/*
* void
* rmc_init(...) - Initialize the resource management data structures
diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c
index e49a925f5e83..9d998c40485c 100644
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -243,7 +243,7 @@ altq_disable(ifq)
ASSERT(ifq->ifq_len == 0);
ifq->altq_flags &= ~(ALTQF_ENABLED|ALTQF_CLASSIFY);
splx(s);
-
+
IFQ_UNLOCK(ifq);
return 0;
}
@@ -330,7 +330,7 @@ tbr_set(ifq, profile)
struct tb_profile *profile;
{
struct tb_regulator *tbr, *otbr;
-
+
if (tbr_dequeue_ptr == NULL)
tbr_dequeue_ptr = tbr_dequeue;
@@ -841,7 +841,6 @@ write_dsfield(struct mbuf *m, struct altq_pktattr *pktattr, u_int8_t dsfield)
return;
}
-
/*
* high resolution clock support taking advantage of a machine dependent
* high resolution time counter (e.g., timestamp counter of intel pentium).
@@ -1811,7 +1810,6 @@ filt2fibmask(filt)
return (mask);
}
-
/*
* helper functions to handle IPv4 fragments.
* currently only in-sequence fragments are handled.
@@ -1831,7 +1829,6 @@ static TAILQ_HEAD(ip4f_list, ip4_frag) ip4f_list; /* IPv4 fragment cache */
#define IP4F_TABSIZE 16 /* IPv4 fragment cache size */
-
static void
ip4f_cache(ip, fin)
struct ip *ip;
@@ -1871,7 +1868,6 @@ ip4f_lookup(ip, fin)
ip->ip_src.s_addr == fp->ip4f_info.fi_src.s_addr &&
ip->ip_dst.s_addr == fp->ip4f_info.fi_dst.s_addr &&
ip->ip_p == fp->ip4f_info.fi_proto) {
-
/* found the matching entry */
fin->fi_sport = fp->ip4f_info.fi_sport;
fin->fi_dport = fp->ip4f_info.fi_dport;
diff --git a/sys/net/altq/if_altq.h b/sys/net/altq/if_altq.h
index 7a093500c466..8d0463e09b3e 100644
--- a/sys/net/altq/if_altq.h
+++ b/sys/net/altq/if_altq.h
@@ -74,7 +74,6 @@ struct ifaltq {
struct top_cdnr *altq_cdnr;
};
-
#ifdef _KERNEL
/*
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 24c8061b6a0b..605e7aa39fdb 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -577,7 +577,6 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp,
* for the link level header.
*/
switch (linktype) {
-
case DLT_SLIP:
sockp->sa_family = AF_INET;
hlen = 0;
@@ -1428,7 +1427,6 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
CURVNET_SET(TD_TO_VNET(td));
switch (cmd) {
-
default:
error = EINVAL;
break;
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c
index 366873ec9293..a8bb51c11f51 100644
--- a/sys/net/bridgestp.c
+++ b/sys/net/bridgestp.c
@@ -832,7 +832,6 @@ bstp_assign_roles(struct bstp_state *bs)
bp->bp_desg_fdelay = bs->bs_root_fdelay;
bp->bp_desg_htime = bs->bs_bridge_htime;
-
switch (bp->bp_infois) {
case BSTP_INFO_DISABLED:
bstp_set_port_role(bp, BSTP_ROLE_DISABLED);
diff --git a/sys/net/bridgestp.h b/sys/net/bridgestp.h
index 48f6c9ebbfcf..b7ce1e27409d 100644
--- a/sys/net/bridgestp.h
+++ b/sys/net/bridgestp.h
@@ -178,7 +178,6 @@
#define BSTP_INFO_AGED 3
#define BSTP_INFO_DISABLED 4
-
#define BSTP_MESSAGE_AGE_INCR (1 * 256) /* in 256ths of a second */
#define BSTP_TICK_VAL (1 * 256) /* in 256ths of a second */
#define BSTP_LINK_TIMER (BSTP_TICK_VAL * 15)
diff --git a/sys/net/debugnet_inet.c b/sys/net/debugnet_inet.c
index 983c5add533f..837f838fa6d9 100644
--- a/sys/net/debugnet_inet.c
+++ b/sys/net/debugnet_inet.c
@@ -161,7 +161,6 @@ debugnet_handle_ip(struct debugnet_pcb *pcb, struct mbuf **mb)
return;
}
if (m->m_pkthdr.len > ip->ip_len) {
-
/* Truncate the packet to the IP length. */
if (m->m_len == m->m_pkthdr.len) {
m->m_len = ip->ip_len;
diff --git a/sys/net/ieee8023ad_lacp.c b/sys/net/ieee8023ad_lacp.c
index af887f2f0dee..39568e2beb08 100644
--- a/sys/net/ieee8023ad_lacp.c
+++ b/sys/net/ieee8023ad_lacp.c
@@ -206,7 +206,6 @@ VNET_DEFINE_STATIC(int, lacp_default_strict_mode) = 1;
SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, default_strict_mode,
CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(lacp_default_strict_mode), 0,
"LACP strict protocol compliance default");
-
#define LACP_DPRINTF(a) if (V_lacp_debug & 0x01) { lacp_dprintf a ; }
#define LACP_TRACE(a) if (V_lacp_debug & 0x02) { lacp_dprintf(a,"%s\n",__func__); }
#define LACP_TPRINTF(a) if (V_lacp_debug & 0x04) { lacp_dprintf a ; }
@@ -607,7 +606,7 @@ lacp_req(struct lagg_softc *sc, void *data)
struct lacp_aggregator *la;
bzero(req, sizeof(struct lacp_opreq));
-
+
/*
* If the LACP softc is NULL, return with the opreq structure full of
* zeros. It is normal for the softc to be NULL while the lagg is
@@ -1102,7 +1101,6 @@ lacp_compose_key(struct lacp_port *lp)
uint16_t key;
if ((lp->lp_state & LACP_STATE_AGGREGATION) == 0) {
-
/*
* non-aggregatable links should have unique keys.
*
@@ -1677,7 +1675,6 @@ lacp_sm_ptx_tx_schedule(struct lacp_port *lp)
if (!(lp->lp_state & LACP_STATE_ACTIVITY) &&
!(lp->lp_partner.lip_state & LACP_STATE_ACTIVITY)) {
-
/*
* NO_PERIODIC
*/
diff --git a/sys/net/if.c b/sys/net/if.c
index a837be09544a..2fd17e00c316 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -488,7 +488,6 @@ VNET_SYSUNINIT(vnet_if_return, SI_SUB_VNET_DONE, SI_ORDER_ANY,
vnet_if_return, NULL);
#endif
-
static void *
if_grow(void)
{
@@ -688,7 +687,7 @@ if_rele(struct ifnet *ifp)
void
ifq_init(struct ifaltq *ifq, struct ifnet *ifp)
{
-
+
mtx_init(&ifq->ifq_mtx, ifp->if_xname, "if send queue", MTX_DEF);
if (ifq->ifq_maxlen == 0)
@@ -1838,7 +1837,6 @@ ifa_free(struct ifaddr *ifa)
NET_EPOCH_CALL(ifa_destroy, &ifa->ifa_epoch_ctx);
}
-
static int
ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa,
struct sockaddr *ia)
@@ -2358,7 +2356,7 @@ if_qflush(struct ifnet *ifp)
{
struct mbuf *m, *n;
struct ifaltq *ifq;
-
+
ifq = &ifp->if_snd;
IFQ_LOCK(ifq);
#ifdef ALTQ
@@ -3142,7 +3140,7 @@ if_setflag(struct ifnet *ifp, int flag, int pflag, int *refcount, int onswitch)
/* Save ifnet parameters for if_ioctl() may fail */
oldcount = *refcount;
oldflags = ifp->if_flags;
-
+
/*
* See if we aren't the only and touching refcount is enough.
* Actually toggle interface flag if we are the first or last.
@@ -3430,7 +3428,6 @@ if_freemulti(struct ifmultiaddr *ifma)
NET_EPOCH_CALL(if_destroymulti, &ifma->ifma_epoch_ctx);
}
-
/*
* Register an additional multicast address with a network interface.
*
@@ -4029,7 +4026,7 @@ void
if_register_com_alloc(u_char type,
if_com_alloc_t *a, if_com_free_t *f)
{
-
+
KASSERT(if_com_alloc[type] == NULL,
("if_register_com_alloc: %d already registered", type));
KASSERT(if_com_free[type] == NULL,
@@ -4042,7 +4039,7 @@ if_register_com_alloc(u_char type,
void
if_deregister_com_alloc(u_char type)
{
-
+
KASSERT(if_com_alloc[type] != NULL,
("if_deregister_com_alloc: %d not registered", type));
KASSERT(if_com_free[type] != NULL,
@@ -4154,7 +4151,7 @@ if_getdrvflags(if_t ifp)
{
return ((struct ifnet *)ifp)->if_drv_flags;
}
-
+
int
if_setdrvflags(if_t ifp, int flags)
{
@@ -4162,7 +4159,6 @@ if_setdrvflags(if_t ifp, int flags)
return (0);
}
-
int
if_setflags(if_t ifp, int flags)
{
@@ -4376,7 +4372,6 @@ if_getamcount(if_t ifp)
return ((struct ifnet *)ifp)->if_amcount;
}
-
int
if_setsendqready(if_t ifp)
{
@@ -4537,7 +4532,7 @@ if_settransmitfn(if_t ifp, if_transmit_fn_t start_fn)
void if_setqflushfn(if_t ifp, if_qflush_fn_t flush_fn)
{
((struct ifnet *)ifp)->if_qflush = flush_fn;
-
+
}
void
diff --git a/sys/net/if.h b/sys/net/if.h
index 1e7430263fc3..bae896c87df5 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -164,7 +164,6 @@ struct if_data {
#define IFF_RENAMING 0x400000 /* (n) interface is being renamed */
#define IFF_NOGROUP 0x800000 /* (n) interface is not part of any groups */
-
/*
* Old names for driver flags so that user space tools can continue to use
* the old (portable) names.
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 51ee9d299067..13dbee934e46 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -364,7 +364,6 @@ static int bridge_fragment(struct ifnet *, struct mbuf **mp,
static void bridge_linkstate(struct ifnet *ifp);
static void bridge_linkcheck(struct bridge_softc *sc);
-
/* The default bridge vlan is 1 (IEEE 802.1Q-2003 Table 9-2) */
#define VLANTAGOF(_m) \
(_m->m_flags & M_VLANTAG) ? EVL_VLANOFTAG(_m->m_pkthdr.ether_vtag) : 1
@@ -784,7 +783,6 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
NET_EPOCH_ENTER(et);
switch (cmd) {
-
case SIOCADDMULTI:
case SIOCDELMULTI:
break;
diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c
index acc392ead16a..36c8337d5f69 100644
--- a/sys/net/if_clone.c
+++ b/sys/net/if_clone.c
@@ -239,7 +239,7 @@ if_clone_createif(struct if_clone *ifc, char *name, size_t len, caddr_t params)
err = ifc_simple_create(ifc, name, len, params);
else
err = (*ifc->ifc_create)(ifc, name, len, params);
-
+
if (!err) {
ifp = ifunit(name);
if (ifp == NULL)
@@ -669,7 +669,7 @@ ifc_simple_match(struct if_clone *ifc, const char *name)
{
const char *cp;
int i;
-
+
/* Match the name */
for (cp = name, i = 0; i < strlen(ifc->ifc_name); i++, cp++) {
if (ifc->ifc_name[i] != *cp)
@@ -721,7 +721,6 @@ ifc_simple_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
*/
panic("if_clone_create(): interface name too long");
}
-
}
return (0);
diff --git a/sys/net/if_dl.h b/sys/net/if_dl.h
index 50767325864b..9c4c03f6d79b 100644
--- a/sys/net/if_dl.h
+++ b/sys/net/if_dl.h
@@ -72,7 +72,6 @@ struct sockaddr_dl {
#define CLLADDR(s) ((c_caddr_t)((s)->sdl_data + (s)->sdl_nlen))
#define LLINDEX(s) ((s)->sdl_index)
-
struct ifnet;
struct sockaddr_dl *link_alloc_sdl(size_t, int);
void link_free_sdl(struct sockaddr *sa);
diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
index 63e3d5e862b8..7f62cdb427ff 100644
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -489,7 +489,7 @@ epair_transmit_locked(struct ifnet *ifp, struct mbuf *m)
if (m == NULL)
return (0);
-
+
/*
* We are not going to use the interface en/dequeue mechanism
* on the TX side. We are called from ether_output_frame()
@@ -609,7 +609,7 @@ static void
epair_qflush(struct ifnet *ifp)
{
struct epair_softc *sc;
-
+
sc = ifp->if_softc;
KASSERT(sc != NULL, ("%s: ifp=%p, epair_softc gone? sc=%p\n",
__func__, ifp, sc));
@@ -681,7 +681,6 @@ epair_init(void *dummy __unused)
{
}
-
/*
* Interface cloning functions.
* We use our private ones so that we can create/destroy our secondary
@@ -800,7 +799,7 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
ifc_free_unit(ifc, unit);
return (ENOSPC);
}
-
+
/*
* Cross-reference the interfaces so we will be able to free both.
*/
@@ -825,7 +824,7 @@ epair_clone_create(struct if_clone *ifc, char *name, size_t len, caddr_t params)
ifmedia_init(&scb->media, 0, epair_media_change, epair_media_status);
ifmedia_add(&scb->media, IFM_ETHER | IFM_10G_T, 0, NULL);
ifmedia_set(&scb->media, IFM_ETHER | IFM_10G_T);
-
+
/* Finish initialization of interface <n>a. */
ifp = sca->ifp;
ifp->if_softc = sca;
@@ -932,7 +931,7 @@ epair_clone_destroy(struct if_clone *ifc, struct ifnet *ifp)
*/
if (ifp->if_softc == NULL)
return (0);
-
+
unit = ifp->if_dunit;
sca = ifp->if_softc;
oifp = sca->oifp;
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 178d8064e3af..dbb4119d0ed9 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -122,7 +122,6 @@ static void ether_reassign(struct ifnet *, struct vnet *, char *);
#endif
static int ether_requestencap(struct ifnet *, struct if_encap_req *);
-
#define senderr(e) do { error = (e); goto bad;} while (0)
static void
@@ -200,7 +199,6 @@ ether_requestencap(struct ifnet *ifp, struct if_encap_req *req)
return (0);
}
-
static int
ether_resolve_addr(struct ifnet *ifp, struct mbuf *m,
const struct sockaddr *dst, struct route *ro, u_char *phdr,
@@ -545,7 +543,6 @@ ether_input_internal(struct ifnet *ifp, struct mbuf *m)
/* draft-ietf-6man-ipv6only-flag */
/* Catch ETHERTYPE_IP, and ETHERTYPE_[REV]ARP if we are v6-only. */
if ((ND_IFINFO(ifp)->flags & ND6_IFF_IPV6_ONLY_MASK) != 0) {
-
switch (etype) {
case ETHERTYPE_IP:
case ETHERTYPE_ARP:
@@ -774,7 +771,7 @@ vnet_ether_init(__unused void *arg)
}
VNET_SYSINIT(vnet_ether_init, SI_SUB_PROTO_IF, SI_ORDER_ANY,
vnet_ether_init, NULL);
-
+
#ifdef VIMAGE
static void
vnet_ether_pfil_destroy(__unused void *arg)
@@ -795,8 +792,6 @@ VNET_SYSUNINIT(vnet_ether_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY,
vnet_ether_destroy, NULL);
#endif
-
-
static void
ether_input(struct ifnet *ifp, struct mbuf *m)
{
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 4b238a2e10da..1784d034ac2d 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -400,7 +400,6 @@ gif_qflush(struct ifnet *ifp __unused)
}
-
int
gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
struct route *ro)
@@ -721,4 +720,3 @@ gif_delete_tunnel(struct gif_softc *sc)
GIF2IFP(sc)->if_drv_flags &= ~IFF_DRV_RUNNING;
if_link_state_change(GIF2IFP(sc), LINK_STATE_DOWN);
}
-
diff --git a/sys/net/if_ipsec.c b/sys/net/if_ipsec.c
index d863b26eaff9..b9931286a735 100644
--- a/sys/net/if_ipsec.c
+++ b/sys/net/if_ipsec.c
@@ -1003,7 +1003,6 @@ ipsec_set_addresses(struct ifnet *ifp, struct sockaddr *src,
key_sockaddrcmp(&saidx->src.sa, src, 0) == 0 &&
key_sockaddrcmp(&saidx->dst.sa, dst, 0) == 0)
return (0); /* Nothing has been changed. */
-
}
/* If reqid is not set, generate new one. */
if (ipsec_init_reqid(sc) != 0)
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
index 4930e1820f3b..6a3e4addb7b1 100644
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -803,7 +803,6 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp)
lagg_setmulti(lp);
-
if ((error = lagg_proto_addport(sc, lp)) != 0) {
/* Remove the port, without calling pr_delport. */
lagg_port_destroy(lp, 0);
@@ -1046,7 +1045,6 @@ lagg_get_counter(struct ifnet *ifp, ift_counter cnt)
*/
vsum += sc->detached_counters.val[cnt];
-
return (vsum);
}
@@ -2425,4 +2423,3 @@ lagg_lacp_input(struct lagg_softc *sc, struct lagg_port *lp, struct mbuf *m)
m->m_pkthdr.rcvif = ifp;
return (m);
}
-
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c
index 2bfa5debc380..97a8e3e9ccc1 100644
--- a/sys/net/if_llatbl.c
+++ b/sys/net/if_llatbl.c
@@ -874,7 +874,6 @@ llatbl_llt_show(struct lltable *llt)
for (i = 0; i < llt->llt_hsize; i++) {
CK_LIST_FOREACH(lle, &llt->lle_head[i], lle_next) {
-
llatbl_lle_show((struct llentry_sa *)lle);
if (db_pager_quit)
return;
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 3c0de11c9a98..cbff8200806a 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -393,7 +393,6 @@ loioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
break;
}
switch (ifr->ifr_addr.sa_family) {
-
#ifdef INET
case AF_INET:
break;
diff --git a/sys/net/if_media.c b/sys/net/if_media.c
index 4df6b8b55940..1809fb8e5681 100644
--- a/sys/net/if_media.c
+++ b/sys/net/if_media.c
@@ -233,7 +233,6 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
return(EINVAL);
switch (cmd) {
-
/*
* Set the current media.
*/
@@ -390,7 +389,7 @@ ifmedia_baudrate(int mword)
/* Not known. */
return (0);
}
-
+
#ifdef IFMEDIA_DEBUG
static const struct ifmedia_description ifm_type_descriptions[] =
IFM_TYPE_DESCRIPTIONS;
diff --git a/sys/net/if_media.h b/sys/net/if_media.h
index 7b1d1c2b33ec..c507713ee7ef 100644
--- a/sys/net/if_media.h
+++ b/sys/net/if_media.h
@@ -108,7 +108,6 @@ void ifmedia_set(struct ifmedia *ifm, int mword);
int ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr,
struct ifmedia *ifm, u_long cmd);
-
/* Compute baudrate for a given media. */
uint64_t ifmedia_baudrate(int);
diff --git a/sys/net/if_mib.c b/sys/net/if_mib.c
index b2646ce4cb1b..27d7a87bdf84 100644
--- a/sys/net/if_mib.c
+++ b/sys/net/if_mib.c
@@ -150,4 +150,3 @@ out:
static SYSCTL_NODE(_net_link_generic, IFMIB_IFDATA, ifdata,
CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ifdata,
"Interface table");
-
diff --git a/sys/net/if_pfsync.h b/sys/net/if_pfsync.h
index 3715fdb55afa..f26a2ae34eed 100644
--- a/sys/net/if_pfsync.h
+++ b/sys/net/if_pfsync.h
@@ -47,7 +47,6 @@
* $FreeBSD$
*/
-
#ifndef _NET_IF_PFSYNC_H_
#define _NET_IF_PFSYNC_H_
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index a96f67270cff..5a18147f14a7 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -742,7 +742,7 @@ static void
sppp_ifstart_sched(void *dummy)
{
struct sppp *sp = dummy;
-
+
sp->if_start(SP2IFP(sp));
}
@@ -1005,7 +1005,7 @@ sppp_attach(struct ifnet *ifp)
/* Initialize mtx lock */
mtx_init(&sp->mtx, "sppp", MTX_NETWORK_LOCK, MTX_DEF | MTX_RECURSE);
-
+
/* Initialize keepalive handler. */
callout_init(&sp->keepalive_callout, 1);
callout_reset(&sp->keepalive_callout, hz * 10, sppp_keepalive,
@@ -1863,7 +1863,6 @@ sppp_cp_input(const struct cp *cp, struct sppp *sp, struct mbuf *m)
}
}
-
/*
* The generic part of all Up/Down/Open/Close/TO event handlers.
* Basically, the state transition handling in the automaton.
@@ -1930,7 +1929,6 @@ sppp_down_event(const struct cp *cp, struct sppp *sp)
}
}
-
static void
sppp_open_event(const struct cp *cp, struct sppp *sp)
{
@@ -1980,7 +1978,6 @@ sppp_open_event(const struct cp *cp, struct sppp *sp)
}
}
-
static void
sppp_close_event(const struct cp *cp, struct sppp *sp)
{
@@ -2680,7 +2677,7 @@ sppp_lcp_tlu(struct sppp *sp)
/* notify low-level driver of state change */
if (sp->pp_chg)
sp->pp_chg(sp, (int)sp->pp_phase);
-
+
if (sp->pp_phase == PHASE_NETWORK)
/* if no NCP is starting, close down */
sppp_lcp_check_and_close(sp);
@@ -3070,7 +3067,6 @@ sppp_ipcp_RCR(struct sppp *sp, struct lcp_header *h, int len)
else
log(-1, "%s [not agreed] ",
sppp_dotted_quad(desiredaddr));
-
}
p[2] = hisaddr >> 24;
p[3] = hisaddr >> 16;
@@ -3836,7 +3832,6 @@ static void sppp_ipv6cp_down(struct sppp *sp)
{
}
-
static void sppp_ipv6cp_open(struct sppp *sp)
{
}
@@ -4188,7 +4183,6 @@ sppp_chap_input(struct sppp *sp, struct mbuf *m)
log(-1, ">\n");
}
break;
-
}
}
@@ -4506,7 +4500,6 @@ sppp_pap_input(struct sppp *sp, struct mbuf *m)
log(-1, ">\n");
}
break;
-
}
}
@@ -5228,7 +5221,6 @@ sppp_phase_network(struct sppp *sp)
sppp_lcp_check_and_close(sp);
}
-
static const char *
sppp_cp_type_name(u_char type)
{
diff --git a/sys/net/if_tuntap.c b/sys/net/if_tuntap.c
index 40c96d23e5ed..5789fce5407f 100644
--- a/sys/net/if_tuntap.c
+++ b/sys/net/if_tuntap.c
@@ -168,7 +168,6 @@ struct tuntap_softc {
#define TAP_ALL_OFFLOAD (CSUM_TSO | CSUM_TCP | CSUM_UDP |\
CSUM_TCP_IPV6 | CSUM_UDP_IPV6)
-
/*
* All mutable global variables in if_tun are locked using tunmtx, with
* the exception of tundebug, which is used unlocked, and the drivers' *clones,
@@ -387,7 +386,6 @@ tun_busy(struct tuntap_softc *tp)
return (ret);
}
-
static void
tun_unbusy(struct tuntap_softc *tp)
{
@@ -476,8 +474,6 @@ tuntap_driver_from_flags(int tun_flags)
return (NULL);
}
-
-
static int
tun_clone_match(struct if_clone *ifc, const char *name)
{
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 6914a3c4a367..c4680ad66d2c 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -342,7 +342,7 @@ static void
vlan_inithash(struct ifvlantrunk *trunk)
{
int i, n;
-
+
/*
* The trunk must not be locked here since we call malloc(M_WAITOK).
* It is OK in case this function is called before the trunk struct
@@ -414,7 +414,7 @@ vlan_remhash(struct ifvlantrunk *trunk, struct ifvlan *ifv)
VLAN_XLOCK_ASSERT();
KASSERT(trunk->hwidth > 0, ("%s: hwidth not positive", __func__));
-
+
b = 1 << trunk->hwidth;
i = HASH(ifv->ifv_vid, trunk->hmask);
CK_SLIST_FOREACH(ifv2, &trunk->hash[i], ifv_list)
@@ -1232,7 +1232,6 @@ vlan_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
return p->if_output(ifp, m, dst, ro);
}
-
/*
* The ifp->if_qflush entry point for vlan(4) is a no-op.
*/
@@ -1633,7 +1632,7 @@ static int
vlan_setflags(struct ifnet *ifp, int status)
{
int error, i;
-
+
for (i = 0; vlan_pflags[i].flag; i++) {
error = vlan_setflag(ifp, vlan_pflags[i].flag,
status, vlan_pflags[i].func);
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 2901ad94a844..85c29f8508ed 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -116,7 +116,6 @@ __FBSDID("$FreeBSD$");
* access.
*/
-
/*
* File organization:
* - private structures
@@ -473,7 +472,6 @@ typedef struct if_rxd_info_pad {
CTASSERT(sizeof(struct if_pkt_info_pad) == sizeof(struct if_pkt_info));
CTASSERT(sizeof(struct if_rxd_info_pad) == sizeof(struct if_rxd_info));
-
static inline void
pkt_info_zero(if_pkt_info_t pi)
{
@@ -584,7 +582,6 @@ static int iflib_no_tx_batch = 0;
SYSCTL_INT(_net_iflib, OID_AUTO, no_tx_batch, CTLFLAG_RW,
&iflib_no_tx_batch, 0, "minimize transmit latency at the possible expense of throughput");
-
#if IFLIB_DEBUG_COUNTERS
static int iflib_tx_seen;
@@ -610,7 +607,6 @@ SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills, CTLFLAG_RD,
SYSCTL_INT(_net_iflib, OID_AUTO, fl_refills_large, CTLFLAG_RD,
&iflib_fl_refills_large, 0, "# large refills");
-
static int iflib_txq_drain_flushing;
static int iflib_txq_drain_oactive;
static int iflib_txq_drain_notready;
@@ -622,7 +618,6 @@ SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_oactive, CTLFLAG_RD,
SYSCTL_INT(_net_iflib, OID_AUTO, txq_drain_notready, CTLFLAG_RD,
&iflib_txq_drain_notready, 0, "# drain notready");
-
static int iflib_encap_load_mbuf_fail;
static int iflib_encap_pad_mbuf_fail;
static int iflib_encap_txq_avail_fail;
@@ -1205,7 +1200,6 @@ iflib_netmap_intr(struct netmap_adapter *na, int onoff)
CTX_UNLOCK(ctx);
}
-
static int
iflib_netmap_attach(if_ctx_t ctx)
{
@@ -1239,7 +1233,6 @@ iflib_netmap_txq_init(if_ctx_t ctx, iflib_txq_t txq)
if (slot == NULL)
return (0);
for (int i = 0; i < ctx->ifc_softc_ctx.isc_ntxd[0]; i++) {
-
/*
* In netmap mode, set the map for the packet buffer.
* NOTE: Some drivers (not this one) also need to set
@@ -1534,7 +1527,6 @@ iflib_fast_intr_rxtx(void *arg)
return (FILTER_HANDLED);
}
-
static int
iflib_fast_intr_ctx(void *arg)
{
@@ -1931,7 +1923,6 @@ fail:
return (err);
}
-
/*
* Internal service routines
*/
@@ -2217,7 +2208,6 @@ iflib_fl_setup(iflib_fl_t fl)
fl->ifl_cltype = m_gettype(fl->ifl_buf_size);
fl->ifl_zone = m_getzone(fl->ifl_buf_size);
-
/*
* Avoid pre-allocating zillions of clusters to an idle card
* potentially speeding up attach. In any case make sure
@@ -2550,7 +2540,6 @@ prefetch_pkts(iflib_fl_t fl, int cidx)
int nrxd = fl->ifl_size;
caddr_t next_rxd;
-
nextptr = (cidx + CACHE_PTR_INCREMENT) & (nrxd-1);
prefetch(&fl->ifl_sds.ifsd_m[nextptr]);
prefetch(&fl->ifl_sds.ifsd_cl[nextptr]);
@@ -3601,7 +3590,6 @@ iflib_completed_tx_reclaim(iflib_txq_t txq, int thresh)
printf("%s processed=%ju cleaned=%ju tx_nsegments=%d reclaim=%d thresh=%d\n", __FUNCTION__,
txq->ift_processed, txq->ift_cleaned, txq->ift_ctx->ifc_softc_ctx.isc_tx_nsegments,
reclaim, thresh);
-
}
#endif
return (0);
@@ -3940,7 +3928,6 @@ _task_fn_admin(void *context)
iflib_txq_check_drain(txq, IFLIB_RESTART_BUDGET);
}
-
static void
_task_fn_iov(void *context)
{
@@ -3985,7 +3972,6 @@ iflib_if_init_locked(if_ctx_t ctx)
iflib_init_locked(ctx);
}
-
static void
iflib_if_init(void *arg)
{
@@ -4103,7 +4089,7 @@ iflib_altq_if_start(if_t ifp)
{
struct ifaltq *ifq = &ifp->if_snd;
struct mbuf *m;
-
+
IFQ_LOCK(ifq);
IFQ_DEQUEUE_NOLOCK(ifq, m);
while (m != NULL) {
@@ -4153,7 +4139,6 @@ iflib_if_qflush(if_t ifp)
if_qflush(ifp);
}
-
#define IFCAP_FLAGS (IFCAP_HWCSUM_IPV6 | IFCAP_HWCSUM | IFCAP_LRO | \
IFCAP_TSO | IFCAP_VLAN_HWTAGGING | IFCAP_HWSTATS | \
IFCAP_VLAN_MTU | IFCAP_VLAN_HWFILTER | \
@@ -4447,7 +4432,6 @@ iflib_device_probe(device_t dev)
(ent->pvi_subdevice_id == 0)) &&
((pci_rev_id == ent->pvi_rev_id) ||
(ent->pvi_rev_id == 0))) {
-
device_set_desc_copy(dev, ent->pvi_name);
/* this needs to be changed to zero if the bus probing code
* ever stops re-probing on best match because the sctx
@@ -5275,7 +5259,6 @@ iflib_device_shutdown(device_t dev)
return bus_generic_suspend(dev);
}
-
int
iflib_device_resume(device_t dev)
{
@@ -5370,7 +5353,6 @@ iflib_module_event_handler(module_t mod, int what, void *arg)
*
**********************************************************************/
-
static void
_iflib_assert(if_shared_ctx_t sctx)
{
@@ -6801,7 +6783,6 @@ iflib_add_device_sysctl_post(if_ctx_t ctx)
CTLFLAG_RD,
&fl->ifl_cl_dequeued, "clusters freed");
#endif
-
}
}
diff --git a/sys/net/iflib.h b/sys/net/iflib.h
index e2d32c563513..eaf8ea33355d 100644
--- a/sys/net/iflib.h
+++ b/sys/net/iflib.h
@@ -167,7 +167,6 @@ typedef struct pci_vendor_info {
uint32_t pvi_class_mask;
const char *pvi_name;
} pci_vendor_info_t;
-
#define PVID(vendor, devid, name) {vendor, devid, 0, 0, 0, 0, name}
#define PVID_OEM(vendor, devid, svid, sdevid, revid, name) {vendor, devid, svid, sdevid, revid, 0, name}
#define PVID_END {0, 0, 0, 0, 0, 0, NULL}
@@ -380,7 +379,6 @@ typedef enum {
*/
#define IFLIB_PSEUDO_ETHER 0x80000
-
/*
* These enum values are used in iflib_needs_restart to indicate to iflib
* functions whether or not the interface needs restarting when certain events
diff --git a/sys/net/iflib_clone.c b/sys/net/iflib_clone.c
index cfd304152bfe..1ad5c7a86a11 100644
--- a/sys/net/iflib_clone.c
+++ b/sys/net/iflib_clone.c
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
#include <sys/md5.h>
#include <sys/proc.h>
-
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_types.h>
diff --git a/sys/net/ifq.h b/sys/net/ifq.h
index bffb80c36228..40e41ddfa0fd 100644
--- a/sys/net/ifq.h
+++ b/sys/net/ifq.h
@@ -420,7 +420,6 @@ drbr_advance(struct ifnet *ifp, struct buf_ring *br)
return (buf_ring_advance_sc(br));
}
-
static __inline struct mbuf *
drbr_dequeue_cond(struct ifnet *ifp, struct buf_ring *br,
int (*func) (struct mbuf *, void *), void *arg)
diff --git a/sys/net/mp_ring.c b/sys/net/mp_ring.c
index 26e79224954d..da1ce7676bfd 100644
--- a/sys/net/mp_ring.c
+++ b/sys/net/mp_ring.c
@@ -109,7 +109,6 @@ drain_ring_locked(struct ifmp_ring *r, union ring_state os, uint16_t prev, int b
total = 0;
while (cidx != pidx) {
-
/* Items from cidx to pidx are available for consumption. */
n = r->drain(r, cidx, pidx);
if (n == 0) {
@@ -184,7 +183,6 @@ drain_ring_lockless(struct ifmp_ring *r, union ring_state os, uint16_t prev, int
total = 0;
while (cidx != pidx) {
-
/* Items from cidx to pidx are available for consumption. */
n = r->drain(r, cidx, pidx);
if (n == 0) {
@@ -491,7 +489,6 @@ ifmp_ring_check_drainage(struct ifmp_ring *r, int budget)
ns.state = os.state;
ns.flags = BUSY;
-
#ifdef MP_RING_NO_64BIT_ATOMICS
mtx_lock(&r->lock);
if (r->state != os.state) {
@@ -509,7 +506,6 @@ ifmp_ring_check_drainage(struct ifmp_ring *r, int budget)
if (!atomic_cmpset_acq_64(&r->state, os.state, ns.state))
return;
-
drain_ring_lockless(r, ns, os.flags, budget);
#endif
}
diff --git a/sys/net/netisr.c b/sys/net/netisr.c
index d0311033d42f..e4abea317440 100644
--- a/sys/net/netisr.c
+++ b/sys/net/netisr.c
@@ -692,7 +692,7 @@ netisr_register_vnet(const struct netisr_handler *nhp)
KASSERT(netisr_proto[proto].np_handler != NULL,
("%s(%u): protocol not registered for %s", __func__, proto,
nhp->nh_name));
-
+
V_netisr_enable[proto] = 1;
NETISR_WUNLOCK();
}
@@ -760,7 +760,7 @@ netisr_unregister_vnet(const struct netisr_handler *nhp)
KASSERT(netisr_proto[proto].np_handler != NULL,
("%s(%u): protocol not registered for %s", __func__, proto,
nhp->nh_name));
-
+
V_netisr_enable[proto] = 0;
netisr_drain_proto_vnet(curvnet, proto);
diff --git a/sys/net/netmap.h b/sys/net/netmap.h
index b3a94bc0d9c3..c040683651d0 100644
--- a/sys/net/netmap.h
+++ b/sys/net/netmap.h
@@ -235,7 +235,6 @@ struct netmap_slot {
#define NETMAP_MAX_FRAGS 64 /* max number of fragments */
-
/*
* struct netmap_ring
*
@@ -308,7 +307,6 @@ struct netmap_ring {
struct netmap_slot slot[0]; /* array of slots. */
};
-
/*
* RING FLAGS
*/
diff --git a/sys/net/netmap_legacy.h b/sys/net/netmap_legacy.h
index 115a09e5fbaf..ba0ffa980285 100644
--- a/sys/net/netmap_legacy.h
+++ b/sys/net/netmap_legacy.h
@@ -144,7 +144,6 @@
*
*/
-
/*
* struct nmreq overlays a struct ifreq (just the name)
*/
@@ -216,7 +215,6 @@ struct nmreq {
#define NETMAP_SETSOCKOPT _IO('i', 140)
#define NETMAP_GETSOCKOPT _IO('i', 141)
-
/* These linknames are for the Netmap Core Driver */
#define NETMAP_NT_DEVICE_NAME L"\\Device\\NETMAP"
#define NETMAP_DOS_DEVICE_NAME L"\\DosDevices\\netmap"
diff --git a/sys/net/netmap_user.h b/sys/net/netmap_user.h
index 1e43aaedbfdd..93cd450e77e7 100644
--- a/sys/net/netmap_user.h
+++ b/sys/net/netmap_user.h
@@ -123,14 +123,12 @@
( ((char *)(buf) - ((char *)(ring) + (ring)->buf_ofs) ) / \
(ring)->nr_buf_size )
-
static inline uint32_t
nm_ring_next(struct netmap_ring *r, uint32_t i)
{
return ( unlikely(i + 1 == r->num_slots) ? 0 : i + 1);
}
-
/*
* Return 1 if we have pending transmissions in the tx ring.
* When everything is complete ring->head = ring->tail + 1 (modulo ring size)
@@ -296,9 +294,6 @@ struct nm_desc {
#define IS_NETMAP_DESC(d) ((d) && P2NMD(d)->self == P2NMD(d))
#define NETMAP_FD(d) (P2NMD(d)->fd)
-
-
-
/*
* The callback, invoked on each received packet. Same as libpcap
*/
@@ -355,7 +350,6 @@ enum {
NM_OPEN_RING_CFG = 0x800000, /* tx|rx rings|slots */
};
-
/*
* nm_close() closes and restores the port to its previous state
*/
@@ -436,7 +430,6 @@ win_remove_fd_record(int fd)
}
}
-
HANDLE
win_get_netmap_handle(int fd)
{
@@ -921,7 +914,6 @@ nm_open(const char *ifname, const struct nmreq *req,
goto fail;
}
-
#ifdef DEBUG_NETMAP_USER
{ /* debugging code */
int i;
@@ -953,7 +945,6 @@ fail:
return NULL;
}
-
static int
nm_close(struct nm_desc *d)
{
@@ -977,7 +968,6 @@ nm_close(struct nm_desc *d)
return 0;
}
-
static int
nm_mmap(struct nm_desc *d, const struct nm_desc *parent)
{
@@ -1067,7 +1057,6 @@ nm_inject(struct nm_desc *d, const void *buf, size_t size)
return 0; /* fail */
}
-
/*
* Same prototype as pcap_dispatch(), only need to cast.
*/
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index efb8bfb9d4bd..5cc613a543e4 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -330,7 +330,6 @@ extern struct sx pf_end_lock;
(neg) \
)
-
struct pf_rule_uid {
uid_t uid[2];
u_int8_t op;
@@ -378,7 +377,6 @@ struct pf_pool {
u_int8_t opts;
};
-
/* A packed Operating System description for fingerprinting */
typedef u_int32_t pf_osfp_t;
#define PF_OSFP_ANY ((pf_osfp_t)0)
@@ -480,7 +478,6 @@ struct pf_osfp_ioctl {
int fp_getnum; /* DIOCOSFPGET number */
};
-
union pf_rule_ptr {
struct pf_rule *ptr;
u_int32_t nr;
@@ -629,7 +626,6 @@ struct pf_rule {
#define PFSTATE_ADAPT_START 60000 /* default adaptive timeout start */
#define PFSTATE_ADAPT_END 120000 /* default adaptive timeout end */
-
struct pf_threshold {
u_int32_t limit;
#define PF_THRESHOLD_MULT 1000
@@ -1448,7 +1444,6 @@ struct pfioc_iface {
int pfiio_flags;
};
-
/*
* ioctl operations
*/
diff --git a/sys/net/radix.c b/sys/net/radix.c
index f6c8dbe496f4..3d9ed0a69538 100644
--- a/sys/net/radix.c
+++ b/sys/net/radix.c
@@ -78,7 +78,6 @@ static char rn_ones[RADIX_MAX_KEY_LEN] = {
-1, -1, -1, -1, -1, -1, -1, -1,
};
-
static int rn_lexobetter(void *m_arg, void *n_arg);
static struct radix_mask *
rn_new_radix_mask(struct radix_node *tt,
@@ -1059,7 +1058,6 @@ rn_walktree_from(struct radix_head *h, void *a, void *m,
/* printf("root, stopping"); */
stopping = 1;
}
-
}
return (0);
}
@@ -1134,7 +1132,7 @@ rn_detachhead_internal(struct radix_head *head)
KASSERT((head != NULL),
("%s: head already freed", __func__));
-
+
/* Free <left,root,right> nodes. */
R_Free(head);
}
@@ -1210,4 +1208,3 @@ rn_detachhead(void **head)
return (1);
}
-
diff --git a/sys/net/radix_mpath.c b/sys/net/radix_mpath.c
index 32c2541956d5..a7ae3b39dc5e 100644
--- a/sys/net/radix_mpath.c
+++ b/sys/net/radix_mpath.c
@@ -99,7 +99,7 @@ rn_mpath_count(struct radix_node *rn)
{
uint32_t i = 0;
struct rtentry *rt;
-
+
while (rn != NULL) {
rt = (struct rtentry *)rn;
i += rt->rt_weight;
@@ -274,4 +274,3 @@ mpath_init(void)
}
SYSINIT(mpath_init, SI_SUB_LAST, SI_ORDER_ANY, mpath_init, NULL);
#endif
-
diff --git a/sys/net/route.c b/sys/net/route.c
index f34814ffc493..a0ac16e587f4 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -328,7 +328,6 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst,
return (ifa);
}
-
/*
* Copy most of @rt data into @info.
*
@@ -367,7 +366,6 @@ rt_exportinfo(struct rtentry *rt, struct rt_addrinfo *info, int flags)
src = rt_mask(rt);
dst = info->rti_info[RTAX_NETMASK];
if (src != NULL && dst != NULL) {
-
/*
* Radix stores different value in sa_len,
* assume rt_mask() to have the same length
@@ -718,7 +716,6 @@ rt_updatemtu(struct ifnet *ifp)
}
}
-
#if 0
int p_sockaddr(char *buf, int buflen, struct sockaddr *s);
int rt_print(char *buf, int buflen, struct rtentry *rt);
@@ -742,7 +739,7 @@ p_sockaddr(char *buf, int buflen, struct sockaddr *s)
if (inet_ntop(s->sa_family, paddr, buf, buflen) == NULL)
return (0);
-
+
return (strlen(buf));
}
@@ -981,7 +978,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int flags, int fibnum)
rn = rnh->rnh_lookup(dst, netmask, &rnh->head);
#ifdef RADIX_MPATH
if (rt_mpath_capable(rnh)) {
-
if (rn == NULL)
error = ESRCH;
else {
@@ -1115,7 +1111,7 @@ rt_routemsg(int cmd, struct rtentry *rt, struct ifnet *ifp, int rti_addrs,
KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE,
("unexpected cmd %d", cmd));
-
+
KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs),
("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs));
@@ -1138,7 +1134,7 @@ rt_routemsg_info(int cmd, struct rt_addrinfo *info, int fibnum)
KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE || cmd == RTM_CHANGE,
("unexpected cmd %d", cmd));
-
+
KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs),
("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs));
@@ -1147,7 +1143,6 @@ rt_routemsg_info(int cmd, struct rt_addrinfo *info, int fibnum)
return (rtsock_routemsg_info(cmd, info, fibnum));
}
-
/*
* This is called to generate messages from the routing socket
* indicating a network interface has had addresses associated with it.
@@ -1171,4 +1166,3 @@ rt_newaddrmsg_fib(int cmd, struct ifaddr *ifa, struct rtentry *rt, int fibnum)
rt_addrmsg(cmd, ifa, fibnum);
}
}
-
diff --git a/sys/net/route/nhop.c b/sys/net/route/nhop.c
index f39b4fabdc93..4b9a79ffbf20 100644
--- a/sys/net/route/nhop.c
+++ b/sys/net/route/nhop.c
@@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$");
static MALLOC_DEFINE(M_NHOP, "nhops", "nexthops data");
-
/* Hash management functions */
int
@@ -384,4 +383,3 @@ find_nhop(struct nh_control *ctl, const struct nhop_priv *nh_priv)
return (nh_priv_ret);
}
-
diff --git a/sys/net/route/nhop.h b/sys/net/route/nhop.h
index a3ee003cdf7d..1f6aff134c2d 100644
--- a/sys/net/route/nhop.h
+++ b/sys/net/route/nhop.h
@@ -166,7 +166,6 @@ struct nhop_object {
_nh = NULL; \
} while (0)
-
void nhop_free(struct nhop_object *nh);
struct sysctl_req;
@@ -222,7 +221,4 @@ struct mpath_external {
uint32_t mp_group_size;
};
-
#endif
-
-
diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c
index 09365cc98238..217003ab6635 100644
--- a/sys/net/route/nhop_ctl.c
+++ b/sys/net/route/nhop_ctl.c
@@ -99,7 +99,6 @@ _Static_assert(sizeof(struct nhop_object) <= 128,
static uma_zone_t nhops_zone; /* Global zone for each and every nexthop */
-
#define NHOP_OBJECT_ALIGNED_SIZE roundup2(sizeof(struct nhop_object), \
2 * CACHE_LINE_SIZE)
#define NHOP_PRIV_ALIGNED_SIZE roundup2(sizeof(struct nhop_priv), \
@@ -181,7 +180,6 @@ set_nhop_mtu_from_info(struct nhop_object *nh, const struct rt_addrinfo *info)
if (info->rti_mflags & RTV_MTU) {
if (info->rti_rmx->rmx_mtu != 0) {
-
/*
* MTU was explicitly provided by user.
* Keep it.
@@ -189,7 +187,6 @@ set_nhop_mtu_from_info(struct nhop_object *nh, const struct rt_addrinfo *info)
nh->nh_priv->rt_flags |= RTF_FIXEDMTU;
} else {
-
/*
* User explicitly sets MTU to 0.
* Assume rollback to default.
@@ -532,7 +529,6 @@ finalize_nhop(struct nh_control *ctl, struct rt_addrinfo *info,
print_nhop("FINALIZE", nh);
if (link_nhop(ctl, nh_priv) == 0) {
-
/*
* Adding nexthop to the datastructures
* failed. Call destructor w/o waiting for
@@ -687,7 +683,6 @@ nhop_free_any(struct nhop_object *nh)
nhop_free(nh);
}
-
/* Helper functions */
uint32_t
@@ -858,4 +853,3 @@ nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w)
return (0);
}
-
diff --git a/sys/net/route/nhop_utils.c b/sys/net/route/nhop_utils.c
index 56bca99c9ed8..c0d432ceaf65 100644
--- a/sys/net/route/nhop_utils.c
+++ b/sys/net/route/nhop_utils.c
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
#define _BLOCKS_TO_ITEMS(_blocks) ((uint32_t)(_blocks) * BLOCK_ITEMS)
#define _ITEMS_TO_BLOCKS(_items) ((_items) / BLOCK_ITEMS)
-
static void _bitmask_init_idx(void *index, uint32_t items);
void
@@ -111,7 +110,6 @@ _bitmask_init_idx(void *_idx, uint32_t items)
*idx &= ~(u_long)1; /* Always skip index 0 */
}
-
/*
* _try_merge api to allow shrinking?
*/
@@ -216,4 +214,3 @@ bitmask_free_idx(struct bitmask_head *bi, uint16_t idx)
return (0);
}
-
diff --git a/sys/net/route/nhop_utils.h b/sys/net/route/nhop_utils.h
index a2876178cbb0..a0d7cd564e72 100644
--- a/sys/net/route/nhop_utils.h
+++ b/sys/net/route/nhop_utils.h
@@ -57,7 +57,6 @@ _cht_need_resize(const struct _cht_head *head)
return (_cht_get_resize_size(head) > 0);
}
-
#ifndef typeof
#define typeof __typeof
#endif
@@ -152,11 +151,9 @@ struct _HNAME##_head { \
} \
} while(0)
-
#define CHT_SLIST_FOREACH(_head, _PX, _x) \
for (uint32_t _i = 0; _i < (_head)->hash_size; _i++) { \
for (_x = CHT_FIRST(_head, _i); _x; _x = _PX##_next(_x))
-
#define CHT_SLIST_FOREACH_END }
#define CHT_SLIST_RESIZE(_head, _PX, _new_void_ptr, _new_hsize) \
@@ -197,4 +194,3 @@ int bitmask_alloc_idx(struct bitmask_head *bi, uint16_t *pidx);
int bitmask_free_idx(struct bitmask_head *bi, uint16_t idx);
#endif
-
diff --git a/sys/net/route/nhop_var.h b/sys/net/route/nhop_var.h
index aac2829e186f..220b6c9a7634 100644
--- a/sys/net/route/nhop_var.h
+++ b/sys/net/route/nhop_var.h
@@ -47,7 +47,6 @@ CHT_SLIST_DEFINE(nhops, struct nhop_priv);
/* next object accessor */
#define nhops_next(_obj) (_obj)->nh_next
-
struct nh_control {
struct nhops_head nh_head; /* hash table head */
struct bitmask_head nh_idx_head; /* nhop index head */
@@ -64,7 +63,6 @@ struct nh_control {
#define NHOPS_LOCK_DESTROY(ctl) rw_destroy(&(ctl)->ctl_lock)
#define NHOPS_WLOCK_ASSERT(ctl) rw_assert(&(ctl)->ctl_lock, RA_WLOCKED)
-
/* Control plane-only nhop data */
struct nhop_object;
struct nhop_priv {
@@ -94,4 +92,3 @@ struct nhop_priv *unlink_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv)
int cmp_priv(const struct nhop_priv *_one, const struct nhop_priv *_two);
#endif
-
diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c
index 710e96f43323..c5ce51dbbe32 100644
--- a/sys/net/route/route_ctl.c
+++ b/sys/net/route/route_ctl.c
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
#include <vm/uma.h>
-
/*
* This file contains control plane routing tables functions.
*
@@ -99,7 +98,7 @@ VNET_DEFINE_STATIC(uma_zone_t, rtzone);
void
vnet_rtzone_init()
{
-
+
V_rtzone = uma_zcreate("rtentry", sizeof(struct rtentry),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
}
@@ -158,8 +157,6 @@ rtfree(struct rtentry *rt)
&rt->rt_epoch_ctx);
}
-
-
static struct rib_head *
get_rnh(uint32_t fibnum, const struct rt_addrinfo *info)
{
@@ -359,7 +356,6 @@ add_route(struct rib_head *rnh, struct rt_addrinfo *info,
return (error);
}
-
/*
* Removes route defined by @info from the kernel table specified by @fibnum and
* sa_family in @info->rti_info[RTAX_DST].
@@ -752,7 +748,6 @@ change_route_conditional(struct rib_head *rnh, struct rtentry *rt,
} else {
/* Prefix exists, try to update */
if (rnd_orig->rnd_nhop == rt_new->rt_nhop) {
-
/*
* Nhop/mpath group hasn't changed. Flip
* to the new precalculated one and return
@@ -812,7 +807,6 @@ rib_action(uint32_t fibnum, int action, struct rt_addrinfo *info,
return (error);
}
-
struct rt_delinfo
{
struct rt_addrinfo info;
@@ -947,7 +941,6 @@ allocate_subscription(rib_subscription_cb_t *f, void *arg,
return (rs);
}
-
/*
* Subscribe for the changes in the routing table specified by @fibnum and
* @family.
@@ -1061,4 +1054,3 @@ rib_destroy_subscriptions(struct rib_head *rnh)
RIB_WUNLOCK(rnh);
NET_EPOCH_EXIT(et);
}
-
diff --git a/sys/net/route/route_ctl.h b/sys/net/route/route_ctl.h
index 62208609cd4d..fb6dda47b3ba 100644
--- a/sys/net/route/route_ctl.h
+++ b/sys/net/route/route_ctl.h
@@ -44,7 +44,6 @@ struct rib_cmd_info {
struct nhop_object *rc_nh_new; /* Target nhop OR mpath */
};
-
int rib_add_route(uint32_t fibnum, struct rt_addrinfo *info,
struct rib_cmd_info *rc);
int rib_del_route(uint32_t fibnum, struct rt_addrinfo *info,
@@ -85,4 +84,3 @@ struct rib_subscription *rib_subscribe_internal(struct rib_head *rnh,
int rib_unsibscribe(uint32_t fibnum, int family, struct rib_subscription *rs);
#endif
-
diff --git a/sys/net/route/route_helpers.c b/sys/net/route/route_helpers.c
index c2b7780976fd..b5b45ef662cc 100644
--- a/sys/net/route/route_helpers.c
+++ b/sys/net/route/route_helpers.c
@@ -131,4 +131,3 @@ rib_lookup(uint32_t fibnum, const struct sockaddr *dst, uint32_t flags,
return (nh);
}
-
diff --git a/sys/net/route/route_tables.c b/sys/net/route/route_tables.c
index bfaf5889807f..d987044091c0 100644
--- a/sys/net/route/route_tables.c
+++ b/sys/net/route/route_tables.c
@@ -324,4 +324,3 @@ rt_tables_get_gen(uint32_t table, sa_family_t family)
__func__, table, family));
return (rnh->rnh_gen);
}
-
diff --git a/sys/net/route/route_temporal.c b/sys/net/route/route_temporal.c
index 660436a2eb6e..935b110db629 100644
--- a/sys/net/route/route_temporal.c
+++ b/sys/net/route/route_temporal.c
@@ -153,11 +153,9 @@ tmproutes_init(struct rib_head *rh)
callout_init(&rh->expire_callout, 1);
}
-
void
tmproutes_destroy(struct rib_head *rh)
{
callout_drain(&rh->expire_callout);
}
-
diff --git a/sys/net/route/route_var.h b/sys/net/route/route_var.h
index f9c1b222d5b1..49c3d8d71f31 100644
--- a/sys/net/route/route_var.h
+++ b/sys/net/route/route_var.h
@@ -127,7 +127,6 @@ VNET_PCPUSTAT_DECLARE(struct rtstat, rtstat);
VNET_PCPUSTAT_ADD(struct rtstat, rtstat, name, (val))
#define RTSTAT_INC(name) RTSTAT_ADD(name, 1)
-
/*
* Convert a 'struct radix_node *' to a 'struct rtentry *'.
* The operation can be done safely (in this code) because a
@@ -211,7 +210,7 @@ struct rtentry {
#define _RT_SELECT_NHOP(_nh, _flowid) \
((!NH_IS_MULTIPATH(_nh)) ? (_nh) : _SELECT_NHOP(_nh, _flowid))
#define RT_SELECT_NHOP(_rt, _flowid) _RT_SELECT_NHOP((_rt)->rt_nhop, _flowid)
-
+
/* route_temporal.c */
void tmproutes_update(struct rib_head *rnh, struct rtentry *rt);
void tmproutes_init(struct rib_head *rh);
diff --git a/sys/net/rss_config.c b/sys/net/rss_config.c
index d0f62e1afef1..0b559307f1bb 100644
--- a/sys/net/rss_config.c
+++ b/sys/net/rss_config.c
@@ -284,7 +284,7 @@ rss_naive_hash(u_int keylen, const uint8_t *key, u_int datalen,
uint32_t
rss_hash(u_int datalen, const uint8_t *data)
{
-
+
switch (rss_hashalgo) {
case RSS_HASH_TOEPLITZ:
return (toeplitz_hash(sizeof(rss_key), rss_key, datalen,
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index e22ef51b1d93..690f9a9226ad 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -849,7 +849,6 @@ route_output(struct mbuf *m, struct socket *so, ...)
struct nhop_object *nh;
fibnum = so->so_fibnum;
-
#define senderr(e) { error = e; goto flush;}
if (m == NULL || ((m->m_len < sizeof(long)) &&
(m = m_pullup(m, sizeof(long))) == NULL))
@@ -1053,7 +1052,6 @@ send_rtm_reply(struct socket *so, struct rt_msghdr *rtm, struct mbuf *m,
}
}
-
static void
rt_getmetrics(const struct rtentry *rt, const struct nhop_object *nh,
struct rt_metrics *out)
@@ -1151,7 +1149,6 @@ rtsock_msg_mbuf(int type, struct rt_addrinfo *rtinfo)
int len, dlen;
switch (type) {
-
case RTM_DELADDR:
case RTM_NEWADDR:
len = sizeof(struct ifa_msghdr);
@@ -1238,7 +1235,6 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int *
#endif
switch (type) {
-
case RTM_DELADDR:
case RTM_NEWADDR:
if (w != NULL && w->w_op == NET_RT_IFLISTL) {
@@ -2040,7 +2036,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
error = sysctl_wire_old_buffer(req, 0);
if (error)
return (error);
-
+
/*
* Allocate reply buffer in advance.
* All rtsock messages has maximum length of u_short.
@@ -2147,4 +2143,3 @@ static struct domain routedomain = {
};
VNET_DOMAIN_SET(route);
-
diff --git a/sys/net/sff8436.h b/sys/net/sff8436.h
index 3399cce50a67..0af402556f24 100644
--- a/sys/net/sff8436.h
+++ b/sys/net/sff8436.h
@@ -209,5 +209,3 @@ enum {
SFF_8436_VENDOR_RSRVD_START = 224,
SFF_8436_VENDOR_RSRVD_END = 255,
};
-
-
diff --git a/sys/net/sff8472.h b/sys/net/sff8472.h
index 9fa465a11f9a..648fc5648e72 100644
--- a/sys/net/sff8472.h
+++ b/sys/net/sff8472.h
@@ -61,7 +61,6 @@
* driver.
*/
-
/* Table 3.1 Two-wire interface ID: Data Fields */
enum {
diff --git a/sys/net/slcompress.c b/sys/net/slcompress.c
index 232d7c5bf2f2..9c342474089c 100644
--- a/sys/net/slcompress.c
+++ b/sys/net/slcompress.c
@@ -87,7 +87,6 @@ sl_compress_init(struct slcompress *comp, int max_state)
comp->flags = SLF_TOSS;
}
-
/* ENCODE encodes a number that is known to be non-zero. ENCODEZ
* checks for zero (since zero has to be encoded in the long, 3 byte
* form).
@@ -309,7 +308,6 @@ sl_compress_tcp(struct mbuf *m, struct ip *ip, struct slcompress *comp,
}
switch(changes) {
-
case 0:
/*
* Nothing changed. If this packet contains data and the
@@ -407,7 +405,6 @@ uncompressed:
return (TYPE_UNCOMPRESSED_TCP);
}
-
int
sl_uncompress_tcp(u_char **bufp, int len, u_int type, struct slcompress *comp)
{
@@ -465,7 +462,6 @@ sl_uncompress_tcp_core(u_char *buf, int buflen, int total_len, u_int type,
u_int vjlen;
switch (type) {
-
case TYPE_UNCOMPRESSED_TCP:
ip = (struct ip *) buf;
if (ip->ip_p >= MAX_STATES)
diff --git a/sys/net/slcompress.h b/sys/net/slcompress.h
index 47526931e9d6..76b61942f9a6 100644
--- a/sys/net/slcompress.h
+++ b/sys/net/slcompress.h
@@ -106,7 +106,6 @@
#define TCP_PUSH_BIT 0x10
-
/*
* "state" data for each active tcp conversation on the wire. This is
* basically a copy of the entire IP/TCP header from the last packet
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index a7ec773871b6..dcfcb5f99064 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -201,14 +201,14 @@ void vnet_log_recursion(struct vnet *, const char *, int);
const char *saved_vnet_lpush = curthread->td_vnet_lpush; \
curvnet = arg; \
curthread->td_vnet_lpush = __func__;
-
+
#define CURVNET_SET_VERBOSE(arg) \
CURVNET_SET_QUIET(arg) \
if (saved_vnet) \
vnet_log_recursion(saved_vnet, saved_vnet_lpush, __LINE__);
#define CURVNET_SET(arg) CURVNET_SET_VERBOSE(arg)
-
+
#define CURVNET_RESTORE() \
VNET_ASSERT(curvnet != NULL && (saved_vnet == NULL || \
saved_vnet->vnet_magic_n == VNET_MAGIC_N), \
@@ -224,12 +224,12 @@ void vnet_log_recursion(struct vnet *, const char *, int);
__FILE__, __LINE__, __func__, curvnet, (arg))); \
struct vnet *saved_vnet = curvnet; \
curvnet = arg;
-
+
#define CURVNET_SET_VERBOSE(arg) \
CURVNET_SET_QUIET(arg)
#define CURVNET_SET(arg) CURVNET_SET_VERBOSE(arg)
-
+
#define CURVNET_RESTORE() \
VNET_ASSERT(curvnet != NULL && (saved_vnet == NULL || \
saved_vnet->vnet_magic_n == VNET_MAGIC_N), \
diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h
index 62c40e263aba..5fa59186c5ea 100644
--- a/sys/net80211/ieee80211.h
+++ b/sys/net80211/ieee80211.h
@@ -101,7 +101,6 @@ struct ieee80211_frame_addr4 {
uint8_t i_addr4[IEEE80211_ADDR_LEN];
} __packed;
-
struct ieee80211_qosframe_addr4 {
uint8_t i_fc[2];
uint8_t i_dur[2];
@@ -742,7 +741,6 @@ struct ieee80211_ie_htinfo {
#define IEEE80211_HTINFO_BASIC_STBCMCS_S 0
#define IEEE80211_HTINFO_DUALPROTECTED 0x80
-
/*
* 802.11ac definitions - 802.11ac-2013 .
*/
diff --git a/sys/net80211/ieee80211_action.c b/sys/net80211/ieee80211_action.c
index 49f954a7b6f3..0e917fb17a8e 100644
--- a/sys/net80211/ieee80211_action.c
+++ b/sys/net80211/ieee80211_action.c
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/systm.h>
-
+
#include <sys/socket.h>
#include <net/if.h>
diff --git a/sys/net80211/ieee80211_ageq.c b/sys/net80211/ieee80211_ageq.c
index ad070b34b847..8055012899f3 100644
--- a/sys/net80211/ieee80211_ageq.c
+++ b/sys/net80211/ieee80211_ageq.c
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
-
+
#include <sys/socket.h>
#include <net/if.h>
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c
index d565b3511170..59760d1e7d9c 100644
--- a/sys/net80211/ieee80211_crypto.c
+++ b/sys/net80211/ieee80211_crypto.c
@@ -747,7 +747,6 @@ ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k,
return (cip->ic_miclen > 0 ? cip->ic_demic(k, m, force) : 1);
}
-
static void
load_ucastkey(void *arg, struct ieee80211_node *ni)
{
diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c
index cff53b6ef994..59230d3538a7 100644
--- a/sys/net80211/ieee80211_crypto_tkip.c
+++ b/sys/net80211/ieee80211_crypto_tkip.c
@@ -209,7 +209,6 @@ tkip_encap(struct ieee80211_key *k, struct mbuf *m)
if ((! is_mgmt) && (k->wk_flags & IEEE80211_KEY_NOIV))
return 1;
-
hdrlen = ieee80211_hdrspace(ic, mtod(m, void *));
/*
@@ -790,25 +789,21 @@ wep_decrypt(u8 *key, struct mbuf *m, u_int off, size_t data_len)
return 0;
}
-
static __inline u32 rotl(u32 val, int bits)
{
return (val << bits) | (val >> (32 - bits));
}
-
static __inline u32 rotr(u32 val, int bits)
{
return (val >> bits) | (val << (32 - bits));
}
-
static __inline u32 xswap(u32 val)
{
return ((val & 0x00ff00ff) << 8) | ((val & 0xff00ff00) >> 8);
}
-
#define michael_block(l, r) \
do { \
r ^= rotl(l, 17); \
@@ -821,7 +816,6 @@ do { \
l += r; \
} while (0)
-
static __inline u32 get_le32_split(u8 b0, u8 b1, u8 b2, u8 b3)
{
return b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
@@ -832,7 +826,6 @@ static __inline u32 get_le32(const u8 *p)
return get_le32_split(p[0], p[1], p[2], p[3]);
}
-
static __inline void put_le32(u8 *p, u32 v)
{
p[0] = v;
diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c
index c9afb8b5177a..2a45d7a604d8 100644
--- a/sys/net80211/ieee80211_freebsd.c
+++ b/sys/net80211/ieee80211_freebsd.c
@@ -629,7 +629,6 @@ ieee80211_get_rx_params_ptr(struct mbuf *m)
return (&rx->params);
}
-
/*
* Add TOA parameters to the given mbuf.
*/
@@ -1148,4 +1147,3 @@ MODULE_DEPEND(wlan, ether, 1, 1, 1);
#ifdef IEEE80211_ALQ
MODULE_DEPEND(wlan, alq, 1, 1, 1);
#endif /* IEEE80211_ALQ */
-
diff --git a/sys/net80211/ieee80211_freebsd.h b/sys/net80211/ieee80211_freebsd.h
index 5913f1e69fe4..71abe9099903 100644
--- a/sys/net80211/ieee80211_freebsd.h
+++ b/sys/net80211/ieee80211_freebsd.h
@@ -154,7 +154,7 @@ typedef struct mtx ieee80211_psq_lock_t;
IF_UNLOCK(ifq); \
} while (0)
#endif /* IF_PREPEND_LIST */
-
+
/*
* Age queue definitions.
*/
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index 6687276d0181..8402ade857ff 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -1637,7 +1637,7 @@ ieee80211_deliver_l2uf(struct ieee80211_node *ni)
struct mbuf *m;
struct l2_update_frame *l2uf;
struct ether_header *eh;
-
+
m = m_gethdr(M_NOWAIT, MT_DATA);
if (m == NULL) {
IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni,
@@ -1652,14 +1652,14 @@ ieee80211_deliver_l2uf(struct ieee80211_node *ni)
/* src: associated STA */
IEEE80211_ADDR_COPY(eh->ether_shost, ni->ni_macaddr);
eh->ether_type = htons(sizeof(*l2uf) - sizeof(*eh));
-
+
l2uf->dsap = 0;
l2uf->ssap = 0;
l2uf->control = 0xf5;
l2uf->xid[0] = 0x81;
l2uf->xid[1] = 0x80;
l2uf->xid[2] = 0x00;
-
+
m->m_pkthdr.len = m->m_len = sizeof(*l2uf);
hostap_deliver_data(vap, ni, m);
}
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index 6f29d81b91b9..44514a16da52 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/endian.h>
-
+
#include <sys/socket.h>
#include <net/if.h>
@@ -2915,7 +2915,6 @@ ieee80211_send_bar(struct ieee80211_node *ni,
uint8_t *frm;
int tid, ret;
-
IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N,
tap->txa_ni,
"%s: called",
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c
index 9f1a9fef6818..75c3eeb7c759 100644
--- a/sys/net80211/ieee80211_hwmp.c
+++ b/sys/net80211/ieee80211_hwmp.c
@@ -120,7 +120,6 @@ static void hwmp_peerdown(struct ieee80211_node *);
static struct timeval ieee80211_hwmp_preqminint = { 0, 100000 };
static struct timeval ieee80211_hwmp_perrminint = { 0, 100000 };
-
/* NB: the Target Address set in a Proactive PREQ is the broadcast address. */
static const uint8_t broadcastaddr[IEEE80211_ADDR_LEN] =
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
@@ -217,7 +216,6 @@ SYSCTL_PROC(_net_wlan_hwmp, OID_AUTO, inact,
&mesh_proto_hwmp.mpp_inact, 0, ieee80211_sysctl_msecs_ticks, "I",
"mesh route inactivity timeout (ms)");
-
static void
ieee80211_hwmp_init(void)
{
@@ -1878,7 +1876,6 @@ hwmp_rediscover_cb(void *arg)
hr->hr_preqretries++;
-
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_HWMP, rt->rt_dest,
"start path rediscovery , target seq %u", hr->hr_seq);
/*
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 404eaf96716a..aa557fc1ec24 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -37,9 +37,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/endian.h>
#include <sys/kernel.h>
-
+
#include <sys/socket.h>
-
+
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_var.h>
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index ceb621731f5a..91bca6b819a6 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/systm.h>
-
+
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_dl.h>
diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h
index 573661d5323d..21c20c7a58d9 100644
--- a/sys/net80211/ieee80211_ioctl.h
+++ b/sys/net80211/ieee80211_ioctl.h
@@ -371,7 +371,6 @@ enum {
IEEE80211_HWMP_ROOTMODE_RANN = 3, /* use RANN elemid */
};
-
/*
* Set the active channel list by IEEE channel #: each channel
* to be marked active is set in a bit vector. Note this list is
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index d56bc4230c92..fdb84a2acb3d 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -895,7 +895,6 @@ ieee80211_mesh_mark_gate(struct ieee80211vap *vap, const uint8_t *addr,
return gr;
}
-
/*
* Helper function to note the Mesh Peer Link FSM change.
*/
@@ -951,7 +950,7 @@ static void
mesh_checkid(void *arg, struct ieee80211_node *ni)
{
uint16_t *r = arg;
-
+
if (*r == ni->ni_mllid)
*(uint16_t *)arg = 0;
}
@@ -2186,7 +2185,7 @@ mesh_parse_meshpeering_action(struct ieee80211_node *ni,
return NULL;
}
}
-
+
/*
* Close frames are accepted if meshid is the same.
* Verify the other two types.
@@ -2231,7 +2230,7 @@ mesh_parse_meshpeering_action(struct ieee80211_node *ni,
}
return NULL;
}
-
+
return (const struct ieee80211_meshpeer_ie *) mp;
}
@@ -2510,7 +2509,7 @@ mesh_recv_action_meshlmetric(struct ieee80211_node *ni,
(const struct ieee80211_meshlmetric_ie *)
(frm+2); /* action + code */
struct ieee80211_meshlmetric_ie lm_rep;
-
+
if (ie->lm_flags & IEEE80211_MESH_LMETRIC_FLAGS_REQ) {
lm_rep.lm_flags = 0;
lm_rep.lm_metric = mesh_airtime_calc(ni);
@@ -2606,7 +2605,6 @@ mesh_recv_action_meshgate(struct ieee80211_node *ni,
/* corresponding mesh gate found & GANN accepted */
found = 1;
break;
-
}
if (found == 0) {
/* this GANN is from a new mesh Gate add it to known table. */
@@ -3005,7 +3003,7 @@ static void
mesh_peer_timeout_backoff(struct ieee80211_node *ni)
{
uint32_t r;
-
+
r = arc4random();
ni->ni_mltval += r % ni->ni_mltval;
callout_reset(&ni->ni_mltimer, ni->ni_mltval, mesh_peer_timeout_cb,
@@ -3039,7 +3037,7 @@ mesh_peer_timeout_cb(void *arg)
IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_MESH,
ni, "mesh link timeout, state %d, retry counter %d",
ni->ni_mlstate, ni->ni_mlrcnt);
-
+
switch (ni->ni_mlstate) {
case IEEE80211_NODE_MESH_IDLE:
case IEEE80211_NODE_MESH_ESTABLISHED:
diff --git a/sys/net80211/ieee80211_mesh.h b/sys/net80211/ieee80211_mesh.h
index 89423bd8f817..9fff6c3c548c 100644
--- a/sys/net80211/ieee80211_mesh.h
+++ b/sys/net80211/ieee80211_mesh.h
@@ -90,7 +90,6 @@ enum {
/* Authentication Protocol Identifier */
enum {
-
IEEE80211_MESHCONF_AUTH_DISABLED = 0,
/* Simultaneous Authenticaction of Equals */
IEEE80211_MESHCONF_AUTH_SEA = 1,
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 9ee5b1b83cde..64a0164aeb81 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -574,7 +574,6 @@ check_bss_debug(struct ieee80211vap *vap, struct ieee80211_node *ni)
}
#endif /* IEEE80211_DEBUG */
-
int
ieee80211_ibss_merge_check(struct ieee80211_node *ni)
{
@@ -640,7 +639,6 @@ ieee80211_ibss_node_check_new(struct ieee80211_node *ni,
* Check if the scan SSID matches the SSID list for the VAP.
*/
for (i = 0; i < vap->iv_des_nssid; i++) {
-
/* Sanity length check */
if (vap->iv_des_ssid[i].len != scan->ssid[1])
continue;
@@ -1815,7 +1813,6 @@ ieee80211_init_neighbor(struct ieee80211_node *ni,
(ni->ni_vap->iv_flags_vht & IEEE80211_FVHT_VHT)) {
do_vht_setup = 1;
}
-
}
/* NB: must be after ni_chan is setup */
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index a753c8c8faed..44c2fc2a128e 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/endian.h>
#include <sys/socket.h>
-
+
#include <net/bpf.h>
#include <net/ethernet.h>
#include <net/if.h>
@@ -174,7 +174,6 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m,
BPF_MTAP(ifp, m); /* 802.3 tx */
-
/*
* Figure out if we can do A-MPDU, A-MSDU or FF.
*
@@ -327,8 +326,6 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m,
return (0);
}
-
-
/*
* Send the given mbuf through the given vap.
*
@@ -1479,7 +1476,7 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni,
int meshhdrsize, meshae;
uint8_t *qos;
int is_amsdu = 0;
-
+
IEEE80211_TX_LOCK_ASSERT(ic);
is_mcast = !! (m->m_flags & (M_MCAST | M_BCAST));
@@ -2645,7 +2642,6 @@ ieee80211_send_mgmt(struct ieee80211_node *ni, int type, int arg)
memset(&params, 0, sizeof(params));
switch (type) {
-
case IEEE80211_FC0_SUBTYPE_AUTH:
status = arg >> 16;
arg &= 0xffff;
diff --git a/sys/net80211/ieee80211_phy.c b/sys/net80211/ieee80211_phy.c
index 16bfbf62b7a1..8bf643b17307 100644
--- a/sys/net80211/ieee80211_phy.c
+++ b/sys/net80211/ieee80211_phy.c
@@ -582,7 +582,6 @@ static const uint16_t ht40_bps[32] = {
216, 432, 648, 864, 1296, 1728, 1944, 2160
};
-
#define OFDM_PLCP_BITS 22
#define HT_L_STF 8
#define HT_L_LTF 8
diff --git a/sys/net80211/ieee80211_power.c b/sys/net80211/ieee80211_power.c
index 75d2dbea92ce..8538d6e5323c 100644
--- a/sys/net80211/ieee80211_power.c
+++ b/sys/net80211/ieee80211_power.c
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
-
+
#include <sys/socket.h>
#include <net/if.h>
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index 2f98deea88d9..ad27275d8cfb 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -104,7 +104,6 @@ const char *ieee80211_wme_acnames[] = {
"WME_UPSD",
};
-
/*
* Reason code descriptions were (mostly) obtained from
* IEEE Std 802.11-2012, pp. 442-445 Table 8-36.
@@ -1693,7 +1692,7 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
/* XXX WDS? */
/* XXX MBSS? */
-
+
if (do_aggrmode) {
chanp = &wme->wme_chanParams.cap_wmeParams[WME_AC_BE];
bssp = &wme->wme_bssChanParams.cap_wmeParams[WME_AC_BE];
@@ -1713,7 +1712,6 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap)
chanp->wmep_logcwmax, chanp->wmep_txopLimit);
}
-
/*
* Change the contention window based on the number of associated
* stations. If the number of associated stations is 1 and
@@ -1996,7 +1994,6 @@ ieee80211_start_locked(struct ieee80211vap *vap)
* to be brought up auto-up the parent if necessary.
*/
if (ic->ic_nrunning++ == 0) {
-
/* reset the channel to a known good channel */
if (ieee80211_start_check_reset_chan(vap))
ieee80211_start_reset_chan(vap);
diff --git a/sys/net80211/ieee80211_radiotap.c b/sys/net80211/ieee80211_radiotap.c
index 80c720a6c57b..08117a9e8c05 100644
--- a/sys/net80211/ieee80211_radiotap.c
+++ b/sys/net80211/ieee80211_radiotap.c
@@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/endian.h>
#include <sys/kernel.h>
-
+
#include <sys/socket.h>
-
+
#include <net/bpf.h>
#include <net/if.h>
#include <net/if_var.h>
diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h
index d4369e8e0cd1..f6e76e9fe8aa 100644
--- a/sys/net80211/ieee80211_radiotap.h
+++ b/sys/net80211/ieee80211_radiotap.h
@@ -286,7 +286,6 @@ enum ieee80211_radiotap_type {
#define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */
#define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */
-
/* For IEEE80211_RADIOTAP_MCS */
#define IEEE80211_RADIOTAP_MCS_HAVE_BW 0x01
#define IEEE80211_RADIOTAP_MCS_HAVE_MCS 0x02
diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c
index ee05d89efb5e..1e07aacfc201 100644
--- a/sys/net80211/ieee80211_scan.c
+++ b/sys/net80211/ieee80211_scan.c
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/condvar.h>
-
+
#include <sys/socket.h>
#include <net/if.h>
diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c
index ea75504a7235..7ac959241358 100644
--- a/sys/net80211/ieee80211_scan_sta.c
+++ b/sys/net80211/ieee80211_scan_sta.c
@@ -1556,7 +1556,7 @@ static int
adhoc_start(struct ieee80211_scan_state *ss, struct ieee80211vap *vap)
{
struct sta_table *st = ss->ss_priv;
-
+
makescanlist(ss, vap, adhocScanTable);
if (ss->ss_mindwell == 0)
diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c
index 4fcd26db61b1..4c184095ad35 100644
--- a/sys/net80211/ieee80211_scan_sw.c
+++ b/sys/net80211/ieee80211_scan_sw.c
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/condvar.h>
-
+
#include <sys/socket.h>
#include <net/if.h>
@@ -232,7 +232,6 @@ ieee80211_swscan_start_scan_locked(const struct ieee80211_scanner *scan,
return 0;
}
-
/*
* Start a scan unless one is already going.
*
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
index f852c4b88b58..9c17358e93a9 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -1580,7 +1580,6 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype,
* us then get us out of STA mode powersave.
*/
if (tim_ucast == 1) {
-
/*
* Wake us out of SLEEP state if we're
* in it; and if we're doing bgscan
diff --git a/sys/net80211/ieee80211_superg.c b/sys/net80211/ieee80211_superg.c
index dacd466c3de7..30c01e0761dc 100644
--- a/sys/net80211/ieee80211_superg.c
+++ b/sys/net80211/ieee80211_superg.c
@@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$");
#include <sys/endian.h>
#include <sys/socket.h>
-
+
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_llc.h>
@@ -590,7 +590,6 @@ bad:
return NULL;
}
-
static void
ff_transmit(struct ieee80211_node *ni, struct mbuf *m)
{
diff --git a/sys/net80211/ieee80211_tdma.h b/sys/net80211/ieee80211_tdma.h
index 9b108e4ba724..f0cbf5cdd77f 100644
--- a/sys/net80211/ieee80211_tdma.h
+++ b/sys/net80211/ieee80211_tdma.h
@@ -87,7 +87,7 @@ struct ieee80211_tdma_state {
const struct ieee80211_rx_stats *rxs, int, int);
void (*tdma_opdetach)(struct ieee80211vap *);
};
-
+
#define TDMA_UPDATE_SLOT 0x0001 /* tdma_slot changed */
#define TDMA_UPDATE_SLOTCNT 0x0002 /* tdma_slotcnt changed */
#define TDMA_UPDATE_SLOTLEN 0x0004 /* tdma_slotlen changed */
diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c
index dbf9f9f69b4b..9582b89a446c 100644
--- a/sys/net80211/ieee80211_vht.c
+++ b/sys/net80211/ieee80211_vht.c
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$");
#include <sys/malloc.h>
#include <sys/systm.h>
#include <sys/endian.h>
-
+
#include <sys/socket.h>
#include <net/if.h>
diff --git a/sys/netgraph/atm/ccatm/ng_ccatm.c b/sys/netgraph/atm/ccatm/ng_ccatm.c
index cc3f7519289f..6c27b6aacc0f 100644
--- a/sys/netgraph/atm/ccatm/ng_ccatm.c
+++ b/sys/netgraph/atm/ccatm/ng_ccatm.c
@@ -492,10 +492,8 @@ ng_ccatm_rcvmsg(node_p node, item_p item, hook_p lasthook)
NGI_GET_MSG(item, msg);
switch (msg->header.typecookie) {
-
case NGM_CCATM_COOKIE:
switch (msg->header.cmd) {
-
case NGM_CCATM_DUMP:
if (priv->dump)
error = ng_ccatm_dump(node);
@@ -769,14 +767,12 @@ ng_ccatm_rcvmsg(node_p node, item_p item, hook_p lasthook)
default:
error = EINVAL;
break;
-
}
break;
default:
error = EINVAL;
break;
-
}
NG_RESPOND_MSG(error, node, item, resp);
@@ -1181,7 +1177,6 @@ ng_ccatm_mod_event(module_t mod, int event, void *data)
int error = 0;
switch (event) {
-
case MOD_LOAD:
break;
diff --git a/sys/netgraph/atm/ng_sscop.h b/sys/netgraph/atm/ng_sscop.h
index d535c3c2505f..cc67916ca49c 100644
--- a/sys/netgraph/atm/ng_sscop.h
+++ b/sys/netgraph/atm/ng_sscop.h
@@ -67,7 +67,6 @@ enum {
{ NULL } \
}
-
struct ng_sscop_setparam {
uint32_t mask;
struct sscop_param param;
diff --git a/sys/netgraph/atm/ngatmbase.c b/sys/netgraph/atm/ngatmbase.c
index 1b0f0969f6e4..85409b35e4bd 100644
--- a/sys/netgraph/atm/ngatmbase.c
+++ b/sys/netgraph/atm/ngatmbase.c
@@ -483,7 +483,6 @@ ngatm_handler(module_t mod, int what, void *arg)
int error = 0;
switch (what) {
-
case MOD_LOAD:
uni_msg_init();
break;
diff --git a/sys/netgraph/atm/sscfu/ng_sscfu.c b/sys/netgraph/atm/sscfu/ng_sscfu.c
index 9036e7740ab6..7fe3728b7eae 100644
--- a/sys/netgraph/atm/sscfu/ng_sscfu.c
+++ b/sys/netgraph/atm/sscfu/ng_sscfu.c
@@ -92,7 +92,6 @@ static const struct ng_parse_type ng_sscfu_getdefparam_type = {
ng_sscfu_getdefparam_type_info
};
-
static const struct ng_cmdlist ng_sscfu_cmdlist[] = {
{
NGM_SSCFU_COOKIE,
@@ -224,10 +223,8 @@ ng_sscfu_rcvmsg(node_p node, item_p item, hook_p lasthook)
NGI_GET_MSG(item, msg);
switch (msg->header.typecookie) {
-
case NGM_GENERIC_COOKIE:
switch (msg->header.cmd) {
-
case NGM_TEXT_STATUS:
NG_MKRESPONSE(resp, msg, NG_TEXTRESPONSE, M_NOWAIT);
if (resp == NULL) {
@@ -246,7 +243,6 @@ ng_sscfu_rcvmsg(node_p node, item_p item, hook_p lasthook)
case NGM_SSCFU_COOKIE:
switch (msg->header.cmd) {
-
case NGM_SSCFU_GETDEFPARAM:
{
struct ng_sscfu_getdefparam *p;
@@ -592,7 +588,6 @@ ng_sscfu_mod_event(module_t mod, int event, void *data)
int error = 0;
switch (event) {
-
case MOD_LOAD:
break;
diff --git a/sys/netgraph/atm/sscfu/ng_sscfu_cust.h b/sys/netgraph/atm/sscfu/ng_sscfu_cust.h
index eb0250e5ec02..f97245833be1 100644
--- a/sys/netgraph/atm/sscfu/ng_sscfu_cust.h
+++ b/sys/netgraph/atm/sscfu/ng_sscfu_cust.h
@@ -82,7 +82,6 @@
#endif
-
/*
* Signal queues
*/
@@ -120,7 +119,6 @@ ng_sscfu_sigq_get(struct sscfu_sigq *q) \
TAILQ_INIT(Q); \
} while (0)
-
/*
* Message buffers
*/
diff --git a/sys/netgraph/atm/sscop/ng_sscop.c b/sys/netgraph/atm/sscop/ng_sscop.c
index 67a3f07efd83..b15ef5e258a1 100644
--- a/sys/netgraph/atm/sscop/ng_sscop.c
+++ b/sys/netgraph/atm/sscop/ng_sscop.c
@@ -302,7 +302,6 @@ flow_upper(node_p node, struct ng_mesg *msg)
q = (struct ngm_queue_state *)msg->data;
switch (msg->header.cmd) {
-
case NGM_HIGH_WATER_PASSED:
if (priv->flow) {
VERBOSE(priv, SSCOP_DBG_FLOW, (priv->sscop, priv,
@@ -355,7 +354,6 @@ flow_lower(node_p node, struct ng_mesg *msg)
return (EINVAL);
switch (msg->header.cmd) {
-
case NGM_HIGH_WATER_PASSED:
sscop_setbusy(priv->sscop, 1);
break;
@@ -435,7 +433,6 @@ text_status(node_p node, struct priv *priv, char *arg, u_int len)
return (sbuf_len(&sbuf));
}
-
/*
* Control message received.
*/
@@ -450,10 +447,8 @@ ng_sscop_rcvmsg(node_p node, item_p item, hook_p lasthook)
NGI_GET_MSG(item, msg);
switch (msg->header.typecookie) {
-
case NGM_GENERIC_COOKIE:
switch (msg->header.cmd) {
-
case NGM_TEXT_STATUS:
NG_MKRESPONSE(resp, msg, NG_TEXTRESPONSE, M_NOWAIT);
if (resp == NULL) {
@@ -482,7 +477,6 @@ ng_sscop_rcvmsg(node_p node, item_p item, hook_p lasthook)
case NGM_SSCOP_COOKIE:
switch (msg->header.cmd) {
-
case NGM_SSCOP_GETPARAM:
{
struct sscop_param *p;
@@ -864,7 +858,6 @@ ng_sscop_mod_event(module_t mod, int event, void *data)
int error = 0;
switch (event) {
-
case MOD_LOAD:
break;
diff --git a/sys/netgraph/atm/sscop/ng_sscop_cust.h b/sys/netgraph/atm/sscop/ng_sscop_cust.h
index 29d701aacb4c..97456a165220 100644
--- a/sys/netgraph/atm/sscop/ng_sscop_cust.h
+++ b/sys/netgraph/atm/sscop/ng_sscop_cust.h
@@ -133,7 +133,6 @@ T##_func(node_p node, hook_p hook, void *arg1, int arg2) \
sscop_signal(sscop, SIG_T_##N, NULL); \
}
-
/*
* Message queues
*/
diff --git a/sys/netgraph/atm/uni/ng_uni.c b/sys/netgraph/atm/uni/ng_uni.c
index d3adad5ac9e4..c4e1c2c523b5 100644
--- a/sys/netgraph/atm/uni/ng_uni.c
+++ b/sys/netgraph/atm/uni/ng_uni.c
@@ -315,10 +315,8 @@ ng_uni_rcvmsg(node_p node, item_p item, hook_p lasthook)
NGI_GET_MSG(item, msg);
switch (msg->header.typecookie) {
-
case NGM_GENERIC_COOKIE:
switch (msg->header.cmd) {
-
case NGM_TEXT_STATUS:
NG_MKRESPONSE(resp, msg, NG_TEXTRESPONSE, M_NOWAIT);
if (resp == NULL) {
@@ -338,7 +336,6 @@ ng_uni_rcvmsg(node_p node, item_p item, hook_p lasthook)
case NGM_UNI_COOKIE:
switch (msg->header.cmd) {
-
case NGM_UNI_SETDEBUG:
{
struct ngm_uni_debug *arg;
@@ -563,7 +560,6 @@ ng_uni_rcvupper(hook_p hook, item_p item)
return (0);
}
-
/*
* Upper layer signal from UNI
*/
@@ -594,7 +590,6 @@ uni_uni_output(struct uni *uni, void *varg, enum uni_sig sig, u_int32_t cookie,
NG_SEND_DATA_ONLY(error, priv->upper, m);
}
-
static void
dump_uni_msg(struct uni_msg *msg)
{
@@ -613,7 +608,6 @@ dump_uni_msg(struct uni_msg *msg)
printf("\n");
}
-
/*
* Dump a SAAL signal in either direction
*/
@@ -625,7 +619,6 @@ dump_saal_signal(node_p node, enum saal_sig sig, struct uni_msg *msg, int to)
printf("signal %s SAAL: ", to ? "to" : "from");
switch (sig) {
-
#define D(S) case S: printf("%s", #S); break
D(SAAL_ESTABLISH_request);
@@ -758,7 +751,6 @@ uni_verbose(struct uni *uni, void *varg, u_int fac, const char *fmt, ...)
printf("\n");
}
-
/************************************************************/
/*
* Memory debugging
@@ -912,7 +904,6 @@ ng_uni_mod_event(module_t mod, int event, void *data)
int error = 0;
switch(event) {
-
case MOD_LOAD:
uni_init();
break;
diff --git a/sys/netgraph/bluetooth/common/ng_bluetooth.c b/sys/netgraph/bluetooth/common/ng_bluetooth.c
index 1a9d1c425a18..c191efae1e6b 100644
--- a/sys/netgraph/bluetooth/common/ng_bluetooth.c
+++ b/sys/netgraph/bluetooth/common/ng_bluetooth.c
@@ -291,4 +291,3 @@ static moduledata_t bluetooth_mod = {
DECLARE_MODULE(ng_bluetooth, bluetooth_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
MODULE_VERSION(ng_bluetooth, NG_BLUETOOTH_VERSION);
-
diff --git a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
index 5a874e989711..c9045e84f256 100644
--- a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
+++ b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c
@@ -137,7 +137,7 @@ do { \
} while(0)
static MALLOC_DEFINE(M_BT3C, "bt3c", "bt3c data structures");
-
+
/****************************************************************************
****************************************************************************
** Netgraph specific
@@ -834,7 +834,7 @@ bt3c_receive(bt3c_softc_p sc)
bt3c_read_data(sc, c);
if (sc->m->m_pkthdr.len >= MCLBYTES) {
NG_BT3C_ERR(sc->dev, "Oversized frame\n");
-
+
NG_FREE_M(sc->m);
sc->state = NG_BT3C_W4_PKT_IND;
sc->want = 1;
@@ -1181,7 +1181,6 @@ static device_method_t bt3c_pccard_methods[] = {
DEVMETHOD(device_probe, bt3c_pccard_probe),
DEVMETHOD(device_attach, bt3c_pccard_attach),
DEVMETHOD(device_detach, bt3c_pccard_detach),
-
{ 0, 0 }
};
@@ -1193,16 +1192,15 @@ static driver_t bt3c_pccard_driver = {
static devclass_t bt3c_devclass;
-
/*
* Load/Unload the driver module
*/
-
+
static int
bt3c_modevent(module_t mod, int event, void *data)
{
int error;
-
+
switch (event) {
case MOD_LOAD:
error = ng_newtype(&typestruct);
diff --git a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h
index 481e36c87b13..9dfd90795ab7 100644
--- a/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h
+++ b/sys/netgraph/bluetooth/drivers/bt3c/ng_bt3c_var.h
@@ -106,4 +106,3 @@ typedef struct bt3c_softc bt3c_softc_t;
typedef struct bt3c_softc * bt3c_softc_p;
#endif /* ndef _NG_BT3C_VAR_H_ */
-
diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
index a747e6bce0d3..11560b7c6681 100644
--- a/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
+++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4.c
@@ -1018,4 +1018,3 @@ ng_h4_mod_event(module_t mod, int event, void *data)
return (error);
} /* ng_h4_mod_event */
-
diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h b/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h
index 0a35a3698769..835fd65b9543 100644
--- a/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h
+++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4_prse.h
@@ -123,4 +123,3 @@ static const struct ng_cmdlist ng_h4_cmdlist[] = {
};
#endif /* ndef _NETGRAPH_H4_PRSE_H_ */
-
diff --git a/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h b/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h
index 2b22fc770aa9..2bfa3d6cde3c 100644
--- a/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h
+++ b/sys/netgraph/bluetooth/drivers/h4/ng_h4_var.h
@@ -73,7 +73,7 @@ typedef struct ng_h4_info {
ng_h4_node_debug_ep debug; /* Debug level */
ng_h4_node_state_ep state; /* State */
-
+
ng_h4_node_stat_ep stat;
#define NG_H4_STAT_PCKTS_SENT(s) (s).pckts_sent ++
#define NG_H4_STAT_BYTES_SENT(s, n) (s).bytes_sent += (n)
@@ -102,4 +102,3 @@ typedef struct ng_h4_info {
typedef ng_h4_info_t * ng_h4_info_p;
#endif /* _NETGRAPH_H4_VAR_H_ */
-
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
index d641aadad60d..30a012702c8f 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
@@ -560,7 +560,6 @@ ubt_do_hci_request(struct usb_device *udev, struct ubt_hci_cmd *cmd,
error = usbd_transfer_setup(udev, &iface_index, xfer,
&ubt_probe_config, 1, evt, &mtx);
if (error == USB_ERR_NORMAL_COMPLETION) {
-
mtx_lock(&mtx);
usbd_transfer_start(*xfer);
@@ -703,7 +702,6 @@ ubt_attach(device_t dev)
while ((ed = (struct usb_endpoint_descriptor *)usb_desc_foreach(
usbd_get_config_descriptor(uaa->device),
(struct usb_descriptor *)ed))) {
-
if ((ed->bDescriptorType == UDESC_INTERFACE) &&
(ed->bLength >= sizeof(*id))) {
id = (struct usb_interface_descriptor *)ed;
@@ -1678,7 +1676,7 @@ ng_ubt_disconnect(hook_p hook)
return (0);
} /* ng_ubt_disconnect */
-
+
/*
* Process control message.
* Netgraph context.
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h
index d5bf568a5ecb..e93c85569f10 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h
@@ -64,7 +64,7 @@ enum {
UBT_IF_0_BULK_DT_RD,
UBT_IF_0_INTR_DT_RD,
UBT_IF_0_CTRL_DT_WR,
-
+
/* Interface #1 transfers */
UBT_IF_1_ISOC_DT_RD1,
UBT_IF_1_ISOC_DT_RD2,
@@ -165,4 +165,3 @@ extern devclass_t ubt_devclass;
extern driver_t ubt_driver;
#endif /* ndef _NG_UBT_VAR_H_ */
-
diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
index 32c9caba94f0..60896597cae7 100644
--- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
+++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
@@ -177,7 +177,6 @@ static const STRUCT_USB_HOST_ID ubtbcmfw_devs[] = {
{ USB_VPI(USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033, 0) },
};
-
DRIVER_MODULE(ubtbcmfw, uhub, ubtbcmfw_driver, ubtbcmfw_devclass, NULL, 0);
MODULE_DEPEND(ubtbcmfw, usb, 1, 1, 1);
USB_PNP_HOST_INFO(ubtbcmfw_devs);
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_cmds.c b/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
index 9bef544cc98b..cf192bfb3469 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_cmds.c
@@ -527,7 +527,7 @@ process_link_policy_params(ng_hci_unit_p unit, u_int16_t ocf,
case NG_HCI_OCF_WRITE_LINK_POLICY_SETTINGS:
/* These do not need post processing */
break;
-
+
case NG_HCI_OCF_HOLD_MODE:
case NG_HCI_OCF_SNIFF_MODE:
case NG_HCI_OCF_EXIT_SNIFF_MODE:
@@ -733,7 +733,7 @@ process_info_params(ng_hci_unit_p unit, u_int16_t ocf, struct mbuf *mcp,
ng_hci_node_is_up(unit->node, unit->acl, NULL, 0);
ng_hci_node_is_up(unit->node, unit->sco, NULL, 0);
break;
-
+
default:
error = EINVAL;
break;
@@ -785,14 +785,13 @@ process_testing_params(ng_hci_unit_p unit, u_int16_t ocf, struct mbuf *mcp,
int error = 0;
switch (ocf) {
-
/*
* XXX FIXME
* We do not support these features at this time. However,
* HCI node could support this and do something smart. At least
* node can change unit state.
*/
-
+
case NG_HCI_OCF_READ_LOOPBACK_MODE:
case NG_HCI_OCF_WRITE_LOOPBACK_MODE:
case NG_HCI_OCF_ENABLE_UNIT_UNDER_TEST:
@@ -854,7 +853,6 @@ process_le_params(ng_hci_unit_p unit, u_int16_t ocf,
case NG_HCI_OCF_LE_READ_REMOTE_USED_FEATURES:
case NG_HCI_OCF_LE_START_ENCRYPTION:
-
default:
/*
* None of these command was supposed to generate
@@ -874,8 +872,6 @@ process_le_params(ng_hci_unit_p unit, u_int16_t ocf,
}
-
-
static int
process_le_status(ng_hci_unit_p unit,ng_hci_command_status_ep *ep,
struct mbuf *mcp)
@@ -918,7 +914,6 @@ process_le_status(ng_hci_unit_p unit,ng_hci_command_status_ep *ep,
case NG_HCI_OCF_LE_TRANSMITTER_TEST:
case NG_HCI_OCF_LE_TEST_END:
-
default:
/*
* None of these command was supposed to generate
@@ -1036,4 +1031,3 @@ process_link_policy_status(ng_hci_unit_p unit, ng_hci_command_status_ep *ep,
return (error);
} /* process_link_policy_status */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_cmds.h b/sys/netgraph/bluetooth/hci/ng_hci_cmds.h
index 9290eddcc8cb..18f14c93ced3 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_cmds.h
+++ b/sys/netgraph/bluetooth/hci/ng_hci_cmds.h
@@ -46,4 +46,3 @@ int ng_hci_process_command_status (ng_hci_unit_p, struct mbuf *);
void ng_hci_process_command_timeout (node_p, hook_p, void *, int);
#endif /* ndef _NETGRAPH_HCI_CMDS_H_ */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
index 5b1916c8ece0..9e299d12fd1e 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.c
@@ -83,7 +83,7 @@ static int le_event (ng_hci_unit_p, struct mbuf *);
/*
* Process HCI event packet
*/
-
+
int
ng_hci_process_event(ng_hci_unit_p unit, struct mbuf *event)
{
@@ -384,7 +384,7 @@ le_advertizing_report(ng_hci_unit_p unit, struct mbuf *event)
int num_reports = 0;
u_int8_t event_type;
u_int8_t addr_type;
-
+
NG_HCI_M_PULLUP(event, sizeof(*ep));
if (event == NULL)
return (ENOBUFS);
@@ -393,7 +393,7 @@ le_advertizing_report(ng_hci_unit_p unit, struct mbuf *event)
num_reports = ep->num_reports;
m_adj(event, sizeof(*ep));
ep = NULL;
-
+
for (; num_reports > 0; num_reports --) {
/* Get remote unit address */
NG_HCI_M_PULLUP(event, sizeof(u_int8_t));
@@ -554,7 +554,6 @@ static int le_connection_complete(ng_hci_unit_p unit, struct mbuf *event)
* supported link modes. Enable Role switch as well if
* device supports it.
*/
-
}
out:
@@ -568,7 +567,7 @@ static int le_connection_update(ng_hci_unit_p unit, struct mbuf *event)
{
int error = 0;
/*TBD*/
-
+
NG_FREE_M(event);
return error;
@@ -1182,7 +1181,7 @@ mode_change(ng_hci_unit_p unit, struct mbuf *event)
ng_hci_mode_change_ep *ep = NULL;
ng_hci_unit_con_p con = NULL;
int error = 0;
-
+
NG_HCI_M_PULLUP(event, sizeof(*ep));
if (event == NULL)
return (ENOBUFS);
@@ -1392,4 +1391,3 @@ out:
return (error);
} /* page_scan_rep_mode_change */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_evnt.h b/sys/netgraph/bluetooth/hci/ng_hci_evnt.h
index 1f11b416eae9..efc958d3be9e 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_evnt.h
+++ b/sys/netgraph/bluetooth/hci/ng_hci_evnt.h
@@ -44,4 +44,3 @@ int ng_hci_process_event (ng_hci_unit_p, struct mbuf *);
void ng_hci_send_data (ng_hci_unit_p);
#endif /* ndef _NETGRAPH_HCI_EVNT_H_ */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_main.c b/sys/netgraph/bluetooth/hci/ng_hci_main.c
index ad3bd403de7f..2d93a79cd679 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_main.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_main.c
@@ -755,7 +755,7 @@ ng_hci_drv_rcvdata(hook_p hook, item_p item)
} else
NG_FWD_ITEM_HOOK(error, item, unit->sco);
break;
-
+
case NG_HCI_EVENT_PKT:
NG_HCI_STAT_EVNT_RECV(unit->stat);
@@ -1101,4 +1101,3 @@ drop:
return (error);
} /* ng_hci_raw_rcvdata */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_misc.c b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
index 619b5d4c4430..707af8c84d06 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_misc.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_misc.c
@@ -232,7 +232,7 @@ ng_hci_get_neighbor(ng_hci_unit_p unit, bdaddr_p bdaddr,int link_type)
n = nn;
}
-
+
return (n);
} /* ng_hci_get_neighbor */
@@ -526,4 +526,3 @@ ng_hci_str_error(u_int16_t code)
return ((code >= LAST_ERROR_CODE)? s[LAST_ERROR_CODE] : s[code]);
} /* ng_hci_str_error */
#endif
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_misc.h b/sys/netgraph/bluetooth/hci/ng_hci_misc.h
index e32a83de909e..dde5f883acb2 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_misc.h
+++ b/sys/netgraph/bluetooth/hci/ng_hci_misc.h
@@ -57,4 +57,3 @@ int ng_hci_con_timeout (ng_hci_unit_con_p);
int ng_hci_con_untimeout (ng_hci_unit_con_p);
#endif /* ndef _NETGRAPH_HCI_MISC_H_ */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_prse.h b/sys/netgraph/bluetooth/hci/ng_hci_prse.h
index 5d456ebea4de..9731de6aa9fa 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_prse.h
+++ b/sys/netgraph/bluetooth/hci/ng_hci_prse.h
@@ -218,4 +218,3 @@ static const struct ng_cmdlist ng_hci_cmdlist[] = {
};
#endif /* ndef _NETGRAPH_HCI_PRSE_H_ */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
index bb85dc6e73c9..4c275f425064 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
+++ b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.c
@@ -68,7 +68,7 @@ int
ng_hci_lp_con_req(ng_hci_unit_p unit, item_p item, hook_p hook)
{
int link_type;
-
+
if ((unit->state & NG_HCI_UNIT_READY) != NG_HCI_UNIT_READY) {
NG_HCI_WARN(
"%s: %s - unit is not ready, state=%#x\n",
@@ -111,7 +111,7 @@ ng_hci_lp_con_req(ng_hci_unit_p unit, item_p item, hook_p hook)
default:
panic("%s: link_type invalid.", __func__);
}
-
+
return (EINVAL);
} /* ng_hci_lp_con_req */
@@ -618,7 +618,7 @@ ng_hci_lp_le_con_req(ng_hci_unit_p unit, item_p item, hook_p hook, int link_type
req->hdr.length = sizeof(req->cp);
req->hdr.opcode = htole16(NG_HCI_OPCODE(NG_HCI_OGF_LE,
NG_HCI_OCF_LE_CREATE_CONNECTION));
-
+
bcopy(&ep->bdaddr, &req->cp.peer_addr, sizeof(req->cp.peer_addr));
req->cp.own_address_type = 0;
req->cp.peer_addr_type = (link_type == NG_HCI_LINK_LE_RANDOM)? 1:0;
@@ -824,7 +824,6 @@ ng_hci_lp_enc_change(ng_hci_unit_con_p con, int status)
ng_hci_lp_enc_change_ep *ep = NULL;
int error;
-
if (con->link_type != NG_HCI_LINK_SCO) {
if (unit->acl != NULL && NG_HOOK_IS_VALID(unit->acl)) {
NG_MKMESSAGE(msg, NGM_HCI_COOKIE, NGM_HCI_LP_ENC_CHG,
@@ -842,7 +841,6 @@ ng_hci_lp_enc_change(ng_hci_unit_con_p con, int status)
NG_HCI_INFO(
"%s: %s - ACL hook not valid, hook=%p\n",
__func__, NG_NODE_NAME(unit->node), unit->acl);
-
}
return (0);
} /* ng_hci_lp_con_cfm */
@@ -1254,7 +1252,7 @@ ng_hci_lp_qos_req(ng_hci_unit_p unit, item_p item, hook_p hook)
error = ng_hci_send_command(unit);
out:
NG_FREE_ITEM(item);
-
+
return (error);
} /* ng_hci_lp_qos_req */
@@ -1309,7 +1307,7 @@ ng_hci_lp_qos_cfm(ng_hci_unit_con_p con, int status)
con->flags &= ~NG_HCI_CON_NOTIFY_SCO;
}
-
+
return (0);
} /* ng_hci_lp_qos_cfm */
@@ -1428,4 +1426,3 @@ ng_hci_process_con_timeout(node_p node, hook_p hook, void *arg1, int con_handle)
ng_hci_free_con(con);
} /* ng_hci_process_con_timeout */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h
index 18fcb4e8dd40..16fdaa3ced63 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h
+++ b/sys/netgraph/bluetooth/hci/ng_hci_ulpi.h
@@ -54,4 +54,3 @@ int ng_hci_lp_enc_change (ng_hci_unit_con_p, int);
void ng_hci_process_con_timeout (node_p, hook_p, void *, int);
#endif /* ndef _NETGRAPH_HCI_ULPI_H_ */
-
diff --git a/sys/netgraph/bluetooth/hci/ng_hci_var.h b/sys/netgraph/bluetooth/hci/ng_hci_var.h
index d30a5694284f..bb5c1f4624a7 100644
--- a/sys/netgraph/bluetooth/hci/ng_hci_var.h
+++ b/sys/netgraph/bluetooth/hci/ng_hci_var.h
@@ -219,4 +219,3 @@ typedef struct ng_hci_neighbor {
typedef ng_hci_neighbor_t * ng_hci_neighbor_p;
#endif /* ndef _NETGRAPH_HCI_VAR_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_bluetooth.h b/sys/netgraph/bluetooth/include/ng_bluetooth.h
index 4eb2c7b79d96..ae68392cc54c 100644
--- a/sys/netgraph/bluetooth/include/ng_bluetooth.h
+++ b/sys/netgraph/bluetooth/include/ng_bluetooth.h
@@ -231,4 +231,3 @@ u_int32_t bluetooth_sco_rtx_timeout (void);
#define BDADDR_LE_RANDOM 2
#endif /* _NETGRAPH_BLUETOOTH_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_bt3c.h b/sys/netgraph/bluetooth/include/ng_bt3c.h
index 9c0f2a121525..59cc7c7dba84 100644
--- a/sys/netgraph/bluetooth/include/ng_bt3c.h
+++ b/sys/netgraph/bluetooth/include/ng_bt3c.h
@@ -110,4 +110,3 @@ typedef struct {
} ng_bt3c_firmware_block_ep;
#endif /* ndef _NG_BT3C_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_btsocket.h b/sys/netgraph/bluetooth/include/ng_btsocket.h
index c8c1a0c00aee..acaed2603ab7 100644
--- a/sys/netgraph/bluetooth/include/ng_btsocket.h
+++ b/sys/netgraph/bluetooth/include/ng_btsocket.h
@@ -239,12 +239,10 @@ struct sockaddr_l2cap {
u_int8_t l2cap_bdaddr_type; /*address type*/
};
-
#if !defined(L2CAP_SOCKET_CHECKED) && !defined(_KERNEL)
#warning "Make sure new member of socket address initialized"
#endif
-
/* L2CAP socket options */
#define SOL_L2CAP 0x1609 /* socket option level */
@@ -375,4 +373,3 @@ struct ng_btsocket_rfcomm_fc_info {
#define NG_BTSOCKET_INFO_LEVEL 4
#endif /* _NETGRAPH_BTSOCKET_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h b/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h
index a40470a51894..5a51452dc884 100644
--- a/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h
+++ b/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h
@@ -87,6 +87,5 @@ int ng_btsocket_hci_raw_send (struct socket *, int, struct mbuf *,
int ng_btsocket_hci_raw_sockaddr (struct socket *, struct sockaddr **);
#endif /* _KERNEL */
-
-#endif /* ndef _NETGRAPH_BTSOCKET_HCI_RAW_H_ */
+#endif /* ndef _NETGRAPH_BTSOCKET_HCI_RAW_H_ */
diff --git a/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h b/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h
index 0017f8b6557a..8ecb8821a275 100644
--- a/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h
+++ b/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h
@@ -176,7 +176,7 @@ struct ng_btsocket_l2cap_pcb {
struct mtx pcb_mtx; /* pcb mutex */
uint16_t need_encrypt; /*encryption needed*/
-
+
LIST_ENTRY(ng_btsocket_l2cap_pcb) next; /* link to next PCB */
};
typedef struct ng_btsocket_l2cap_pcb ng_btsocket_l2cap_pcb_t;
@@ -215,4 +215,3 @@ int ng_btsocket_l2cap_sockaddr (struct socket *, struct sockaddr **);
#endif /* _KERNEL */
#endif /* _NETGRAPH_BTSOCKET_L2CAP_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h b/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h
index 1e3a28b9ede7..569a407ef629 100644
--- a/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h
+++ b/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h
@@ -339,4 +339,3 @@ int ng_btsocket_rfcomm_sockaddr (struct socket *, struct sockaddr **);
#endif /* _KERNEL */
#endif /* _NETGRAPH_BTSOCKET_RFCOMM_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_btsocket_sco.h b/sys/netgraph/bluetooth/include/ng_btsocket_sco.h
index f707e7ed1988..979ea408f292 100644
--- a/sys/netgraph/bluetooth/include/ng_btsocket_sco.h
+++ b/sys/netgraph/bluetooth/include/ng_btsocket_sco.h
@@ -129,4 +129,3 @@ int ng_btsocket_sco_sockaddr (struct socket *, struct sockaddr **);
#endif /* _KERNEL */
#endif /* _NETGRAPH_BTSOCKET_SCO_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_h4.h b/sys/netgraph/bluetooth/include/ng_h4.h
index 803bbaf9609b..872ce6423ad9 100644
--- a/sys/netgraph/bluetooth/include/ng_h4.h
+++ b/sys/netgraph/bluetooth/include/ng_h4.h
@@ -112,4 +112,3 @@ typedef struct {
#define NGM_H4_NODE_RESET_STAT 8
#endif /* _NETGRAPH_H4_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_hci.h b/sys/netgraph/bluetooth/include/ng_hci.h
index fedd2d7696b7..3de0ef337249 100644
--- a/sys/netgraph/bluetooth/include/ng_hci.h
+++ b/sys/netgraph/bluetooth/include/ng_hci.h
@@ -715,7 +715,7 @@ typedef struct {
} __attribute__ ((packed)) ng_hci_periodic_inquiry_cp;
typedef ng_hci_status_rp ng_hci_periodic_inquiry_rp;
-
+
#define NG_HCI_OCF_EXIT_PERIODIC_INQUIRY 0x0004
/* No command parameter(s) */
typedef ng_hci_status_rp ng_hci_exit_periodic_inquiry_rp;
@@ -941,7 +941,7 @@ typedef struct {
typedef struct {
u_int16_t con_handle; /* connection handle */
} __attribute__ ((packed)) ng_hci_read_link_policy_settings_cp;
-
+
typedef struct {
u_int8_t status; /* 0x00 - success */
u_int16_t con_handle; /* connection handle */
@@ -1207,7 +1207,7 @@ typedef struct {
u_int16_t con_handle; /* connection handle */
u_int16_t timeout; /* 0x00 - no flush, timeout * 0.625 msec */
} __attribute__ ((packed)) ng_hci_read_auto_flush_timo_rp;
-
+
#define NG_HCI_OCF_WRITE_AUTO_FLUSH_TIMO 0x0028
typedef struct {
u_int16_t con_handle; /* connection handle */
@@ -1529,7 +1529,7 @@ typedef ng_hci_status_rp ng_hci_enable_unit_under_test_rp;
#define NG_HCI_OCF_LE_SET_EVENT_MASK 0x0001
typedef struct {
u_int8_t event_mask[NG_HCI_LE_EVENT_MASK_SIZE]; /* event_mask*/
-
+
} __attribute__ ((packed)) ng_hci_le_set_event_mask_cp;
typedef ng_hci_status_rp ng_hci_le_set_event_mask_rp;
#define NG_HCI_LE_EVENT_MASK_ALL 0x1f
@@ -1542,7 +1542,6 @@ typedef struct {
u_int8_t hc_total_num_le_data_packets;
} __attribute__ ((packed)) ng_hci_le_read_buffer_size_rp;
-
#define NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES 0x0003
/*No command parameter */
typedef struct {
@@ -1640,7 +1639,7 @@ typedef struct {
u_int8_t status;
u_int8_t white_list_size;
} __attribute__ ((packed)) ng_hci_le_read_white_list_size_rp;
-
+
#define NG_HCI_OCF_LE_CLEAR_WHITE_LIST 0x0010
/* No command parameters. */
typedef ng_hci_status_rp ng_hci_le_clear_white_list_rp;
@@ -1685,7 +1684,7 @@ typedef struct {
u_int16_t connection_handle;
u_int8_t le_channel_map[5];
} __attribute__ ((packed)) ng_hci_le_read_channel_map_rp;
-
+
#define NG_HCI_OCF_LE_READ_REMOTE_USED_FEATURES 0x0016
typedef struct {
u_int16_t connection_handle;
@@ -1708,7 +1707,7 @@ typedef struct {
u_int8_t status;
u_int64_t random_number;
}__attribute__ ((packed)) ng_hci_le_rand_rp;
-
+
#define NG_HCI_OCF_LE_START_ENCRYPTION 0x0019
typedef struct {
u_int16_t connection_handle;
@@ -2044,13 +2043,13 @@ typedef struct {
u_int8_t latency;
u_int16_t supervision_timeout;
u_int8_t master_clock_accuracy;
-
+
} __attribute__ ((packed)) ng_hci_le_connection_complete_ep;
#define NG_HCI_LEEV_ADVREP 0x02
typedef struct {
u_int8_t num_reports;
-
+
}__attribute__ ((packed)) ng_hci_le_advertising_report_ep;
#define NG_HCI_SCAN_RESPONSE_DATA_MAX 0x1f
diff --git a/sys/netgraph/bluetooth/include/ng_l2cap.h b/sys/netgraph/bluetooth/include/ng_l2cap.h
index c8b5dddc6ffc..f7b5e54be59a 100644
--- a/sys/netgraph/bluetooth/include/ng_l2cap.h
+++ b/sys/netgraph/bluetooth/include/ng_l2cap.h
@@ -84,7 +84,6 @@
#define NG_L2CAP_LAST_CID 0xffff /* dynamically alloc. (end) */
#define NG_L2CAP_LELAST_CID 0x007f
-
/* L2CAP MTU */
#define NG_L2CAP_MTU_LE_MINIMAM 23
#define NG_L2CAP_MTU_MINIMUM 48
@@ -705,4 +704,3 @@ typedef struct {
typedef u_int16_t ng_l2cap_node_auto_discon_ep;
#endif /* ndef _NETGRAPH_L2CAP_H_ */
-
diff --git a/sys/netgraph/bluetooth/include/ng_ubt.h b/sys/netgraph/bluetooth/include/ng_ubt.h
index 48ee265143d5..9f713259d966 100644
--- a/sys/netgraph/bluetooth/include/ng_ubt.h
+++ b/sys/netgraph/bluetooth/include/ng_ubt.h
@@ -90,4 +90,3 @@ typedef struct {
typedef u_int16_t ng_ubt_node_dev_nodes_ep;
#endif /* ndef _NG_UBT_H_ */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c
index a1c4d144dfef..a8a11b453223 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.c
@@ -410,4 +410,3 @@ ng_l2cap_process_command_timeout(node_p node, hook_p hook, void *arg1, int arg2)
ng_l2cap_free_cmd(cmd);
} /* ng_l2cap_process_command_timeout */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
index dafea71bf8ed..1d9b80b173a7 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h
@@ -427,4 +427,3 @@ void ng_l2cap_con_fail (ng_l2cap_con_p, u_int16_t);
void ng_l2cap_process_command_timeout (node_p, hook_p, void *, int);
#endif /* ndef _NETGRAPH_L2CAP_CMDS_H_ */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
index 425dfc055677..b64c93c85eea 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.c
@@ -370,7 +370,7 @@ static int ng_l2cap_process_cmd_urs(ng_l2cap_con_p con, uint8_t ident)
{
/* We only support master side yet .*/
//send_l2cap_reject(con,ident ... );
-
+
NG_FREE_M(con->rx_pkt);
return 0;
}
@@ -463,7 +463,7 @@ ng_l2cap_process_con_req(ng_l2cap_con_p con, u_int8_t ident)
int error = 0;
u_int16_t dcid, psm;
int idtype;
-
+
/* Get command parameters */
NG_L2CAP_M_PULLUP(m, sizeof(*cp));
if (m == NULL)
@@ -713,7 +713,6 @@ ng_l2cap_process_cfg_req(ng_l2cap_con_p con, u_int8_t ident)
respond = 1;
if (error == -3) {
-
/*
* Adjust mbuf so we can get to the start
* of the first option we did not like.
@@ -1244,7 +1243,7 @@ ng_l2cap_process_info_rsp(ng_l2cap_con_p con, u_int8_t ident)
return (ENOENT);
}
-
+
/* If command timeout already happened then ignore response */
if ((error = ng_l2cap_command_untimeout(cmd)) != 0) {
NG_FREE_M(con->rx_pkt);
@@ -1335,7 +1334,7 @@ send_l2cap_con_rej(ng_l2cap_con_p con, u_int8_t ident, u_int16_t scid,
return (ENOBUFS);
}
-
+
/* Link command to the queue */
ng_l2cap_link_cmd(con, cmd);
ng_l2cap_lp_deliver(con);
@@ -1384,7 +1383,6 @@ send_l2cap_param_urs(ng_l2cap_con_p con, u_int8_t ident,
NG_L2CAP_CMD_PARAM_UPDATE_RESPONSE,
0);
if (cmd == NULL) {
-
return (ENOMEM);
}
@@ -1475,4 +1473,3 @@ get_next_l2cap_opt(struct mbuf *m, int *off, ng_l2cap_cfg_opt_p hdr,
return (1);
} /* get_next_l2cap_opt */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h
index 945ff0a8e52f..53c6ac3f7218 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_evnt.h
@@ -39,4 +39,3 @@
int ng_l2cap_receive (ng_l2cap_con_p);
#endif /* ndef _NETGRAPH_L2CAP_EVNT_H_ */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
index cf761af3f7c2..b1e7514430e0 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c
@@ -127,7 +127,7 @@ ng_l2cap_lp_con_req(ng_l2cap_p l2cap, bdaddr_p bdaddr, int type)
* the caller.
*/
}
-
+
return (error);
} /* ng_l2cap_lp_con_req */
@@ -403,7 +403,7 @@ ng_l2cap_lp_qos_req(ng_l2cap_p l2cap, u_int16_t con_handle,
ep->delay_variation = flow->delay_variation;
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, 0);
-
+
return (error);
} /* ng_l2cap_lp_con_req */
@@ -524,13 +524,13 @@ ng_l2cap_lp_enc_change(ng_l2cap_p l2cap, struct ng_mesg *msg)
}
con->encryption = ep->status;
-
+
LIST_FOREACH(ch, &l2cap->chan_list, next){
if((ch->con->con_handle == ep->con_handle) &&
(ch->con->linktype == ep->link_type))
ng_l2cap_l2ca_encryption_change(ch, ep->status);
}
-
+
out:
return (error);
} /* ng_l2cap_enc_change */
@@ -967,4 +967,3 @@ ng_l2cap_process_discon_timeout(node_p node, hook_p hook, void *arg1, int con_ha
NG_SEND_MSG_HOOK(error, l2cap->node, msg, l2cap->hci, 0);
} /* ng_l2cap_process_discon_timeout */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h
index e3e5b5959c1b..36c118c2dd57 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.h
@@ -51,4 +51,3 @@ void ng_l2cap_process_lp_timeout (node_p, hook_p, void *, int);
void ng_l2cap_process_discon_timeout (node_p, hook_p, void *, int);
#endif /* ndef _NETGRAPH_L2CAP_LLPI_H_ */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c
index b438cf223374..1a60e1be4a62 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_main.c
@@ -757,4 +757,3 @@ ng_l2cap_destroy_channels(ng_l2cap_p l2cap)
while (!LIST_EMPTY(&l2cap->chan_list))
ng_l2cap_free_chan(LIST_FIRST(&l2cap->chan_list));
} /* ng_l2cap_destroy_channels_by_hook */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
index eb6df6d7c94c..7a3daf75ead4 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.c
@@ -234,7 +234,7 @@ ng_l2cap_discon_untimeout(ng_l2cap_con_p con)
"%s: %s - no disconnect timeout, state=%d, flags=%#x\n",
__func__, NG_NODE_NAME(con->l2cap->node),
con->state, con->flags);
-
+
if (ng_uncallout(&con->con_timo, con->l2cap->node) == 0)
return (ETIMEDOUT);
@@ -348,7 +348,7 @@ ng_l2cap_new_chan(ng_l2cap_p l2cap, ng_l2cap_con_p con, u_int16_t psm, int idtyp
ch->scid = ng_l2cap_get_cid(l2cap,
(con->linktype!= NG_HCI_LINK_ACL));
}
-
+
ch->idtype = idtype;
if (ch->scid != NG_L2CAP_NULL_CID) {
/* Initialize channel */
@@ -378,7 +378,6 @@ ng_l2cap_new_chan(ng_l2cap_p l2cap, ng_l2cap_con_p con, u_int16_t psm, int idtyp
return (ch);
} /* ng_l2cap_new_chan */
-
ng_l2cap_chan_p
ng_l2cap_chan_by_scid(ng_l2cap_p l2cap, u_int16_t scid, int idtype)
{
@@ -388,7 +387,7 @@ ng_l2cap_chan_by_scid(ng_l2cap_p l2cap, u_int16_t scid, int idtype)
(idtype == NG_L2CAP_L2CA_IDTYPE_SMP)){
return NULL;
}
-
+
LIST_FOREACH(ch, &l2cap->chan_list, next){
if((idtype != NG_L2CAP_L2CA_IDTYPE_BREDR)&&
(ch->con->linktype == NG_HCI_LINK_ACL ))
@@ -408,7 +407,6 @@ ng_l2cap_chan_by_conhandle(ng_l2cap_p l2cap, uint16_t scid,
{
ng_l2cap_chan_p ch = NULL;
-
LIST_FOREACH(ch, &l2cap->chan_list, next){
if ((ch->scid == scid) &&
(ch->con->con_handle == con_handle))
@@ -477,7 +475,7 @@ ng_l2cap_new_cmd(ng_l2cap_con_p con, ng_l2cap_chan_p ch, u_int8_t ident,
return (cmd);
} /* ng_l2cap_new_cmd */
-
+
/*
* Get pending (i.e. initiated by local side) L2CAP command descriptor by ident
*/
@@ -535,7 +533,7 @@ ng_l2cap_lp_untimeout(ng_l2cap_con_p con)
"%s: %s - no LP connection timeout, state=%d, flags=%#x\n",
__func__, NG_NODE_NAME(con->l2cap->node),
con->state, con->flags);
-
+
if (ng_uncallout(&con->con_timo, con->l2cap->node) == 0)
return (ETIMEDOUT);
@@ -697,4 +695,3 @@ ng_l2cap_get_ident(ng_l2cap_con_p con)
return (NG_L2CAP_NULL_IDENT);
} /* ng_l2cap_get_ident */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h
index 697432d5b4dc..4e29ec074788 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_misc.h
@@ -107,4 +107,3 @@ struct mbuf * ng_l2cap_prepend (struct mbuf *, int);
ng_l2cap_flow_p ng_l2cap_default_flow (void);
#endif /* ndef _NETGRAPH_L2CAP_MISC_H_ */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h
index f6829adc3a6f..b60be9f5bc06 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_prse.h
@@ -86,4 +86,3 @@ static const struct ng_cmdlist ng_l2cap_cmdlist[] = {
};
#endif /* ndef _NETGRAPH_L2CAP_PRSE_H_ */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c b/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c
index b1359cf42aee..098761b013eb 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c
@@ -380,12 +380,12 @@ int ng_l2cap_l2ca_encryption_change(ng_l2cap_chan_p ch, uint16_t result)
}
return (error);
-
+
}
/*
* Send L2CAP_ConnectRsp response to the upper layer
*/
-
+
int
ng_l2cap_l2ca_con_rsp_rsp(ng_l2cap_chan_p ch, u_int32_t token, u_int16_t result)
{
@@ -889,7 +889,7 @@ ng_l2cap_l2ca_write_req(ng_l2cap_p l2cap, struct mbuf *m)
ch = ng_l2cap_chan_by_scid(l2cap, l2ca_hdr->lcid,
l2ca_hdr->idtype);
}
-
+
if (ch == NULL) {
NG_L2CAP_ERR(
"%s: %s - invalid L2CA Data packet. Channel does not exist, cid=%d\n",
@@ -995,7 +995,7 @@ ng_l2cap_l2ca_receive(ng_l2cap_con_p con)
int idtype;
uint16_t *idp;
int silent = 0;
-
+
NG_L2CAP_M_PULLUP(con->rx_pkt, sizeof(*hdr));
if (con->rx_pkt == NULL)
return (ENOBUFS);
@@ -1233,7 +1233,6 @@ ng_l2cap_l2ca_discon_req(ng_l2cap_p l2cap, struct ng_mesg *msg)
ip = (ng_l2cap_l2ca_discon_ip *)(msg->data);
-
if(ip->idtype == NG_L2CAP_L2CA_IDTYPE_ATT){
/* Don't send Disconnect request on L2CAP Layer*/
ch = ng_l2cap_chan_by_conhandle(l2cap, NG_L2CAP_ATT_CID,
@@ -1719,7 +1718,7 @@ out:
return (error);
} /* ng_l2cap_l2ca_get_info_rsp */
-
+
/*
* Process L2CA_EnableCLT message from the upper layer protocol
* XXX convert to NGN_L2CAP_NODE_SET_FLAGS?
@@ -1786,7 +1785,7 @@ ng_l2cap_l2ca_enable_clt(ng_l2cap_p l2cap, struct ng_mesg *msg)
else
l2cap->flags |= NG_L2CAP_CLT_TCP_DISABLED;
break;
-
+
default:
NG_L2CAP_ERR(
"%s: %s - unsupported PSM=%d\n", __func__, NG_NODE_NAME(l2cap->node), ip->psm);
@@ -1820,4 +1819,3 @@ ng_l2cap_l2ca_enable_clt(ng_l2cap_p l2cap, struct ng_mesg *msg)
return (error);
} /* ng_l2cap_l2ca_enable_clt */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h
index 54d89519fabf..2e60f6f8c675 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.h
@@ -78,4 +78,3 @@ int ng_l2cap_l2ca_get_info_rsp (ng_l2cap_con_p, u_int32_t, u_int16_t,
int ng_l2cap_l2ca_enable_clt (ng_l2cap_p, struct ng_mesg *);
int ng_l2cap_l2ca_encryption_change(ng_l2cap_chan_p , uint16_t );
#endif /* ndef _NETGRAPH_L2CAP_ULPI_H_ */
-
diff --git a/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h b/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h
index b71bc3476a82..0bf8e8219e5a 100644
--- a/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h
+++ b/sys/netgraph/bluetooth/l2cap/ng_l2cap_var.h
@@ -122,7 +122,7 @@ typedef struct ng_l2cap_con {
u_int8_t ident; /* last allocated ident */
uint8_t linktype;
uint8_t encryption;
-
+
TAILQ_HEAD(, ng_l2cap_cmd) cmd_list; /* pending L2CAP cmds */
struct mbuf *tx_pkt; /* xmitted L2CAP packet */
@@ -193,4 +193,3 @@ typedef struct ng_l2cap_cmd {
typedef ng_l2cap_cmd_t * ng_l2cap_cmd_p;
#endif /* ndef _NETGRAPH_L2CAP_VAR_H_ */
-
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
index 1e2cde0f489c..5f6b98d03359 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c
@@ -125,7 +125,7 @@ static struct mtx ng_btsocket_hci_raw_token_mtx;
static struct ng_btsocket_hci_raw_sec_filter *ng_btsocket_hci_raw_sec_filter;
static struct timeval ng_btsocket_hci_raw_lasttime;
static int ng_btsocket_hci_raw_curpps;
-
+
/* Sysctl tree */
SYSCTL_DECL(_net_bluetooth_hci_sockets);
static SYSCTL_NODE(_net_bluetooth_hci_sockets, OID_AUTO, raw,
@@ -365,7 +365,7 @@ ng_btsocket_hci_raw_node_rcvdata(hook_p hook, item_p item)
* submits ioctl() message then interrupts ioctl() and re-submits another
* ioctl() on the same socket *before* first ioctl() complete.
*/
-
+
static void
ng_btsocket_hci_raw_get_token(u_int32_t *token)
{
@@ -373,9 +373,9 @@ ng_btsocket_hci_raw_get_token(u_int32_t *token)
if (++ ng_btsocket_hci_raw_token == 0)
ng_btsocket_hci_raw_token = 1;
-
+
*token = ng_btsocket_hci_raw_token;
-
+
mtx_unlock(&ng_btsocket_hci_raw_token_mtx);
} /* ng_btsocket_hci_raw_get_token */
@@ -499,7 +499,6 @@ ng_btsocket_hci_raw_data_input(struct mbuf *nam)
mtx_lock(&ng_btsocket_hci_raw_sockets_mtx);
LIST_FOREACH(pcb, &ng_btsocket_hci_raw_sockets, next) {
-
mtx_lock(&pcb->pcb_mtx);
/*
@@ -1504,7 +1503,7 @@ ng_btsocket_hci_raw_ctloutput(struct socket *so, struct sockopt *sopt)
}
mtx_unlock(&pcb->pcb_mtx);
-
+
return (error);
} /* ng_btsocket_hci_raw_ctloutput */
@@ -1650,7 +1649,7 @@ drop:
NG_FREE_M(control); /* NG_FREE_M checks for != NULL */
NG_FREE_M(nam);
NG_FREE_M(m);
-
+
return (error);
} /* ng_btsocket_hci_raw_send */
@@ -1681,4 +1680,3 @@ ng_btsocket_hci_raw_sockaddr(struct socket *so, struct sockaddr **nam)
return ((*nam == NULL)? ENOMEM : 0);
} /* ng_btsocket_hci_raw_sockaddr */
-
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
index 54323c0fce56..2bd15ac35895 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
@@ -223,8 +223,6 @@ static int ng_btsock_l2cap_addrtype_to_linktype(int addrtype);
#define ng_btsocket_l2cap_wakeup_route_task() \
taskqueue_enqueue(taskqueue_swi_giant, &ng_btsocket_l2cap_rt_task)
-
-
int ng_btsock_l2cap_addrtype_to_linktype(int addrtype)
{
switch(addrtype){
@@ -237,7 +235,6 @@ int ng_btsock_l2cap_addrtype_to_linktype(int addrtype)
}
}
-
/*****************************************************************************
*****************************************************************************
** Netgraph node interface
@@ -614,7 +611,7 @@ ng_btsocket_l2cap_process_l2ca_con_ind(struct ng_mesg *msg,
ip->psm, ip->lcid, ip->ident);
mtx_lock(&ng_btsocket_l2cap_sockets_mtx);
-
+
pcb = ng_btsocket_l2cap_pcb_by_addr(&rt->src, ip->psm);
if (pcb != NULL) {
struct socket *so1;
@@ -697,7 +694,6 @@ static int ng_btsocket_l2cap_process_l2ca_enc_change(struct ng_mesg *msg, ng_bts
ng_l2cap_l2ca_enc_chg_op *op = NULL;
ng_btsocket_l2cap_pcb_t *pcb = NULL;
-
if (msg->header.arglen != sizeof(*op))
return (EMSGSIZE);
@@ -714,7 +710,7 @@ static int ng_btsocket_l2cap_process_l2ca_enc_change(struct ng_mesg *msg, ng_bts
mtx_lock(&pcb->pcb_mtx);
pcb->encryption = op->result;
-
+
if(pcb->need_encrypt){
ng_btsocket_l2cap_untimeout(pcb);
if(pcb->state != NG_BTSOCKET_L2CAP_W4_ENC_CHANGE){
@@ -1191,7 +1187,7 @@ ng_btsocket_l2cap_process_l2ca_write_rsp(struct ng_mesg *msg,
return (ENOENT);
}
-
+
ng_btsocket_l2cap_untimeout(pcb);
/*
@@ -1428,7 +1424,7 @@ ng_btsocket_l2cap_data_input(struct mbuf *m, hook_p hook)
m = m_pullup(m, sizeof(uint16_t));
idtype = *mtod(m, uint16_t *);
m_adj(m, sizeof(uint16_t));
-
+
/* Make sure we can access header */
if (m->m_pkthdr.len < sizeof(*hdr)) {
NG_BTSOCKET_L2CAP_ERR(
@@ -1476,7 +1472,6 @@ ng_btsocket_l2cap_data_input(struct mbuf *m, hook_p hook)
(idtype == NG_L2CAP_L2CA_IDTYPE_ATT)||
(idtype == NG_L2CAP_L2CA_IDTYPE_SMP)
){
-
mtx_lock(&ng_btsocket_l2cap_sockets_mtx);
/* Normal packet: find connected socket */
@@ -1518,7 +1513,6 @@ ng_btsocket_l2cap_data_input(struct mbuf *m, hook_p hook)
/* Check if we have enough space in socket receive queue */
if (m->m_pkthdr.len > sbspace(&pcb->so->so_rcv)) {
-
/*
* This is really bad. Receive queue on socket does
* not have enough space for the packet. We do not
@@ -2086,7 +2080,7 @@ ng_btsocket_l2cap_attach(struct socket *so, int proto, struct thread *td)
mtx_lock(&ng_btsocket_l2cap_sockets_mtx);
else
mtx_assert(&ng_btsocket_l2cap_sockets_mtx, MA_OWNED);
-
+
/* Set PCB token. Use ng_btsocket_l2cap_sockets_mtx for protection */
if (++ token == 0)
token ++;
@@ -2347,7 +2341,6 @@ ng_btsocket_l2cap_ctloutput(struct socket *so, struct sockopt *sopt)
sizeof(pcb->need_encrypt));
break;
-
default:
error = ENOPROTOOPT;
break;
@@ -2651,7 +2644,7 @@ ng_btsocket_l2cap_send2(ng_btsocket_l2cap_pcb_p pcb)
struct mbuf *m = NULL;
ng_l2cap_l2ca_hdr_t *hdr = NULL;
int error = 0;
-
+
mtx_assert(&pcb->pcb_mtx, MA_OWNED);
if (sbavail(&pcb->so->so_snd) == 0)
@@ -2793,7 +2786,6 @@ ng_btsocket_l2cap_pcb_by_cid(bdaddr_p src, int cid, int idtype)
bcmp(src, &p->src, sizeof(p->src)) == 0&&
p->idtype == idtype)
break;
-
}
return (p);
} /* ng_btsocket_l2cap_pcb_by_cid */
@@ -2971,4 +2963,3 @@ ng_btsocket_l2cap_result2errno(int result)
return (ENOSYS);
} /* ng_btsocket_l2cap_result2errno */
-
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
index fa1b05480fda..5508ff7526d2 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c
@@ -283,7 +283,6 @@ ng_btsocket_l2cap_raw_node_rcvmsg(node_p node, item_p item, hook_p hook)
int error = 0;
if (msg != NULL && msg->header.typecookie == NGM_L2CAP_COOKIE) {
-
/*
* NGM_L2CAP_NODE_HOOK_INFO is special message initiated by
* L2CAP layer. Ignore all other messages if they are not
@@ -751,7 +750,7 @@ ng_btsocket_l2cap_raw_connect(struct socket *so, struct sockaddr *nam,
return (0);
}
-
+
/*
* Find the first hook that does not match specified destination address
*/
@@ -849,7 +848,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
(struct ng_btsocket_l2cap_raw_con_list *) data;
ng_l2cap_node_con_list_ep *p1 = NULL;
ng_l2cap_node_con_ep *p2 = NULL;
-
+
if (p->num_connections == 0 ||
p->num_connections > NG_L2CAP_MAX_CON_NUM ||
p->connections == NULL) {
@@ -913,14 +912,14 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
(struct ng_btsocket_l2cap_raw_chan_list *) data;
ng_l2cap_node_chan_list_ep *p1 = NULL;
ng_l2cap_node_chan_ep *p2 = NULL;
-
+
if (p->num_channels == 0 ||
p->num_channels > NG_L2CAP_MAX_CHAN_NUM ||
p->channels == NULL) {
mtx_unlock(&pcb->pcb_mtx);
return (EINVAL);
}
-
+
NG_MKMESSAGE(msg, NGM_L2CAP_COOKIE,
NGM_L2CAP_NODE_GET_CHAN_LIST, 0, M_NOWAIT);
if (msg == NULL) {
@@ -1287,9 +1286,9 @@ ng_btsocket_l2cap_raw_get_token(u_int32_t *token)
if (++ ng_btsocket_l2cap_raw_token == 0)
ng_btsocket_l2cap_raw_token = 1;
-
+
*token = ng_btsocket_l2cap_raw_token;
-
+
mtx_unlock(&ng_btsocket_l2cap_raw_token_mtx);
} /* ng_btsocket_l2cap_raw_get_token */
@@ -1359,4 +1358,3 @@ ng_btsocket_l2cap_raw_send_sync_ngmsg(ng_btsocket_l2cap_raw_pcb_p pcb,
return (0);
} /* ng_btsocket_l2cap_raw_send_sync_ngmsg */
-
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
index 137580e52542..95b28e6cc5e7 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c
@@ -740,7 +740,7 @@ ng_btsocket_rfcomm_detach(struct socket *so)
ng_btsocket_rfcomm_task_wakeup();
break;
}
-
+
while (pcb->state != NG_BTSOCKET_RFCOMM_DLC_CLOSED)
msleep(&pcb->state, &pcb->pcb_mtx, PZERO, "rf_det", 0);
@@ -977,7 +977,7 @@ ng_btsocket_rfcomm_send(struct socket *so, int flags, struct mbuf *m,
/* Put the packet on the socket's send queue and wakeup RFCOMM task */
sbappend(&pcb->so->so_snd, m, flags);
m = NULL;
-
+
if (!(pcb->flags & NG_BTSOCKET_RFCOMM_DLC_SENDING)) {
pcb->flags |= NG_BTSOCKET_RFCOMM_DLC_SENDING;
error = ng_btsocket_rfcomm_task_wakeup();
@@ -1595,7 +1595,7 @@ ng_btsocket_rfcomm_session_receive(ng_btsocket_rfcomm_session_p s)
return (error);
}
-
+
more = (m->m_nextpkt != NULL);
m->m_nextpkt = NULL;
@@ -1709,7 +1709,6 @@ ng_btsocket_rfcomm_session_process_pcb(ng_btsocket_rfcomm_session_p s)
pcb_next = LIST_NEXT(pcb, session_next);
switch (pcb->state) {
-
/*
* If DLC in W4_CONNECT state then we should check for both
* timeout and detach.
@@ -2359,13 +2358,12 @@ ng_btsocket_rfcomm_receive_uih(ng_btsocket_rfcomm_session_p s, int dlci,
error = EMSGSIZE;
} else if (m0->m_pkthdr.len > sbspace(&pcb->so->so_rcv)) {
-
/*
* This is really bad. Receive queue on socket does
* not have enough space for the packet. We do not
* have any other choice but drop the packet.
*/
-
+
NG_BTSOCKET_RFCOMM_ERR(
"%s: Not enough space in socket receive queue. Dropping UIH for dlci=%d, " \
"state=%d, flags=%#x, len=%d, space=%ld\n",
@@ -3558,4 +3556,3 @@ ng_btsocket_rfcomm_prepare_packet(struct sockbuf *sb, int length)
return (top);
} /* ng_btsocket_rfcomm_prepare_packet */
-
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c
index 1fa4246c9d13..da8f22befc79 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c
@@ -1323,7 +1323,6 @@ ng_btsocket_sco_bind(struct socket *so, struct sockaddr *nam,
mtx_unlock(&pcb->pcb_mtx);
}
-
}
pcb = so2sco_pcb(so);
@@ -1508,7 +1507,7 @@ ng_btsocket_sco_ctloutput(struct socket *so, struct sockopt *sopt)
}
mtx_unlock(&pcb->pcb_mtx);
-
+
return (error);
} /* ng_btsocket_sco_ctloutput */
@@ -1980,4 +1979,3 @@ ng_btsocket_sco_process_timeout(void *xpcb)
mtx_unlock(&pcb->pcb_mtx);
} /* ng_btsocket_sco_process_timeout */
-
diff --git a/sys/netgraph/netflow/netflow.c b/sys/netgraph/netflow/netflow.c
index 34991784f74d..8e1bcddd6895 100644
--- a/sys/netgraph/netflow/netflow.c
+++ b/sys/netgraph/netflow/netflow.c
@@ -503,7 +503,6 @@ hash6_insert(priv_p priv, struct flow_hash_entry *hsh6, struct flow6_rec *r,
}
#endif
-
/*
* Non-static functions called from ng_netflow.c
*/
@@ -598,7 +597,7 @@ ng_netflow_fib_init(priv_p priv, int fib)
fib, fe, priv_to_fib(priv, fib));
priv->nfinfo_alloc_fibs++;
}
-
+
return (0);
}
@@ -864,7 +863,7 @@ ng_netflow_flow6_add(priv_p priv, fib_export_p fe, struct ip6_hdr *ip6,
r.r_ip_p = upper_proto;
r.r_i_ifx = src_if_index;
-
+
counter_u64_add(priv->nfinfo_packets6, 1);
counter_u64_add(priv->nfinfo_bytes6, plen);
@@ -1078,7 +1077,6 @@ export_send(priv_p priv, fib_export_p fe, item_p item, int flags)
return (error);
}
-
/* Add export record to dgram. */
static int
export_add(item_p item, struct flow_entry *fle)
diff --git a/sys/netgraph/netflow/netflow.h b/sys/netgraph/netflow/netflow.h
index d6e061a7ff14..894692bd4f90 100644
--- a/sys/netgraph/netflow/netflow.h
+++ b/sys/netgraph/netflow/netflow.h
@@ -145,7 +145,6 @@ struct netflow_v5_export_dgram {
struct netflow_v5_record r[NETFLOW_V5_MAX_RECORDS];
} __attribute__((__packed__));
-
/* RFC3954 field definitions */
#define NETFLOW_V9_FIELD_IN_BYTES 1 /* Input bytes count for a flow. Default 4, can be 8 */
#define NETFLOW_V9_FIELD_IN_PKTS 2 /* Incoming counter with number of packets associated with an IP Flow. Default 4 */
diff --git a/sys/netgraph/netflow/netflow_v9.c b/sys/netgraph/netflow/netflow_v9.c
index e4f9c5faa534..798bf6fecc42 100644
--- a/sys/netgraph/netflow/netflow_v9.c
+++ b/sys/netgraph/netflow/netflow_v9.c
@@ -236,8 +236,6 @@ export9_send(priv_p priv, fib_export_p fe, item_p item, struct netflow_v9_packet
return (error);
}
-
-
/* Add V9 record to dgram. */
int
export9_add(item_p item, struct netflow_v9_packet_opt *t, struct flow_entry *fle)
@@ -413,16 +411,15 @@ get_export9_dgram(priv_p priv, fib_export_p fe, struct netflow_v9_packet_opt **t
t->count = 0;
t->mtu = mtu;
t->flow_header = m->m_len;
-
+
/*
* Check if we need to insert templates into packet
*/
struct netflow_v9_flowset_header *fl;
-
+
if ((time_uptime >= priv->templ_time + fe->templ_last_ts) ||
(fe->sent_packets >= priv->templ_packets + fe->templ_last_pkt)) {
-
fe->templ_last_ts = time_uptime;
fe->templ_last_pkt = fe->sent_packets;
@@ -431,7 +428,6 @@ get_export9_dgram(priv_p priv, fib_export_p fe, struct netflow_v9_packet_opt **t
t->flow_header = m->m_len;
t->count += priv->flowset_records[0];
}
-
}
*tt = t;
@@ -492,4 +488,3 @@ ng_netflow_copyv9info(priv_p priv, struct ng_netflow_v9info *i)
i->templ_packets = priv->templ_packets;
i->mtu = priv->mtu;
}
-
diff --git a/sys/netgraph/netflow/ng_netflow.c b/sys/netgraph/netflow/ng_netflow.c
index ab09e3000d0e..6180fe573b60 100644
--- a/sys/netgraph/netflow/ng_netflow.c
+++ b/sys/netgraph/netflow/ng_netflow.c
@@ -220,7 +220,6 @@ static const struct ng_cmdlist ng_netflow_cmds[] = {
{ 0 }
};
-
/* Netgraph node type descriptor */
static struct ng_type ng_netflow_typestruct = {
.version = NG_ABI_VERSION,
@@ -340,7 +339,6 @@ ng_netflow_newhook(node_p node, hook_p hook, const char *name)
iface->out = hook;
} else if (strcmp(name, NG_NETFLOW_HOOK_EXPORT) == 0) {
-
if (priv->export != NULL)
return (EISCONN);
@@ -354,7 +352,6 @@ ng_netflow_newhook(node_p node, hook_p hook, const char *name)
callout_reset(&priv->exp_callout, (1*hz), &ng_netflow_expire,
(void *)priv);
} else if (strcmp(name, NG_NETFLOW_HOOK_EXPORT9) == 0) {
-
if (priv->export9 != NULL)
return (EISCONN);
@@ -500,7 +497,7 @@ ng_netflow_rcvmsg (node_p node, item_p item, hook_p lasthook)
ERROUT(EINVAL);
priv->ifaces[set->iface].info.conf = set->conf;
-
+
break;
}
case NGM_NETFLOW_SETTEMPLATE:
@@ -638,7 +635,7 @@ ng_netflow_rcvdata (hook_p hook, item_p item)
MTAG_NETFLOW_CALLED, mtag);
}
}
-
+
if (bypass) {
if (out == NULL)
ERROUT(ENOTCONN);
@@ -646,7 +643,7 @@ ng_netflow_rcvdata (hook_p hook, item_p item)
NG_FWD_ITEM_HOOK(error, item, out);
return (error);
}
-
+
if (iface->info.conf &
(NG_NETFLOW_CONF_ONCE | NG_NETFLOW_CONF_THISONCE)) {
mtag = m_tag_alloc(MTAG_NETFLOW, MTAG_NETFLOW_CALLED,
@@ -918,7 +915,7 @@ loopend:
src_if_index = m->m_pkthdr.rcvif->if_index;
} else
src_if_index = iface->info.ifinfo_index;
-
+
/* Check packet FIB */
fib = M_GETFIB(m);
if (fib >= priv->maxfibs) {
@@ -948,7 +945,7 @@ loopend:
#endif
else
goto bypass;
-
+
acct = 1;
bypass:
if (out != NULL) {
diff --git a/sys/netgraph/netflow/ng_netflow.h b/sys/netgraph/netflow/ng_netflow.h
index 836b13b14a06..5086cff1c401 100644
--- a/sys/netgraph/netflow/ng_netflow.h
+++ b/sys/netgraph/netflow/ng_netflow.h
@@ -111,7 +111,6 @@ struct ng_netflow_info {
{ NULL } \
}
-
/* This structure is returned by the NGM_NETFLOW_IFINFO message */
struct ng_netflow_ifinfo {
uint32_t ifinfo_packets; /* number of packets for this iface */
@@ -121,7 +120,6 @@ struct ng_netflow_ifinfo {
uint32_t conf;
};
-
/* This structure is passed to NGM_NETFLOW_SETDLT message */
struct ng_netflow_setdlt {
uint16_t iface; /* which iface dlt change */
@@ -248,7 +246,7 @@ struct flow6_rec {
#define r_ports ports.both
#define r_sport ports.dir.s_port
#define r_dport ports.dir.d_port
-
+
/* A flow entry which accumulates statistics */
struct flow_entry_data {
uint16_t version; /* Protocol version */
@@ -493,7 +491,6 @@ struct flow_hash_entry {
struct mtx mtx;
TAILQ_HEAD(fhead, flow_entry) head;
};
-
#define ERROUT(x) { error = (x); goto done; }
#define MTAG_NETFLOW 1221656444
diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h
index c7b0e67902cf..7535472dc631 100644
--- a/sys/netgraph/netgraph.h
+++ b/sys/netgraph/netgraph.h
@@ -77,7 +77,6 @@
#define NG_ABI_VERSION _NG_ABI_VERSION
#endif /* NETGRAPH_DEBUG */ /*----------------------------------------------*/
-
/*
* Forward references for the basic structures so we can
* define the typedefs and use them in the structures themselves.
@@ -303,7 +302,6 @@ _ng_hook_hi_stack(hook_p hook, char * file, int line)
_NG_HOOK_HI_STACK(hook);
}
-
#define NG_HOOK_REF(hook) _ng_hook_ref(hook, _NN_)
#define NG_HOOK_NAME(hook) _ng_hook_name(hook, _NN_)
#define NG_HOOK_UNREF(hook) _ng_hook_unref(hook, _NN_)
@@ -873,7 +871,7 @@ _ngi_hook(item_p item, char *file, int line)
#define NGI_QUEUED_READER(i) ((i)->el_flags & NGQF_QREADER)
#define NGI_QUEUED_WRITER(i) (((i)->el_flags & NGQF_QMODE) == NGQF_QWRITER)
-
+
/**********************************************************************
* Data macros. Send, manipulate and free.
**********************************************************************/
@@ -1033,7 +1031,6 @@ _ngi_hook(item_p item, char *file, int line)
(item) = NULL; \
} while (0)
-
/***********************************************************************
******** Structures Definitions and Macros for defining a node *******
***********************************************************************
@@ -1070,7 +1067,6 @@ struct ng_cmdlist {
* for other reasons (e.g. device output queuing).
*/
struct ng_type {
-
u_int32_t version; /* must equal NG_API_VERSION */
const char *name; /* Unique type name */
modeventhand_t mod_event; /* Module event handler (optional) */
diff --git a/sys/netgraph/ng_UI.c b/sys/netgraph/ng_UI.c
index 8e8ab55d6490..9f899a841fd8 100644
--- a/sys/netgraph/ng_UI.c
+++ b/sys/netgraph/ng_UI.c
@@ -49,7 +49,6 @@
#include <sys/mbuf.h>
#include <sys/errno.h>
-
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_UI.h>
@@ -242,4 +241,3 @@ ng_UI_disconnect(hook_p hook)
}
return (0);
}
-
diff --git a/sys/netgraph/ng_UI.h b/sys/netgraph/ng_UI.h
index 216570aaf1dc..82ff49540515 100644
--- a/sys/netgraph/ng_UI.h
+++ b/sys/netgraph/ng_UI.h
@@ -53,4 +53,3 @@
#define NG_UI_HOOK_UPSTREAM "upstream"
#endif /* _NETGRAPH_NG_UI_H_ */
-
diff --git a/sys/netgraph/ng_async.c b/sys/netgraph/ng_async.c
index 217590b73950..c89b71077a01 100644
--- a/sys/netgraph/ng_async.c
+++ b/sys/netgraph/ng_async.c
@@ -66,7 +66,6 @@ static MALLOC_DEFINE(M_NETGRAPH_ASYNC, "netgraph_async", "netgraph async node");
#define M_NETGRAPH_ASYNC M_NETGRAPH
#endif
-
/* Async decode state */
#define MODE_HUNT 0
#define MODE_NORMAL 1
@@ -259,7 +258,7 @@ nga_rcvmsg(node_p node, item_p item, hook_p lasthook)
struct ng_mesg *resp = NULL;
int error = 0;
struct ng_mesg *msg;
-
+
NGI_GET_MSG(item, msg);
switch (msg->header.typecookie) {
case NGM_ASYNC_COOKIE:
@@ -407,7 +406,6 @@ nga_rcv_sync(const sc_p sc, item_p item)
u_int32_t accm;
struct mbuf *m;
-
#define ADD_BYTE(x) nga_async_add(sc, &fcs, accm, &alen, (x))
/* Check for bypass mode */
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index 9cfa4403a2c3..c5b38dc1fdd6 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -1426,7 +1426,7 @@ ng_con_part2(node_p node, item_p item, hook_p hook)
LIST_INSERT_HEAD(&node->nd_hooks, hook, hk_hooks);
node->nd_numhooks++;
NG_HOOK_REF(hook); /* one for the node */
-
+
/*
* We now have a symmetrical situation, where both hooks have been
* linked to their nodes, the newhook methods have been called
@@ -1577,7 +1577,6 @@ ng_mkpeer(node_p node, const char *name, const char *name2, char *type)
if ((error == 0) && hook2->hk_node->nd_type->connect) {
error = (*hook2->hk_node->nd_type->connect) (hook2);
-
}
/*
@@ -1599,7 +1598,7 @@ ng_mkpeer(node_p node, const char *name, const char *name2, char *type)
/************************************************************************
Utility routines to send self messages
************************************************************************/
-
+
/* Shut this node down as soon as everyone is clear of it */
/* Should add arg "immediately" to jump the queue */
int
diff --git a/sys/netgraph/ng_bpf.c b/sys/netgraph/ng_bpf.c
index 49db81e60954..b9535c7c124d 100644
--- a/sys/netgraph/ng_bpf.c
+++ b/sys/netgraph/ng_bpf.c
@@ -479,7 +479,6 @@ ng_bpf_rcvdata(hook_p hook, item_p item)
ready:
/* See if we got a match and find destination hook */
if (len > 0) {
-
/* Update stats */
/* XXX atomically? */
hip->stats.recvMatchFrames++;
diff --git a/sys/netgraph/ng_bridge.c b/sys/netgraph/ng_bridge.c
index e2e533be2c1e..1521b1cee901 100644
--- a/sys/netgraph/ng_bridge.c
+++ b/sys/netgraph/ng_bridge.c
@@ -382,7 +382,6 @@ ng_bridge_reset_link(hook_p hook, void *arg __unused)
return (1);
}
-
static int
ng_bridge_rcvmsg(node_p node, item_p item, hook_p lasthook)
{
@@ -631,7 +630,6 @@ ng_bridge_send_ctx(hook_p dst, void *arg)
return (0); /* abort loop */
}
-
/* Update stats */
destLink->stats.xmitPackets++;
destLink->stats.xmitOctets += m2->m_pkthdr.len;
@@ -707,20 +705,17 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
/* Look up packet's source Ethernet address in hashtable */
if ((host = ng_bridge_get(priv, eh->ether_shost)) != NULL) {
-
/* Update time since last heard from this host */
host->staleness = 0;
/* Did host jump to a different link? */
if (host->link != ctx.incoming) {
-
/*
* If the host's old link was recently established
* on the old link and it's already jumped to a new
* link, declare a loopback condition.
*/
if (host->age < priv->conf.minStableAge) {
-
/* Log the problem */
if (priv->conf.debugLevel >= 2) {
struct ifnet *ifp = ctx.m->m_pkthdr.rcvif;
@@ -776,7 +771,6 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
* unless it is the same link as the packet came in on.
*/
if (!ctx.manycast) {
-
/* Determine packet destination link */
if ((host = ng_bridge_get(priv, eh->ether_dhost)) != NULL) {
link_p destLink = host->link;
@@ -808,7 +802,7 @@ ng_bridge_rcvdata(hook_p hook, item_p item)
NG_FREE_M(ctx.m);
return (ctx.error);
}
-
+
/*
* If we've sent all the others, send the original
* on the first link we found.
@@ -995,7 +989,6 @@ ng_bridge_rehash(priv_p priv)
MISC FUNCTIONS
******************************************************************/
-
/*
* Remove all hosts associated with a specific link from the hashtable.
* If linkNum == -1, then remove all hosts in the table.
@@ -1105,4 +1098,3 @@ ng_bridge_nodename(node_p node)
snprintf(name, sizeof(name), "[%x]", ng_node2ID(node));
return name;
}
-
diff --git a/sys/netgraph/ng_bridge.h b/sys/netgraph/ng_bridge.h
index fa4736370e92..e4b74efbfc5e 100644
--- a/sys/netgraph/ng_bridge.h
+++ b/sys/netgraph/ng_bridge.h
@@ -201,4 +201,3 @@ enum {
};
#endif /* _NETGRAPH_NG_BRIDGE_H_ */
-
diff --git a/sys/netgraph/ng_car.c b/sys/netgraph/ng_car.c
index babbbb151820..1f74c4b193d0 100644
--- a/sys/netgraph/ng_car.c
+++ b/sys/netgraph/ng_car.c
@@ -305,7 +305,6 @@ ng_car_rcvdata(hook_p hook, item_p item )
hinfo->tc -= len;
NG_CAR_PERFORM_MATCH_ACTION(hinfo->conf.green_action);
} else {
-
/* Refill only if not green without it. */
ng_car_refillhook(hinfo);
@@ -673,7 +672,6 @@ ng_car_q_event(node_p node, hook_p hook, void *arg, int arg2)
/* If we have some tokens */
while (hinfo->tc >= 0) {
-
/* Send packet. */
m = hinfo->q[hinfo->q_first];
NG_SEND_DATA_ONLY(error, hinfo->dest, m);
diff --git a/sys/netgraph/ng_checksum.c b/sys/netgraph/ng_checksum.c
index c7fecb0ab78d..682375c805da 100644
--- a/sys/netgraph/ng_checksum.c
+++ b/sys/netgraph/ng_checksum.c
@@ -75,7 +75,6 @@ static ng_shutdown_t ng_checksum_shutdown;
static ng_newhook_t ng_checksum_newhook;
static ng_rcvdata_t ng_checksum_rcvdata;
static ng_disconnect_t ng_checksum_disconnect;
-
#define ERROUT(x) { error = (x); goto done; }
static const struct ng_parse_struct_field ng_checksum_config_type_fields[]
diff --git a/sys/netgraph/ng_cisco.c b/sys/netgraph/ng_cisco.c
index 61c3b7f05265..25b931545b44 100644
--- a/sys/netgraph/ng_cisco.c
+++ b/sys/netgraph/ng_cisco.c
@@ -572,7 +572,6 @@ drop:
return (error);
}
-
/*
* Send keepalive packets, every 10 seconds.
*/
diff --git a/sys/netgraph/ng_cisco.h b/sys/netgraph/ng_cisco.h
index ebded7a76982..8bf15e6e16b1 100644
--- a/sys/netgraph/ng_cisco.h
+++ b/sys/netgraph/ng_cisco.h
@@ -88,4 +88,3 @@ struct ng_cisco_stats {
}
#endif /* _NETGRAPH_NG_CISCO_H_ */
-
diff --git a/sys/netgraph/ng_deflate.c b/sys/netgraph/ng_deflate.c
index 1d62d60efd9a..db9cc588b765 100644
--- a/sys/netgraph/ng_deflate.c
+++ b/sys/netgraph/ng_deflate.c
@@ -716,4 +716,3 @@ ng_deflate_reset_req(node_p node)
inflateReset(&priv->cx);
}
}
-
diff --git a/sys/netgraph/ng_deflate.h b/sys/netgraph/ng_deflate.h
index 780dcc7676fd..47d93d8f866c 100644
--- a/sys/netgraph/ng_deflate.h
+++ b/sys/netgraph/ng_deflate.h
@@ -84,4 +84,3 @@ enum {
};
#endif /* _NETGRAPH_NG_DEFLATE_H_ */
-
diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c
index 248572b6fd49..ff62f7f44a35 100644
--- a/sys/netgraph/ng_device.c
+++ b/sys/netgraph/ng_device.c
@@ -447,7 +447,6 @@ ngdread(struct cdev *dev, struct uio *uio, int flag)
return (error);
}
-
/*
* This function is called when our device is written to.
* We read the data from userland into mbuf chain and pass it to the remote hook.
diff --git a/sys/netgraph/ng_echo.c b/sys/netgraph/ng_echo.c
index e9daf5eda958..2601c42aaeea 100644
--- a/sys/netgraph/ng_echo.c
+++ b/sys/netgraph/ng_echo.c
@@ -118,4 +118,3 @@ nge_disconnect(hook_p hook)
}
return (0);
}
-
diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c
index 6d69779c8562..5b12ecc70c11 100644
--- a/sys/netgraph/ng_eiface.c
+++ b/sys/netgraph/ng_eiface.c
@@ -60,7 +60,6 @@
#include <net/ethernet.h>
#include <net/if_arp.h>
-
static const struct ng_cmdlist ng_eiface_cmdlist[] = {
{
NGM_EIFACE_COOKIE,
@@ -143,7 +142,6 @@ ng_eiface_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
ng_eiface_print_ioctl(ifp, command, data);
#endif
switch (command) {
-
/* These two are mostly handled at a higher layer */
case SIOCSIFADDR:
error = ether_ioctl(ifp, command, data);
@@ -484,7 +482,6 @@ ng_eiface_rcvmsg(node_p node, item_p item, hook_p lasthook)
switch (msg->header.typecookie) {
case NGM_EIFACE_COOKIE:
switch (msg->header.cmd) {
-
case NGM_EIFACE_SET:
{
if (msg->header.arglen != ETHER_ADDR_LEN) {
diff --git a/sys/netgraph/ng_etf.c b/sys/netgraph/ng_etf.c
index e4757b4001d7..26e8489878b8 100644
--- a/sys/netgraph/ng_etf.c
+++ b/sys/netgraph/ng_etf.c
@@ -159,7 +159,6 @@ ng_etf_findentry(etf_p etfp, u_int16_t ethertype)
{
struct filterhead *chain = etfp->hashtable + HASH(ethertype);
struct filter *fil;
-
LIST_FOREACH(fil, chain, next) {
if (fil->ethertype == ethertype) {
@@ -169,7 +168,6 @@ ng_etf_findentry(etf_p etfp, u_int16_t ethertype)
return (NULL);
}
-
/*
* Allocate the private data structure. The generic node has already
* been created. Link them together. We arrive with a reference to the node
@@ -485,4 +483,3 @@ ng_etf_disconnect(hook_p hook)
ng_rmnode_self(NG_HOOK_NODE(hook));
return (0);
}
-
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index b307b3d5ab88..c5ea9d102d5c 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -690,7 +690,6 @@ ng_ether_rcv_lower(hook_p hook, item_p item)
/* Drop in the MAC address if desired */
if (priv->autoSrcAddr) {
-
/* Make the mbuf writable if it's not already */
if (!M_WRITABLE(m)
&& (m = m_pullup(m, sizeof(struct ether_header))) == NULL)
diff --git a/sys/netgraph/ng_ether_echo.c b/sys/netgraph/ng_ether_echo.c
index 4064bc371864..75f44f7a0000 100644
--- a/sys/netgraph/ng_ether_echo.c
+++ b/sys/netgraph/ng_ether_echo.c
@@ -142,4 +142,3 @@ ngee_disconnect(hook_p hook)
}
return (0);
}
-
diff --git a/sys/netgraph/ng_frame_relay.c b/sys/netgraph/ng_frame_relay.c
index b931e897be88..20c8fb9791c3 100644
--- a/sys/netgraph/ng_frame_relay.c
+++ b/sys/netgraph/ng_frame_relay.c
@@ -252,7 +252,6 @@ ngfrm_newhook(node_p node, hook_p hook, const char *name)
*/
if (strncmp(name, NG_FRAMERELAY_HOOK_DLCI,
strlen(NG_FRAMERELAY_HOOK_DLCI)) != 0) {
-
/* It must be the downstream connection */
if (strcmp(name, NG_FRAMERELAY_HOOK_DOWNSTREAM) != 0)
return EINVAL;
diff --git a/sys/netgraph/ng_gif.c b/sys/netgraph/ng_gif.c
index 69401a3344fb..d4cb8922d1d6 100644
--- a/sys/netgraph/ng_gif.c
+++ b/sys/netgraph/ng_gif.c
@@ -593,4 +593,3 @@ ng_gif_mod_event(module_t mod, int event, void *data)
}
return (error);
}
-
diff --git a/sys/netgraph/ng_hub.c b/sys/netgraph/ng_hub.c
index 8d7026e84e7a..f1f9f2265854 100644
--- a/sys/netgraph/ng_hub.c
+++ b/sys/netgraph/ng_hub.c
@@ -81,7 +81,6 @@ static struct ng_type ng_hub_typestruct = {
};
NETGRAPH_INIT(hub, &ng_hub_typestruct);
-
static int
ng_hub_constructor(node_p node)
{
diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c
index a91c202ef832..1e586d687244 100644
--- a/sys/netgraph/ng_iface.c
+++ b/sys/netgraph/ng_iface.c
@@ -287,7 +287,6 @@ ng_iface_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
ng_iface_print_ioctl(ifp, command, data);
#endif
switch (command) {
-
/* These two are mostly handled at a higher layer */
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
@@ -625,7 +624,6 @@ ng_iface_rcvmsg(node_p node, item_p item, hook_p lasthook)
case NGM_IFACE_POINT2POINT:
case NGM_IFACE_BROADCAST:
{
-
/* Deny request if interface is UP */
if ((ifp->if_flags & IFF_UP) != 0)
return (EBUSY);
diff --git a/sys/netgraph/ng_ipfw.c b/sys/netgraph/ng_ipfw.c
index 599833731325..d97f131849de 100644
--- a/sys/netgraph/ng_ipfw.c
+++ b/sys/netgraph/ng_ipfw.c
@@ -225,7 +225,6 @@ ng_ipfw_findhook1(node_p node, u_int16_t rulenum)
return (NULL);
}
-
static int
ng_ipfw_rcvdata(hook_p hook, item_p item)
{
diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c
index cbfded714eb9..ba9845410e42 100644
--- a/sys/netgraph/ng_ksocket.c
+++ b/sys/netgraph/ng_ksocket.c
@@ -583,7 +583,6 @@ ng_ksocket_newhook(node_p node, hook_p hook, const char *name0)
return (error);
/* XXX call soreserve() ? */
-
}
/* OK */
@@ -1016,7 +1015,6 @@ ng_ksocket_incoming(struct socket *so, void *arg, int waitflag)
return (SU_OK);
}
-
/*
* When incoming data is appended to the socket, we get notified here.
* This is also called whenever a significant event occurs for the socket.
@@ -1271,4 +1269,3 @@ ng_ksocket_parse(const struct ng_ksocket_alias *aliases,
return (-1);
return (val);
}
-
diff --git a/sys/netgraph/ng_l2tp.c b/sys/netgraph/ng_l2tp.c
index 91d998965d88..91f6004961ec 100644
--- a/sys/netgraph/ng_l2tp.c
+++ b/sys/netgraph/ng_l2tp.c
@@ -1065,9 +1065,9 @@ ng_l2tp_rcvdata_ctrl(hook_p hook, item_p item)
if (!callout_active(&seq->rack_timer))
ng_callout(&seq->rack_timer, node, NULL,
hz, ng_l2tp_seq_rack_timeout, NULL, 0);
-
+
ns = seq->ns++;
-
+
mtx_unlock(&seq->mtx);
/* Copy packet */
@@ -1349,7 +1349,6 @@ ng_l2tp_seq_recv_nr(priv_p priv, u_int16_t nr)
* ACK had arrived separately.
*/
if (seq->cwnd < seq->wmax) {
-
/* Handle slow start phase */
if (seq->cwnd < seq->ssth) {
seq->cwnd += nack;
@@ -1522,7 +1521,6 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
/* If no mbuf passed, send an empty packet (ZLB) */
if (m == NULL) {
-
/* Create a new mbuf for ZLB packet */
MGETHDR(m, M_NOWAIT, MT_DATA);
if (m == NULL) {
@@ -1533,7 +1531,6 @@ ng_l2tp_xmit_ctrl(priv_p priv, struct mbuf *m, u_int16_t ns)
m->m_pkthdr.rcvif = NULL;
priv->stats.xmitZLBs++;
} else {
-
/* Strip off session ID */
if (m->m_len < 2 && (m = m_pullup(m, 2)) == NULL) {
priv->stats.memoryFailures++;
diff --git a/sys/netgraph/ng_lmi.c b/sys/netgraph/ng_lmi.c
index a51c024617e1..024bc47eb725 100644
--- a/sys/netgraph/ng_lmi.c
+++ b/sys/netgraph/ng_lmi.c
@@ -1077,4 +1077,3 @@ nglmi_disconnect(hook_p hook)
ng_rmnode_self(NG_HOOK_NODE(hook));
return (0);
}
-
diff --git a/sys/netgraph/ng_message.h b/sys/netgraph/ng_message.h
index da531f0e7863..6b28c375f674 100644
--- a/sys/netgraph/ng_message.h
+++ b/sys/netgraph/ng_message.h
@@ -358,7 +358,6 @@ struct flow_manager {
{ NULL } \
}
-
/*
* For netgraph nodes that are somehow associated with file descriptors
* (e.g., a device that has a /dev entry and is also a netgraph node),
diff --git a/sys/netgraph/ng_mppc.c b/sys/netgraph/ng_mppc.c
index 4e2c42ffe4b2..35873ee46518 100644
--- a/sys/netgraph/ng_mppc.c
+++ b/sys/netgraph/ng_mppc.c
@@ -734,7 +734,6 @@ ng_mppc_decompress(node_p node, struct mbuf **datap)
}
#endif
} else {
-
/* Are we expecting encryption? */
if ((d->cfg.bits & MPPE_BITS) != 0) {
log(LOG_ERR, "%s: rec'd unexpectedly %s packet",
@@ -820,7 +819,7 @@ failed:
if (ina)
free(inbuf, M_NETGRAPH_MPPC);
outlen -= destCnt;
-
+
m_copyback(m, 0, outlen, (caddr_t)outbuf);
if (m->m_pkthdr.len < outlen) {
m_freem(m);
@@ -904,4 +903,3 @@ ng_mppc_updatekey(u_int32_t bits,
rc4_init(rc4, key, keylen);
}
#endif
-
diff --git a/sys/netgraph/ng_mppc.h b/sys/netgraph/ng_mppc.h
index b826806c277e..83bbdb8f5add 100644
--- a/sys/netgraph/ng_mppc.h
+++ b/sys/netgraph/ng_mppc.h
@@ -82,4 +82,3 @@ enum {
};
#endif /* _NETGRAPH_NG_MPPC_H_ */
-
diff --git a/sys/netgraph/ng_nat.c b/sys/netgraph/ng_nat.c
index 4b6039d33654..a5c776ef6db6 100644
--- a/sys/netgraph/ng_nat.c
+++ b/sys/netgraph/ng_nat.c
@@ -884,7 +884,7 @@ ng_nat_rcvdata(hook_p hook, item_p item )
th->th_sum = in_pseudo(ip->ip_src.s_addr,
ip->ip_dst.s_addr, htons(IPPROTO_TCP +
ip_len - (ip->ip_hl << 2)));
-
+
if ((m->m_pkthdr.csum_flags & CSUM_TCP) == 0) {
m->m_pkthdr.csum_data = offsetof(struct tcphdr,
th_sum);
@@ -946,7 +946,7 @@ static unsigned int
ng_nat_translate_flags(unsigned int x)
{
unsigned int res = 0;
-
+
if (x & NG_NAT_LOG)
res |= PKT_ALIAS_LOG;
if (x & NG_NAT_DENY_INCOMING)
diff --git a/sys/netgraph/ng_one2many.h b/sys/netgraph/ng_one2many.h
index 753221d8c1c0..a9cc24dfcb5e 100644
--- a/sys/netgraph/ng_one2many.h
+++ b/sys/netgraph/ng_one2many.h
@@ -111,4 +111,3 @@ enum {
};
#endif /* _NETGRAPH_NG_ONE2MANY_H_ */
-
diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c
index b08cecd102e9..8050edbba562 100644
--- a/sys/netgraph/ng_parse.c
+++ b/sys/netgraph/ng_parse.c
@@ -175,7 +175,6 @@ ng_parse_getDefault(const struct ng_parse_type *type, u_char *buf, int *buflen)
return (*func)(type, buf, buf, buflen);
}
-
/************************************************************************
STRUCTURE TYPE
************************************************************************/
@@ -1899,4 +1898,3 @@ ng_get_getAlign_method(const struct ng_parse_type *t)
t = t->supertype;
return (t ? t->getAlign : NULL);
}
-
diff --git a/sys/netgraph/ng_parse.h b/sys/netgraph/ng_parse.h
index c17feaf458e7..e1b6c399e8d2 100644
--- a/sys/netgraph/ng_parse.h
+++ b/sys/netgraph/ng_parse.h
@@ -109,7 +109,6 @@
ASCII value
-----------
-
{ ip=1.2.3.4 label="abc\n" alen=3 ary=[ 5 2=10 ] }
Note that omitted fields and array elements get their default
@@ -537,4 +536,3 @@ extern char *ng_get_string_token(const char *s, int *startp,
extern char *ng_encode_string(const char *s, int slen);
#endif /* _NETGRAPH_NG_PARSE_H_ */
-
diff --git a/sys/netgraph/ng_patch.c b/sys/netgraph/ng_patch.c
index 4982fd0e8073..3626cece7dc8 100644
--- a/sys/netgraph/ng_patch.c
+++ b/sys/netgraph/ng_patch.c
@@ -65,7 +65,6 @@ static ng_shutdown_t ng_patch_shutdown;
static ng_newhook_t ng_patch_newhook;
static ng_rcvdata_t ng_patch_rcvdata;
static ng_disconnect_t ng_patch_disconnect;
-
#define ERROUT(x) { error = (x); goto done; }
static int
@@ -578,7 +577,6 @@ ng_patch_rcvdata(hook_p hook, item_p item)
if (priv->conf && hook == priv->in &&
m && (m->m_flags & M_PKTHDR)) {
-
m = m_unshare(m, M_NOWAIT);
if (m == NULL)
diff --git a/sys/netgraph/ng_pipe.c b/sys/netgraph/ng_pipe.c
index ad4767865d77..0812957b0109 100644
--- a/sys/netgraph/ng_pipe.c
+++ b/sys/netgraph/ng_pipe.c
@@ -40,7 +40,6 @@
* both directions can be set separately, except for delay.
*/
-
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/systm.h>
@@ -128,7 +127,6 @@ typedef struct node_priv *priv_p;
} else \
TAILQ_INSERT_TAIL(&hinfo->fifo_head, ngp_f, fifo_le); \
-
static void parse_cfg(struct ng_pipe_hookcfg *, struct ng_pipe_hookcfg *,
struct hookinfo *, priv_p);
static void pipe_dequeue(struct hookinfo *, struct timeval *);
@@ -717,7 +715,6 @@ ngp_rcvdata(hook_p hook, item_p item)
return (0);
}
-
/*
* Dequeueing sequence - we basically do the following:
* 1) Try to extract the frame from the inbound (bandwidth) queue;
@@ -932,7 +929,6 @@ ngp_shutdown(node_p node)
return (0);
}
-
/*
* Hook disconnection
*/
diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c
index 086d5481f725..eb639aa3d900 100644
--- a/sys/netgraph/ng_ppp.c
+++ b/sys/netgraph/ng_ppp.c
@@ -1446,7 +1446,7 @@ ng_ppp_rcvdata(hook_p hook, item_p item)
mtx_unlock(&priv->rmtx);
return (ng_ppp_bypass(node, item, proto, linkNum));
}
-
+
/* Other packets are denied on a disabled link. */
if (!link->conf.enableLink)
ERROUT(ENXIO);
@@ -1650,7 +1650,7 @@ ng_ppp_bump_mseq(node_p node, int32_t new_mseq)
{
const priv_p priv = NG_NODE_PRIVATE(node);
int i;
-
+
if (MP_RECV_SEQ_DIFF(priv, priv->mseq, new_mseq) < 0) {
priv->mseq = new_mseq;
for (i = 0; i < priv->numActiveLinks; i++) {
@@ -1863,7 +1863,7 @@ ng_ppp_frag_process(node_p node, item_p oitem)
}
/* Delete dead fragments and try again */
} while (ng_ppp_frag_trim(node) || ng_ppp_frag_drop(node));
-
+
/* If we haven't reused original item - free it. */
if (oitem) NG_FREE_ITEM(oitem);
@@ -1897,7 +1897,6 @@ ng_ppp_frag_checkstale(node_p node)
now.tv_sec = 0; /* uninitialized state */
while (1) {
-
/* If queue is empty, we're done */
if (TAILQ_EMPTY(&priv->frags))
break;
@@ -2004,7 +2003,7 @@ ng_ppp_mp_xmit(node_p node, item_p item, uint16_t proto)
NG_FREE_ITEM(item);
return (ENETDOWN);
}
-
+
/* Save length for later stats. */
plen = NGI_M(item)->m_pkthdr.len;
@@ -2077,7 +2076,7 @@ deliver:
frags += (distrib[activeLinkNum] + link->conf.mru - hdr_len - 1) /
(link->conf.mru - hdr_len);
}
-
+
/* Get out initial sequence number */
seq = priv->xseq;
diff --git a/sys/netgraph/ng_pppoe.c b/sys/netgraph/ng_pppoe.c
index b15208217281..70f893498420 100644
--- a/sys/netgraph/ng_pppoe.c
+++ b/sys/netgraph/ng_pppoe.c
@@ -306,8 +306,6 @@ static int pppoe_send_event(sessp sp, enum cmd cmdid);
* Author: Michal Ostrowski <mostrows@styx.uwaterloo.ca> *
************************************************************************/
-
-
/*
* Return the location where the next tag can be put
*/
@@ -2184,7 +2182,7 @@ scan_tags(sessp sp, const struct pppoe_hdr* ph)
}
return NULL;
}
-
+
static int
pppoe_send_event(sessp sp, enum cmd cmdid)
{
diff --git a/sys/netgraph/ng_pppoe.h b/sys/netgraph/ng_pppoe.h
index 43ac36fc85c7..2718ae55629c 100644
--- a/sys/netgraph/ng_pppoe.h
+++ b/sys/netgraph/ng_pppoe.h
@@ -240,7 +240,6 @@ struct pppoe_hdr{
u_int16_t length;
}__packed;
-
struct pppoe_full_hdr {
struct ether_header eh;
struct pppoe_hdr ph;
@@ -285,4 +284,3 @@ struct maxptag {
/* for PADT */
#endif /* _NETGRAPH_NG_PPPOE_H_ */
-
diff --git a/sys/netgraph/ng_pptpgre.c b/sys/netgraph/ng_pptpgre.c
index 01620bd007dd..4c3ccebd560f 100644
--- a/sys/netgraph/ng_pptpgre.c
+++ b/sys/netgraph/ng_pptpgre.c
@@ -385,7 +385,7 @@ ng_pptpgre_newhook(node_p node, hook_p hook, const char *name)
hpriv = malloc(sizeof(*hpriv), M_NETGRAPH, M_NOWAIT | M_ZERO);
if (hpriv == NULL)
return (ENOMEM);
-
+
/* Initialize state */
mtx_init(&hpriv->mtx, "ng_pptp", NULL, MTX_DEF);
ng_callout_init(&hpriv->sackTimer);
@@ -600,7 +600,6 @@ ng_pptpgre_xmit(hpriv_p hpriv, item_p item)
}
/* Check if there's data */
if (m != NULL) {
-
/* Check if windowing is enabled */
if (hpriv->conf.enableWindowing) {
/* Is our transmit window full? */
diff --git a/sys/netgraph/ng_pred1.c b/sys/netgraph/ng_pred1.c
index 5598ae9d7c0f..80f75992dd79 100644
--- a/sys/netgraph/ng_pred1.c
+++ b/sys/netgraph/ng_pred1.c
@@ -714,4 +714,3 @@ static const uint16_t Crc16Table[256] = {
/* f0 */ 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330,
/* f8 */ 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78
};
-
diff --git a/sys/netgraph/ng_pred1.h b/sys/netgraph/ng_pred1.h
index 3d1f8fb243d3..19687673851a 100644
--- a/sys/netgraph/ng_pred1.h
+++ b/sys/netgraph/ng_pred1.h
@@ -82,4 +82,3 @@ enum {
};
#endif /* _NETGRAPH_NG_PRED1_H_ */
-
diff --git a/sys/netgraph/ng_rfc1490.c b/sys/netgraph/ng_rfc1490.c
index 061faa29fdef..32603593b496 100644
--- a/sys/netgraph/ng_rfc1490.c
+++ b/sys/netgraph/ng_rfc1490.c
@@ -486,4 +486,3 @@ ng_rfc1490_disconnect(hook_p hook)
panic("%s", __func__);
return (0);
}
-
diff --git a/sys/netgraph/ng_sample.c b/sys/netgraph/ng_sample.c
index 8fa66229fb4d..ae239c5286df 100644
--- a/sys/netgraph/ng_sample.c
+++ b/sys/netgraph/ng_sample.c
@@ -393,7 +393,7 @@ devintr()
/* get packet from device and send on */
m = MGET(blah blah)
-
+
NG_SEND_DATA_ONLY(error, xxxp->upstream_hook.hook, m);
/* see note above in xxx_rcvdata() */
/* and ng_xxx_connect() */
@@ -493,4 +493,3 @@ ng_xxx_disconnect(hook_p hook)
ng_rmnode_self(NG_HOOK_NODE(hook));
return (0);
}
-
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c
index 533b3aafcefa..421f11bc1fdc 100644
--- a/sys/netgraph/ng_socket.c
+++ b/sys/netgraph/ng_socket.c
@@ -988,7 +988,7 @@ ngs_rcvmsg(node_p node, item_p item, hook_p lasthook)
return (ENOBUFS);
}
sorwakeup_locked(so);
-
+
return (error);
}
@@ -1214,4 +1214,3 @@ SYSCTL_INT(_net_graph_data, OID_AUTO, proto, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, NG
static SYSCTL_NODE(_net_graph, OID_AUTO, control, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"CONTROL");
SYSCTL_INT(_net_graph_control, OID_AUTO, proto, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, NG_CONTROL, "");
-
diff --git a/sys/netgraph/ng_socket.h b/sys/netgraph/ng_socket.h
index b7e831018abb..52886664af14 100644
--- a/sys/netgraph/ng_socket.h
+++ b/sys/netgraph/ng_socket.h
@@ -66,4 +66,3 @@ struct sockaddr_ng {
};
#endif /* _NETGRAPH_NG_SOCKET_H_ */
-
diff --git a/sys/netgraph/ng_split.c b/sys/netgraph/ng_split.c
index a2260ecfcf95..9583ec71465e 100644
--- a/sys/netgraph/ng_split.c
+++ b/sys/netgraph/ng_split.c
@@ -166,7 +166,7 @@ static int
ng_split_disconnect(hook_p hook)
{
hook_p *localhook = NG_HOOK_PRIVATE(hook);
-
+
KASSERT(localhook != NULL, ("%s: null info", __func__));
*localhook = NULL;
if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
diff --git a/sys/netgraph/ng_split.h b/sys/netgraph/ng_split.h
index a88fc20f5132..d0d05e7c4eee 100644
--- a/sys/netgraph/ng_split.h
+++ b/sys/netgraph/ng_split.h
@@ -30,7 +30,6 @@
*
*/
-
#ifndef _NETGRAPH_NG_SPLIT_H_
#define _NETGRAPH_NG_SPLIT_H_
diff --git a/sys/netgraph/ng_sppp.c b/sys/netgraph/ng_sppp.c
index 95e9a60f56f9..78e205e0d715 100644
--- a/sys/netgraph/ng_sppp.c
+++ b/sys/netgraph/ng_sppp.c
@@ -196,7 +196,7 @@ ng_sppp_start (struct ifnet *ifp)
struct mbuf *m;
int len, error = 0;
priv_p priv = ifp->if_softc;
-
+
/* Check interface flags */
/*
* This has side effects. It is not good idea to stop sending if we
@@ -207,7 +207,7 @@ ng_sppp_start (struct ifnet *ifp)
/* (ifp->if_drv_flags & IFF_DRV_RUNNING))) { */
/* return;*/
/* }*/
-
+
if (ifp->if_drv_flags & IFF_DRV_OACTIVE)
return;
@@ -295,13 +295,13 @@ ng_sppp_newhook (node_p node, hook_p hook, const char *name)
if (strcmp (name, NG_SPPP_HOOK_DOWNSTREAM) != 0)
return (EINVAL);
-
+
if (priv->hook)
return (EISCONN);
priv->hook = hook;
NG_HOOK_SET_PRIVATE (hook, priv);
-
+
return (0);
}
diff --git a/sys/netgraph/ng_tag.c b/sys/netgraph/ng_tag.c
index 9222d3bd3b20..364a0bd83dc0 100644
--- a/sys/netgraph/ng_tag.c
+++ b/sys/netgraph/ng_tag.c
@@ -545,7 +545,7 @@ ng_tag_rcvdata(hook_p hook, item_p item)
tag = m_tag_locate(m, cookie, type, tag);
}
}
-
+
/* See if we got a match and find destination hook. */
if (found) {
#ifdef NG_TAG_DEBUG
@@ -569,11 +569,11 @@ ng_tag_rcvdata(hook_p hook, item_p item)
dhip->stats.xmitOctets += totlen;
dhip->stats.xmitFrames++;
#endif
-
+
cookie = dhip->out_tag_cookie;
type = dhip->out_tag_id;
tag_len = dhip->out_tag_len;
-
+
if ((cookie != 0) || (type != 0)) {
tag = m_tag_alloc(cookie, type, tag_len, M_NOWAIT);
/* XXX may be free the mbuf if tag allocation failed? */
@@ -586,7 +586,7 @@ ng_tag_rcvdata(hook_p hook, item_p item)
m_tag_prepend(m, tag);
}
}
-
+
NG_FWD_ITEM_HOOK(error, item, dest);
return (error);
}
@@ -717,4 +717,3 @@ ng_tag_setdata_out(hook_p hook, const struct ng_tag_hookout *hp0)
hip->out_tag_data = (void*)(hip->out->tag_data);
return (0);
}
-
diff --git a/sys/netgraph/ng_tcpmss.c b/sys/netgraph/ng_tcpmss.c
index 5378332f3313..a79253309c39 100644
--- a/sys/netgraph/ng_tcpmss.c
+++ b/sys/netgraph/ng_tcpmss.c
@@ -142,7 +142,6 @@ static struct ng_type ng_tcpmss_typestruct = {
};
NETGRAPH_INIT(tcpmss, &ng_tcpmss_typestruct);
-
#define ERROUT(x) { error = (x); goto done; }
/*
@@ -329,7 +328,7 @@ ng_tcpmss_rcvdata(hook_p hook, item_p item)
/* Check SYN packet and has options. */
if (!(tcp->th_flags & TH_SYN) || tcphlen == sizeof(struct tcphdr))
goto send;
-
+
/* Update SYN stats. */
priv->stats.SYNPkts++;
diff --git a/sys/netgraph/ng_tcpmss.h b/sys/netgraph/ng_tcpmss.h
index c4c61c7d4e48..f73e269d2040 100644
--- a/sys/netgraph/ng_tcpmss.h
+++ b/sys/netgraph/ng_tcpmss.h
@@ -57,7 +57,6 @@ struct ng_tcpmss_hookstat {
{ NULL } \
}
-
/* Structure for NGM_TCPMSS_CONFIG. */
struct ng_tcpmss_config {
char inHook[NG_HOOKSIZ];
diff --git a/sys/netgraph/ng_tty.c b/sys/netgraph/ng_tty.c
index 6dcd262a47e2..fb1e06ff0f2b 100644
--- a/sys/netgraph/ng_tty.c
+++ b/sys/netgraph/ng_tty.c
@@ -507,4 +507,3 @@ ngt_rint_poll(struct tty *tp)
/* We can always accept input */
return (1);
}
-
diff --git a/sys/netgraph/ng_vjc.c b/sys/netgraph/ng_vjc.c
index 1d8d3a942b8b..11bd328fc8b2 100644
--- a/sys/netgraph/ng_vjc.c
+++ b/sys/netgraph/ng_vjc.c
@@ -611,4 +611,3 @@ ng_vjc_pulluphdrs(struct mbuf *m, int knownTCP)
m = m_pullup(m, ihlen + thlen);
return (m);
}
-
diff --git a/sys/netgraph/ng_vlan.c b/sys/netgraph/ng_vlan.c
index 456f531b1224..ce70d4ec1e46 100644
--- a/sys/netgraph/ng_vlan.c
+++ b/sys/netgraph/ng_vlan.c
@@ -194,7 +194,6 @@ static struct ng_type ng_vlan_typestruct = {
};
NETGRAPH_INIT(vlan, &ng_vlan_typestruct);
-
/*
* Helper functions.
*/
@@ -214,7 +213,6 @@ m_chk(struct mbuf **mp, int len)
return (0);
}
-
/*
* Netgraph node functions.
*/
@@ -524,7 +522,6 @@ ng_vlan_rcvdata(hook_p hook, item_p item)
struct mbuf *m;
hook_p dst_hook;
-
NGI_GET_M(item, m);
/* Make sure we have an entire header. */
diff --git a/sys/netgraph/ng_vlan.h b/sys/netgraph/ng_vlan.h
index 5cc580ad5778..fd7442e680c6 100644
--- a/sys/netgraph/ng_vlan.h
+++ b/sys/netgraph/ng_vlan.h
@@ -93,7 +93,6 @@ struct ng_vlan_filter {
}
#endif
-
/* Structure returned by NGM_VLAN_GET_TABLE. */
struct ng_vlan_table {
u_int32_t n;
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);
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index d99d6e71b0d3..c22e931dee33 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -158,7 +158,6 @@ VNET_DEFINE_STATIC(uint32_t, ip6qb_hashseed);
#define IP6_MAXFRAGS (nmbclusters / 32)
#define IP6_MAXFRAGPACKETS (imin(IP6_MAXFRAGS, IP6REASS_NHASH * 50))
-
/*
* Sysctls and helper function.
*/
@@ -213,7 +212,6 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGBUCKETSIZE, maxfragbucketsize,
CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_maxfragbucketsize), 0,
"Maximum number of reassembly queues per hash bucket");
-
/*
* Remove the IPv6 fragmentation header from the mbuf.
*/
@@ -250,7 +248,6 @@ frag6_freef(struct ip6q *q6, uint32_t bucket)
IP6QB_LOCK_ASSERT(bucket);
while ((af6 = TAILQ_FIRST(&q6->ip6q_frags)) != NULL) {
-
m = af6->ip6af_m;
TAILQ_REMOVE(&q6->ip6q_frags, af6, ip6af_tq);
@@ -259,7 +256,6 @@ frag6_freef(struct ip6q *q6, uint32_t bucket)
* Just free other fragments.
*/
if (af6->ip6af_off == 0 && m->m_pkthdr.rcvif != NULL) {
-
/* Adjust pointer. */
ip6 = mtod(m, struct ip6_hdr *);
@@ -317,7 +313,6 @@ frag6_cleanup(void *arg __unused, struct ifnet *ifp)
/* Scan fragment list. */
TAILQ_FOREACH(q6, head, ip6q_tq) {
TAILQ_FOREACH(af6, &q6->ip6q_frags, ip6af_tq) {
-
/* Clear no longer valid rcvif pointer. */
if (af6->ip6af_m->m_pkthdr.rcvif == ifp)
af6->ip6af_m->m_pkthdr.rcvif = NULL;
@@ -524,7 +519,6 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
only_frag = false;
if (q6 == NULL) {
-
/* A first fragment to arrive creates a reassembly queue. */
only_frag = true;
@@ -634,7 +628,6 @@ frag6_input(struct mbuf **mp, int *offp, int proto)
*/
if (fragoff == 0 && !only_frag) {
TAILQ_FOREACH_SAFE(af6, &q6->ip6q_frags, ip6af_tq, af6tmp) {
-
if (q6->ip6q_unfrglen + af6->ip6af_off +
af6->ip6af_frglen > IPV6_MAXPACKET) {
struct ip6_hdr *ip6err;
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 31cb54aef6a0..a86bdf5a1876 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -114,7 +114,6 @@ __FBSDID("$FreeBSD$");
#include <netinet6/in6_fib.h>
#include <netinet6/in6_pcb.h>
-
/*
* struct in6_ifreq and struct ifreq must be type punnable for common members
* of ifr_ifru to allow accessors to be shared.
@@ -165,7 +164,6 @@ static int in6_broadcast_ifa(struct ifnet *, struct in6_aliasreq *,
#define ifa2ia6(ifa) ((struct in6_ifaddr *)(ifa))
#define ia62ifa(ia6) (&((ia6)->ia_ifa))
-
void
in6_newaddrmsg(struct in6_ifaddr *ia, int cmd)
{
@@ -188,7 +186,6 @@ in6_newaddrmsg(struct in6_ifaddr *ia, int cmd)
if (cmd != RTM_DELETE)
info.rti_ifp = V_loif;
-
fibnum = V_rt_add_addr_allfibs ? RT_ALL_FIBS : ia62ifa(ia)->ifa_ifp->if_fib;
if (cmd == RTM_ADD) {
@@ -740,7 +737,6 @@ out:
return (error);
}
-
static struct in6_multi_mship *
in6_joingroup_legacy(struct ifnet *ifp, const struct in6_addr *mcaddr,
int *errorp, int delay)
@@ -1080,7 +1076,6 @@ in6_validate_ifra(struct ifnet *ifp, struct in6_aliasreq *ifra,
return (0);
}
-
/*
* Allocate a new ifaddr and link it into chains.
*/
@@ -1500,7 +1495,6 @@ in6ifa_ifpforlinklocal(struct ifnet *ifp, int ignoreflags)
return ((struct in6_ifaddr *)ifa);
}
-
/*
* find the interface address corresponding to a given IPv6 address.
* ifaddr is returned referenced.
@@ -1559,7 +1553,6 @@ in6ifa_llaonifp(struct ifnet *ifp)
struct sockaddr_in6 *sin6;
struct ifaddr *ifa;
-
if (ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED)
return (NULL);
NET_EPOCH_ENTER(et);
@@ -1701,7 +1694,7 @@ in6_localip(struct in6_addr *in6)
IN6_IFADDR_RUNLOCK(&in6_ifa_tracker);
return (0);
}
-
+
/*
* Return 1 if an internet address is configured on an interface.
*/
@@ -2098,7 +2091,6 @@ in6_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
@@ -2127,7 +2119,6 @@ in6_lltable_free_entry(struct lltable *llt, struct llentry *lle)
/* Unlink entry from table */
if ((lle->la_flags & LLE_LINKED) != 0) {
-
ifp = llt->llt_ifp;
IF_AFDATA_WLOCK_ASSERT(ifp);
lltable_unlink_entry(llt, lle);
diff --git a/sys/netinet6/in6_cksum.c b/sys/netinet6/in6_cksum.c
index aead41228b40..c4624b90b6a1 100644
--- a/sys/netinet6/in6_cksum.c
+++ b/sys/netinet6/in6_cksum.c
@@ -234,7 +234,7 @@ in6_cksum_partial(struct mbuf *m, u_int8_t nxt, u_int32_t off,
byte_swapped = 1;
} else
byte_swapped = 0;
-
+
/*
* Unroll the loop to make overhead from
* branches &c small.
diff --git a/sys/netinet6/in6_fib.c b/sys/netinet6/in6_fib.c
index ae4121d1e13f..a0e4dacc86e1 100644
--- a/sys/netinet6/in6_fib.c
+++ b/sys/netinet6/in6_fib.c
@@ -154,7 +154,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);
@@ -259,4 +259,3 @@ fib6_lookup_debugnet(uint32_t fibnum, const struct in6_addr *dst6,
}
#endif
-
diff --git a/sys/netinet6/in6_fib.h b/sys/netinet6/in6_fib.h
index f6195776f245..a716674bce23 100644
--- a/sys/netinet6/in6_fib.h
+++ b/sys/netinet6/in6_fib.h
@@ -40,4 +40,3 @@ int fib6_check_urpf(uint32_t fibnum, const struct in6_addr *dst6,
struct nhop_object *fib6_lookup_debugnet(uint32_t fibnum,
const struct in6_addr *dst6, uint32_t scopeid, uint32_t flags);
#endif
-
diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c
index fde7e5dad165..9b04c87d22a0 100644
--- a/sys/netinet6/in6_mcast.c
+++ b/sys/netinet6/in6_mcast.c
@@ -1378,7 +1378,6 @@ in6_leavegroup_locked(struct in6_multi *inm, /*const*/ struct in6_mfilter *imf)
return (error);
}
-
/*
* Block or unblock an ASM multicast source on an inpcb.
* This implements the delta-based API described in RFC 3678.
@@ -2508,7 +2507,7 @@ in6p_set_source_filters(struct inpcb *inp, struct sockopt *sopt)
int i;
INP_WUNLOCK(inp);
-
+
CTR2(KTR_MLD, "%s: loading %lu source list entries",
__func__, (unsigned long)msfr.msfr_nsrcs);
kss = malloc(sizeof(struct sockaddr_storage) * msfr.msfr_nsrcs,
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 5041790eca02..5f2e2fe3ae6e 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -172,4 +172,3 @@ in6_detachhead(struct rib_head *rh)
rt_table_destroy(rh);
}
#endif
-
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 8c0f3b334b54..4921f7027218 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -767,7 +767,6 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
/* Unwrap in6_getscope() and in6_clearscope() */
scopeid = ntohs(sa6->sin6_addr.s6_addr16[1]);
sa6->sin6_addr.s6_addr16[1] = 0;
-
}
ro->ro_nh = fib6_lookup(fibnum,
diff --git a/sys/netinet6/ip6_fastfwd.c b/sys/netinet6/ip6_fastfwd.c
index 78f1a0f79cb0..b6a8af8013c4 100644
--- a/sys/netinet6/ip6_fastfwd.c
+++ b/sys/netinet6/ip6_fastfwd.c
@@ -302,4 +302,3 @@ drop:
m_freem(m);
return (NULL);
}
-
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index ae4cb2c125b7..8f500cb87bfe 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -379,7 +379,6 @@ ip6_destroy(void *unused __unused)
/* Cannot lock here - lock recursion. */
/* IF_ADDR_LOCK(ifp); */
CK_STAILQ_FOREACH_SAFE(ifa, &ifp->if_addrhead, ifa_link, nifa) {
-
if (ifa->ifa_addr->sa_family != AF_INET6)
continue;
in6_purgeaddr(ifa);
@@ -1492,7 +1491,6 @@ ip6_savecontrol(struct inpcb *inp, struct mbuf *m, struct mbuf **mp)
* other cases).
*/
goto loopend;
-
}
/* proceed with the next header. */
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index 0af84c56a81e..d2277e41110c 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -149,7 +149,6 @@ static const struct encap_config ipv6_encap_cfg = {
.input = pim6_input
};
-
VNET_DEFINE_STATIC(int, ip6_mrouter_ver) = 0;
#define V_ip6_mrouter_ver VNET(ip6_mrouter_ver)
@@ -851,7 +850,6 @@ add_m6fc(struct mf6cctl *mfccp)
IN6_ARE_ADDR_EQUAL(&rt->mf6c_mcastgrp.sin6_addr,
&mfccp->mf6cc_mcastgrp.sin6_addr) &&
(rt->mf6c_stall != NULL)) {
-
if (nstl++)
log(LOG_ERR,
"add_m6fc: %s o %s g %s p %x dbx %p\n",
@@ -906,12 +904,10 @@ add_m6fc(struct mf6cctl *mfccp)
mfccp->mf6cc_parent);
for (rt = mf6ctable[hash]; rt; rt = rt->mf6c_next) {
-
if (IN6_ARE_ADDR_EQUAL(&rt->mf6c_origin.sin6_addr,
&mfccp->mf6cc_origin.sin6_addr)&&
IN6_ARE_ADDR_EQUAL(&rt->mf6c_mcastgrp.sin6_addr,
&mfccp->mf6cc_mcastgrp.sin6_addr)) {
-
rt->mf6c_origin = mfccp->mf6cc_origin;
rt->mf6c_mcastgrp = mfccp->mf6cc_mcastgrp;
rt->mf6c_parent = mfccp->mf6cc_parent;
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 975a000f1c81..9d37cf84bde6 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -155,7 +155,6 @@ static int ip6_calcmtu(struct ifnet *, const struct in6_addr *, u_long,
static int ip6_getpmtu_ctl(u_int, const struct in6_addr *, u_long *);
static int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int);
-
/*
* Make an extension header from option data. hp is the source,
* mp is the destination, and _ol is the optlen.
@@ -826,7 +825,7 @@ nonh6lookup:
* more details.
*/
origifp = ifp;
-
+
/*
* We should use ia_ifp to support the case of sending
* packets to an address of our own.
@@ -1496,7 +1495,6 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, int do_lookup,
mtu = 0;
if (ro_pmtu == NULL || do_lookup) {
-
/*
* Here ro_pmtu has final destination address, while
* ro might represent immediate destination.
@@ -1681,7 +1679,6 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt)
}
} else { /* level == IPPROTO_IPV6 */
switch (op) {
-
case SOPT_SET:
switch (optname) {
case IPV6_2292PKTOPTIONS:
@@ -1770,7 +1767,6 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt)
if (error)
break;
switch (optname) {
-
case IPV6_UNICAST_HOPS:
if (optval < -1 || optval >= 256)
error = EINVAL;
@@ -2133,7 +2129,6 @@ do { \
case SOPT_GET:
switch (optname) {
-
case IPV6_2292PKTOPTIONS:
#ifdef IPV6_PKTOPTIONS
case IPV6_PKTOPTIONS:
@@ -2173,7 +2168,6 @@ do { \
#endif
case IPV6_BINDMULTI:
switch (optname) {
-
case IPV6_RECVHOPOPTS:
optval = OPTBIT(IN6P_HOPOPTS);
break;
@@ -2269,7 +2263,6 @@ do { \
case IPV6_BINDMULTI:
optval = OPTBIT2(INP_BINDMULTI);
break;
-
}
if (error)
break;
diff --git a/sys/netinet6/ip_fw_nptv6.h b/sys/netinet6/ip_fw_nptv6.h
index a1c12c26e21d..d777db98dd98 100644
--- a/sys/netinet6/ip_fw_nptv6.h
+++ b/sys/netinet6/ip_fw_nptv6.h
@@ -52,4 +52,3 @@ typedef struct _ipfw_nptv6_cfg {
} ipfw_nptv6_cfg;
#endif /* _NETINET6_IP_FW_NPTV6_H_ */
-
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index ccfa499739f0..c4948158bba8 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -1024,7 +1024,6 @@ mld_v2_process_group_query(struct in6_multi *inm, struct mld_ifsoftc *mli,
m0->m_pkthdr.len, off + sizeof(struct mldv2_query) +
nsrc * sizeof(struct in6_addr), m0));
-
/*
* Deal with group-specific queries upfront.
* If any group query is already pending, purge any recorded
@@ -1334,7 +1333,7 @@ mld_fasttimo(void)
VNET_ITERATOR_DECL(vnet_iter);
SLIST_INIT(&inmh);
-
+
VNET_LIST_RLOCK_NOSLEEP();
VNET_FOREACH(vnet_iter) {
CURVNET_SET(vnet_iter);
@@ -1808,7 +1807,7 @@ mld_v1_transmit_report(struct in6_multi *in6m, const int type)
NET_EPOCH_ASSERT();
IN6_MULTI_LIST_LOCK_ASSERT();
MLD_LOCK_ASSERT();
-
+
ifp = in6m->in6m_ifp;
/* in process of being freed */
if (ifp == NULL)
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index bb488dbc6ff1..7af9cc385b8f 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -141,7 +141,6 @@ static void clear_llinfo_pqueue(struct llentry *);
static int nd6_resolve_slow(struct ifnet *, int, struct mbuf *,
const struct sockaddr_in6 *, u_char *, uint32_t *, struct llentry **);
static int nd6_need_cache(struct ifnet *);
-
VNET_DEFINE_STATIC(struct callout, nd6_slowtimo_ch);
#define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch)
@@ -622,7 +621,6 @@ nd6_is_stale(struct llentry *lle, long *pdelay, int *do_switch)
LLE_REQ_UNLOCK(lle);
if (r_skip_req > 0) {
-
/*
* Nonzero r_skip_req value was set upon entering
* STALE state. Since value was not changed, no
@@ -639,7 +637,6 @@ nd6_is_stale(struct llentry *lle, long *pdelay, int *do_switch)
}
if (delay == 0) {
-
/*
* The original ng6_gctime timeout ended,
* no more rescheduling.
@@ -656,7 +653,6 @@ nd6_is_stale(struct llentry *lle, long *pdelay, int *do_switch)
*/
delay = (long)(time_uptime - lle_hittime);
if (delay < nd_delay) {
-
/*
* V_nd6_delay still not passed since the first
* hit in STALE state.
@@ -671,7 +667,6 @@ nd6_is_stale(struct llentry *lle, long *pdelay, int *do_switch)
return (0);
}
-
/*
* Switch @lle state to new state optionally arming timers.
*
@@ -849,7 +844,6 @@ nd6_llinfo_timer(void *arg)
case ND6_LLINFO_STALE:
if (nd6_is_stale(ln, &delay, &do_switch) != 0) {
-
/*
* No packet has used this entry and GC timeout
* has not been passed. Reshedule timer and
@@ -860,7 +854,6 @@ nd6_llinfo_timer(void *arg)
}
if (do_switch == 0) {
-
/*
* GC timer has ended and entry hasn't been used.
* Run Garbage collector (RFC 4861, 5.3)
@@ -912,7 +905,6 @@ done:
CURVNET_RESTORE();
}
-
/*
* ND6 timer routine to expire default route list and prefix list
*/
@@ -978,7 +970,6 @@ nd6_timer(void *arg)
if (V_ip6_use_tempaddr &&
(ia6->ia6_flags & IN6_IFF_TEMPORARY) != 0 &&
(oldflags & IN6_IFF_DEPRECATED) == 0) {
-
if (regen_tmpaddr(ia6) == 0) {
/*
* A new temporary address is
@@ -1198,7 +1189,7 @@ nd6_lookup(const struct in6_addr *addr6, int flags, struct ifnet *ifp)
{
struct sockaddr_in6 sin6;
struct llentry *ln;
-
+
bzero(&sin6, sizeof(sin6));
sin6.sin6_len = sizeof(struct sockaddr_in6);
sin6.sin6_family = AF_INET6;
@@ -1369,7 +1360,6 @@ restart:
return (0);
}
-
/*
* Detect if a given IPv6 address identifies a neighbor on a given link.
* XXX: should take care of the destination of a p2p link?
@@ -1481,7 +1471,6 @@ nd6_free(struct llentry **lnp, int gc)
}
if (ln->ln_router || dr) {
-
/*
* We need to unlock to avoid a LOR with rt6_flush() with the
* rnh and for the calls to pfxlist_onlink_check() and
@@ -1600,7 +1589,6 @@ nd6_subscription_cb(struct rib_head *rnh, struct rib_cmd_info *rc, void *arg)
}
}
-
int
nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp)
{
@@ -2070,7 +2058,7 @@ nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr,
if (chain != NULL)
nd6_flush_holdchain(ifp, chain, &sin6);
-
+
/*
* When the link-layer address of a router changes, select the
* best router again. In particular, when the neighbor entry is newly
@@ -2138,7 +2126,6 @@ nd6_grab_holdchain(struct llentry *ln, struct mbuf **chain,
lltable_fill_sa_entry(ln, (struct sockaddr *)sin6);
if (ln->ln_state == ND6_LLINFO_STALE) {
-
/*
* The first time we send a packet to a
* neighbor whose entry is STALE, we have
@@ -2271,7 +2258,6 @@ nd6_resolve(struct ifnet *ifp, int is_gw, struct mbuf *m,
return (nd6_resolve_slow(ifp, 0, m, dst6, desten, pflags, plle));
}
-
/*
* Do L2 address resolution for @sa_dst address. Stores found
* address in @desten buffer. Copy of lle ln_flags can be also
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 20364e03ffe1..f96d5a76c4f1 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -272,7 +272,6 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len)
0, 0, &info) == 0) {
if ((info.rti_flags & RTF_ANNOUNCE) != 0 &&
rt_gateway.sdl_family == AF_LINK) {
-
/*
* proxy NDP for single entry
*/
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index bd54a58c7747..f17ad21e6b6f 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -668,7 +668,6 @@ pfxrtr_del(struct nd_pfxrouter *pfr)
free(pfr, M_IP6NDP);
}
-
/* Default router list processing sub routines. */
static void
defrouter_addreq(struct nd_defrouter *new)
@@ -793,7 +792,6 @@ defrouter_del(struct nd_defrouter *dr)
defrouter_rele(dr);
}
-
struct nd_defrouter *
defrouter_lookup_locked(const struct in6_addr *addr, struct ifnet *ifp)
{
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c
index f99585dc1789..099f8a78e14d 100644
--- a/sys/netinet6/scope6.c
+++ b/sys/netinet6/scope6.c
@@ -595,5 +595,3 @@ sa6_checkzone_ifp(struct ifnet *ifp, struct sockaddr_in6 *sa6)
}
return (sa6_checkzone(sa6));
}
-
-
diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c
index 525bed2366d2..b544d2975c6a 100644
--- a/sys/netinet6/sctp6_usrreq.c
+++ b/sys/netinet6/sctp6_usrreq.c
@@ -164,7 +164,6 @@ out:
return (IPPROTO_DONE);
}
-
int
sctp6_input(struct mbuf **i_pak, int *offp, int proto SCTP_UNUSED)
{
@@ -463,7 +462,6 @@ SYSCTL_PROC(_net_inet6_sctp6, OID_AUTO, getcred,
0, 0, sctp6_getcred, "S,ucred",
"Get the ucred of a SCTP6 connection");
-
/* This is the same as the sctp_abort() could be made common */
static void
sctp6_abort(struct socket *so)
@@ -654,7 +652,6 @@ out:
return (error);
}
-
static void
sctp6_close(struct socket *so)
{
@@ -670,12 +667,10 @@ sctp6_disconnect(struct socket *so)
return (sctp_disconnect(so));
}
-
int
sctp_sendm(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
struct mbuf *control, struct thread *p);
-
static int
sctp6_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr,
struct mbuf *control, struct thread *p)
@@ -1126,7 +1121,6 @@ sctp6_in6getaddr(struct socket *so, struct sockaddr **nam)
return (error);
}
-
static int
sctp6_getpeeraddr(struct socket *so, struct sockaddr **nam)
{
diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c
index 5fd83bde1a4b..535ebcd45303 100644
--- a/sys/netinet6/udp6_usrreq.c
+++ b/sys/netinet6/udp6_usrreq.c
@@ -183,7 +183,6 @@ udp6_append(struct inpcb *inp, struct mbuf *n, int off,
} else
opts = tmp_opts;
}
-
}
m_adj(n, off + sizeof(struct udphdr));
@@ -817,7 +816,6 @@ udp6_output(struct socket *so, int flags_arg, struct mbuf *m,
NET_EPOCH_ENTER(et);
if (sin6) {
-
/*
* Since we saw no essential reason for calling in_pcbconnect,
* we get rid of such kind of logic, and call in6_selectsrc
diff --git a/sys/netipsec/esp.h b/sys/netipsec/esp.h
index 94612b878514..2e7c0c9cffa3 100644
--- a/sys/netipsec/esp.h
+++ b/sys/netipsec/esp.h
@@ -64,6 +64,6 @@ struct esptail {
u_int8_t esp_nxt; /* Next header */
/*variable size, 32bit bound*/ /* Authentication data (new IPsec)*/
};
-
+
#define ESP_ALEN 12 /* 96-bit authenticator */
#endif /*_NETIPSEC_ESP_H_*/
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c
index f8ba71cf6635..7d336641b96e 100644
--- a/sys/netipsec/ipsec.c
+++ b/sys/netipsec/ipsec.c
@@ -1303,7 +1303,6 @@ ipsec_updatereplay(uint32_t seq, struct secasvar *sav)
ok:
if (replay->count == ~0) {
-
/* Set overflow flag. */
replay->overflow++;
@@ -1392,7 +1391,6 @@ def_policy_init(const void *unused __unused)
printf("%s: failed to initialize default policy\n", __func__);
}
-
static void
def_policy_uninit(const void *unused __unused)
{
diff --git a/sys/netipsec/ipsec_input.c b/sys/netipsec/ipsec_input.c
index 7f9317bee8b6..48acba68a1fe 100644
--- a/sys/netipsec/ipsec_input.c
+++ b/sys/netipsec/ipsec_input.c
@@ -98,7 +98,6 @@ __FBSDID("$FreeBSD$");
#include <machine/in_cksum.h>
#include <machine/stdarg.h>
-
#define IPSEC_ISTAT(proto, name) do { \
if ((proto) == IPPROTO_ESP) \
ESPSTAT_INC(esps_##name); \
@@ -516,7 +515,6 @@ ipsec6_common_input_cb(struct mbuf *m, struct secasvar *sav, int skip,
/* Fix IPv6 header */
if (m->m_len < sizeof(struct ip6_hdr) &&
(m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) {
-
DPRINTF(("%s: processing failed for SA %s/%08lx\n",
__func__, ipsec_address(&sav->sah->saidx.dst, buf,
sizeof(buf)), (u_long) ntohl(sav->spi)));
diff --git a/sys/netipsec/ipsec_output.c b/sys/netipsec/ipsec_output.c
index 557c0d1d4a4e..f95a35226f6f 100644
--- a/sys/netipsec/ipsec_output.c
+++ b/sys/netipsec/ipsec_output.c
@@ -965,4 +965,3 @@ ipsec_encap(struct mbuf **mp, struct secasindex *saidx)
(*mp)->m_flags &= ~(M_BCAST | M_MCAST);
return (0);
}
-
diff --git a/sys/netipsec/ipsec_pcb.c b/sys/netipsec/ipsec_pcb.c
index 93f60b10e788..63ad288ab0da 100644
--- a/sys/netipsec/ipsec_pcb.c
+++ b/sys/netipsec/ipsec_pcb.c
@@ -480,4 +480,3 @@ ipsec6_pcbctl(struct inpcb *inp, struct sockopt *sopt)
return (ipsec_control_pcbpolicy(inp, sopt));
}
#endif
-
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index 0497187db856..cd99f3d251d8 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -871,7 +871,6 @@ key_do_allocsp(struct secpolicyindex *spidx, u_int dir)
return (sp);
}
-
/*
* allocating a SP for OUTBOUND or INBOUND packet.
* Must call key_freesp() later.
@@ -1036,7 +1035,6 @@ key_allocsa_policy(struct secpolicy *sp, const struct secasindex *saidx,
kdebug_secash(sah, " "));
if (key_cmpsaidx(&sah->saidx, saidx, CMP_MODE_REQID))
break;
-
}
if (sah != NULL) {
/*
@@ -4066,7 +4064,6 @@ key_dup_keymsg(const struct sadb_key *src, size_t len,
} else {
ipseclog((LOG_DEBUG, "%s: No more memory.\n",
__func__));
-
}
return (dst);
}
@@ -4133,7 +4130,6 @@ key_cmpsaidx(const struct secasindex *saidx0, const struct secasindex *saidx1,
saidx0->dst.sa.sa_len) != 0)
return 0;
} else {
-
/* CMP_MODE_REQID, CMP_REQID, CMP_HEAD */
if (flag == CMP_MODE_REQID || flag == CMP_REQID) {
/*
@@ -5031,7 +5027,6 @@ key_do_getnewspi(struct sadb_spirange *spirange, struct secasindex *saidx)
count--; /* taking one cost. */
newspi = min;
} else {
-
/* init SPI */
newspi = 0;
@@ -8536,7 +8531,7 @@ key_setlifetime(struct seclifetime *src, uint16_t exttype)
p->sadb_lifetime_bytes = src->bytes;
p->sadb_lifetime_addtime = src->addtime;
p->sadb_lifetime_usetime = src->usetime;
-
+
return m;
}
@@ -8573,4 +8568,3 @@ comp_algorithm_lookup(int alg)
return (supported_calgs[i].xform);
return (NULL);
}
-
diff --git a/sys/netipsec/key_debug.c b/sys/netipsec/key_debug.c
index 3041d6368755..d746bfbbe800 100644
--- a/sys/netipsec/key_debug.c
+++ b/sys/netipsec/key_debug.c
@@ -163,7 +163,6 @@ kdebug_sadb_exttype(uint16_t type)
#undef X_NAME
}
-
/* %%%: about struct sadb_msg */
void
kdebug_sadb(struct sadb_msg *base)
@@ -1030,7 +1029,6 @@ ipsec_bindump(caddr_t buf, int len)
return;
}
-
void
ipsec_hexdump(caddr_t buf, int len)
{
diff --git a/sys/netipsec/udpencap.c b/sys/netipsec/udpencap.c
index b982d6fbdb80..0fafbd919d6e 100644
--- a/sys/netipsec/udpencap.c
+++ b/sys/netipsec/udpencap.c
@@ -291,4 +291,3 @@ udp_ipsec_adjust_cksum(struct mbuf *m, struct secasvar *sav, int proto,
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
}
}
-
diff --git a/sys/netpfil/ipfw/dn_aqm.h b/sys/netpfil/ipfw/dn_aqm.h
index d01e98ebeafa..a8a362a4bde9 100644
--- a/sys/netpfil/ipfw/dn_aqm.h
+++ b/sys/netpfil/ipfw/dn_aqm.h
@@ -36,7 +36,6 @@
#ifndef _IP_DN_AQM_H
#define _IP_DN_AQM_H
-
/* NOW is the current time in millisecond*/
#define NOW ((dn_cfg.curr_time * tick) / 1000)
@@ -65,7 +64,7 @@ extern unsigned long io_pkt_drop;
#define DN_AQM_NAME_MAX 50
char name[DN_AQM_NAME_MAX]; /* name of AQM algorithm */
uint32_t type; /* AQM type number */
-
+
/* Methods implemented by AQM algorithm:
*
* enqueue enqueue packet 'm' on queue 'q'.
@@ -100,7 +99,7 @@ extern unsigned long io_pkt_drop;
* the AQM configurations using 'par' array.
*
*/
-
+
int (*enqueue)(struct dn_queue *, struct mbuf *);
struct mbuf * (*dequeue)(struct dn_queue *);
int (*config)(struct dn_fsk *, struct dn_extra_parms *ep, int);
@@ -126,7 +125,7 @@ update_stats(struct dn_queue *q, int len, int drop)
int inc = 0;
struct dn_flow *sni;
struct dn_flow *qni;
-
+
sni = &q->_si->ni;
qni = &q->ni;
@@ -151,7 +150,6 @@ update_stats(struct dn_queue *q, int len, int drop)
/* tot_pkts is updated in dn_enqueue function */
}
-
/* kernel module related function */
int
dn_aqm_modevent(module_t mod, int cmd, void *arg);
diff --git a/sys/netpfil/ipfw/dn_aqm_codel.c b/sys/netpfil/ipfw/dn_aqm_codel.c
index d1a8c4ebe7f2..4b921f0f52c8 100644
--- a/sys/netpfil/ipfw/dn_aqm_codel.c
+++ b/sys/netpfil/ipfw/dn_aqm_codel.c
@@ -274,7 +274,6 @@ drop:
return (1);
}
-
/* Dequeue a pcaket from queue q */
static struct mbuf *
aqm_codel_dequeue(struct dn_queue *q)
@@ -364,10 +363,10 @@ aqm_codel_config(struct dn_fsk* fs, struct dn_extra_parms *ep, int len)
D("cannot allocate AQM_codel configuration parameters");
return ENOMEM;
}
-
+
/* configure codel parameters */
ccfg = fs->aqmcfg;
-
+
if (ep->par[0] < 0)
ccfg->target = codel_sysctl.target;
else
@@ -443,5 +442,4 @@ static struct dn_aqm codel_desc = {
DECLARE_DNAQM_MODULE(dn_aqm_codel, &codel_desc);
-
#endif
diff --git a/sys/netpfil/ipfw/dn_aqm_codel.h b/sys/netpfil/ipfw/dn_aqm_codel.h
index f5618e7655e1..077d427d02bf 100644
--- a/sys/netpfil/ipfw/dn_aqm_codel.h
+++ b/sys/netpfil/ipfw/dn_aqm_codel.h
@@ -49,7 +49,6 @@
#ifndef _IP_DN_AQM_CODEL_H
#define _IP_DN_AQM_CODEL_H
-
// XXX How to choose MTAG?
#define FIX_POINT_BITS 16
@@ -88,9 +87,9 @@ codel_dodequeue(struct dn_queue *q, aqm_time_t now, uint16_t *ok_to_drop)
*ok_to_drop = 0;
m = codel_extract_head(q, &pkt_ts);
-
+
cst = q->aqm_status;
-
+
if (m == NULL) {
/* queue is empty - we can't be above target */
cst->first_above_time= 0;
@@ -158,7 +157,6 @@ codel_dequeue(struct dn_queue *q)
* happen now, hence the 'while' loop.
*/
while (now >= cst->drop_next_time && cst->dropping) {
-
/* mark the packet */
if (cprms->flags & CODEL_ECN_ENABLED && ecn_mark(m)) {
cst->count++;
@@ -188,7 +186,6 @@ codel_dequeue(struct dn_queue *q)
* above 'target' for 'interval' so enter dropping state.
*/
} else if (ok_to_drop) {
-
/* if ECN option is disabled or the packet cannot be marked,
* drop the packet and extract another.
*/
@@ -215,7 +212,7 @@ codel_dequeue(struct dn_queue *q)
* we initilaize isqrt in control_law function when count == 1 */
cst->drop_next_time = control_law(cst, cprms, now);
}
-
+
return m;
}
diff --git a/sys/netpfil/ipfw/dn_aqm_pie.c b/sys/netpfil/ipfw/dn_aqm_pie.c
index 928db631b877..abd5bbf0eb9a 100644
--- a/sys/netpfil/ipfw/dn_aqm_pie.c
+++ b/sys/netpfil/ipfw/dn_aqm_pie.c
@@ -121,7 +121,7 @@ pie_sysctl_target_tupdate_maxb_handler(SYSCTL_HANDLER_ARGS)
value = pie_sysctl.tupdate;
else
value = pie_sysctl.max_burst;
-
+
value = value / AQM_TIME_1US;
error = sysctl_handle_long(oidp, &value, 0, req);
if (error != 0 || req->newptr == NULL)
@@ -129,7 +129,7 @@ pie_sysctl_target_tupdate_maxb_handler(SYSCTL_HANDLER_ARGS)
if (value < 1 || value > 10 * AQM_TIME_1S)
return (EINVAL);
value = value * AQM_TIME_1US;
-
+
if (!strcmp(oidp->oid_name,"target"))
pie_sysctl.qdelay_ref = value;
else if (!strcmp(oidp->oid_name,"tupdate"))
@@ -195,7 +195,6 @@ SYSCTL_PROC(_net_inet_ip_dummynet_pie, OID_AUTO, beta,
"beta scaled by 1000");
#endif
-
/*
* Callout function for drop probability calculation
* This function is called over tupdate ms and takes pointer of PIE
@@ -299,7 +298,7 @@ calculate_drop_prob(void *x)
}
pst->drop_prob = prob;
-
+
/* store current queue delay value in old queue delay*/
pst->qdelay_old = pst->current_qdelay;
@@ -529,7 +528,6 @@ aqm_pie_enqueue(struct dn_queue *q, struct mbuf* m)
if ((pst->sflags & PIE_ACTIVE) && pst->drop_prob == 0 &&
pst->current_qdelay < (pprms->qdelay_ref >> 1) &&
pst->qdelay_old < (pprms->qdelay_ref >> 1)) {
-
pst->burst_allowance = pprms->max_burst;
if ((pprms->flags & PIE_ON_OFF_MODE_ENABLED) && qlen<=0)
deactivate_pie(pst);
@@ -576,9 +574,9 @@ aqm_pie_init(struct dn_queue *q)
struct pie_status *pst;
struct dn_aqm_pie_parms *pprms;
int err = 0;
-
+
pprms = q->fs->aqmcfg;
-
+
do { /* exit with break when error occurs*/
if (!pprms){
DX(2, "AQM_PIE is not configured");
@@ -615,7 +613,7 @@ aqm_pie_init(struct dn_queue *q)
//DX(2, "aqm_PIE_init");
} while(0);
-
+
return err;
}
@@ -698,7 +696,7 @@ aqm_pie_config(struct dn_fsk* fs, struct dn_extra_parms *ep, int len)
free(fs->aqmcfg, M_DUMMYNET);
fs->aqmcfg = NULL;
}
-
+
fs->aqmcfg = malloc(sizeof(struct dn_aqm_pie_parms),
M_DUMMYNET, M_NOWAIT | M_ZERO);
if (fs->aqmcfg== NULL) {
@@ -713,7 +711,7 @@ aqm_pie_config(struct dn_fsk* fs, struct dn_extra_parms *ep, int len)
/* configure PIE parameters */
pcfg = fs->aqmcfg;
-
+
if (ep->par[0] < 0)
pcfg->qdelay_ref = pie_sysctl.qdelay_ref * AQM_TIME_1US;
else
diff --git a/sys/netpfil/ipfw/dn_aqm_pie.h b/sys/netpfil/ipfw/dn_aqm_pie.h
index 7512d3272af7..81e2b9382fe5 100644
--- a/sys/netpfil/ipfw/dn_aqm_pie.h
+++ b/sys/netpfil/ipfw/dn_aqm_pie.h
@@ -48,7 +48,6 @@
#define PIE_FIX_POINT_BITS 13
#define PIE_SCALE (1L<<PIE_FIX_POINT_BITS)
-
/* PIE options */
enum {
PIE_ECN_ENABLED =1,
@@ -120,7 +119,6 @@ drop_early(struct pie_status *pst, uint32_t qlen)
|| qlen <= 2 * MEAN_PKTSIZE)
return ENQUE;
-
if (pst->drop_prob == 0)
pst->accu_prob = 0;
diff --git a/sys/netpfil/ipfw/dn_sched_fq_codel.c b/sys/netpfil/ipfw/dn_sched_fq_codel.c
index a589ee8b41f6..5580dd91bbfe 100644
--- a/sys/netpfil/ipfw/dn_sched_fq_codel.c
+++ b/sys/netpfil/ipfw/dn_sched_fq_codel.c
@@ -123,7 +123,6 @@ fqcodel_sysctl_target_handler(SYSCTL_HANDLER_ARGS)
return (0);
}
-
SYSBEGIN(f4)
SYSCTL_DECL(_net_inet);
@@ -134,7 +133,7 @@ static SYSCTL_NODE(_net_inet_ip_dummynet, OID_AUTO, fqcodel,
"FQ_CODEL");
#ifdef SYSCTL_NODE
-
+
SYSCTL_PROC(_net_inet_ip_dummynet_fqcodel, OID_AUTO, target,
CTLTYPE_LONG | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
NULL, 0, fqcodel_sysctl_target_handler, "L",
@@ -143,7 +142,7 @@ SYSCTL_PROC(_net_inet_ip_dummynet_fqcodel, OID_AUTO, interval,
CTLTYPE_LONG | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
NULL, 0, fqcodel_sysctl_interval_handler, "L",
"FQ_CoDel interval in microsecond");
-
+
SYSCTL_UINT(_net_inet_ip_dummynet_fqcodel, OID_AUTO, quantum,
CTLFLAG_RW, &fq_codel_sysctl.quantum, 1514, "FQ_CoDel quantum");
SYSCTL_UINT(_net_inet_ip_dummynet_fqcodel, OID_AUTO, flows,
@@ -249,7 +248,6 @@ fq_codel_classify_flow(struct mbuf *m, uint16_t fcount, struct fq_codel_si *si)
break;
default:
memset(&tuple[37], 0, 4);
-
}
hash = jenkins_hash(tuple, 41, HASHINIT) % fcount;
@@ -277,7 +275,6 @@ fq_codel_classify_flow(struct mbuf *m, uint16_t fcount, struct fq_codel_si *si)
break;
default:
memset(&tuple[13], 0, 4);
-
}
hash = jenkins_hash(tuple, 17, HASHINIT) % fcount;
@@ -309,11 +306,11 @@ fq_codel_enqueue(struct dn_sch_inst *_si, struct dn_queue *_q,
* Note: 'codel_enqueue' function returns 1 only when it unable to
* add timestamp to packet (no limit check)*/
drop = codel_enqueue(&si->flows[idx], m, si);
-
+
/* codel unable to timestamp a packet */
if (drop)
return 1;
-
+
/* If the flow (sub-queue) is not active ,then add it to the tail of
* new flows list, initialize and activate it.
*/
@@ -425,7 +422,7 @@ fq_codel_dequeue(struct dn_sch_inst *_si)
return mbuf;
} while (1);
-
+
/* unreachable point */
return NULL;
}
@@ -507,7 +504,7 @@ fq_codel_config(struct dn_schk *_schk)
struct fq_codel_schk *schk;
struct dn_extra_parms *ep;
struct dn_sch_fq_codel_parms *fqc_cfg;
-
+
schk = (struct fq_codel_schk *)(_schk+1);
ep = (struct dn_extra_parms *) _schk->cfg;
@@ -517,7 +514,6 @@ fq_codel_config(struct dn_schk *_schk)
*/
if (ep && ep->oid.len ==sizeof(*ep) &&
ep->oid.subtype == DN_SCH_PARAMS) {
-
fqc_cfg = &schk->cfg;
if (ep->par[0] < 0)
fqc_cfg->ccfg.target = fq_codel_sysctl.ccfg.target;
@@ -572,7 +568,6 @@ fq_codel_config(struct dn_schk *_schk)
*/
static int
fq_codel_getconfig (struct dn_schk *_schk, struct dn_extra_parms *ep) {
-
struct fq_codel_schk *schk = (struct fq_codel_schk *)(_schk+1);
struct dn_sch_fq_codel_parms *fqc_cfg;
diff --git a/sys/netpfil/ipfw/dn_sched_fq_codel.h b/sys/netpfil/ipfw/dn_sched_fq_codel.h
index 4b65781e0bef..725189483ba2 100644
--- a/sys/netpfil/ipfw/dn_sched_fq_codel.h
+++ b/sys/netpfil/ipfw/dn_sched_fq_codel.h
@@ -163,5 +163,4 @@ fq_codel_extract_head(struct fq_codel_flow *q, aqm_time_t *pkt_ts, struct fq_cod
return m;
}
-
#endif
diff --git a/sys/netpfil/ipfw/dn_sched_fq_codel_helper.h b/sys/netpfil/ipfw/dn_sched_fq_codel_helper.h
index da663dc884da..05054a97b236 100644
--- a/sys/netpfil/ipfw/dn_sched_fq_codel_helper.h
+++ b/sys/netpfil/ipfw/dn_sched_fq_codel_helper.h
@@ -125,7 +125,6 @@ fqc_codel_dequeue(struct fq_codel_flow *q, struct fq_codel_si *si)
* happen now, hence the 'while' loop.
*/
while (now >= cst->drop_next_time && cst->dropping) {
-
/* mark the packet */
if (cprms->flags & CODEL_ECN_ENABLED && ecn_mark(m)) {
cst->count++;
@@ -153,7 +152,6 @@ fqc_codel_dequeue(struct fq_codel_flow *q, struct fq_codel_si *si)
* above 'target' for 'interval' so enter dropping state.
*/
} else if (ok_to_drop) {
-
/* if ECN option is disabled or the packet cannot be marked,
* drop the packet and extract another.
*/
diff --git a/sys/netpfil/ipfw/dn_sched_fq_pie.c b/sys/netpfil/ipfw/dn_sched_fq_pie.c
index d62becd91435..2f21ca77e33a 100644
--- a/sys/netpfil/ipfw/dn_sched_fq_pie.c
+++ b/sys/netpfil/ipfw/dn_sched_fq_pie.c
@@ -42,7 +42,6 @@
* and off option is available but it does not work properly in this version.
*/
-
#ifdef _KERNEL
#include <sys/malloc.h>
#include <sys/socket.h>
@@ -120,7 +119,6 @@ struct fq_pie_schk {
struct dn_sch_fq_pie_parms cfg;
};
-
/* fq_pie scheduler instance extra state vars.
* The purpose of separation this structure is to preserve number of active
* sub-queues and the flows array pointer even after the scheduler instance
@@ -143,7 +141,6 @@ struct fq_pie_si {
struct fq_pie_si_extra *si_extra; /* extra state vars*/
};
-
static struct dn_alg fq_pie_desc;
/* Default FQ-PIE parameters including PIE */
@@ -196,7 +193,7 @@ fqpie_sysctl_target_tupdate_maxb_handler(SYSCTL_HANDLER_ARGS)
value = fq_pie_sysctl.pcfg.tupdate;
else
value = fq_pie_sysctl.pcfg.max_burst;
-
+
value = value / AQM_TIME_1US;
error = sysctl_handle_long(oidp, &value, 0, req);
if (error != 0 || req->newptr == NULL)
@@ -204,7 +201,7 @@ fqpie_sysctl_target_tupdate_maxb_handler(SYSCTL_HANDLER_ARGS)
if (value < 1 || value > 10 * AQM_TIME_1S)
return (EINVAL);
value = value * AQM_TIME_1US;
-
+
if (!strcmp(oidp->oid_name,"target"))
fq_pie_sysctl.pcfg.qdelay_ref = value;
else if (!strcmp(oidp->oid_name,"tupdate"))
@@ -242,7 +239,7 @@ static SYSCTL_NODE(_net_inet_ip_dummynet, OID_AUTO, fqpie,
"FQ_PIE");
#ifdef SYSCTL_NODE
-
+
SYSCTL_PROC(_net_inet_ip_dummynet_fqpie, OID_AUTO, target,
CTLTYPE_LONG | CTLFLAG_RW | CTLFLAG_NEEDGIANT, NULL, 0,
fqpie_sysctl_target_tupdate_maxb_handler, "L",
@@ -473,7 +470,7 @@ fq_calculate_drop_prob(void *x)
}
pst->drop_prob = prob;
-
+
/* store current delay value */
pst->qdelay_old = pst->current_qdelay;
@@ -514,7 +511,7 @@ fq_activate_pie(struct fq_pie_flow *q)
pst->avg_dq_time = 0;
pst->sflags = PIE_INMEASUREMENT | PIE_ACTIVE;
pst->measurement_start = AQM_UNOW;
-
+
callout_reset_sbt(&pst->aqm_pie_callout,
(uint64_t)pprms->tupdate * SBT_1US,
0, fq_calculate_drop_prob, q, 0);
@@ -522,7 +519,6 @@ fq_activate_pie(struct fq_pie_flow *q)
mtx_unlock(&pst->lock_mtx);
}
-
/*
* Deactivate PIE and stop probe update callout
*/
@@ -580,7 +576,7 @@ fqpie_callout_cleanup(void *x)
mtx_unlock(&pst->lock_mtx);
mtx_destroy(&pst->lock_mtx);
psi_extra = q->psi_extra;
-
+
DN_BH_WLOCK();
psi_extra->nr_active_q--;
@@ -629,7 +625,7 @@ pie_dequeue(struct fq_pie_flow *q, struct fq_pie_si *si)
/*we extarct packet ts only when Departure Rate Estimation dis not used*/
m = fq_pie_extract_head(q, &pkt_ts, si,
!(pprms->flags & PIE_DEPRATEEST_ENABLED));
-
+
if (!m || !(pst->sflags & PIE_ACTIVE))
return m;
@@ -680,7 +676,6 @@ pie_dequeue(struct fq_pie_flow *q, struct fq_pie_si *si)
return m;
}
-
/*
* Enqueue a packet in q, subject to space and FQ-PIE queue management policy
* (whose parameters are in q->fs).
@@ -776,7 +771,7 @@ pie_drop_head(struct fq_pie_flow *q, struct fq_pie_si *si)
si->main_q.q_time = dn_cfg.curr_time;
/* reset accu_prob after packet drop */
q->pst.accu_prob = 0;
-
+
FREE_PKT(m);
}
@@ -883,11 +878,11 @@ fq_pie_enqueue(struct dn_sch_inst *_si, struct dn_queue *_q,
* Note: 'pie_enqueue' function returns 1 only when it unable to
* add timestamp to packet (no limit check)*/
drop = pie_enqueue(&flows[idx], m, si);
-
+
/* pie unable to timestamp a packet */
if (drop)
return 1;
-
+
/* If the flow (sub-queue) is not active ,then add it to tail of
* new flows list, initialize and activate it.
*/
@@ -997,7 +992,7 @@ fq_pie_dequeue(struct dn_sch_inst *_si)
return mbuf;
} while (1);
-
+
/* unreachable point */
return NULL;
}
@@ -1067,7 +1062,6 @@ fq_pie_new_sched(struct dn_sch_inst *_si)
return 0;
}
-
/*
* Free fq_pie scheduler instance.
*/
@@ -1099,7 +1093,7 @@ fq_pie_config(struct dn_schk *_schk)
struct fq_pie_schk *schk;
struct dn_extra_parms *ep;
struct dn_sch_fq_pie_parms *fqp_cfg;
-
+
schk = (struct fq_pie_schk *)(_schk+1);
ep = (struct dn_extra_parms *) _schk->cfg;
@@ -1110,7 +1104,6 @@ fq_pie_config(struct dn_schk *_schk)
*/
if (ep && ep->oid.len ==sizeof(*ep) &&
ep->oid.subtype == DN_SCH_PARAMS) {
-
fqp_cfg = &schk->cfg;
if (ep->par[0] < 0)
fqp_cfg->pcfg.qdelay_ref = fq_pie_sysctl.pcfg.qdelay_ref;
@@ -1185,7 +1178,6 @@ fq_pie_config(struct dn_schk *_schk)
*/
static int
fq_pie_getconfig (struct dn_schk *_schk, struct dn_extra_parms *ep) {
-
struct fq_pie_schk *schk = (struct fq_pie_schk *)(_schk+1);
struct dn_sch_fq_pie_parms *fqp_cfg;
@@ -1199,7 +1191,7 @@ fq_pie_getconfig (struct dn_schk *_schk, struct dn_extra_parms *ep) {
ep->par[4] = fqp_cfg->pcfg.alpha;
ep->par[5] = fqp_cfg->pcfg.beta;
ep->par[6] = fqp_cfg->pcfg.flags;
-
+
ep->par[7] = fqp_cfg->quantum;
ep->par[8] = fqp_cfg->limit;
ep->par[9] = fqp_cfg->flows_cnt;
diff --git a/sys/netpfil/ipfw/dn_sched_prio.c b/sys/netpfil/ipfw/dn_sched_prio.c
index 495cf8162254..703158c0d829 100644
--- a/sys/netpfil/ipfw/dn_sched_prio.c
+++ b/sys/netpfil/ipfw/dn_sched_prio.c
@@ -207,7 +207,6 @@ prio_free_queue(struct dn_queue *q)
return 0;
}
-
static struct dn_alg prio_desc = {
_SI( .type = ) DN_SCHED_PRIO,
_SI( .name = ) "PRIO",
@@ -236,5 +235,4 @@ static struct dn_alg prio_desc = {
#endif
};
-
DECLARE_DNSCHED_MODULE(dn_prio, &prio_desc);
diff --git a/sys/netpfil/ipfw/dn_sched_qfq.c b/sys/netpfil/ipfw/dn_sched_qfq.c
index daad2b83765b..e02f27dfd85e 100644
--- a/sys/netpfil/ipfw/dn_sched_qfq.c
+++ b/sys/netpfil/ipfw/dn_sched_qfq.c
@@ -500,7 +500,6 @@ qfq_slot_rotate(struct qfq_sched *q, struct qfq_group *grp, uint64_t roundedS)
grp->front = (grp->front - i) % QFQ_MAX_SLOTS;
}
-
static inline void
qfq_update_eligible(struct qfq_sched *q, uint64_t old_V)
{
@@ -710,7 +709,6 @@ skip_update:
return 0;
}
-
#if 0
static inline void
qfq_slot_remove(struct qfq_sched *q, struct qfq_group *grp,
diff --git a/sys/netpfil/ipfw/dn_sched_rr.c b/sys/netpfil/ipfw/dn_sched_rr.c
index 4c1e4e910a98..701ce490d605 100644
--- a/sys/netpfil/ipfw/dn_sched_rr.c
+++ b/sys/netpfil/ipfw/dn_sched_rr.c
@@ -138,7 +138,6 @@ remove_queue_q(struct rr_queue *q, struct rr_si *si)
}
}
-
static inline void
next_pointer(struct rr_si *si)
{
@@ -322,5 +321,4 @@ static struct dn_alg rr_desc = {
#endif
};
-
DECLARE_DNSCHED_MODULE(dn_rr, &rr_desc);
diff --git a/sys/netpfil/ipfw/dn_sched_wf2q.c b/sys/netpfil/ipfw/dn_sched_wf2q.c
index d90357345c8c..7285df0d1d7d 100644
--- a/sys/netpfil/ipfw/dn_sched_wf2q.c
+++ b/sys/netpfil/ipfw/dn_sched_wf2q.c
@@ -381,5 +381,4 @@ static struct dn_alg wf2qp_desc = {
};
-
DECLARE_DNSCHED_MODULE(dn_wf2qp, &wf2qp_desc);
diff --git a/sys/netpfil/ipfw/ip_dn_glue.c b/sys/netpfil/ipfw/ip_dn_glue.c
index 7beb8525e30a..5a39a1a47282 100644
--- a/sys/netpfil/ipfw/ip_dn_glue.c
+++ b/sys/netpfil/ipfw/ip_dn_glue.c
@@ -195,7 +195,6 @@ struct dn_pipe7 { /* a pipe */
};
SLIST_HEAD(dn_pipe_head7, dn_pipe7);
-
/* FREEBSD8 ip_dummynet.h r196045 */
struct dn_flow_queue8 {
struct dn_flow_queue8 *next ;
@@ -312,7 +311,6 @@ o_next(struct dn_id **o, int len, int type)
return ret;
}
-
static size_t pipesize7 = sizeof(struct dn_pipe7);
static size_t pipesize8 = sizeof(struct dn_pipe8);
static size_t pipesizemax8 = sizeof(struct dn_pipe_max8);
@@ -483,7 +481,7 @@ dn_compat_config_profile(struct dn_profile *pf, struct dn_link *p,
struct dn_pipe8 *p8 = (struct dn_pipe8 *)v;
p8->samples = &(((struct dn_pipe_max8 *)p8)->samples[0]);
-
+
pf->link_nr = p->link_nr;
pf->loss_level = p8->loss_level;
// pf->bandwidth = p->bandwidth; //XXX bandwidth redundant?
@@ -661,7 +659,6 @@ dn_c_copy_pipe(struct dn_schk *s, struct copy_args *a, int nq)
return 0;
}
-
int
dn_compat_copy_pipe(struct copy_args *a, void *_o)
{
@@ -847,5 +844,3 @@ ip_dummynet_compat(struct sockopt *sopt)
return error;
}
-
-
diff --git a/sys/netpfil/ipfw/ip_dn_io.c b/sys/netpfil/ipfw/ip_dn_io.c
index 42afdb3b4d59..1b39fcb0359f 100644
--- a/sys/netpfil/ipfw/ip_dn_io.c
+++ b/sys/netpfil/ipfw/ip_dn_io.c
@@ -172,13 +172,11 @@ static SYSCTL_NODE(_net_inet_ip, OID_AUTO, dummynet,
#define DC(x) (&(dn_cfg.x))
/* parameters */
-
SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, hash_size,
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
0, 0, sysctl_hash_size, "I",
"Default hash table size");
-
SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, pipe_slot_limit,
CTLTYPE_LONG | CTLFLAG_RW | CTLFLAG_NEEDGIANT,
0, 1, sysctl_limits, "L",
@@ -857,7 +855,6 @@ tag_mbuf(struct mbuf *m, int dir, struct ip_fw_args *fwa)
return 0;
}
-
/*
* dummynet hook for packets.
* We use the argument to locate the flowset fs and the sched_set sch
diff --git a/sys/netpfil/ipfw/ip_dn_private.h b/sys/netpfil/ipfw/ip_dn_private.h
index 5f564ef68c86..24765bc09b0e 100644
--- a/sys/netpfil/ipfw/ip_dn_private.h
+++ b/sys/netpfil/ipfw/ip_dn_private.h
@@ -304,7 +304,6 @@ struct dn_schk {
struct dn_ht *siht;
};
-
/*
* Scheduler instance.
* Contains variables and all queues relative to a this instance.
@@ -354,7 +353,6 @@ struct dn_sch_inst {
* The same schema is used for sceduler instances
*/
-
/* kernel-side flags. Linux has DN_DELETE in fcntl.h
*/
enum {
diff --git a/sys/netpfil/ipfw/ip_dummynet.c b/sys/netpfil/ipfw/ip_dummynet.c
index 70cb2e5043ed..17f3e364756e 100644
--- a/sys/netpfil/ipfw/ip_dummynet.c
+++ b/sys/netpfil/ipfw/ip_dummynet.c
@@ -1338,7 +1338,7 @@ get_aqm_parms(struct sockopt *sopt)
struct dn_fsk *fs;
size_t sopt_valsize;
int l, err = 0;
-
+
sopt_valsize = sopt->sopt_valsize;
l = sizeof(*ep);
if (sopt->sopt_valsize < l) {
@@ -1393,7 +1393,7 @@ get_sched_parms(struct sockopt *sopt)
struct dn_schk *schk;
size_t sopt_valsize;
int l, err = 0;
-
+
sopt_valsize = sopt->sopt_valsize;
l = sizeof(*ep);
if (sopt->sopt_valsize < l) {
@@ -2505,7 +2505,6 @@ ip_dn_ctl(struct sockopt *sopt)
return error ;
}
-
static void
ip_dn_init(void)
{
@@ -2733,7 +2732,6 @@ load_dn_aqm(struct dn_aqm *d)
return aqm ? 1 : 0;
}
-
/* Callback to clean up AQM status for queues connected to a flowset
* and then deconfigure the flowset.
* This function is called before an AQM module is unloaded
@@ -2794,4 +2792,3 @@ dn_aqm_modevent(module_t mod, int cmd, void *arg)
#endif
/* end of file */
-
diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c
index 9096bfa9a95f..7ccbe3e590df 100644
--- a/sys/netpfil/ipfw/ip_fw2.c
+++ b/sys/netpfil/ipfw/ip_fw2.c
@@ -231,7 +231,6 @@ SYSEND
#endif /* SYSCTL_NODE */
-
/*
* Some macros used in the various matching options.
* L3HDR maps an ipv4 pointer into a layer3 header pointer of type T
@@ -310,7 +309,6 @@ ipopts_match(struct ip *ip, ipfw_insn *cmd)
return 0; /* invalid or truncated */
}
switch (opt) {
-
default:
break;
@@ -978,7 +976,6 @@ send_reject6(struct ip_fw_args *args, int code, u_int hlen, struct ip6_hdr *ip6)
#endif /* INET6 */
-
/*
* sends a reject message, consuming the mbuf passed as an argument.
*/
@@ -2198,7 +2195,6 @@ do { \
#endif
break;
-
case O_IP_SRCPORT:
case O_IP_DSTPORT:
/*
@@ -3562,7 +3558,7 @@ SYSINIT(ipfw_init, IPFW_SI_SUB_FIREWALL, IPFW_MODULE_ORDER,
ipfw_init, NULL);
VNET_SYSINIT(vnet_ipfw_init, IPFW_SI_SUB_FIREWALL, IPFW_VNET_ORDER,
vnet_ipfw_init, NULL);
-
+
/*
* Closing up shop. These are done in REVERSE ORDER, but still
* after ipfwmod() has been called. Not called on reboot.
diff --git a/sys/netpfil/ipfw/ip_fw_bpf.c b/sys/netpfil/ipfw/ip_fw_bpf.c
index 02db073cd03d..a6a6be95e507 100644
--- a/sys/netpfil/ipfw/ip_fw_bpf.c
+++ b/sys/netpfil/ipfw/ip_fw_bpf.c
@@ -206,4 +206,3 @@ ipfw_bpf_uninit(int last __unused)
if_clone_detach(V_ipfw_cloner);
if_clone_detach(V_ipfwlog_cloner);
}
-
diff --git a/sys/netpfil/ipfw/ip_fw_dynamic.c b/sys/netpfil/ipfw/ip_fw_dynamic.c
index 85b8dc304cdc..7b5a7f60e495 100644
--- a/sys/netpfil/ipfw/ip_fw_dynamic.c
+++ b/sys/netpfil/ipfw/ip_fw_dynamic.c
@@ -489,7 +489,6 @@ SYSCTL_U32(_net_inet_ip_fw, OID_AUTO, dyn_keep_states,
CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(dyn_keep_states), 0,
"Do not flush dynamic states on rule deletion");
-
#ifdef IPFIREWALL_DYNDEBUG
#define DYN_DEBUG(fmt, ...) do { \
printf("%s: " fmt "\n", __func__, __VA_ARGS__); \
@@ -1165,7 +1164,6 @@ dyn_lookup_ipv4_parent_locked(const struct ipfw_flow_id *pkt,
return (s);
}
-
#ifdef INET6
static uint32_t
dyn_getscopeid(const struct ip_fw_args *args)
@@ -3267,5 +3265,3 @@ ipfw_dyn_uninit(int pass)
if (IS_DEFAULT_VNET(curvnet))
free(dyn_hp_cache, M_IPFW);
}
-
-
diff --git a/sys/netpfil/ipfw/ip_fw_iface.c b/sys/netpfil/ipfw/ip_fw_iface.c
index b2aa7d3205db..8e384105ce14 100644
--- a/sys/netpfil/ipfw/ip_fw_iface.c
+++ b/sys/netpfil/ipfw/ip_fw_iface.c
@@ -302,7 +302,6 @@ ipfw_iface_ref(struct ip_fw_chain *ch, char *name,
ii = CHAIN_TO_II(ch);
if (ii == NULL) {
-
/*
* First request to subsystem.
* Let's perform init.
@@ -375,7 +374,7 @@ ipfw_iface_add_notify(struct ip_fw_chain *ch, struct ipfw_ifc *ic)
IPFW_WLOCK_ASSERT(ch);
iif = ic->iface;
-
+
TAILQ_INSERT_TAIL(&iif->consumers, ic, next);
if (iif->resolved != 0)
ic->cb(ch, ic->cbdata, iif->ifindex);
@@ -536,4 +535,3 @@ list_ifaces(struct ip_fw_chain *ch, ip_fw3_opheader *op3,
return (0);
}
-
diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c
index a4e1ddf16be7..81229b2707e9 100644
--- a/sys/netpfil/ipfw/ip_fw_nat.c
+++ b/sys/netpfil/ipfw/ip_fw_nat.c
@@ -281,7 +281,6 @@ free_nat_instance(struct cfg_nat *ptr)
free(ptr, M_IPFW);
}
-
/*
* ipfw_nat - perform mbuf header translation.
*
@@ -707,7 +706,7 @@ nat44_get_cfg(struct ip_fw_chain *chain, ip_fw3_opheader *op3,
}
export_nat_cfg(ptr, ucfg);
-
+
/* Estimate memory amount */
sz = sizeof(ipfw_obj_header) + sizeof(struct nat44_cfg_nat);
LIST_FOREACH(r, &ptr->redir_chain, _next) {
@@ -718,7 +717,6 @@ nat44_get_cfg(struct ip_fw_chain *chain, ip_fw3_opheader *op3,
ucfg->size = sz;
if (sd->valsize < sz) {
-
/*
* Submitted buffer size is not enough.
* WE've already filled in @ucfg structure with
@@ -854,11 +852,10 @@ nat44_get_log(struct ip_fw_chain *chain, ip_fw3_opheader *op3,
}
export_nat_cfg(ptr, ucfg);
-
+
/* Estimate memory amount */
ucfg->size = sizeof(struct nat44_cfg_nat) + LIBALIAS_BUF_SIZE;
if (sd->valsize < sz + sizeof(*oh)) {
-
/*
* Submitted buffer size is not enough.
* WE've already filled in @ucfg structure with
@@ -871,7 +868,7 @@ nat44_get_log(struct ip_fw_chain *chain, ip_fw3_opheader *op3,
pbuf = (void *)ipfw_get_sopt_space(sd, LIBALIAS_BUF_SIZE);
memcpy(pbuf, ptr->lib->logDesc, LIBALIAS_BUF_SIZE);
-
+
IPFW_UH_RUNLOCK(chain);
return (0);
@@ -885,7 +882,6 @@ static struct ipfw_sopt_handler scodes[] = {
{ IP_FW_NAT44_XGETLOG, 0, HDIR_GET, nat44_get_log },
};
-
/*
* Legacy configuration routines
*/
diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h
index 57fa7464e429..56624209e4cb 100644
--- a/sys/netpfil/ipfw/ip_fw_private.h
+++ b/sys/netpfil/ipfw/ip_fw_private.h
@@ -77,7 +77,6 @@ struct _ip6dn_args {
u_long mtu_or;
};
-
/*
* Arguments for calling ipfw_chk() and dummynet_io(). We put them
* all into a structure because this way it is easier and more
@@ -336,7 +335,6 @@ struct table_value {
uint64_t refcnt; /* Number of references */
};
-
struct named_object {
TAILQ_ENTRY(named_object) nn_next; /* namehash */
TAILQ_ENTRY(named_object) nv_next; /* valuehash */
@@ -615,7 +613,6 @@ enum ipfw_sets_cmd {
typedef int (ipfw_obj_sets_cb)(struct ip_fw_chain *ch,
uint16_t set, uint8_t new_set, enum ipfw_sets_cmd cmd);
-
struct opcode_obj_rewrite {
uint32_t opcode; /* Opcode to act upon */
uint32_t etlv; /* Relevant export TLV id */
diff --git a/sys/netpfil/ipfw/ip_fw_sockopt.c b/sys/netpfil/ipfw/ip_fw_sockopt.c
index b0f14bf0539a..ee057b4d8346 100644
--- a/sys/netpfil/ipfw/ip_fw_sockopt.c
+++ b/sys/netpfil/ipfw/ip_fw_sockopt.c
@@ -195,7 +195,7 @@ ipfw_init_counters()
void
ipfw_destroy_counters()
{
-
+
uma_zdestroy(V_ipfw_cntr_zone);
}
@@ -227,7 +227,6 @@ ipfw_free_rule(struct ip_fw *rule)
free(rule, M_IPFW);
}
-
/*
* Find the smallest rule >= key, id.
* We could use bsearch but it is so simple that we code it directly
@@ -348,7 +347,6 @@ ipfw_destroy_skipto_cache(struct ip_fw_chain *chain)
free(chain->idxmap_back, M_IPFW);
}
-
/*
* allocate a new map, returns the chain locked. extra is the number
* of entries to add or delete.
@@ -398,7 +396,6 @@ swap_map(struct ip_fw_chain *chain, struct ip_fw **new_map, int new_len)
return old_map;
}
-
static void
export_cntr1_base(struct ip_fw *krule, struct ip_fw_bcounter *cntr)
{
@@ -502,7 +499,6 @@ export_rule1(struct ip_fw *krule, caddr_t data, int len, int rcntrs)
memcpy(urule->cmd, krule->cmd, krule->cmd_len * sizeof(uint32_t));
}
-
/*
* Copies rule @urule from FreeBSD8 userland format (v0)
* to kernel @krule.
@@ -706,14 +702,12 @@ commit_rules(struct ip_fw_chain *chain, struct rule_check_info *rci, int count)
*/
error = rewrite_rule_uidx(chain, ci);
if (error != 0) {
-
/*
* rewrite failed, state for current rule
* has been reverted. Check if we need to
* revert more.
*/
if (tcount > 0) {
-
/*
* We have some more table rules
* we need to rollback.
@@ -725,10 +719,8 @@ commit_rules(struct ip_fw_chain *chain, struct rule_check_info *rci, int count)
if (ci->object_opcodes == 0)
continue;
unref_rule_objects(chain,ci->krule);
-
}
IPFW_UH_WUNLOCK(chain);
-
}
return (error);
@@ -1675,7 +1667,6 @@ zero_entry(struct ip_fw_chain *chain, u_int32_t arg, int log_only)
return (0);
}
-
/*
* Check rule head in FreeBSD11 format
*
@@ -2099,7 +2090,6 @@ bad_size:
return (EINVAL);
}
-
/*
* Translation of requests for compatibility with FreeBSD 7.2/8.
* a static variable tells us if we have an old client from userland,
@@ -2136,7 +2126,6 @@ static int convert_rule_to_8(struct ip_fw_rule0 *rule);
((struct ip_fw7 *)(rule))->cmd_len * 4 - 4)
#endif
-
/*
* Copy the static and dynamic rules to the supplied buffer
* and return the amount of space actually used.
@@ -2227,7 +2216,6 @@ ipfw_getrules(struct ip_fw_chain *chain, void *buf, size_t space)
return (bp - (char *)buf);
}
-
struct dump_args {
uint32_t b; /* start rule */
uint32_t e; /* end rule */
@@ -2636,7 +2624,6 @@ set_legacy_obj_kidx(struct ip_fw_chain *ch, struct ip_fw_rule0 *rule)
if (*end == '\0' && val < 65535) {
uidx = val;
} else {
-
/*
* We are called via legacy opcode.
* Save error and show table as fake number
@@ -2652,7 +2639,6 @@ set_legacy_obj_kidx(struct ip_fw_chain *ch, struct ip_fw_rule0 *rule)
return (error);
}
-
/*
* Unreferences all already-referenced objects in given @cmd rule,
* using information in @oib.
@@ -2725,7 +2711,6 @@ unref_rule_objects(struct ip_fw_chain *ch, struct ip_fw *rule)
}
}
-
/*
* Find and reference object (if any) stored in instruction @cmd.
*
@@ -3334,7 +3319,6 @@ ipfw_del_obj_rewriter(struct opcode_obj_rewrite *rw, size_t count)
ctl3_rsize--;
break;
}
-
}
if (ctl3_rsize == 0) {
@@ -3664,7 +3648,7 @@ ipfw_get_sopt_header(struct sockopt_data *sd, size_t needed)
if (sd->kavail > 0)
memset(sd->kbuf + sd->koff, 0, sd->kavail);
-
+
return (addr);
}
@@ -3732,7 +3716,6 @@ ipfw_ctl3(struct sockopt *sopt)
sdata.ksize = sizeof(xbuf);
sdata.kavail = valsize;
} else {
-
/*
* Determine opcode type/buffer size:
* allocate sliding-window buf for data export or
@@ -4004,7 +3987,6 @@ ipfw_ctl(struct sockopt *sopt)
}
break;
-
case IP_FW_TABLE_FLUSH:
{
u_int16_t tbl;
@@ -4416,7 +4398,7 @@ ipfw_objhash_lookup_name(struct namedobj_instance *ni, uint32_t set, char *name)
uint32_t hash;
hash = ni->hash_f(ni, name, set) % ni->nn_size;
-
+
TAILQ_FOREACH(no, &ni->names[hash], nn_next) {
if (ni->cmp_f(no, name, set) == 0)
return (no);
@@ -4532,7 +4514,7 @@ ipfw_objhash_lookup_kidx(struct namedobj_instance *ni, uint16_t kidx)
uint32_t hash;
hash = objhash_hash_idx(ni, kidx);
-
+
TAILQ_FOREACH(no, &ni->values[hash], nv_next) {
if (no->kidx == kidx)
return (no);
@@ -4674,7 +4656,7 @@ ipfw_objhash_free_idx(struct namedobj_instance *ni, uint16_t idx)
/* Update free offset */
if (ni->free_off[0] > i)
ni->free_off[0] = i;
-
+
return (0);
}
diff --git a/sys/netpfil/ipfw/ip_fw_table.c b/sys/netpfil/ipfw/ip_fw_table.c
index 0d36d589ba5e..6d472029c4bd 100644
--- a/sys/netpfil/ipfw/ip_fw_table.c
+++ b/sys/netpfil/ipfw/ip_fw_table.c
@@ -186,7 +186,6 @@ get_table_value(struct ip_fw_chain *ch, struct table_config *tc, uint32_t kidx)
return (&pval[kidx]);
}
-
/*
* Checks if we're able to insert/update entry @tei into table
* w.r.t @tc limits.
@@ -328,7 +327,7 @@ find_ref_table(struct ip_fw_chain *ch, struct tid_info *ti,
IPFW_UH_WUNLOCK(ch);
error = create_table_compat(ch, ti, &kidx);
IPFW_UH_WLOCK(ch);
-
+
if (error != 0)
return (error);
@@ -368,7 +367,6 @@ rollback_added_entries(struct ip_fw_chain *ch, struct table_config *tc,
for (i = 0; i < added; i++, v += ta_buf_sz, vv += ta_buf_sz) {
ptei = &tei[i];
if ((ptei->flags & TEI_FLAGS_UPDATED) != 0) {
-
/*
* We have old value stored by previous
* call in @ptei->value. Do add once again
@@ -411,7 +409,6 @@ prepare_batch_buffer(struct ip_fw_chain *ch, struct table_algo *ta,
memset(*ta_buf, 0, TA_BUF_SZ);
ta_buf_m = *ta_buf;
} else {
-
/*
* Multiple adds/deletes, allocate larger buffer
*
@@ -482,7 +479,6 @@ flush_batch_buffer(struct ip_fw_chain *ch, struct table_algo *ta,
free(ta_buf_m, M_TEMP);
}
-
static void
rollback_add_entry(void *object, struct op_state *_state)
{
@@ -707,7 +703,7 @@ cleanup:
IPFW_UH_WUNLOCK(ch);
flush_batch_buffer(ch, ta, tei, count, rollback, ta_buf_m, ta_buf);
-
+
return (error);
}
@@ -863,7 +859,6 @@ check_table_space(struct ip_fw_chain *ch, struct tableop_state *ts,
break;
if (ts != NULL && ts->modified != 0) {
-
/*
* Swap operation has happened
* so we're currently operating on other
@@ -885,7 +880,7 @@ check_table_space(struct ip_fw_chain *ch, struct tableop_state *ts,
ta->flush_mod(ta_buf);
break;
}
-
+
error = ta->fill_mod(tc->astate, ti, ta_buf, &pflags);
if (error == 0) {
/* Do actual modification */
@@ -931,7 +926,7 @@ manage_table_ent_v0(struct ip_fw_chain *ch, ip_fw3_opheader *op3,
xent = (ipfw_table_xentry *)(op3 + 1);
if (xent->len < hdrlen || xent->len + read > sd->valsize)
return (EINVAL);
-
+
memset(&tei, 0, sizeof(tei));
tei.paddr = &xent->k;
tei.masklen = xent->masklen;
@@ -1570,7 +1565,6 @@ ipfw_resize_tables(struct ip_fw_chain *ch, unsigned int ntables)
/* Temporary restrict decreasing max_tables */
if (ntables < V_fw_tables_max) {
-
/*
* FIXME: Check if we really can shrink
*/
@@ -1906,7 +1900,6 @@ create_table_internal(struct ip_fw_chain *ch, struct tid_info *ti,
/* Check if table has been already created */
tc_new = find_table(ni, ti);
if (tc_new != NULL) {
-
/*
* Compat: do not fail if we're
* requesting to create existing table
@@ -2074,7 +2067,7 @@ export_table_info(struct ip_fw_chain *ch, struct table_config *tc,
{
struct table_info *ti;
struct table_algo *ta;
-
+
i->type = tc->no.subtype;
i->tflags = tc->tflags;
i->vmask = tc->vmask;
@@ -2197,7 +2190,6 @@ dump_table_v1(struct ip_fw_chain *ch, ip_fw3_opheader *op3,
export_table_info(ch, tc, i);
if (sd->valsize < i->size) {
-
/*
* Submitted buffer size is not enough.
* WE've already filled in @i structure with
@@ -2250,7 +2242,7 @@ dump_table_v0(struct ip_fw_chain *ch, ip_fw3_opheader *op3,
memset(&ti, 0, sizeof(ti));
ti.uidx = xtbl->tbl;
-
+
IPFW_UH_RLOCK(ch);
if ((tc = find_table(CHAIN_TO_NI(ch), &ti)) == NULL) {
IPFW_UH_RUNLOCK(ch);
@@ -2265,7 +2257,6 @@ dump_table_v0(struct ip_fw_chain *ch, ip_fw3_opheader *op3,
xtbl->tbl = ti.uidx;
if (sd->valsize < sz) {
-
/*
* Submitted buffer size is not enough.
* WE've already filled in @i structure with
@@ -2663,7 +2654,7 @@ ipfw_add_table_algo(struct ip_fw_chain *ch, struct table_algo *ta, size_t size,
tcfg->def_algo[ta_new->type] = ta_new;
*idx = ta_new->idx;
-
+
return (0);
}
@@ -3072,7 +3063,6 @@ ipfw_switch_tables_namespace(struct ip_fw_chain *ch, unsigned int sets)
IPFW_UH_WUNLOCK(ch);
return (EBUSY);
}
-
}
}
V_fw_tables_sets = sets;
@@ -3202,7 +3192,7 @@ alloc_table_config(struct ip_fw_chain *ch, struct tid_info *ti,
free(tc, M_IPFW);
return (NULL);
}
-
+
return (tc);
}
@@ -3364,6 +3354,3 @@ ipfw_init_tables(struct ip_fw_chain *ch, int first)
IPFW_ADD_SOPT_HANDLER(first, scodes);
return (0);
}
-
-
-
diff --git a/sys/netpfil/ipfw/ip_fw_table.h b/sys/netpfil/ipfw/ip_fw_table.h
index ed5e3832adde..927707ade54a 100644
--- a/sys/netpfil/ipfw/ip_fw_table.h
+++ b/sys/netpfil/ipfw/ip_fw_table.h
@@ -230,6 +230,5 @@ int ipfw_count_xtable(struct ip_fw_chain *ch, struct tid_info *ti,
int ipfw_dump_table_legacy(struct ip_fw_chain *ch, struct tid_info *ti,
ipfw_table *tbl);
-
#endif /* _KERNEL */
#endif /* _IPFW2_TABLE_H */
diff --git a/sys/netpfil/ipfw/ip_fw_table_algo.c b/sys/netpfil/ipfw/ip_fw_table_algo.c
index 94ae1ac7357b..64bc65277608 100644
--- a/sys/netpfil/ipfw/ip_fw_table_algo.c
+++ b/sys/netpfil/ipfw/ip_fw_table_algo.c
@@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
#include <netpfil/ipfw/ip_fw_private.h>
#include <netpfil/ipfw/ip_fw_table.h>
-
/*
* IPFW table lookup algorithms.
*
@@ -300,7 +299,6 @@ static int badd(const void *key, void *item, void *base, size_t nmemb,
static int bdel(const void *key, void *base, size_t nmemb, size_t size,
int (*compar) (const void *, const void *));
-
/*
* ADDR implementation using radix
*
@@ -581,7 +579,6 @@ ta_foreach_radix(void *ta_state, struct table_info *ti, ta_foreach_f *f,
rnh->rnh_walktree(&rnh->rh, (walktree_f_t *)f, arg);
}
-
#ifdef INET6
static inline void ipv6_writemask(struct in6_addr *addr6, uint8_t mask);
@@ -665,7 +662,7 @@ ta_prepare_add_radix(struct ip_fw_chain *ch, struct tentry_info *tei,
mlen = tei->masklen;
set_mask = 0;
-
+
if (tei->subtype == AF_INET) {
#ifdef INET
if (mlen > 32)
@@ -755,7 +752,7 @@ ta_add_radix(void *ta_state, struct table_info *ti, struct tentry_info *tei,
/* Unknown error */
return (EINVAL);
}
-
+
if (tei->subtype == AF_INET)
cfg->count4++;
else
@@ -833,7 +830,7 @@ ta_del_radix(void *ta_state, struct table_info *ti, struct tentry_info *tei,
tei->value = ((struct radix_addr_xentry *)rn)->value;
tb->ent_ptr = rn;
-
+
if (tei->subtype == AF_INET)
cfg->count4--;
else
@@ -888,7 +885,6 @@ struct table_algo addr_radix = {
.need_modify = ta_need_modify_radix,
};
-
/*
* addr:hash cmds
*
@@ -994,7 +990,6 @@ static void ta_modify_chash(void *ta_state, struct table_info *ti, void *ta_buf,
uint64_t pflags);
static void ta_flush_mod_chash(void *ta_buf);
-
#ifdef INET
static __inline uint32_t
hash_ip(uint32_t addr, int hsize)
@@ -1016,7 +1011,6 @@ hash_ip6(struct in6_addr *addr6, int hsize)
return (i % (hsize - 1));
}
-
static __inline uint16_t
hash_ip64(struct in6_addr *addr6, int hsize)
{
@@ -1027,7 +1021,6 @@ hash_ip64(struct in6_addr *addr6, int hsize)
return (i % (hsize - 1));
}
-
static __inline uint32_t
hash_ip6_slow(struct in6_addr *addr6, void *key, int mask, int hsize)
{
@@ -1300,7 +1293,6 @@ ta_init_chash(struct ip_fw_chain *ch, void **ta_state, struct table_info *ti,
for (i = 0; i < cfg->size6; i++)
SLIST_INIT(&cfg->head6[i]);
-
*ta_state = cfg;
ti->state = cfg->head4;
ti->xstate = cfg->head6;
@@ -1424,9 +1416,8 @@ tei_to_chash_ent(struct tentry_info *tei, struct chashentry *ent)
struct in6_addr mask6;
#endif
-
mlen = tei->masklen;
-
+
if (tei->subtype == AF_INET) {
#ifdef INET
if (mlen > 32)
@@ -1885,7 +1876,6 @@ struct table_algo addr_hash = {
.flush_mod = ta_flush_mod_chash,
};
-
/*
* Iface table cmds.
*
@@ -2145,7 +2135,6 @@ destroy_ifidx_locked(struct namedobj_instance *ii, struct named_object *no,
return (0);
}
-
/*
* Destroys table @ti
*/
@@ -2371,7 +2360,6 @@ ta_flush_ifidx_entry(struct ip_fw_chain *ch, struct tentry_info *tei,
free(tb->ife, M_IPFW_TBL);
}
-
/*
* Handle interface announce/withdrawal for particular table.
* Every real runtime array modification happens here.
@@ -2416,7 +2404,6 @@ if_notifier(struct ip_fw_chain *ch, void *cbdata, uint16_t ifindex)
}
}
-
/*
* Table growing callbacks.
*/
@@ -2804,7 +2791,7 @@ ta_add_numarray(void *ta_state, struct table_info *ti, struct tentry_info *tei,
tb->na.value = tei->value;
ri = numarray_find(ti, &tb->na.number);
-
+
if (ri != NULL) {
if ((tei->flags & TEI_FLAGS_UPDATE) == 0)
return (EEXIST);
@@ -2854,7 +2841,7 @@ ta_del_numarray(void *ta_state, struct table_info *ti, struct tentry_info *tei,
return (ENOENT);
tei->value = ri->value;
-
+
res = bdel(&tb->na.number, cfg->main_ptr, cfg->used,
sizeof(struct numarray), compare_numarray);
@@ -2874,7 +2861,6 @@ ta_flush_numarray_entry(struct ip_fw_chain *ch, struct tentry_info *tei,
/* We don't have any state, do nothing */
}
-
/*
* Table growing callbacks.
*/
@@ -3431,7 +3417,6 @@ tei_to_fhash_ent(struct tentry_info *tei, struct fhashentry *ent)
return (0);
}
-
static int
ta_find_fhash_tentry(void *ta_state, struct table_info *ti,
ipfw_obj_tentry *tent)
@@ -3806,7 +3791,6 @@ static int ta_find_kfib_tentry(void *ta_state, struct table_info *ti,
static void ta_foreach_kfib(void *ta_state, struct table_info *ti,
ta_foreach_f *f, void *arg);
-
static int
ta_lookup_kfib(struct table_info *ti, void *key, uint32_t keylen,
uint32_t *val)
@@ -3936,7 +3920,6 @@ contigmask(uint8_t *p, int len)
return (i);
}
-
static int
ta_dump_kfib_tentry(void *ta_state, struct table_info *ti, void *e,
ipfw_obj_tentry *tent)
@@ -4106,5 +4089,3 @@ ipfw_table_algo_destroy(struct ip_fw_chain *ch)
ipfw_del_table_algo(ch, flow_hash.idx);
ipfw_del_table_algo(ch, addr_kfib.idx);
}
-
-
diff --git a/sys/netpfil/ipfw/ip_fw_table_value.c b/sys/netpfil/ipfw/ip_fw_table_value.c
index 9e1055235b2f..025ee5923a10 100644
--- a/sys/netpfil/ipfw/ip_fw_table_value.c
+++ b/sys/netpfil/ipfw/ip_fw_table_value.c
@@ -86,7 +86,6 @@ struct vdump_args {
int error;
};
-
static uint32_t
hash_table_value(struct namedobj_instance *ni, const void *key, uint32_t kopt)
{
@@ -372,7 +371,6 @@ alloc_table_vidx(struct ip_fw_chain *ch, struct tableop_state *ts,
error = ipfw_objhash_alloc_idx(vi, &vidx);
if (error != 0) {
-
/*
* We need to resize array. This involves
* lock/unlock, so we need to check "modified"
@@ -385,7 +383,6 @@ alloc_table_vidx(struct ip_fw_chain *ch, struct tableop_state *ts,
vlimit = ts->ta->vlimit;
if (vlimit != 0 && vidx >= vlimit && !(flags & IPFW_CTF_ATOMIC)) {
-
/*
* Algorithm is not able to store given index.
* We have to rollback state, start using
@@ -445,7 +442,6 @@ ipfw_garbage_table_values(struct ip_fw_chain *ch, struct table_config *tc,
ptei = &tei[i];
if (ptei->value == 0) {
-
/*
* We may be deleting non-existing record.
* Skip.
@@ -550,7 +546,6 @@ ipfw_link_table_values(struct ip_fw_chain *ch, struct tableop_state *ts,
tc_unref(tc);
del_toperation_state(ch, ts);
if (ts->modified != 0) {
-
/*
* In general, we should free all state/indexes here
* and return. However, we keep allocated state instead
@@ -804,4 +799,3 @@ ipfw_table_value_destroy(struct ip_fw_chain *ch, int last)
ipfw_objhash_foreach(CHAIN_TO_VI(ch), destroy_value, ch);
ipfw_objhash_destroy(CHAIN_TO_VI(ch));
}
-
diff --git a/sys/netpfil/ipfw/nat64/nat64_translate.c b/sys/netpfil/ipfw/nat64/nat64_translate.c
index 87cef07feefc..e8fffe03497c 100644
--- a/sys/netpfil/ipfw/nat64/nat64_translate.c
+++ b/sys/netpfil/ipfw/nat64/nat64_translate.c
@@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$");
#include "ip_fw_nat64.h"
#include "nat64_translate.h"
-
typedef int (*nat64_output_t)(struct ifnet *, struct mbuf *,
struct sockaddr *, struct nat64_counters *, void *);
typedef int (*nat64_output_one_t)(struct mbuf *, struct nat64_counters *,
@@ -1725,4 +1724,3 @@ nat64_do_handle_ip6(struct mbuf *m, uint32_t aaddr, uint16_t aport,
NAT64STAT_INC(&cfg->stats, opcnt64);
return (NAT64RETURN);
}
-
diff --git a/sys/netpfil/ipfw/nat64/nat64_translate.h b/sys/netpfil/ipfw/nat64/nat64_translate.h
index 4b669d27d9db..deaf4fd5c0e9 100644
--- a/sys/netpfil/ipfw/nat64/nat64_translate.h
+++ b/sys/netpfil/ipfw/nat64/nat64_translate.h
@@ -154,4 +154,3 @@ void nat64_set_output_method(int);
int nat64_get_output_method(void);
#endif
-
diff --git a/sys/netpfil/ipfw/nat64/nat64clat_control.c b/sys/netpfil/ipfw/nat64/nat64clat_control.c
index 2f6ac812bdd4..1edb01007b38 100644
--- a/sys/netpfil/ipfw/nat64/nat64clat_control.c
+++ b/sys/netpfil/ipfw/nat64/nat64clat_control.c
@@ -487,7 +487,6 @@ nat64clat_reset_stats(struct ip_fw_chain *ch, ip_fw3_opheader *op,
}
static struct ipfw_sopt_handler scodes[] = {
-
{ IP_FW_NAT64CLAT_CREATE, 0, HDIR_SET, nat64clat_create },
{ IP_FW_NAT64CLAT_DESTROY,0, HDIR_SET, nat64clat_destroy },
{ IP_FW_NAT64CLAT_CONFIG, 0, HDIR_BOTH, nat64clat_config },
@@ -611,4 +610,3 @@ nat64clat_uninit(struct ip_fw_chain *ch, int last)
V_nat64clat_eid = 0;
IPFW_UH_WUNLOCK(ch);
}
-
diff --git a/sys/netpfil/ipfw/nat64/nat64lsn.c b/sys/netpfil/ipfw/nat64/nat64lsn.c
index ed50239176d0..e7e7027492dd 100644
--- a/sys/netpfil/ipfw/nat64/nat64lsn.c
+++ b/sys/netpfil/ipfw/nat64/nat64lsn.c
@@ -258,7 +258,6 @@ freemask_ffsll(uint32_t *freemask)
((uint64_t)ck_pr_load_32(FREEMASK_CHUNK((pg), (n)) + 1) << 32)
#endif /* !__LP64__ */
-
#define NAT64LSN_TRY_PGCNT 32
static struct nat64lsn_pg*
nat64lsn_get_pg(uint32_t *chunkmask, uint32_t *pgmask,
@@ -1750,4 +1749,3 @@ nat64lsn_destroy_instance(struct nat64lsn_cfg *cfg)
free(cfg->aliases, M_NAT64LSN);
free(cfg, M_NAT64LSN);
}
-
diff --git a/sys/netpfil/ipfw/nat64/nat64lsn_control.c b/sys/netpfil/ipfw/nat64/nat64lsn_control.c
index 65481a88d64e..52eb22a0953c 100644
--- a/sys/netpfil/ipfw/nat64/nat64lsn_control.c
+++ b/sys/netpfil/ipfw/nat64/nat64lsn_control.c
@@ -941,4 +941,3 @@ nat64lsn_uninit(struct ip_fw_chain *ch, int last)
if (last != 0)
nat64lsn_uninit_internal();
}
-
diff --git a/sys/netpfil/ipfw/nat64/nat64stl.c b/sys/netpfil/ipfw/nat64/nat64stl.c
index a150322d1a44..286876e553e3 100644
--- a/sys/netpfil/ipfw/nat64/nat64stl.c
+++ b/sys/netpfil/ipfw/nat64/nat64stl.c
@@ -263,5 +263,3 @@ ipfw_nat64stl(struct ip_fw_chain *chain, struct ip_fw_args *args,
args->m = NULL;
return (IP_FW_NAT64);
}
-
-
diff --git a/sys/netpfil/ipfw/nat64/nat64stl.h b/sys/netpfil/ipfw/nat64/nat64stl.h
index 54ecfcac002b..385e92a7e4ef 100644
--- a/sys/netpfil/ipfw/nat64/nat64stl.h
+++ b/sys/netpfil/ipfw/nat64/nat64stl.h
@@ -57,4 +57,3 @@ int ipfw_nat64stl(struct ip_fw_chain *chain, struct ip_fw_args *args,
ipfw_insn *cmd, int *done);
#endif
-
diff --git a/sys/netpfil/ipfw/nat64/nat64stl_control.c b/sys/netpfil/ipfw/nat64/nat64stl_control.c
index a2dd51791a84..93b1dfe49b1b 100644
--- a/sys/netpfil/ipfw/nat64/nat64stl_control.c
+++ b/sys/netpfil/ipfw/nat64/nat64stl_control.c
@@ -140,7 +140,6 @@ nat64stl_find(struct namedobj_instance *ni, const char *name, uint8_t set)
return (cfg);
}
-
static int
nat64stl_create_internal(struct ip_fw_chain *ch, struct nat64stl_cfg *cfg,
ipfw_nat64stl_cfg *i)
@@ -493,7 +492,6 @@ nat64stl_reset_stats(struct ip_fw_chain *ch, ip_fw3_opheader *op,
}
static struct ipfw_sopt_handler scodes[] = {
-
{ IP_FW_NAT64STL_CREATE, 0, HDIR_SET, nat64stl_create },
{ IP_FW_NAT64STL_DESTROY,0, HDIR_SET, nat64stl_destroy },
{ IP_FW_NAT64STL_CONFIG, 0, HDIR_BOTH, nat64stl_config },
@@ -617,4 +615,3 @@ nat64stl_uninit(struct ip_fw_chain *ch, int last)
V_nat64stl_eid = 0;
IPFW_UH_WUNLOCK(ch);
}
-
diff --git a/sys/netpfil/ipfw/nptv6/nptv6.c b/sys/netpfil/ipfw/nptv6/nptv6.c
index b0230f2601f0..de5be6836ab4 100644
--- a/sys/netpfil/ipfw/nptv6/nptv6.c
+++ b/sys/netpfil/ipfw/nptv6/nptv6.c
@@ -1039,4 +1039,3 @@ nptv6_uninit(struct ip_fw_chain *ch, int last)
V_nptv6_eid = 0;
IPFW_UH_WUNLOCK(ch);
}
-
diff --git a/sys/netpfil/ipfw/nptv6/nptv6.h b/sys/netpfil/ipfw/nptv6/nptv6.h
index df5a4e8bf0ea..a30a44fc24d0 100644
--- a/sys/netpfil/ipfw/nptv6/nptv6.h
+++ b/sys/netpfil/ipfw/nptv6/nptv6.h
@@ -65,4 +65,3 @@ void nptv6_uninit(struct ip_fw_chain *ch, int last);
#endif /* _KERNEL */
#endif /* _IP_FW_NPTV6_H_ */
-
diff --git a/sys/netpfil/ipfw/pmod/pmod.h b/sys/netpfil/ipfw/pmod/pmod.h
index 1e9f6ec00f7f..8df741bb91b4 100644
--- a/sys/netpfil/ipfw/pmod/pmod.h
+++ b/sys/netpfil/ipfw/pmod/pmod.h
@@ -33,4 +33,3 @@
int tcpmod_init(struct ip_fw_chain *ch, int first);
void tcpmod_uninit(struct ip_fw_chain *ch, int last);
#endif /* _IP_FW_PMOD_H_ */
-
diff --git a/sys/netpfil/ipfw/pmod/tcpmod.c b/sys/netpfil/ipfw/pmod/tcpmod.c
index 054c289c8914..aa2d199f46d5 100644
--- a/sys/netpfil/ipfw/pmod/tcpmod.c
+++ b/sys/netpfil/ipfw/pmod/tcpmod.c
@@ -243,4 +243,3 @@ tcpmod_uninit(struct ip_fw_chain *ch, int last)
ipfw_del_eaction(ch, V_tcpmod_setmss_eid);
V_tcpmod_setmss_eid = 0;
}
-
diff --git a/sys/netpfil/ipfw/test/dn_test.h b/sys/netpfil/ipfw/test/dn_test.h
index 77704690f6f3..f2f21a0811d0 100644
--- a/sys/netpfil/ipfw/test/dn_test.h
+++ b/sys/netpfil/ipfw/test/dn_test.h
@@ -28,7 +28,6 @@ extern int debug;
#define DX(lev, fmt, args...) do { \
if (debug > lev) D(fmt, ## args); } while (0)
-
#ifndef offsetof
#define offsetof(t,m) (int)(intptr_t)((&((t *)0L)->m))
#endif
diff --git a/sys/netpfil/ipfw/test/main.c b/sys/netpfil/ipfw/test/main.c
index 71fa2744db6c..999c0fadd073 100644
--- a/sys/netpfil/ipfw/test/main.c
+++ b/sys/netpfil/ipfw/test/main.c
@@ -132,7 +132,6 @@ drop(struct cfg_s *c, struct mbuf *m)
return 0;
}
-
/*
* dn_sch_inst does not have a queue, for the RR we
* allocate a mq right after si
@@ -152,7 +151,6 @@ default_enqueue(struct dn_sch_inst *si, struct dn_queue *q, struct mbuf *m)
return 0; /* default - success */
}
-
static struct mbuf *
default_dequeue(struct dn_sch_inst *si)
{
@@ -599,7 +597,6 @@ init(struct cfg_s *c)
return 0;
}
-
int
main(int ac, char *av[])
{
diff --git a/sys/netpfil/ipfw/test/mylist.h b/sys/netpfil/ipfw/test/mylist.h
index 109592256f47..2a62546e543f 100644
--- a/sys/netpfil/ipfw/test/mylist.h
+++ b/sys/netpfil/ipfw/test/mylist.h
@@ -22,7 +22,7 @@ __list_add(struct list_head *o, struct list_head *prev,
o->prev = prev;
prev->next = o;
}
-
+
static inline void
list_add_tail(struct list_head *o, struct list_head *head)
{
diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c
index e6c85dbb884a..b24efe10688d 100644
--- a/sys/netpfil/pf/if_pfsync.c
+++ b/sys/netpfil/pf/if_pfsync.c
@@ -315,7 +315,6 @@ static void pfsync_update_net_tdb(struct pfsync_tdb *);
static struct pfsync_bucket *pfsync_get_bucket(struct pfsync_softc *,
struct pf_state *);
-
#define PFSYNC_MAX_BULKTRIES 12
VNET_DEFINE(struct if_clone *, pfsync_cloner);
@@ -454,7 +453,6 @@ pfsync_alloc_scrub_memory(struct pfsync_state_peer *s,
return (0);
}
-
static int
pfsync_state_import(struct pfsync_state *sp, u_int8_t flags)
{
@@ -1288,7 +1286,6 @@ bad:
}
#endif
-
static int
pfsync_in_eof(struct pfsync_pkt *pkt, struct mbuf *m, int offset, int count)
{
@@ -2332,7 +2329,6 @@ pfsyncintr(void *arg)
PFSYNC_BUCKET_UNLOCK(b);
for (; m != NULL; m = n) {
-
n = m->m_nextpkt;
m->m_nextpkt = NULL;
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 708633377c42..77ec1c60bb39 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -1485,7 +1485,6 @@ pf_purge_thread(void *unused __unused)
VNET_FOREACH(vnet_iter) {
CURVNET_SET(vnet_iter);
-
/* Wait until V_pf_default_rule is initialized. */
if (V_pf_vnet_active == 0) {
CURVNET_RESTORE();
@@ -1553,7 +1552,6 @@ pf_unload_vnet_purge(void)
pfi_kif_purge();
}
-
u_int32_t
pf_state_expires(const struct pf_state *state)
{
@@ -1734,7 +1732,6 @@ pf_purge_expired_states(u_int i, int maxcheck)
* Go through hash and unlink states that expire now.
*/
while (maxcheck > 0) {
-
ih = &V_pf_idhash[i];
/* only take the lock if we expect to do work */
@@ -2012,7 +2009,6 @@ pf_calc_skip_steps(struct pf_rulequeue *rules)
for (i = 0; i < PF_SKIP_COUNT; ++i)
head[i] = cur;
while (cur != NULL) {
-
if (cur->kif != prev->kif || cur->ifnot != prev->ifnot)
PF_SET_SKIP_STEPS(PF_SKIP_IFP);
if (cur->direction != prev->direction)
@@ -2304,7 +2300,6 @@ pf_change_icmp(struct pf_addr *ia, u_int16_t *ip, struct pf_addr *oa,
}
}
-
/*
* Need to modulate the sequence numbers in the TCP SACK option
* (credits to Krzysztof Pfaff for report and patch)
@@ -2594,7 +2589,6 @@ pf_return(struct pf_rule *r, struct pf_rule *nr, struct pf_pdesc *pd,
r->return_icmp6 & 255, af, r);
}
-
static int
pf_ieee8021q_setpcp(struct mbuf *m, u_int8_t prio)
{
@@ -4093,7 +4087,6 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst,
ackskew = dst->seqlo - ack;
-
/*
* Need to demodulate the sequence numbers in any TCP SACK options
* (Selective ACK). We could optionally validate the SACK values
@@ -4111,7 +4104,6 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst,
*copyback = 1;
}
-
#define MAXACKWINDOW (0xffff + 1500) /* 1500 is an arbitrary fudge factor */
if (SEQ_GEQ(src->seqhi, end) &&
/* Last octet inside other's window space */
@@ -4142,7 +4134,6 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst,
if (SEQ_GEQ(ack + (win << sws), dst->seqhi))
dst->seqhi = ack + MAX((win << sws), 1);
-
/* update states */
if (th->th_flags & TH_SYN)
if (src->state < TCPS_SYN_SENT)
@@ -4645,7 +4636,6 @@ pf_test_state_icmp(struct pf_state **state, int direction, struct pfi_kif *kif,
}
if (!state_icmp) {
-
/*
* ICMP query/reply message not related to a TCP/UDP packet.
* Search for an ICMP state.
@@ -5266,7 +5256,6 @@ pf_test_state_other(struct pf_state **state, int direction, struct pfi_kif *kif,
nk->addr[pd->sidx].v4.s_addr,
0);
-
if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], AF_INET))
pf_change_a(&pd->dst->v4.s_addr,
pd->ip_sum,
@@ -5800,7 +5789,6 @@ pf_check_proto_cksum(struct mbuf *m, int off, int len, u_int8_t p, sa_family_t a
return (0);
}
-
#ifdef INET
int
pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *inp)
@@ -5895,7 +5883,6 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb *
}
switch (h->ip_p) {
-
case IPPROTO_TCP: {
struct tcphdr th;
@@ -6046,7 +6033,6 @@ done:
/* Add hints for ecn. */
pd.pf_mtag->hdr = h;
}
-
}
#endif /* ALTQ */
@@ -6064,7 +6050,6 @@ done:
if (action == PF_PASS && r->divert.port && ip_divert_ptr != NULL &&
!PACKET_LOOPED(&pd)) {
-
ipfwtag = m_tag_alloc(MTAG_IPFW_RULE, 0,
sizeof(struct ipfw_rule_ref), M_NOWAIT | M_ZERO);
if (ipfwtag != NULL) {
@@ -6334,7 +6319,6 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb
n = m;
switch (pd.proto) {
-
case IPPROTO_TCP: {
struct tcphdr th;
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 7733cd3169cd..a5757556dffc 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -330,7 +330,6 @@ pfattach_vnet(void)
return;
}
-
static struct pf_pool *
pf_get_pool(char *anchor, u_int32_t ticket, u_int8_t rule_action,
u_int32_t rule_number, u_int8_t r_last, u_int8_t active,
@@ -472,7 +471,7 @@ pf_init_tagset(struct pf_tagset *ts, unsigned int *tunable_size,
{
unsigned int i;
unsigned int hashsize;
-
+
if (*tunable_size == 0 || !powerof2(*tunable_size))
*tunable_size = default_size;
@@ -559,7 +558,7 @@ tagname2tag(struct pf_tagset *ts, char *tagname)
/* Mark the tag as in use. Bits are 0-based for BIT_CLR() */
BIT_CLR(TAGID_MAX, new_tagid - 1, &ts->avail);
-
+
/* allocate and fill new struct pf_tagname */
tag = uma_zalloc(V_pf_tag_z, M_NOWAIT);
if (tag == NULL)
@@ -574,7 +573,7 @@ tagname2tag(struct pf_tagset *ts, char *tagname)
/* Insert into taghash */
index = tag2hashindex(ts, new_tagid);
TAILQ_INSERT_TAIL(&ts->taghash[index], tag, taghash_entries);
-
+
return (tag->tag);
}
@@ -583,7 +582,7 @@ tag_unref(struct pf_tagset *ts, u_int16_t tag)
{
struct pf_tagname *t;
uint16_t index;
-
+
PF_RULES_WASSERT();
index = tag2hashindex(ts, tag);
@@ -795,7 +794,7 @@ pf_altq_ifnet_event_add(struct ifnet *ifp, int remove, u_int32_t ticket,
{
struct ifnet *ifp1;
int error = 0;
-
+
/* Deactivate the interface in question */
altq->local_flags &= ~PFALTQ_FLAG_IF_REMOVED;
if ((ifp1 = ifunit(altq->ifname)) == NULL ||
@@ -1058,7 +1057,6 @@ pf_commit_rules(u_int32_t ticket, int rs_num, char *anchor)
rs->rules[rs_num].inactive.ticket;
pf_calc_skip_steps(rs->rules[rs_num].active.ptr);
-
/* Purge the old rule list. */
while ((rule = TAILQ_FIRST(old_rules)) != NULL)
pf_unlink_rule(old_rules, rule);
@@ -1155,7 +1153,7 @@ static int
pf_export_kaltq(struct pf_altq *q, struct pfioc_altq_v1 *pa, size_t ioc_size)
{
u_int32_t version;
-
+
if (ioc_size == sizeof(struct pfioc_altq_v0))
version = 0;
else
@@ -1264,7 +1262,7 @@ static int
pf_import_kaltq(struct pfioc_altq_v1 *pa, struct pf_altq *q, size_t ioc_size)
{
u_int32_t version;
-
+
if (ioc_size == sizeof(struct pfioc_altq_v0))
version = 0;
else
@@ -1272,7 +1270,7 @@ pf_import_kaltq(struct pfioc_altq_v1 *pa, struct pf_altq *q, size_t ioc_size)
if (version > PFIOC_ALTQ_VERSION)
return (EINVAL);
-
+
#define ASSIGN(x) q->x = imported_q->x
#define COPY(x) \
bcopy(&imported_q->x, &q->x, min(sizeof(imported_q->x), sizeof(q->x)))
@@ -1357,7 +1355,7 @@ pf_import_kaltq(struct pfioc_altq_v1 *pa, struct pf_altq *q, size_t ioc_size)
#undef ASSIGN
#undef COPY
-
+
return (0);
}
@@ -1584,7 +1582,6 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
rule->cuid = td->td_ucred->cr_ruid;
rule->cpid = td->td_proc ? td->td_proc->p_pid : 0;
TAILQ_INIT(&rule->rpool.list);
-
#define ERROUT(x) { error = (x); goto DIOCADDRULE_error; }
PF_RULES_WLOCK();
@@ -1846,7 +1843,6 @@ DIOCADDRULE_error:
newrule->cpid = td->td_proc ? td->td_proc->p_pid : 0;
TAILQ_INIT(&newrule->rpool.list);
}
-
#define ERROUT(x) { error = (x); goto DIOCCHANGERULE_error; }
PF_RULES_WLOCK();
@@ -2182,7 +2178,6 @@ relock_DIOCKILLSTATES:
PF_HASHROW_LOCK(ih);
LIST_FOREACH(s, &ih->states, entry) {
-
if (s->timeout == PFTM_UNLINKED)
continue;
@@ -2775,7 +2770,6 @@ DIOCGETSTATES_full:
kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK);
newpa->kif = NULL;
}
-
#define ERROUT(x) { error = (x); goto DIOCCHANGEADDR_error; }
PF_RULES_WLOCK();
ruleset = pf_find_ruleset(pca->anchor);
@@ -3834,7 +3828,6 @@ DIOCCHANGEADDR_error:
}
case DIOCCLRSRCNODES: {
-
pf_clear_srcnodes(NULL);
pf_purge_expired_src_nodes();
break;
@@ -4499,7 +4492,6 @@ SYSUNINIT(pf_unload, SI_SUB_PROTO_FIREWALL, SI_ORDER_SECOND, pf_unload, NULL);
VNET_SYSUNINIT(vnet_pf_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD,
vnet_pf_uninit, NULL);
-
static int
pf_modevent(module_t mod, int type, void *data)
{
diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c
index 47407014adf0..b3f867a997c6 100644
--- a/sys/netpfil/pf/pf_norm.c
+++ b/sys/netpfil/pf/pf_norm.c
@@ -1445,7 +1445,6 @@ pf_normalize_tcp_init(struct mbuf *m, int off, struct pf_pdesc *pd,
#endif /* INET6 */
}
-
/*
* All normalizations below are only begun if we see the start of
* the connections. They must all set an enabled bit in pfss_flags
@@ -1453,7 +1452,6 @@ pf_normalize_tcp_init(struct mbuf *m, int off, struct pf_pdesc *pd,
if ((th->th_flags & TH_SYN) == 0)
return (0);
-
if (th->th_off > (sizeof(struct tcphdr) >> 2) && src->scrub &&
pf_pull_hdr(m, off, hdr, th->th_off << 2, NULL, NULL, pd->af)) {
/* Diddle with TCP options */
@@ -1630,7 +1628,6 @@ pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd,
}
}
-
/*
* Must invalidate PAWS checks on connections idle for too long.
* The fastest allowed timestamp clock is 1ms. That turns out to
@@ -1731,7 +1728,6 @@ pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd,
struct timeval delta_ts;
int ts_fudge;
-
/*
* PFTM_TS_DIFF is how many seconds of leeway to allow
* a host's timestamp. This can happen if the previous
@@ -1838,7 +1834,6 @@ pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd,
}
}
-
/*
* We will note if a host sends his data packets with or without
* timestamps. And require all data packets to contain a timestamp
@@ -1866,7 +1861,6 @@ pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd,
}
}
-
/*
* Update PAWS values
*/
diff --git a/sys/netpfil/pf/pf_osfp.c b/sys/netpfil/pf/pf_osfp.c
index e00cce5c4d36..90b491dc3421 100644
--- a/sys/netpfil/pf/pf_osfp.c
+++ b/sys/netpfil/pf/pf_osfp.c
@@ -135,7 +135,6 @@ pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const st
return (NULL);
fp.fp_wsize = ntohs(tcp->th_win);
-
cnt = (tcp->th_off << 2) - sizeof(*tcp);
optp = (const u_int8_t *)((const char *)tcp + sizeof(*tcp));
for (; cnt > 0; cnt -= optlen, optp += optlen) {
@@ -181,7 +180,6 @@ pf_osfp_fingerprint_hdr(const struct ip *ip, const struct ip6_hdr *ip6, const st
memcpy(&ts, &optp[2], sizeof(ts));
if (ts == 0)
fp.fp_flags |= PF_OSFP_TS0;
-
}
fp.fp_tcpopts = (fp.fp_tcpopts <<
PF_OSFP_TCPOPT_BITS) | PF_OSFP_TCPOPT_TS;
@@ -259,7 +257,6 @@ pf_osfp_flush(void)
}
}
-
/* Add a fingerprint */
int
pf_osfp_add(struct pf_osfp_ioctl *fpioc)
@@ -349,7 +346,6 @@ pf_osfp_add(struct pf_osfp_ioctl *fpioc)
return (0);
}
-
/* Find a fingerprint in the list */
static struct pf_os_fingerprint *
pf_osfp_find(struct pf_osfp_list *list, struct pf_os_fingerprint *find,
@@ -471,7 +467,6 @@ pf_osfp_get(struct pf_osfp_ioctl *fpioc)
int num = fpioc->fp_getnum;
int i = 0;
-
memset(fpioc, 0, sizeof(*fpioc));
SLIST_FOREACH(fp, &V_pf_osfp_list, fp_next) {
SLIST_FOREACH(entry, &fp->fp_oses, fp_entry) {
@@ -493,7 +488,6 @@ pf_osfp_get(struct pf_osfp_ioctl *fpioc)
return (EBUSY);
}
-
#ifdef PFDEBUG
/* Validate that each signature is reachable */
static struct pf_os_fingerprint *
diff --git a/sys/netpfil/pf/pf_ruleset.c b/sys/netpfil/pf/pf_ruleset.c
index a96d460cf22c..6595464132a7 100644
--- a/sys/netpfil/pf/pf_ruleset.c
+++ b/sys/netpfil/pf/pf_ruleset.c
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
#include <netinet/ip6.h>
#endif /* INET6 */
-
#ifdef _KERNEL
#define DPFPRINTF(format, x...) \
if (V_pf_status.debug >= PF_DEBUG_NOISY) \
diff --git a/sys/netpfil/pf/pf_table.c b/sys/netpfil/pf/pf_table.c
index 8a7ff2ea0467..192b5e37c779 100644
--- a/sys/netpfil/pf/pf_table.c
+++ b/sys/netpfil/pf/pf_table.c
@@ -754,7 +754,6 @@ pfr_mark_addrs(struct pfr_ktable *kt)
printf("pfr_mark_addrs: IPv6 walktree failed.\n");
}
-
static struct pfr_kentry *
pfr_lookup_addr(struct pfr_ktable *kt, struct pfr_addr *ad, int exact)
{
diff --git a/sys/netsmb/smb.h b/sys/netsmb/smb.h
index d532b496a8d3..42c14bc5fdb7 100644
--- a/sys/netsmb/smb.h
+++ b/sys/netsmb/smb.h
@@ -31,7 +31,7 @@
/*
* Common definitions and structures for SMB/CIFS protocol
*/
-
+
#ifndef _NETSMB_SMB_H_
#define _NETSMB_SMB_H_
diff --git a/sys/netsmb/smb_conn.c b/sys/netsmb/smb_conn.c
index 52aeb49ae4d4..a1fe0a1983ce 100644
--- a/sys/netsmb/smb_conn.c
+++ b/sys/netsmb/smb_conn.c
@@ -726,7 +726,7 @@ u_short
smb_vc_nextmid(struct smb_vc *vcp)
{
u_short r;
-
+
sx_xlock(&vcp->obj.co_interlock);
r = vcp->vc_mid++;
sx_unlock(&vcp->obj.co_interlock);
@@ -834,7 +834,7 @@ smb_share_get(struct smb_share *ssp, struct smb_cred *scred)
void
smb_share_put(struct smb_share *ssp, struct smb_cred *scred)
{
-
+
smb_co_put(SSTOCP(ssp), scred);
}
@@ -843,7 +843,7 @@ smb_share_lock(struct smb_share *ssp)
{
struct smb_connobj *cp;
int error;
-
+
cp = SSTOCP(ssp);
sx_xlock(&cp->co_interlock);
error = smb_co_lock(cp);
@@ -855,7 +855,7 @@ void
smb_share_unlock(struct smb_share *ssp)
{
struct smb_connobj *cp;
-
+
cp = SSTOCP(ssp);
sx_xlock(&cp->co_interlock);
smb_co_unlock(cp);
diff --git a/sys/netsmb/smb_conn.h b/sys/netsmb/smb_conn.h
index d26303a43db5..1ce8e3b623ac 100644
--- a/sys/netsmb/smb_conn.h
+++ b/sys/netsmb/smb_conn.h
@@ -79,7 +79,6 @@
/*#define SMBV_FAILED 0x0200*/ /* last reconnect attempt has failed */
#define SMBV_UNICODE 0x0400 /* connection is configured to use Unicode */
-
/*
* smb_share flags
*/
@@ -125,7 +124,6 @@ enum smbiod_state {
SMBIOD_ST_DEAD /* connection broken, transport is down */
};
-
/*
* Info structures
*/
diff --git a/sys/netsmb/smb_crypt.c b/sys/netsmb/smb_crypt.c
index 46c841cba3df..82626c5546e6 100644
--- a/sys/netsmb/smb_crypt.c
+++ b/sys/netsmb/smb_crypt.c
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
static u_char N8[] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
-
static void
smb_E(const u_char *key, u_char *data, u_char *dest)
{
@@ -88,7 +87,6 @@ smb_E(const u_char *key, u_char *data, u_char *dest)
free(ksp, M_SMBTEMP);
}
-
int
smb_encrypt(const u_char *apwd, u_char *C8, u_char *RN)
{
diff --git a/sys/netsmb/smb_dev.c b/sys/netsmb/smb_dev.c
index f88d14330c4a..0b577564aff7 100644
--- a/sys/netsmb/smb_dev.c
+++ b/sys/netsmb/smb_dev.c
@@ -69,7 +69,6 @@ MODULE_VERSION(netsmb, NSMB_VERSION);
static int smb_version = NSMB_VERSION;
struct sx smb_lock;
-
SYSCTL_DECL(_net_smb);
SYSCTL_INT(_net_smb, OID_AUTO, version, CTLFLAG_RD, &smb_version, 0, "");
@@ -172,7 +171,6 @@ sdp_trydestroy(struct smb_dev *sdp)
return;
}
-
static int
nsmb_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
@@ -238,7 +236,7 @@ nsmb_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thre
case SMBIOC_SETFLAGS: {
struct smbioc_flags *fl = (struct smbioc_flags*)data;
int on;
-
+
if (fl->ioc_level == SMBL_VC) {
if (fl->ioc_mask & SMBV_PERMANENT) {
on = fl->ioc_flags & SMBV_PERMANENT;
@@ -309,7 +307,7 @@ nsmb_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thre
struct smbioc_rw *rwrq = (struct smbioc_rw*)data;
struct uio auio;
struct iovec iov;
-
+
if ((ssp = sdp->sd_share) == NULL) {
error = ENOTCONN;
goto out;
@@ -412,4 +410,3 @@ smb_dev2share(int fd, int mode, struct smb_cred *scred,
SMB_UNLOCK();
return error;
}
-
diff --git a/sys/netsmb/smb_dev.h b/sys/netsmb/smb_dev.h
index 6828602781f3..2c927346a96d 100644
--- a/sys/netsmb/smb_dev.h
+++ b/sys/netsmb/smb_dev.h
@@ -195,7 +195,6 @@ int smb_usr_t2request(struct smb_share *ssp, struct smbioc_t2rq *data,
int smb_dev2share(int fd, int mode, struct smb_cred *scred,
struct smb_share **sspp, struct smb_dev **ssdp);
-
#endif /* _KERNEL */
#endif /* _NETSMB_DEV_H_ */
diff --git a/sys/netsmb/smb_iod.c b/sys/netsmb/smb_iod.c
index e93787c3bb1d..bc53d01edad4 100644
--- a/sys/netsmb/smb_iod.c
+++ b/sys/netsmb/smb_iod.c
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/endian.h>
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <netsmb/smb_tran.h>
#include <netsmb/smb_trantcp.h>
-
#define SMBIOD_SLEEP_TIMO 2
#define SMBIOD_PING_TIMO 60 /* seconds */
@@ -59,7 +58,6 @@ __FBSDID("$FreeBSD$");
#define smb_iod_wakeup(iod) wakeup(&(iod)->iod_flags)
-
static MALLOC_DEFINE(M_SMBIOD, "SMBIOD", "SMB network io daemon");
static int smb_iod_next;
@@ -506,7 +504,6 @@ smb_iod_waitrq(struct smb_rq *rqp)
}
smb_iod_removerq(rqp);
return rqp->sr_lerror;
-
}
SMBRQ_SLOCK(rqp);
if (rqp->sr_rpgen == rqp->sr_rplast)
@@ -528,7 +525,6 @@ smb_iod_waitrq(struct smb_rq *rqp)
return error;
}
-
static int
smb_iod_sendall(struct smbiod *iod)
{
@@ -719,4 +715,3 @@ smb_iod_done(void)
{
return 0;
}
-
diff --git a/sys/netsmb/smb_rq.c b/sys/netsmb/smb_rq.c
index 544bfd1194f0..57bf053034ad 100644
--- a/sys/netsmb/smb_rq.c
+++ b/sys/netsmb/smb_rq.c
@@ -366,7 +366,6 @@ smb_rq_reply(struct smb_rq *rqp)
return error ? error : rperror;
}
-
#define ALIGN4(a) (((a) + 3) & ~3)
/*
diff --git a/sys/netsmb/smb_rq.h b/sys/netsmb/smb_rq.h
index 861fa2c722bb..c8f16539a938 100644
--- a/sys/netsmb/smb_rq.h
+++ b/sys/netsmb/smb_rq.h
@@ -56,7 +56,6 @@
#define SMBRQ_SUNLOCK(rqp) smb_sl_unlock(&(rqp)->sr_slock)
#define SMBRQ_SLOCKPTR(rqp) (&(rqp)->sr_slock)
-
enum smbrq_state {
SMBRQ_NOTSENT, /* rq have data to send */
SMBRQ_SENT, /* send procedure completed */
diff --git a/sys/netsmb/smb_smb.c b/sys/netsmb/smb_smb.c
index 6761e9675b62..efd1fa18ac71 100644
--- a/sys/netsmb/smb_smb.c
+++ b/sys/netsmb/smb_smb.c
@@ -852,7 +852,7 @@ smb_smb_write(struct smb_share *ssp, u_int16_t fid, int *len, int *rresid,
if (*len && SSTOVC(ssp)->vc_sopt.sv_caps & SMB_CAP_LARGE_WRITEX)
return (smb_smb_writex(ssp, fid, len, rresid, uio, scred));
-
+
blksz = SSTOVC(ssp)->vc_txmax - SMB_HDRLEN - 16;
if (blksz > 0xffff)
blksz = 0xffff;
diff --git a/sys/netsmb/smb_subr.h b/sys/netsmb/smb_subr.h
index e32fbc424593..e24c50f7978c 100644
--- a/sys/netsmb/smb_subr.h
+++ b/sys/netsmb/smb_subr.h
@@ -79,7 +79,6 @@ void m_dumpm(struct mbuf *m);
#define smb_sl_lock(mtx) mtx_lock(mtx)
#define smb_sl_unlock(mtx) mtx_unlock(mtx)
-
#define SMB_STRFREE(p) do { if (p) smb_strfree(p); } while(0)
typedef u_int16_t smb_unichar;
diff --git a/sys/netsmb/smb_trantcp.c b/sys/netsmb/smb_trantcp.c
index 8101993277a3..051aade51217 100644
--- a/sys/netsmb/smb_trantcp.c
+++ b/sys/netsmb/smb_trantcp.c
@@ -600,7 +600,6 @@ abort:
return error;
}
-
static int
smb_nbst_recv(struct smb_vc *vcp, struct mbuf **mpp, struct thread *td)
{
@@ -682,7 +681,6 @@ smb_nbst_fatal(struct smb_vc *vcp, int error)
return 0;
}
-
struct smb_tran_desc smb_tran_nbtcp_desc = {
SMBT_NBTCP,
smb_nbst_create, smb_nbst_done,
@@ -692,4 +690,3 @@ struct smb_tran_desc smb_tran_nbtcp_desc = {
smb_nbst_getparam, smb_nbst_setparam,
smb_nbst_fatal
};
-
diff --git a/sys/netsmb/smb_trantcp.h b/sys/netsmb/smb_trantcp.h
index 1fbed212a95f..889a43acaea1 100644
--- a/sys/netsmb/smb_trantcp.h
+++ b/sys/netsmb/smb_trantcp.h
@@ -47,7 +47,6 @@ enum nbstate {
NBST_REFUSED
};
-
/*
* socket specific data
*/