include/uapi/linux/batadv_packet.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/batadv_packet.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/batadv_packet.h- Extension
.h- Size
- 21802 bytes
- Lines
- 670
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/byteorder.hlinux/if_ether.hlinux/stddef.hlinux/types.h
Detected Declarations
struct batadv_bla_claim_dststruct batadv_ogm_packetstruct batadv_ogm2_packetstruct batadv_elp_packetstruct batadv_icmp_headerstruct batadv_icmp_packetstruct batadv_icmp_tp_packetstruct batadv_icmp_packet_rrstruct batadv_unicast_packetstruct batadv_unicast_4addr_packetstruct batadv_frag_packetstruct batadv_bcast_packetstruct batadv_mcast_packetstruct batadv_coded_packetstruct batadv_unicast_tvlv_packetstruct batadv_tvlv_hdrstruct batadv_tvlv_gateway_datastruct batadv_tvlv_tt_vlan_datastruct batadv_tvlv_tt_datastruct batadv_tvlv_tt_changestruct batadv_tvlv_roam_advstruct batadv_tvlv_mcast_datastruct batadv_tvlv_mcast_trackerenum batadv_packettypeenum batadv_subtypeenum batadv_iv_flagsenum batadv_icmp_packettypeenum batadv_mcast_flagsenum batadv_tt_data_flagsenum batadv_vlan_flagsenum batadv_bla_claimframeenum batadv_tvlv_typeenum batadv_icmp_tp_subtype
Annotated Snippet
struct batadv_bla_claim_dst {
__u8 magic[3]; /* FF:43:05 */
__u8 type; /* bla_claimframe */
__be16 group; /* group id */
};
/**
* struct batadv_ogm_packet - ogm (routing protocol) packet
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
* @flags: contains routing relevant flags - see enum batadv_iv_flags
* @seqno: sequence identification
* @orig: address of the source node
* @prev_sender: address of the previous sender
* @reserved: reserved byte for alignment
* @tq: transmission quality
* @tvlv_len: length of tvlv data following the ogm header
*/
struct batadv_ogm_packet {
__u8 packet_type;
__u8 version;
__u8 ttl;
__u8 flags;
__be32 seqno;
__u8 orig[ETH_ALEN];
__u8 prev_sender[ETH_ALEN];
__u8 reserved;
__u8 tq;
__be16 tvlv_len;
};
#define BATADV_OGM_HLEN sizeof(struct batadv_ogm_packet)
/**
* struct batadv_ogm2_packet - ogm2 (routing protocol) packet
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
* @flags: reserved for routing relevant flags - currently always 0
* @seqno: sequence number
* @orig: originator mac address
* @tvlv_len: length of the appended tvlv buffer (in bytes)
* @throughput: the currently flooded path throughput
*/
struct batadv_ogm2_packet {
__u8 packet_type;
__u8 version;
__u8 ttl;
__u8 flags;
__be32 seqno;
__u8 orig[ETH_ALEN];
__be16 tvlv_len;
__be32 throughput;
};
#define BATADV_OGM2_HLEN sizeof(struct batadv_ogm2_packet)
/**
* struct batadv_elp_packet - elp (neighbor discovery) packet
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @orig: originator mac address
* @seqno: sequence number
* @elp_interval: currently used ELP sending interval in ms
*/
struct batadv_elp_packet {
__u8 packet_type;
__u8 version;
__u8 orig[ETH_ALEN];
__be32 seqno;
__be32 elp_interval;
};
#define BATADV_ELP_HLEN sizeof(struct batadv_elp_packet)
/**
* struct batadv_icmp_header - common members among all the ICMP packets
* @packet_type: batman-adv packet type, part of the general header
* @version: batman-adv protocol version, part of the general header
* @ttl: time to live for this packet, part of the general header
* @msg_type: ICMP packet type
* @dst: address of the destination node
* @orig: address of the source node
* @uid: local ICMP socket identifier
* @align: not used - useful for alignment purposes only
*
* This structure is used for ICMP packet parsing only and it is never sent
* over the wire. The alignment field at the end is there to ensure that
* members are padded the same way as they are in real packets.
Annotation
- Immediate include surface: `asm/byteorder.h`, `linux/if_ether.h`, `linux/stddef.h`, `linux/types.h`.
- Detected declarations: `struct batadv_bla_claim_dst`, `struct batadv_ogm_packet`, `struct batadv_ogm2_packet`, `struct batadv_elp_packet`, `struct batadv_icmp_header`, `struct batadv_icmp_packet`, `struct batadv_icmp_tp_packet`, `struct batadv_icmp_packet_rr`, `struct batadv_unicast_packet`, `struct batadv_unicast_4addr_packet`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.