PATH:
usr
/
src
/
kernels
/
5.14.0-611.49.1.el9_7.x86_64
/
include
/
net
/* SPDX-License-Identifier: GPL-2.0-or-later */ #ifndef _LINUX_RSTREASON_H #define _LINUX_RSTREASON_H #include <net/dropreason-core.h> #include <uapi/linux/mptcp.h> #define DEFINE_RST_REASON(FN, FNe) \ FN(NOT_SPECIFIED) \ FN(NO_SOCKET) \ FN(TCP_INVALID_ACK_SEQUENCE) \ FN(TCP_RFC7323_PAWS) \ FN(TCP_TOO_OLD_ACK) \ FN(TCP_ACK_UNSENT_DATA) \ FN(TCP_FLAGS) \ FN(TCP_OLD_ACK) \ FN(TCP_ABORT_ON_DATA) \ FN(TCP_TIMEWAIT_SOCKET) \ FN(INVALID_SYN) \ FN(MPTCP_RST_EUNSPEC) \ FN(MPTCP_RST_EMPTCP) \ FN(MPTCP_RST_ERESOURCE) \ FN(MPTCP_RST_EPROHIBIT) \ FN(MPTCP_RST_EWQ2BIG) \ FN(MPTCP_RST_EBADPERF) \ FN(MPTCP_RST_EMIDDLEBOX) \ FN(ERROR) \ FNe(MAX) /** * enum sk_rst_reason - the reasons of socket reset * * The reasons of sk reset, which are used in DCCP/TCP/MPTCP protocols. * * There are three parts in order: * 1) skb drop reasons: relying on drop reasons for such as passive reset * 2) independent reset reasons: such as active reset reasons * 3) reset reasons in MPTCP: only for MPTCP use */ enum sk_rst_reason { /* Refer to include/net/dropreason-core.h * Rely on skb drop reasons because it indicates exactly why RST * could happen. */ /** @SK_RST_REASON_NOT_SPECIFIED: reset reason is not specified */ SK_RST_REASON_NOT_SPECIFIED, /** @SK_RST_REASON_NO_SOCKET: no valid socket that can be used */ SK_RST_REASON_NO_SOCKET, /** * @SK_RST_REASON_TCP_INVALID_ACK_SEQUENCE: Not acceptable ACK SEQ * field because ack sequence is not in the window between snd_una * and snd_nxt */ SK_RST_REASON_TCP_INVALID_ACK_SEQUENCE, /** * @SK_RST_REASON_TCP_RFC7323_PAWS: PAWS check, corresponding to * LINUX_MIB_PAWSESTABREJECTED, LINUX_MIB_PAWSACTIVEREJECTED */ SK_RST_REASON_TCP_RFC7323_PAWS, /** @SK_RST_REASON_TCP_TOO_OLD_ACK: TCP ACK is too old */ SK_RST_REASON_TCP_TOO_OLD_ACK, /** * @SK_RST_REASON_TCP_ACK_UNSENT_DATA: TCP ACK for data we haven't * sent yet */ SK_RST_REASON_TCP_ACK_UNSENT_DATA, /** @SK_RST_REASON_TCP_FLAGS: TCP flags invalid */ SK_RST_REASON_TCP_FLAGS, /** @SK_RST_REASON_TCP_OLD_ACK: TCP ACK is old, but in window */ SK_RST_REASON_TCP_OLD_ACK, /** * @SK_RST_REASON_TCP_ABORT_ON_DATA: abort on data * corresponding to LINUX_MIB_TCPABORTONDATA */ SK_RST_REASON_TCP_ABORT_ON_DATA, /* Here start with the independent reasons */ /** @SK_RST_REASON_TCP_TIMEWAIT_SOCKET: happen on the timewait socket */ SK_RST_REASON_TCP_TIMEWAIT_SOCKET, /** * @SK_RST_REASON_INVALID_SYN: receive bad syn packet * RFC 793 says if the state is not CLOSED/LISTEN/SYN-SENT then * "fourth, check the SYN bit,...If the SYN is in the window it is * an error, send a reset" */ SK_RST_REASON_INVALID_SYN, /* Copy from include/uapi/linux/mptcp.h. * These reset fields will not be changed since they adhere to * RFC 8684. So do not touch them. I'm going to list each definition * of them respectively. */ /** * @SK_RST_REASON_MPTCP_RST_EUNSPEC: Unspecified error. * This is the default error; it implies that the subflow is no * longer available. The presence of this option shows that the * RST was generated by an MPTCP-aware device. */ SK_RST_REASON_MPTCP_RST_EUNSPEC, /** * @SK_RST_REASON_MPTCP_RST_EMPTCP: MPTCP-specific error. * An error has been detected in the processing of MPTCP options. * This is the usual reason code to return in the cases where a RST * is being sent to close a subflow because of an invalid response. */ SK_RST_REASON_MPTCP_RST_EMPTCP, /** * @SK_RST_REASON_MPTCP_RST_ERESOURCE: Lack of resources. * This code indicates that the sending host does not have enough * resources to support the terminated subflow. */ SK_RST_REASON_MPTCP_RST_ERESOURCE, /** * @SK_RST_REASON_MPTCP_RST_EPROHIBIT: Administratively prohibited. * This code indicates that the requested subflow is prohibited by * the policies of the sending host. */ SK_RST_REASON_MPTCP_RST_EPROHIBIT, /** * @SK_RST_REASON_MPTCP_RST_EWQ2BIG: Too much outstanding data. * This code indicates that there is an excessive amount of data * that needs to be transmitted over the terminated subflow while * having already been acknowledged over one or more other subflows. * This may occur if a path has been unavailable for a short period * and it is more efficient to reset and start again than it is to * retransmit the queued data. */ SK_RST_REASON_MPTCP_RST_EWQ2BIG, /** * @SK_RST_REASON_MPTCP_RST_EBADPERF: Unacceptable performance. * This code indicates that the performance of this subflow was * too low compared to the other subflows of this Multipath TCP * connection. */ SK_RST_REASON_MPTCP_RST_EBADPERF, /** * @SK_RST_REASON_MPTCP_RST_EMIDDLEBOX: Middlebox interference. * Middlebox interference has been detected over this subflow, * making MPTCP signaling invalid. For example, this may be sent * if the checksum does not validate. */ SK_RST_REASON_MPTCP_RST_EMIDDLEBOX, /** @SK_RST_REASON_ERROR: unexpected error happens */ SK_RST_REASON_ERROR, /** * @SK_RST_REASON_MAX: Maximum of socket reset reasons. * It shouldn't be used as a real 'reason'. */ SK_RST_REASON_MAX, }; /* Convert skb drop reasons to enum sk_rst_reason type */ static inline enum sk_rst_reason sk_rst_convert_drop_reason(enum skb_drop_reason reason) { switch (reason) { case SKB_DROP_REASON_NOT_SPECIFIED: return SK_RST_REASON_NOT_SPECIFIED; case SKB_DROP_REASON_NO_SOCKET: return SK_RST_REASON_NO_SOCKET; case SKB_DROP_REASON_TCP_INVALID_ACK_SEQUENCE: return SK_RST_REASON_TCP_INVALID_ACK_SEQUENCE; case SKB_DROP_REASON_TCP_RFC7323_PAWS: return SK_RST_REASON_TCP_RFC7323_PAWS; case SKB_DROP_REASON_TCP_TOO_OLD_ACK: return SK_RST_REASON_TCP_TOO_OLD_ACK; case SKB_DROP_REASON_TCP_ACK_UNSENT_DATA: return SK_RST_REASON_TCP_ACK_UNSENT_DATA; case SKB_DROP_REASON_TCP_FLAGS: return SK_RST_REASON_TCP_FLAGS; case SKB_DROP_REASON_TCP_OLD_ACK: return SK_RST_REASON_TCP_OLD_ACK; case SKB_DROP_REASON_TCP_ABORT_ON_DATA: return SK_RST_REASON_TCP_ABORT_ON_DATA; default: /* If we don't have our own corresponding reason */ return SK_RST_REASON_NOT_SPECIFIED; } } #endif
[+]
..
[-] ipcomp.h
[edit]
[-] mac80211.h
[edit]
[-] switchdev.h
[edit]
[-] psample.h
[edit]
[-] xdp_sock.h
[edit]
[-] xdp.h
[edit]
[-] llc_c_ac.h
[edit]
[-] af_ieee802154.h
[edit]
[-] hwbm.h
[edit]
[-] netrom.h
[edit]
[-] af_rxrpc.h
[edit]
[-] xsk_buff_pool.h
[edit]
[-] bonding.h
[edit]
[+]
page_pool
[-] nl802154.h
[edit]
[-] fq_impl.h
[edit]
[-] dropreason-core.h
[edit]
[-] rsi_91x.h
[edit]
[+]
netfilter
[-] codel_impl.h
[edit]
[-] calipso.h
[edit]
[-] llc_sap.h
[edit]
[+]
caif
[-] xdp_priv.h
[edit]
[-] af_unix.h
[edit]
[-] rtnetlink.h
[edit]
[-] inet_common.h
[edit]
[-] if_inet6.h
[edit]
[-] ah.h
[edit]
[-] netevent.h
[edit]
[-] pkt_sched.h
[edit]
[-] route.h
[edit]
[-] ieee80211_radiotap.h
[edit]
[-] bond_options.h
[edit]
[-] l3mdev.h
[edit]
[-] devlink.h
[edit]
[-] fib_notifier.h
[edit]
[-] seg6.h
[edit]
[-] codel.h
[edit]
[-] act_api.h
[edit]
[-] inet6_hashtables.h
[edit]
[-] rstreason.h
[edit]
[-] ipconfig.h
[edit]
[-] pkt_cls.h
[edit]
[-] rawv6.h
[edit]
[-] ip.h
[edit]
[-] udplite.h
[edit]
[-] fq.h
[edit]
[-] dsa.h
[edit]
[-] gro.h
[edit]
[-] llc_c_ev.h
[edit]
[+]
netns
[-] timewait_sock.h
[edit]
[-] espintcp.h
[edit]
[-] llc_s_st.h
[edit]
[-] dst_metadata.h
[edit]
[-] wext.h
[edit]
[-] sock_reuseport.h
[edit]
[-] net_debug.h
[edit]
[+]
9p
[-] rtnh.h
[edit]
[-] tcp_states.h
[edit]
[-] inetpeer.h
[edit]
[-] flow_offload.h
[edit]
[-] x25.h
[edit]
[-] ieee802154_netdev.h
[edit]
[-] psnap.h
[edit]
[-] secure_seq.h
[edit]
[-] netlink.h
[edit]
[-] ipx.h
[edit]
[-] Space.h
[edit]
[-] eee.h
[edit]
[-] dn_dev.h
[edit]
[-] nsh.h
[edit]
[-] dsfield.h
[edit]
[-] mpls_iptunnel.h
[edit]
[-] datalink.h
[edit]
[-] llc_c_st.h
[edit]
[+]
nfc
[-] dst_cache.h
[edit]
[-] dn_route.h
[edit]
[-] mpls.h
[edit]
[-] xfrm.h
[edit]
[-] rose.h
[edit]
[-] vxlan.h
[edit]
[+]
bluetooth
[-] kcm.h
[edit]
[-] geneve.h
[edit]
[-] tun_proto.h
[edit]
[-] ipv6_frag.h
[edit]
[+]
mana
[-] fib_rules.h
[edit]
[-] udp_tunnel.h
[edit]
[-] rps.h
[edit]
[-] x25device.h
[edit]
[-] gue.h
[edit]
[-] busy_poll.h
[edit]
[-] tc_wrapper.h
[edit]
[-] ip6_route.h
[edit]
[-] icmp.h
[edit]
[-] bond_3ad.h
[edit]
[-] tls_prot.h
[edit]
[-] sock.h
[edit]
[-] ax88796.h
[edit]
[-] mrp.h
[edit]
[-] ip6_fib.h
[edit]
[-] red.h
[edit]
[-] ila.h
[edit]
[-] ip6_tunnel.h
[edit]
[-] pie.h
[edit]
[-] dropreason.h
[edit]
[-] ethoc.h
[edit]
[+]
tc_act
[-] bpf_sk_storage.h
[edit]
[-] dcbevent.h
[edit]
[-] regulatory.h
[edit]
[-] tls_toe.h
[edit]
[-] lapb.h
[edit]
[-] codel_qdisc.h
[edit]
[-] dn_fib.h
[edit]
[-] gtp.h
[edit]
[-] strparser.h
[edit]
[-] gre.h
[edit]
[-] ndisc.h
[edit]
[-] dn_nsp.h
[edit]
[-] ax25.h
[edit]
[-] inet_connection_sock.h
[edit]
[-] neighbour.h
[edit]
[-] af_vsock.h
[edit]
[-] seg6_local.h
[edit]
[-] llc_conn.h
[edit]
[-] llc.h
[edit]
[-] tls.h
[edit]
[-] pptp.h
[edit]
[+]
libeth
[-] failover.h
[edit]
[-] dst_ops.h
[edit]
[-] inet_dscp.h
[edit]
[-] dsa_stubs.h
[edit]
[-] mac802154.h
[edit]
[-] p8022.h
[edit]
[-] gro_cells.h
[edit]
[-] request_sock.h
[edit]
[-] atmclip.h
[edit]
[-] net_ratelimit.h
[edit]
[-] firewire.h
[edit]
[-] dst.h
[edit]
[-] tcx.h
[edit]
[-] rpl.h
[edit]
[-] tipc.h
[edit]
[-] ip_fib.h
[edit]
[-] snmp.h
[edit]
[-] tcp.h
[edit]
[+]
iucv
[-] nexthop.h
[edit]
[-] mptcp.h
[edit]
[-] netdev_queues.h
[edit]
[-] protocol.h
[edit]
[+]
sctp
[-] fou.h
[edit]
[-] inet_sock.h
[edit]
[-] bond_alb.h
[edit]
[-] ipv6.h
[edit]
[-] net_trackers.h
[edit]
[-] 6lowpan.h
[edit]
[-] mld.h
[edit]
[-] raw.h
[edit]
[-] netdev_rx_queue.h
[edit]
[-] garp.h
[edit]
[-] cfg80211-wext.h
[edit]
[-] checksum.h
[edit]
[-] llc_pdu.h
[edit]
[-] cfg80211.h
[edit]
[-] dn.h
[edit]
[-] udp.h
[edit]
[-] stp.h
[edit]
[-] flow.h
[edit]
[-] handshake.h
[edit]
[-] transp_v6.h
[edit]
[-] llc_s_ac.h
[edit]
[-] ip_vs.h
[edit]
[-] mip6.h
[edit]
[-] sch_generic.h
[edit]
[-] ip_tunnels.h
[edit]
[-] smc.h
[edit]
[-] xdp_sock_drv.h
[edit]
[-] inet6_connection_sock.h
[edit]
[-] dn_neigh.h
[edit]
[-] cipso_ipv4.h
[edit]
[-] vsock_addr.h
[edit]
[-] dcbnl.h
[edit]
[-] ife.h
[edit]
[-] lwtunnel.h
[edit]
[-] netlabel.h
[edit]
[-] compat.h
[edit]
[-] gen_stats.h
[edit]
[-] genetlink.h
[edit]
[-] net_shaper.h
[edit]
[-] inet_timewait_sock.h
[edit]
[-] cls_cgroup.h
[edit]
[-] llc_if.h
[edit]
[+]
phonet
[-] erspan.h
[edit]
[-] inet_frag.h
[edit]
[-] inet_ecn.h
[edit]
[-] bareudp.h
[edit]
[-] slhc_vj.h
[edit]
[-] seg6_hmac.h
[edit]
[-] inet_hashtables.h
[edit]
[-] llc_s_ev.h
[edit]
[-] gso.h
[edit]
[-] net_failover.h
[edit]
[-] iw_handler.h
[edit]
[-] selftests.h
[edit]
[-] addrconf.h
[edit]
[-] lag.h
[edit]
[-] esp.h
[edit]
[-] ping.h
[edit]
[-] net_namespace.h
[edit]
[-] ip6_checksum.h
[edit]
[-] macsec.h
[edit]
[-] scm.h
[edit]
[-] arp.h
[edit]
[-] tso.h
[edit]
[-] netprio_cgroup.h
[edit]
[-] ipv6_stubs.h
[edit]
[-] flow_dissector.h
[edit]
[-] cfg802154.h
[edit]
[-] ncsi.h
[edit]