tools/include/uapi/linux/if_link.h
Source file repositories/reference/linux-study-clean/tools/include/uapi/linux/if_link.h
File Facts
- System
- Linux kernel
- Corpus path
tools/include/uapi/linux/if_link.h- Extension
.h- Size
- 56064 bytes
- Lines
- 1983
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/netlink.h
Detected Declarations
struct rtnl_link_statsstruct rtnl_link_stats64struct rtnl_hw_stats64struct rtnl_link_ifmapstruct ifla_bridge_idstruct ifla_cacheinfostruct ifla_vlan_flagsstruct ifla_vlan_qos_mappingstruct tunnel_msgstruct ifla_vxlan_port_rangestruct ifla_vf_macstruct ifla_vf_broadcaststruct ifla_vf_vlanstruct ifla_vf_vlan_infostruct ifla_vf_tx_ratestruct ifla_vf_ratestruct ifla_vf_spoofchkstruct ifla_vf_guidstruct ifla_vf_link_statestruct ifla_vf_rss_query_enstruct ifla_vf_truststruct ifla_port_vsistruct if_stats_msgstruct ifla_rmnet_flagsenum in6_addr_gen_modeenum macvlan_modeenum macvlan_macaddr_modeenum macsec_validation_typeenum macsec_offloadenum ipvlan_modeenum netkit_actionenum netkit_modeenum netkit_scrubenum ifla_vxlan_dfenum ifla_vxlan_label_policyenum ifla_geneve_dfenum ifla_gtp_role
Annotated Snippet
struct rtnl_link_stats {
__u32 rx_packets;
__u32 tx_packets;
__u32 rx_bytes;
__u32 tx_bytes;
__u32 rx_errors;
__u32 tx_errors;
__u32 rx_dropped;
__u32 tx_dropped;
__u32 multicast;
__u32 collisions;
/* detailed rx_errors: */
__u32 rx_length_errors;
__u32 rx_over_errors;
__u32 rx_crc_errors;
__u32 rx_frame_errors;
__u32 rx_fifo_errors;
__u32 rx_missed_errors;
/* detailed tx_errors */
__u32 tx_aborted_errors;
__u32 tx_carrier_errors;
__u32 tx_fifo_errors;
__u32 tx_heartbeat_errors;
__u32 tx_window_errors;
/* for cslip etc */
__u32 rx_compressed;
__u32 tx_compressed;
__u32 rx_nohandler;
};
/**
* struct rtnl_link_stats64 - The main device statistics structure.
*
* @rx_packets: Number of good packets received by the interface.
* For hardware interfaces counts all good packets received from the device
* by the host, including packets which host had to drop at various stages
* of processing (even in the driver).
*
* @tx_packets: Number of packets successfully transmitted.
* For hardware interfaces counts packets which host was able to successfully
* hand over to the device, which does not necessarily mean that packets
* had been successfully transmitted out of the device, only that device
* acknowledged it copied them out of host memory.
*
* @rx_bytes: Number of good received bytes, corresponding to @rx_packets.
*
* For IEEE 802.3 devices should count the length of Ethernet Frames
* excluding the FCS.
*
* @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets.
*
* For IEEE 802.3 devices should count the length of Ethernet Frames
* excluding the FCS.
*
* @rx_errors: Total number of bad packets received on this network device.
* This counter must include events counted by @rx_length_errors,
* @rx_crc_errors, @rx_frame_errors and other errors not otherwise
* counted.
*
* @tx_errors: Total number of transmit problems.
* This counter must include events counter by @tx_aborted_errors,
* @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors,
* @tx_window_errors and other errors not otherwise counted.
*
* @rx_dropped: Number of packets received but not processed,
* e.g. due to lack of resources or unsupported protocol.
* For hardware interfaces this counter may include packets discarded
* due to L2 address filtering but should not include packets dropped
* by the device due to buffer exhaustion which are counted separately in
* @rx_missed_errors (since procfs folds those two counters together).
*
* @tx_dropped: Number of packets dropped on their way to transmission,
* e.g. due to lack of resources.
*
* @multicast: Multicast packets received.
* For hardware interfaces this statistic is commonly calculated
* at the device level (unlike @rx_packets) and therefore may include
* packets which did not reach the host.
*
* For IEEE 802.3 devices this counter may be equivalent to:
*
* - 30.3.1.1.21 aMulticastFramesReceivedOK
*
* @collisions: Number of collisions during packet transmissions.
*
* @rx_length_errors: Number of packets dropped due to invalid length.
* Part of aggregate "frame" errors in `/proc/net/dev`.
Annotation
- Immediate include surface: `linux/types.h`, `linux/netlink.h`.
- Detected declarations: `struct rtnl_link_stats`, `struct rtnl_link_stats64`, `struct rtnl_hw_stats64`, `struct rtnl_link_ifmap`, `struct ifla_bridge_id`, `struct ifla_cacheinfo`, `struct ifla_vlan_flags`, `struct ifla_vlan_qos_mapping`, `struct tunnel_msg`, `struct ifla_vxlan_port_range`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.