mirror of
https://github.com/ziglang/zig.git
synced 2025-02-08 13:40:30 +00:00
Add tpacket_hdr and tpacket_block variant unions
This commit is contained in:
parent
1950e52c6c
commit
6f24c4485c
@ -6915,9 +6915,7 @@ pub const TP_STATUS = extern union {
|
||||
},
|
||||
};
|
||||
|
||||
pub const tpacket_block_desc = extern struct {
|
||||
version: u32,
|
||||
offset_to_priv: u32,
|
||||
pub const tpacket_hdr_v1 = extern struct {
|
||||
block_status: TP_STATUS,
|
||||
num_pkts: u32,
|
||||
offset_to_first_pkt: u32,
|
||||
@ -6927,6 +6925,27 @@ pub const tpacket_block_desc = extern struct {
|
||||
ts_last_pkt: tpacket_bd_ts,
|
||||
};
|
||||
|
||||
pub const tpacket_bd_header_u = extern union {
|
||||
bh1: tpacket_hdr_v1,
|
||||
};
|
||||
|
||||
pub const tpacket_block_desc = extern struct {
|
||||
version: u32,
|
||||
offset_to_priv: u32,
|
||||
hdr: tpacket_bd_header_u,
|
||||
};
|
||||
|
||||
pub const tpacket_hdr_variant1 = extern struct {
|
||||
rxhash: u32,
|
||||
vlan_tci: u32,
|
||||
vlan_tpid: u16,
|
||||
padding: u16,
|
||||
};
|
||||
|
||||
pub const tpacket3_hdr_variants = extern union {
|
||||
hv1: tpacket_hdr_variant1,
|
||||
};
|
||||
|
||||
pub const tpacket3_hdr = extern struct {
|
||||
next_offset: u32,
|
||||
sec: u32,
|
||||
@ -6936,10 +6955,8 @@ pub const tpacket3_hdr = extern struct {
|
||||
status: u32,
|
||||
mac: u16,
|
||||
net: u16,
|
||||
rxhash: u32,
|
||||
vlan_tci: u32,
|
||||
vlan_tpid: u16,
|
||||
padding: [10]u8,
|
||||
variant: tpacket3_hdr_variants,
|
||||
padding: [8]u8,
|
||||
};
|
||||
|
||||
pub const tpacket_stats_v3 = extern struct {
|
||||
|
Loading…
Reference in New Issue
Block a user