me.bechberger.ebpf.bpf.raw.bpf_attr Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rawbpf Show documentation
Show all versions of rawbpf Show documentation
Raw Panama bindings for libbpf generated for jextract on 64-bit Linux
The newest version!
// Generated by jextract
package me.bechberger.ebpf.bpf.raw;
import java.lang.invoke.*;
import java.lang.foreign.*;
import java.nio.ByteOrder;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.MemoryLayout.PathElement.*;
/**
* {@snippet lang=c :
* union bpf_attr {
* struct {
* __u32 map_type;
* __u32 key_size;
* __u32 value_size;
* __u32 max_entries;
* __u32 map_flags;
* __u32 inner_map_fd;
* __u32 numa_node;
* char map_name[16];
* __u32 map_ifindex;
* __u32 btf_fd;
* __u32 btf_key_type_id;
* __u32 btf_value_type_id;
* __u32 btf_vmlinux_value_type_id;
* __u64 map_extra;
* __s32 value_type_btf_obj_fd;
* __s32 map_token_fd;
* };
* struct {
* __u32 map_fd;
* __u64 key;
* union {
* __u64 value;
* __u64 next_key;
* };
* __u64 flags;
* };
* struct {
* __u64 in_batch;
* __u64 out_batch;
* __u64 keys;
* __u64 values;
* __u32 count;
* __u32 map_fd;
* __u64 elem_flags;
* __u64 flags;
* } batch;
* struct {
* __u32 prog_type;
* __u32 insn_cnt;
* __u64 insns;
* __u64 license;
* __u32 log_level;
* __u32 log_size;
* __u64 log_buf;
* __u32 kern_version;
* __u32 prog_flags;
* char prog_name[16];
* __u32 prog_ifindex;
* __u32 expected_attach_type;
* __u32 prog_btf_fd;
* __u32 func_info_rec_size;
* __u64 func_info;
* __u32 func_info_cnt;
* __u32 line_info_rec_size;
* __u64 line_info;
* __u32 line_info_cnt;
* __u32 attach_btf_id;
* union {
* __u32 attach_prog_fd;
* __u32 attach_btf_obj_fd;
* };
* __u32 core_relo_cnt;
* __u64 fd_array;
* __u64 core_relos;
* __u32 core_relo_rec_size;
* __u32 log_true_size;
* __s32 prog_token_fd;
* };
* struct {
* __u64 pathname;
* __u32 bpf_fd;
* __u32 file_flags;
* __s32 path_fd;
* };
* struct {
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_bpf_fd;
* __u32 attach_type;
* __u32 attach_flags;
* __u32 replace_bpf_fd;
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* };
* struct {
* __u32 prog_fd;
* __u32 retval;
* __u32 data_size_in;
* __u32 data_size_out;
* __u64 data_in;
* __u64 data_out;
* __u32 repeat;
* __u32 duration;
* __u32 ctx_size_in;
* __u32 ctx_size_out;
* __u64 ctx_in;
* __u64 ctx_out;
* __u32 flags;
* __u32 cpu;
* __u32 batch_size;
* } test;
* struct {
* union {
* __u32 start_id;
* __u32 prog_id;
* __u32 map_id;
* __u32 btf_id;
* __u32 link_id;
* };
* __u32 next_id;
* __u32 open_flags;
* };
* struct {
* __u32 bpf_fd;
* __u32 info_len;
* __u64 info;
* } info;
* struct {
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 query_flags;
* __u32 attach_flags;
* __u64 prog_ids;
* union {
* __u32 prog_cnt;
* __u32 count;
* };
* __u32 : 32;
* __u64 prog_attach_flags;
* __u64 link_ids;
* __u64 link_attach_flags;
* __u64 revision;
* } query;
* struct {
* __u64 name;
* __u32 prog_fd;
* __u32 : 32;
* __u64 cookie;
* } raw_tracepoint;
* struct {
* __u64 btf;
* __u64 btf_log_buf;
* __u32 btf_size;
* __u32 btf_log_size;
* __u32 btf_log_level;
* __u32 btf_log_true_size;
* __u32 btf_flags;
* __s32 btf_token_fd;
* };
* struct {
* __u32 pid;
* __u32 fd;
* __u32 flags;
* __u32 buf_len;
* __u64 buf;
* __u32 prog_id;
* __u32 fd_type;
* __u64 probe_offset;
* __u64 probe_addr;
* } task_fd_query;
* struct {
* union {
* __u32 prog_fd;
* __u32 map_fd;
* };
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 flags;
* union {
* __u32 target_btf_id;
* struct {
* __u64 iter_info;
* __u32 iter_info_len;
* };
* struct {
* __u64 bpf_cookie;
* } perf_event;
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi;
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing;
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx;
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit;
* };
* } link_create;
* struct {
* __u32 link_fd;
* union {
* __u32 new_prog_fd;
* __u32 new_map_fd;
* };
* __u32 flags;
* union {
* __u32 old_prog_fd;
* __u32 old_map_fd;
* };
* } link_update;
* struct {
* __u32 link_fd;
* } link_detach;
* struct {
* __u32 type;
* } enable_stats;
* struct {
* __u32 link_fd;
* __u32 flags;
* } iter_create;
* struct {
* __u32 prog_fd;
* __u32 map_fd;
* __u32 flags;
* } prog_bind_map;
* struct {
* __u32 flags;
* __u32 bpffs_fd;
* } token_create;
* }
* }
*/
public class bpf_attr {
bpf_attr() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.unionLayout(
MemoryLayout.structLayout(
Lib.C_INT.withName("map_type"),
Lib.C_INT.withName("key_size"),
Lib.C_INT.withName("value_size"),
Lib.C_INT.withName("max_entries"),
Lib.C_INT.withName("map_flags"),
Lib.C_INT.withName("inner_map_fd"),
Lib.C_INT.withName("numa_node"),
MemoryLayout.sequenceLayout(16, Lib.C_CHAR).withName("map_name"),
Lib.C_INT.withName("map_ifindex"),
Lib.C_INT.withName("btf_fd"),
Lib.C_INT.withName("btf_key_type_id"),
Lib.C_INT.withName("btf_value_type_id"),
Lib.C_INT.withName("btf_vmlinux_value_type_id"),
Lib.C_LONG_LONG.withName("map_extra"),
Lib.C_INT.withName("value_type_btf_obj_fd"),
Lib.C_INT.withName("map_token_fd")
).withName("$anon$1457:2"),
MemoryLayout.structLayout(
Lib.C_INT.withName("map_fd"),
MemoryLayout.paddingLayout(4),
Lib.C_LONG_LONG.withName("key"),
MemoryLayout.unionLayout(
Lib.C_LONG_LONG.withName("value"),
Lib.C_LONG_LONG.withName("next_key")
).withName("$anon$1502:3"),
Lib.C_LONG_LONG.withName("flags")
).withName("$anon$1499:2"),
bpf_attr.batch.layout().withName("batch"),
MemoryLayout.structLayout(
Lib.C_INT.withName("prog_type"),
Lib.C_INT.withName("insn_cnt"),
Lib.C_LONG_LONG.withName("insns"),
Lib.C_LONG_LONG.withName("license"),
Lib.C_INT.withName("log_level"),
Lib.C_INT.withName("log_size"),
Lib.C_LONG_LONG.withName("log_buf"),
Lib.C_INT.withName("kern_version"),
Lib.C_INT.withName("prog_flags"),
MemoryLayout.sequenceLayout(16, Lib.C_CHAR).withName("prog_name"),
Lib.C_INT.withName("prog_ifindex"),
Lib.C_INT.withName("expected_attach_type"),
Lib.C_INT.withName("prog_btf_fd"),
Lib.C_INT.withName("func_info_rec_size"),
Lib.C_LONG_LONG.withName("func_info"),
Lib.C_INT.withName("func_info_cnt"),
Lib.C_INT.withName("line_info_rec_size"),
Lib.C_LONG_LONG.withName("line_info"),
Lib.C_INT.withName("line_info_cnt"),
Lib.C_INT.withName("attach_btf_id"),
MemoryLayout.unionLayout(
Lib.C_INT.withName("attach_prog_fd"),
Lib.C_INT.withName("attach_btf_obj_fd")
).withName("$anon$1551:3"),
Lib.C_INT.withName("core_relo_cnt"),
Lib.C_LONG_LONG.withName("fd_array"),
Lib.C_LONG_LONG.withName("core_relos"),
Lib.C_INT.withName("core_relo_rec_size"),
Lib.C_INT.withName("log_true_size"),
Lib.C_INT.withName("prog_token_fd"),
MemoryLayout.paddingLayout(4)
).withName("$anon$1526:2"),
MemoryLayout.structLayout(
Lib.C_LONG_LONG.withName("pathname"),
Lib.C_INT.withName("bpf_fd"),
Lib.C_INT.withName("file_flags"),
Lib.C_INT.withName("path_fd"),
MemoryLayout.paddingLayout(4)
).withName("$anon$1572:2"),
MemoryLayout.structLayout(
MemoryLayout.unionLayout(
Lib.C_INT.withName("target_fd"),
Lib.C_INT.withName("target_ifindex")
).withName("$anon$1586:3"),
Lib.C_INT.withName("attach_bpf_fd"),
Lib.C_INT.withName("attach_type"),
Lib.C_INT.withName("attach_flags"),
Lib.C_INT.withName("replace_bpf_fd"),
MemoryLayout.unionLayout(
Lib.C_INT.withName("relative_fd"),
Lib.C_INT.withName("relative_id")
).withName("$anon$1594:3"),
Lib.C_LONG_LONG.withName("expected_revision")
).withName("$anon$1585:2"),
bpf_attr.test.layout().withName("test"),
MemoryLayout.structLayout(
MemoryLayout.unionLayout(
Lib.C_INT.withName("start_id"),
Lib.C_INT.withName("prog_id"),
Lib.C_INT.withName("map_id"),
Lib.C_INT.withName("btf_id"),
Lib.C_INT.withName("link_id")
).withName("$anon$1626:3"),
Lib.C_INT.withName("next_id"),
Lib.C_INT.withName("open_flags")
).withName("$anon$1625:2"),
bpf_attr.info.layout().withName("info"),
bpf_attr.query.layout().withName("query"),
bpf_attr.raw_tracepoint.layout().withName("raw_tracepoint"),
MemoryLayout.structLayout(
Lib.C_LONG_LONG.withName("btf"),
Lib.C_LONG_LONG.withName("btf_log_buf"),
Lib.C_INT.withName("btf_size"),
Lib.C_INT.withName("btf_log_size"),
Lib.C_INT.withName("btf_log_level"),
Lib.C_INT.withName("btf_log_true_size"),
Lib.C_INT.withName("btf_flags"),
Lib.C_INT.withName("btf_token_fd")
).withName("$anon$1673:2"),
bpf_attr.task_fd_query.layout().withName("task_fd_query"),
bpf_attr.link_create.layout().withName("link_create"),
bpf_attr.link_update.layout().withName("link_update"),
bpf_attr.link_detach.layout().withName("link_detach"),
bpf_attr.enable_stats.layout().withName("enable_stats"),
bpf_attr.iter_create.layout().withName("iter_create"),
bpf_attr.prog_bind_map.layout().withName("prog_bind_map"),
bpf_attr.token_create.layout().withName("token_create")
).withName("bpf_attr");
/**
* The layout of this union
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt map_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("map_type"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 map_type
* }
*/
public static final OfInt map_type$layout() {
return map_type$LAYOUT;
}
private static final long map_type$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 map_type
* }
*/
public static final long map_type$offset() {
return map_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 map_type
* }
*/
public static int map_type(MemorySegment union) {
return union.get(map_type$LAYOUT, map_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 map_type
* }
*/
public static void map_type(MemorySegment union, int fieldValue) {
union.set(map_type$LAYOUT, map_type$OFFSET, fieldValue);
}
private static final OfInt key_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("key_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 key_size
* }
*/
public static final OfInt key_size$layout() {
return key_size$LAYOUT;
}
private static final long key_size$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 key_size
* }
*/
public static final long key_size$offset() {
return key_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 key_size
* }
*/
public static int key_size(MemorySegment union) {
return union.get(key_size$LAYOUT, key_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 key_size
* }
*/
public static void key_size(MemorySegment union, int fieldValue) {
union.set(key_size$LAYOUT, key_size$OFFSET, fieldValue);
}
private static final OfInt value_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("value_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 value_size
* }
*/
public static final OfInt value_size$layout() {
return value_size$LAYOUT;
}
private static final long value_size$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 value_size
* }
*/
public static final long value_size$offset() {
return value_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 value_size
* }
*/
public static int value_size(MemorySegment union) {
return union.get(value_size$LAYOUT, value_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 value_size
* }
*/
public static void value_size(MemorySegment union, int fieldValue) {
union.set(value_size$LAYOUT, value_size$OFFSET, fieldValue);
}
private static final OfInt max_entries$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("max_entries"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 max_entries
* }
*/
public static final OfInt max_entries$layout() {
return max_entries$LAYOUT;
}
private static final long max_entries$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 max_entries
* }
*/
public static final long max_entries$offset() {
return max_entries$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 max_entries
* }
*/
public static int max_entries(MemorySegment union) {
return union.get(max_entries$LAYOUT, max_entries$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 max_entries
* }
*/
public static void max_entries(MemorySegment union, int fieldValue) {
union.set(max_entries$LAYOUT, max_entries$OFFSET, fieldValue);
}
private static final OfInt map_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("map_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 map_flags
* }
*/
public static final OfInt map_flags$layout() {
return map_flags$LAYOUT;
}
private static final long map_flags$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 map_flags
* }
*/
public static final long map_flags$offset() {
return map_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 map_flags
* }
*/
public static int map_flags(MemorySegment union) {
return union.get(map_flags$LAYOUT, map_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 map_flags
* }
*/
public static void map_flags(MemorySegment union, int fieldValue) {
union.set(map_flags$LAYOUT, map_flags$OFFSET, fieldValue);
}
private static final OfInt inner_map_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("inner_map_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 inner_map_fd
* }
*/
public static final OfInt inner_map_fd$layout() {
return inner_map_fd$LAYOUT;
}
private static final long inner_map_fd$OFFSET = 20;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 inner_map_fd
* }
*/
public static final long inner_map_fd$offset() {
return inner_map_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 inner_map_fd
* }
*/
public static int inner_map_fd(MemorySegment union) {
return union.get(inner_map_fd$LAYOUT, inner_map_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 inner_map_fd
* }
*/
public static void inner_map_fd(MemorySegment union, int fieldValue) {
union.set(inner_map_fd$LAYOUT, inner_map_fd$OFFSET, fieldValue);
}
private static final OfInt numa_node$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("numa_node"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 numa_node
* }
*/
public static final OfInt numa_node$layout() {
return numa_node$LAYOUT;
}
private static final long numa_node$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 numa_node
* }
*/
public static final long numa_node$offset() {
return numa_node$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 numa_node
* }
*/
public static int numa_node(MemorySegment union) {
return union.get(numa_node$LAYOUT, numa_node$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 numa_node
* }
*/
public static void numa_node(MemorySegment union, int fieldValue) {
union.set(numa_node$LAYOUT, numa_node$OFFSET, fieldValue);
}
private static final SequenceLayout map_name$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("map_name"));
/**
* Layout for field:
* {@snippet lang=c :
* char map_name[16]
* }
*/
public static final SequenceLayout map_name$layout() {
return map_name$LAYOUT;
}
private static final long map_name$OFFSET = 28;
/**
* Offset for field:
* {@snippet lang=c :
* char map_name[16]
* }
*/
public static final long map_name$offset() {
return map_name$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char map_name[16]
* }
*/
public static MemorySegment map_name(MemorySegment union) {
return union.asSlice(map_name$OFFSET, map_name$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* char map_name[16]
* }
*/
public static void map_name(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, map_name$OFFSET, map_name$LAYOUT.byteSize());
}
private static long[] map_name$DIMS = { 16 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* char map_name[16]
* }
*/
public static long[] map_name$dimensions() {
return map_name$DIMS;
}
private static final VarHandle map_name$ELEM_HANDLE = map_name$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* char map_name[16]
* }
*/
public static byte map_name(MemorySegment union, long index0) {
return (byte)map_name$ELEM_HANDLE.get(union, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* char map_name[16]
* }
*/
public static void map_name(MemorySegment union, long index0, byte fieldValue) {
map_name$ELEM_HANDLE.set(union, 0L, index0, fieldValue);
}
private static final OfInt map_ifindex$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("map_ifindex"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 map_ifindex
* }
*/
public static final OfInt map_ifindex$layout() {
return map_ifindex$LAYOUT;
}
private static final long map_ifindex$OFFSET = 44;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 map_ifindex
* }
*/
public static final long map_ifindex$offset() {
return map_ifindex$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 map_ifindex
* }
*/
public static int map_ifindex(MemorySegment union) {
return union.get(map_ifindex$LAYOUT, map_ifindex$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 map_ifindex
* }
*/
public static void map_ifindex(MemorySegment union, int fieldValue) {
union.set(map_ifindex$LAYOUT, map_ifindex$OFFSET, fieldValue);
}
private static final OfInt btf_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("btf_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_fd
* }
*/
public static final OfInt btf_fd$layout() {
return btf_fd$LAYOUT;
}
private static final long btf_fd$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_fd
* }
*/
public static final long btf_fd$offset() {
return btf_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_fd
* }
*/
public static int btf_fd(MemorySegment union) {
return union.get(btf_fd$LAYOUT, btf_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_fd
* }
*/
public static void btf_fd(MemorySegment union, int fieldValue) {
union.set(btf_fd$LAYOUT, btf_fd$OFFSET, fieldValue);
}
private static final OfInt btf_key_type_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("btf_key_type_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_key_type_id
* }
*/
public static final OfInt btf_key_type_id$layout() {
return btf_key_type_id$LAYOUT;
}
private static final long btf_key_type_id$OFFSET = 52;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_key_type_id
* }
*/
public static final long btf_key_type_id$offset() {
return btf_key_type_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_key_type_id
* }
*/
public static int btf_key_type_id(MemorySegment union) {
return union.get(btf_key_type_id$LAYOUT, btf_key_type_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_key_type_id
* }
*/
public static void btf_key_type_id(MemorySegment union, int fieldValue) {
union.set(btf_key_type_id$LAYOUT, btf_key_type_id$OFFSET, fieldValue);
}
private static final OfInt btf_value_type_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("btf_value_type_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_value_type_id
* }
*/
public static final OfInt btf_value_type_id$layout() {
return btf_value_type_id$LAYOUT;
}
private static final long btf_value_type_id$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_value_type_id
* }
*/
public static final long btf_value_type_id$offset() {
return btf_value_type_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_value_type_id
* }
*/
public static int btf_value_type_id(MemorySegment union) {
return union.get(btf_value_type_id$LAYOUT, btf_value_type_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_value_type_id
* }
*/
public static void btf_value_type_id(MemorySegment union, int fieldValue) {
union.set(btf_value_type_id$LAYOUT, btf_value_type_id$OFFSET, fieldValue);
}
private static final OfInt btf_vmlinux_value_type_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("btf_vmlinux_value_type_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_vmlinux_value_type_id
* }
*/
public static final OfInt btf_vmlinux_value_type_id$layout() {
return btf_vmlinux_value_type_id$LAYOUT;
}
private static final long btf_vmlinux_value_type_id$OFFSET = 60;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_vmlinux_value_type_id
* }
*/
public static final long btf_vmlinux_value_type_id$offset() {
return btf_vmlinux_value_type_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_vmlinux_value_type_id
* }
*/
public static int btf_vmlinux_value_type_id(MemorySegment union) {
return union.get(btf_vmlinux_value_type_id$LAYOUT, btf_vmlinux_value_type_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_vmlinux_value_type_id
* }
*/
public static void btf_vmlinux_value_type_id(MemorySegment union, int fieldValue) {
union.set(btf_vmlinux_value_type_id$LAYOUT, btf_vmlinux_value_type_id$OFFSET, fieldValue);
}
private static final OfLong map_extra$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("map_extra"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 map_extra
* }
*/
public static final OfLong map_extra$layout() {
return map_extra$LAYOUT;
}
private static final long map_extra$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 map_extra
* }
*/
public static final long map_extra$offset() {
return map_extra$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 map_extra
* }
*/
public static long map_extra(MemorySegment union) {
return union.get(map_extra$LAYOUT, map_extra$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 map_extra
* }
*/
public static void map_extra(MemorySegment union, long fieldValue) {
union.set(map_extra$LAYOUT, map_extra$OFFSET, fieldValue);
}
private static final OfInt value_type_btf_obj_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("value_type_btf_obj_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __s32 value_type_btf_obj_fd
* }
*/
public static final OfInt value_type_btf_obj_fd$layout() {
return value_type_btf_obj_fd$LAYOUT;
}
private static final long value_type_btf_obj_fd$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* __s32 value_type_btf_obj_fd
* }
*/
public static final long value_type_btf_obj_fd$offset() {
return value_type_btf_obj_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __s32 value_type_btf_obj_fd
* }
*/
public static int value_type_btf_obj_fd(MemorySegment union) {
return union.get(value_type_btf_obj_fd$LAYOUT, value_type_btf_obj_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __s32 value_type_btf_obj_fd
* }
*/
public static void value_type_btf_obj_fd(MemorySegment union, int fieldValue) {
union.set(value_type_btf_obj_fd$LAYOUT, value_type_btf_obj_fd$OFFSET, fieldValue);
}
private static final OfInt map_token_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1457:2"), groupElement("map_token_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __s32 map_token_fd
* }
*/
public static final OfInt map_token_fd$layout() {
return map_token_fd$LAYOUT;
}
private static final long map_token_fd$OFFSET = 76;
/**
* Offset for field:
* {@snippet lang=c :
* __s32 map_token_fd
* }
*/
public static final long map_token_fd$offset() {
return map_token_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __s32 map_token_fd
* }
*/
public static int map_token_fd(MemorySegment union) {
return union.get(map_token_fd$LAYOUT, map_token_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __s32 map_token_fd
* }
*/
public static void map_token_fd(MemorySegment union, int fieldValue) {
union.set(map_token_fd$LAYOUT, map_token_fd$OFFSET, fieldValue);
}
private static final OfInt map_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1499:2"), groupElement("map_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static final OfInt map_fd$layout() {
return map_fd$LAYOUT;
}
private static final long map_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static final long map_fd$offset() {
return map_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static int map_fd(MemorySegment union) {
return union.get(map_fd$LAYOUT, map_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static void map_fd(MemorySegment union, int fieldValue) {
union.set(map_fd$LAYOUT, map_fd$OFFSET, fieldValue);
}
private static final OfLong key$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1499:2"), groupElement("key"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 key
* }
*/
public static final OfLong key$layout() {
return key$LAYOUT;
}
private static final long key$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 key
* }
*/
public static final long key$offset() {
return key$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 key
* }
*/
public static long key(MemorySegment union) {
return union.get(key$LAYOUT, key$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 key
* }
*/
public static void key(MemorySegment union, long fieldValue) {
union.set(key$LAYOUT, key$OFFSET, fieldValue);
}
private static final OfLong value$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1499:2"), groupElement("$anon$1502:3"), groupElement("value"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 value
* }
*/
public static final OfLong value$layout() {
return value$LAYOUT;
}
private static final long value$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 value
* }
*/
public static final long value$offset() {
return value$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 value
* }
*/
public static long value(MemorySegment union) {
return union.get(value$LAYOUT, value$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 value
* }
*/
public static void value(MemorySegment union, long fieldValue) {
union.set(value$LAYOUT, value$OFFSET, fieldValue);
}
private static final OfLong next_key$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1499:2"), groupElement("$anon$1502:3"), groupElement("next_key"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 next_key
* }
*/
public static final OfLong next_key$layout() {
return next_key$LAYOUT;
}
private static final long next_key$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 next_key
* }
*/
public static final long next_key$offset() {
return next_key$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 next_key
* }
*/
public static long next_key(MemorySegment union) {
return union.get(next_key$LAYOUT, next_key$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 next_key
* }
*/
public static void next_key(MemorySegment union, long fieldValue) {
union.set(next_key$LAYOUT, next_key$OFFSET, fieldValue);
}
private static final OfLong flags$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1499:2"), groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 flags
* }
*/
public static final OfLong flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 flags
* }
*/
public static long flags(MemorySegment union) {
return union.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 flags
* }
*/
public static void flags(MemorySegment union, long fieldValue) {
union.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* struct {
* __u64 in_batch;
* __u64 out_batch;
* __u64 keys;
* __u64 values;
* __u32 count;
* __u32 map_fd;
* __u64 elem_flags;
* __u64 flags;
* }
* }
*/
public static class batch {
batch() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_LONG_LONG.withName("in_batch"),
Lib.C_LONG_LONG.withName("out_batch"),
Lib.C_LONG_LONG.withName("keys"),
Lib.C_LONG_LONG.withName("values"),
Lib.C_INT.withName("count"),
Lib.C_INT.withName("map_fd"),
Lib.C_LONG_LONG.withName("elem_flags"),
Lib.C_LONG_LONG.withName("flags")
).withName("$anon$1509:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfLong in_batch$LAYOUT = (OfLong)$LAYOUT.select(groupElement("in_batch"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 in_batch
* }
*/
public static final OfLong in_batch$layout() {
return in_batch$LAYOUT;
}
private static final long in_batch$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 in_batch
* }
*/
public static final long in_batch$offset() {
return in_batch$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 in_batch
* }
*/
public static long in_batch(MemorySegment struct) {
return struct.get(in_batch$LAYOUT, in_batch$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 in_batch
* }
*/
public static void in_batch(MemorySegment struct, long fieldValue) {
struct.set(in_batch$LAYOUT, in_batch$OFFSET, fieldValue);
}
private static final OfLong out_batch$LAYOUT = (OfLong)$LAYOUT.select(groupElement("out_batch"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 out_batch
* }
*/
public static final OfLong out_batch$layout() {
return out_batch$LAYOUT;
}
private static final long out_batch$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 out_batch
* }
*/
public static final long out_batch$offset() {
return out_batch$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 out_batch
* }
*/
public static long out_batch(MemorySegment struct) {
return struct.get(out_batch$LAYOUT, out_batch$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 out_batch
* }
*/
public static void out_batch(MemorySegment struct, long fieldValue) {
struct.set(out_batch$LAYOUT, out_batch$OFFSET, fieldValue);
}
private static final OfLong keys$LAYOUT = (OfLong)$LAYOUT.select(groupElement("keys"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 keys
* }
*/
public static final OfLong keys$layout() {
return keys$LAYOUT;
}
private static final long keys$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 keys
* }
*/
public static final long keys$offset() {
return keys$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 keys
* }
*/
public static long keys(MemorySegment struct) {
return struct.get(keys$LAYOUT, keys$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 keys
* }
*/
public static void keys(MemorySegment struct, long fieldValue) {
struct.set(keys$LAYOUT, keys$OFFSET, fieldValue);
}
private static final OfLong values$LAYOUT = (OfLong)$LAYOUT.select(groupElement("values"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 values
* }
*/
public static final OfLong values$layout() {
return values$LAYOUT;
}
private static final long values$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 values
* }
*/
public static final long values$offset() {
return values$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 values
* }
*/
public static long values(MemorySegment struct) {
return struct.get(values$LAYOUT, values$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 values
* }
*/
public static void values(MemorySegment struct, long fieldValue) {
struct.set(values$LAYOUT, values$OFFSET, fieldValue);
}
private static final OfInt count$LAYOUT = (OfInt)$LAYOUT.select(groupElement("count"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 count
* }
*/
public static final OfInt count$layout() {
return count$LAYOUT;
}
private static final long count$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 count
* }
*/
public static final long count$offset() {
return count$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 count
* }
*/
public static int count(MemorySegment struct) {
return struct.get(count$LAYOUT, count$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 count
* }
*/
public static void count(MemorySegment struct, int fieldValue) {
struct.set(count$LAYOUT, count$OFFSET, fieldValue);
}
private static final OfInt map_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("map_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static final OfInt map_fd$layout() {
return map_fd$LAYOUT;
}
private static final long map_fd$OFFSET = 36;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static final long map_fd$offset() {
return map_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static int map_fd(MemorySegment struct) {
return struct.get(map_fd$LAYOUT, map_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static void map_fd(MemorySegment struct, int fieldValue) {
struct.set(map_fd$LAYOUT, map_fd$OFFSET, fieldValue);
}
private static final OfLong elem_flags$LAYOUT = (OfLong)$LAYOUT.select(groupElement("elem_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 elem_flags
* }
*/
public static final OfLong elem_flags$layout() {
return elem_flags$LAYOUT;
}
private static final long elem_flags$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 elem_flags
* }
*/
public static final long elem_flags$offset() {
return elem_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 elem_flags
* }
*/
public static long elem_flags(MemorySegment struct) {
return struct.get(elem_flags$LAYOUT, elem_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 elem_flags
* }
*/
public static void elem_flags(MemorySegment struct, long fieldValue) {
struct.set(elem_flags$LAYOUT, elem_flags$OFFSET, fieldValue);
}
private static final OfLong flags$LAYOUT = (OfLong)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 flags
* }
*/
public static final OfLong flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 flags
* }
*/
public static long flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 flags
* }
*/
public static void flags(MemorySegment struct, long fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout batch$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("batch"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u64 in_batch;
* __u64 out_batch;
* __u64 keys;
* __u64 values;
* __u32 count;
* __u32 map_fd;
* __u64 elem_flags;
* __u64 flags;
* } batch
* }
*/
public static final GroupLayout batch$layout() {
return batch$LAYOUT;
}
private static final long batch$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u64 in_batch;
* __u64 out_batch;
* __u64 keys;
* __u64 values;
* __u32 count;
* __u32 map_fd;
* __u64 elem_flags;
* __u64 flags;
* } batch
* }
*/
public static final long batch$offset() {
return batch$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u64 in_batch;
* __u64 out_batch;
* __u64 keys;
* __u64 values;
* __u32 count;
* __u32 map_fd;
* __u64 elem_flags;
* __u64 flags;
* } batch
* }
*/
public static MemorySegment batch(MemorySegment union) {
return union.asSlice(batch$OFFSET, batch$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u64 in_batch;
* __u64 out_batch;
* __u64 keys;
* __u64 values;
* __u32 count;
* __u32 map_fd;
* __u64 elem_flags;
* __u64 flags;
* } batch
* }
*/
public static void batch(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, batch$OFFSET, batch$LAYOUT.byteSize());
}
private static final OfInt prog_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("prog_type"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_type
* }
*/
public static final OfInt prog_type$layout() {
return prog_type$LAYOUT;
}
private static final long prog_type$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_type
* }
*/
public static final long prog_type$offset() {
return prog_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_type
* }
*/
public static int prog_type(MemorySegment union) {
return union.get(prog_type$LAYOUT, prog_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_type
* }
*/
public static void prog_type(MemorySegment union, int fieldValue) {
union.set(prog_type$LAYOUT, prog_type$OFFSET, fieldValue);
}
private static final OfInt insn_cnt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("insn_cnt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 insn_cnt
* }
*/
public static final OfInt insn_cnt$layout() {
return insn_cnt$LAYOUT;
}
private static final long insn_cnt$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 insn_cnt
* }
*/
public static final long insn_cnt$offset() {
return insn_cnt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 insn_cnt
* }
*/
public static int insn_cnt(MemorySegment union) {
return union.get(insn_cnt$LAYOUT, insn_cnt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 insn_cnt
* }
*/
public static void insn_cnt(MemorySegment union, int fieldValue) {
union.set(insn_cnt$LAYOUT, insn_cnt$OFFSET, fieldValue);
}
private static final OfLong insns$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("insns"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 insns
* }
*/
public static final OfLong insns$layout() {
return insns$LAYOUT;
}
private static final long insns$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 insns
* }
*/
public static final long insns$offset() {
return insns$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 insns
* }
*/
public static long insns(MemorySegment union) {
return union.get(insns$LAYOUT, insns$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 insns
* }
*/
public static void insns(MemorySegment union, long fieldValue) {
union.set(insns$LAYOUT, insns$OFFSET, fieldValue);
}
private static final OfLong license$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("license"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 license
* }
*/
public static final OfLong license$layout() {
return license$LAYOUT;
}
private static final long license$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 license
* }
*/
public static final long license$offset() {
return license$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 license
* }
*/
public static long license(MemorySegment union) {
return union.get(license$LAYOUT, license$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 license
* }
*/
public static void license(MemorySegment union, long fieldValue) {
union.set(license$LAYOUT, license$OFFSET, fieldValue);
}
private static final OfInt log_level$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("log_level"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 log_level
* }
*/
public static final OfInt log_level$layout() {
return log_level$LAYOUT;
}
private static final long log_level$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 log_level
* }
*/
public static final long log_level$offset() {
return log_level$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 log_level
* }
*/
public static int log_level(MemorySegment union) {
return union.get(log_level$LAYOUT, log_level$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 log_level
* }
*/
public static void log_level(MemorySegment union, int fieldValue) {
union.set(log_level$LAYOUT, log_level$OFFSET, fieldValue);
}
private static final OfInt log_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("log_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 log_size
* }
*/
public static final OfInt log_size$layout() {
return log_size$LAYOUT;
}
private static final long log_size$OFFSET = 28;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 log_size
* }
*/
public static final long log_size$offset() {
return log_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 log_size
* }
*/
public static int log_size(MemorySegment union) {
return union.get(log_size$LAYOUT, log_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 log_size
* }
*/
public static void log_size(MemorySegment union, int fieldValue) {
union.set(log_size$LAYOUT, log_size$OFFSET, fieldValue);
}
private static final OfLong log_buf$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("log_buf"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 log_buf
* }
*/
public static final OfLong log_buf$layout() {
return log_buf$LAYOUT;
}
private static final long log_buf$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 log_buf
* }
*/
public static final long log_buf$offset() {
return log_buf$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 log_buf
* }
*/
public static long log_buf(MemorySegment union) {
return union.get(log_buf$LAYOUT, log_buf$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 log_buf
* }
*/
public static void log_buf(MemorySegment union, long fieldValue) {
union.set(log_buf$LAYOUT, log_buf$OFFSET, fieldValue);
}
private static final OfInt kern_version$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("kern_version"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 kern_version
* }
*/
public static final OfInt kern_version$layout() {
return kern_version$LAYOUT;
}
private static final long kern_version$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 kern_version
* }
*/
public static final long kern_version$offset() {
return kern_version$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 kern_version
* }
*/
public static int kern_version(MemorySegment union) {
return union.get(kern_version$LAYOUT, kern_version$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 kern_version
* }
*/
public static void kern_version(MemorySegment union, int fieldValue) {
union.set(kern_version$LAYOUT, kern_version$OFFSET, fieldValue);
}
private static final OfInt prog_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("prog_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_flags
* }
*/
public static final OfInt prog_flags$layout() {
return prog_flags$LAYOUT;
}
private static final long prog_flags$OFFSET = 44;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_flags
* }
*/
public static final long prog_flags$offset() {
return prog_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_flags
* }
*/
public static int prog_flags(MemorySegment union) {
return union.get(prog_flags$LAYOUT, prog_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_flags
* }
*/
public static void prog_flags(MemorySegment union, int fieldValue) {
union.set(prog_flags$LAYOUT, prog_flags$OFFSET, fieldValue);
}
private static final SequenceLayout prog_name$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("prog_name"));
/**
* Layout for field:
* {@snippet lang=c :
* char prog_name[16]
* }
*/
public static final SequenceLayout prog_name$layout() {
return prog_name$LAYOUT;
}
private static final long prog_name$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* char prog_name[16]
* }
*/
public static final long prog_name$offset() {
return prog_name$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char prog_name[16]
* }
*/
public static MemorySegment prog_name(MemorySegment union) {
return union.asSlice(prog_name$OFFSET, prog_name$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* char prog_name[16]
* }
*/
public static void prog_name(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, prog_name$OFFSET, prog_name$LAYOUT.byteSize());
}
private static long[] prog_name$DIMS = { 16 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* char prog_name[16]
* }
*/
public static long[] prog_name$dimensions() {
return prog_name$DIMS;
}
private static final VarHandle prog_name$ELEM_HANDLE = prog_name$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* char prog_name[16]
* }
*/
public static byte prog_name(MemorySegment union, long index0) {
return (byte)prog_name$ELEM_HANDLE.get(union, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* char prog_name[16]
* }
*/
public static void prog_name(MemorySegment union, long index0, byte fieldValue) {
prog_name$ELEM_HANDLE.set(union, 0L, index0, fieldValue);
}
private static final OfInt prog_ifindex$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("prog_ifindex"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_ifindex
* }
*/
public static final OfInt prog_ifindex$layout() {
return prog_ifindex$LAYOUT;
}
private static final long prog_ifindex$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_ifindex
* }
*/
public static final long prog_ifindex$offset() {
return prog_ifindex$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_ifindex
* }
*/
public static int prog_ifindex(MemorySegment union) {
return union.get(prog_ifindex$LAYOUT, prog_ifindex$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_ifindex
* }
*/
public static void prog_ifindex(MemorySegment union, int fieldValue) {
union.set(prog_ifindex$LAYOUT, prog_ifindex$OFFSET, fieldValue);
}
private static final OfInt expected_attach_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("expected_attach_type"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 expected_attach_type
* }
*/
public static final OfInt expected_attach_type$layout() {
return expected_attach_type$LAYOUT;
}
private static final long expected_attach_type$OFFSET = 68;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 expected_attach_type
* }
*/
public static final long expected_attach_type$offset() {
return expected_attach_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 expected_attach_type
* }
*/
public static int expected_attach_type(MemorySegment union) {
return union.get(expected_attach_type$LAYOUT, expected_attach_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 expected_attach_type
* }
*/
public static void expected_attach_type(MemorySegment union, int fieldValue) {
union.set(expected_attach_type$LAYOUT, expected_attach_type$OFFSET, fieldValue);
}
private static final OfInt prog_btf_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("prog_btf_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_btf_fd
* }
*/
public static final OfInt prog_btf_fd$layout() {
return prog_btf_fd$LAYOUT;
}
private static final long prog_btf_fd$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_btf_fd
* }
*/
public static final long prog_btf_fd$offset() {
return prog_btf_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_btf_fd
* }
*/
public static int prog_btf_fd(MemorySegment union) {
return union.get(prog_btf_fd$LAYOUT, prog_btf_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_btf_fd
* }
*/
public static void prog_btf_fd(MemorySegment union, int fieldValue) {
union.set(prog_btf_fd$LAYOUT, prog_btf_fd$OFFSET, fieldValue);
}
private static final OfInt func_info_rec_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("func_info_rec_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 func_info_rec_size
* }
*/
public static final OfInt func_info_rec_size$layout() {
return func_info_rec_size$LAYOUT;
}
private static final long func_info_rec_size$OFFSET = 76;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 func_info_rec_size
* }
*/
public static final long func_info_rec_size$offset() {
return func_info_rec_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 func_info_rec_size
* }
*/
public static int func_info_rec_size(MemorySegment union) {
return union.get(func_info_rec_size$LAYOUT, func_info_rec_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 func_info_rec_size
* }
*/
public static void func_info_rec_size(MemorySegment union, int fieldValue) {
union.set(func_info_rec_size$LAYOUT, func_info_rec_size$OFFSET, fieldValue);
}
private static final OfLong func_info$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("func_info"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 func_info
* }
*/
public static final OfLong func_info$layout() {
return func_info$LAYOUT;
}
private static final long func_info$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 func_info
* }
*/
public static final long func_info$offset() {
return func_info$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 func_info
* }
*/
public static long func_info(MemorySegment union) {
return union.get(func_info$LAYOUT, func_info$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 func_info
* }
*/
public static void func_info(MemorySegment union, long fieldValue) {
union.set(func_info$LAYOUT, func_info$OFFSET, fieldValue);
}
private static final OfInt func_info_cnt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("func_info_cnt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 func_info_cnt
* }
*/
public static final OfInt func_info_cnt$layout() {
return func_info_cnt$LAYOUT;
}
private static final long func_info_cnt$OFFSET = 88;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 func_info_cnt
* }
*/
public static final long func_info_cnt$offset() {
return func_info_cnt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 func_info_cnt
* }
*/
public static int func_info_cnt(MemorySegment union) {
return union.get(func_info_cnt$LAYOUT, func_info_cnt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 func_info_cnt
* }
*/
public static void func_info_cnt(MemorySegment union, int fieldValue) {
union.set(func_info_cnt$LAYOUT, func_info_cnt$OFFSET, fieldValue);
}
private static final OfInt line_info_rec_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("line_info_rec_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 line_info_rec_size
* }
*/
public static final OfInt line_info_rec_size$layout() {
return line_info_rec_size$LAYOUT;
}
private static final long line_info_rec_size$OFFSET = 92;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 line_info_rec_size
* }
*/
public static final long line_info_rec_size$offset() {
return line_info_rec_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 line_info_rec_size
* }
*/
public static int line_info_rec_size(MemorySegment union) {
return union.get(line_info_rec_size$LAYOUT, line_info_rec_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 line_info_rec_size
* }
*/
public static void line_info_rec_size(MemorySegment union, int fieldValue) {
union.set(line_info_rec_size$LAYOUT, line_info_rec_size$OFFSET, fieldValue);
}
private static final OfLong line_info$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("line_info"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 line_info
* }
*/
public static final OfLong line_info$layout() {
return line_info$LAYOUT;
}
private static final long line_info$OFFSET = 96;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 line_info
* }
*/
public static final long line_info$offset() {
return line_info$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 line_info
* }
*/
public static long line_info(MemorySegment union) {
return union.get(line_info$LAYOUT, line_info$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 line_info
* }
*/
public static void line_info(MemorySegment union, long fieldValue) {
union.set(line_info$LAYOUT, line_info$OFFSET, fieldValue);
}
private static final OfInt line_info_cnt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("line_info_cnt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 line_info_cnt
* }
*/
public static final OfInt line_info_cnt$layout() {
return line_info_cnt$LAYOUT;
}
private static final long line_info_cnt$OFFSET = 104;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 line_info_cnt
* }
*/
public static final long line_info_cnt$offset() {
return line_info_cnt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 line_info_cnt
* }
*/
public static int line_info_cnt(MemorySegment union) {
return union.get(line_info_cnt$LAYOUT, line_info_cnt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 line_info_cnt
* }
*/
public static void line_info_cnt(MemorySegment union, int fieldValue) {
union.set(line_info_cnt$LAYOUT, line_info_cnt$OFFSET, fieldValue);
}
private static final OfInt attach_btf_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("attach_btf_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_btf_id
* }
*/
public static final OfInt attach_btf_id$layout() {
return attach_btf_id$LAYOUT;
}
private static final long attach_btf_id$OFFSET = 108;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_btf_id
* }
*/
public static final long attach_btf_id$offset() {
return attach_btf_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_btf_id
* }
*/
public static int attach_btf_id(MemorySegment union) {
return union.get(attach_btf_id$LAYOUT, attach_btf_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_btf_id
* }
*/
public static void attach_btf_id(MemorySegment union, int fieldValue) {
union.set(attach_btf_id$LAYOUT, attach_btf_id$OFFSET, fieldValue);
}
private static final OfInt attach_prog_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("$anon$1551:3"), groupElement("attach_prog_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_prog_fd
* }
*/
public static final OfInt attach_prog_fd$layout() {
return attach_prog_fd$LAYOUT;
}
private static final long attach_prog_fd$OFFSET = 112;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_prog_fd
* }
*/
public static final long attach_prog_fd$offset() {
return attach_prog_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_prog_fd
* }
*/
public static int attach_prog_fd(MemorySegment union) {
return union.get(attach_prog_fd$LAYOUT, attach_prog_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_prog_fd
* }
*/
public static void attach_prog_fd(MemorySegment union, int fieldValue) {
union.set(attach_prog_fd$LAYOUT, attach_prog_fd$OFFSET, fieldValue);
}
private static final OfInt attach_btf_obj_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("$anon$1551:3"), groupElement("attach_btf_obj_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_btf_obj_fd
* }
*/
public static final OfInt attach_btf_obj_fd$layout() {
return attach_btf_obj_fd$LAYOUT;
}
private static final long attach_btf_obj_fd$OFFSET = 112;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_btf_obj_fd
* }
*/
public static final long attach_btf_obj_fd$offset() {
return attach_btf_obj_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_btf_obj_fd
* }
*/
public static int attach_btf_obj_fd(MemorySegment union) {
return union.get(attach_btf_obj_fd$LAYOUT, attach_btf_obj_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_btf_obj_fd
* }
*/
public static void attach_btf_obj_fd(MemorySegment union, int fieldValue) {
union.set(attach_btf_obj_fd$LAYOUT, attach_btf_obj_fd$OFFSET, fieldValue);
}
private static final OfInt core_relo_cnt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("core_relo_cnt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 core_relo_cnt
* }
*/
public static final OfInt core_relo_cnt$layout() {
return core_relo_cnt$LAYOUT;
}
private static final long core_relo_cnt$OFFSET = 116;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 core_relo_cnt
* }
*/
public static final long core_relo_cnt$offset() {
return core_relo_cnt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 core_relo_cnt
* }
*/
public static int core_relo_cnt(MemorySegment union) {
return union.get(core_relo_cnt$LAYOUT, core_relo_cnt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 core_relo_cnt
* }
*/
public static void core_relo_cnt(MemorySegment union, int fieldValue) {
union.set(core_relo_cnt$LAYOUT, core_relo_cnt$OFFSET, fieldValue);
}
private static final OfLong fd_array$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("fd_array"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 fd_array
* }
*/
public static final OfLong fd_array$layout() {
return fd_array$LAYOUT;
}
private static final long fd_array$OFFSET = 120;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 fd_array
* }
*/
public static final long fd_array$offset() {
return fd_array$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 fd_array
* }
*/
public static long fd_array(MemorySegment union) {
return union.get(fd_array$LAYOUT, fd_array$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 fd_array
* }
*/
public static void fd_array(MemorySegment union, long fieldValue) {
union.set(fd_array$LAYOUT, fd_array$OFFSET, fieldValue);
}
private static final OfLong core_relos$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("core_relos"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 core_relos
* }
*/
public static final OfLong core_relos$layout() {
return core_relos$LAYOUT;
}
private static final long core_relos$OFFSET = 128;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 core_relos
* }
*/
public static final long core_relos$offset() {
return core_relos$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 core_relos
* }
*/
public static long core_relos(MemorySegment union) {
return union.get(core_relos$LAYOUT, core_relos$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 core_relos
* }
*/
public static void core_relos(MemorySegment union, long fieldValue) {
union.set(core_relos$LAYOUT, core_relos$OFFSET, fieldValue);
}
private static final OfInt core_relo_rec_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("core_relo_rec_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 core_relo_rec_size
* }
*/
public static final OfInt core_relo_rec_size$layout() {
return core_relo_rec_size$LAYOUT;
}
private static final long core_relo_rec_size$OFFSET = 136;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 core_relo_rec_size
* }
*/
public static final long core_relo_rec_size$offset() {
return core_relo_rec_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 core_relo_rec_size
* }
*/
public static int core_relo_rec_size(MemorySegment union) {
return union.get(core_relo_rec_size$LAYOUT, core_relo_rec_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 core_relo_rec_size
* }
*/
public static void core_relo_rec_size(MemorySegment union, int fieldValue) {
union.set(core_relo_rec_size$LAYOUT, core_relo_rec_size$OFFSET, fieldValue);
}
private static final OfInt log_true_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("log_true_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 log_true_size
* }
*/
public static final OfInt log_true_size$layout() {
return log_true_size$LAYOUT;
}
private static final long log_true_size$OFFSET = 140;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 log_true_size
* }
*/
public static final long log_true_size$offset() {
return log_true_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 log_true_size
* }
*/
public static int log_true_size(MemorySegment union) {
return union.get(log_true_size$LAYOUT, log_true_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 log_true_size
* }
*/
public static void log_true_size(MemorySegment union, int fieldValue) {
union.set(log_true_size$LAYOUT, log_true_size$OFFSET, fieldValue);
}
private static final OfInt prog_token_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1526:2"), groupElement("prog_token_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __s32 prog_token_fd
* }
*/
public static final OfInt prog_token_fd$layout() {
return prog_token_fd$LAYOUT;
}
private static final long prog_token_fd$OFFSET = 144;
/**
* Offset for field:
* {@snippet lang=c :
* __s32 prog_token_fd
* }
*/
public static final long prog_token_fd$offset() {
return prog_token_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __s32 prog_token_fd
* }
*/
public static int prog_token_fd(MemorySegment union) {
return union.get(prog_token_fd$LAYOUT, prog_token_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __s32 prog_token_fd
* }
*/
public static void prog_token_fd(MemorySegment union, int fieldValue) {
union.set(prog_token_fd$LAYOUT, prog_token_fd$OFFSET, fieldValue);
}
private static final OfLong pathname$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1572:2"), groupElement("pathname"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 pathname
* }
*/
public static final OfLong pathname$layout() {
return pathname$LAYOUT;
}
private static final long pathname$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 pathname
* }
*/
public static final long pathname$offset() {
return pathname$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 pathname
* }
*/
public static long pathname(MemorySegment union) {
return union.get(pathname$LAYOUT, pathname$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 pathname
* }
*/
public static void pathname(MemorySegment union, long fieldValue) {
union.set(pathname$LAYOUT, pathname$OFFSET, fieldValue);
}
private static final OfInt bpf_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1572:2"), groupElement("bpf_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 bpf_fd
* }
*/
public static final OfInt bpf_fd$layout() {
return bpf_fd$LAYOUT;
}
private static final long bpf_fd$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 bpf_fd
* }
*/
public static final long bpf_fd$offset() {
return bpf_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 bpf_fd
* }
*/
public static int bpf_fd(MemorySegment union) {
return union.get(bpf_fd$LAYOUT, bpf_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 bpf_fd
* }
*/
public static void bpf_fd(MemorySegment union, int fieldValue) {
union.set(bpf_fd$LAYOUT, bpf_fd$OFFSET, fieldValue);
}
private static final OfInt file_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1572:2"), groupElement("file_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 file_flags
* }
*/
public static final OfInt file_flags$layout() {
return file_flags$LAYOUT;
}
private static final long file_flags$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 file_flags
* }
*/
public static final long file_flags$offset() {
return file_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 file_flags
* }
*/
public static int file_flags(MemorySegment union) {
return union.get(file_flags$LAYOUT, file_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 file_flags
* }
*/
public static void file_flags(MemorySegment union, int fieldValue) {
union.set(file_flags$LAYOUT, file_flags$OFFSET, fieldValue);
}
private static final OfInt path_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1572:2"), groupElement("path_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __s32 path_fd
* }
*/
public static final OfInt path_fd$layout() {
return path_fd$LAYOUT;
}
private static final long path_fd$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __s32 path_fd
* }
*/
public static final long path_fd$offset() {
return path_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __s32 path_fd
* }
*/
public static int path_fd(MemorySegment union) {
return union.get(path_fd$LAYOUT, path_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __s32 path_fd
* }
*/
public static void path_fd(MemorySegment union, int fieldValue) {
union.set(path_fd$LAYOUT, path_fd$OFFSET, fieldValue);
}
private static final OfInt target_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("$anon$1586:3"), groupElement("target_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static final OfInt target_fd$layout() {
return target_fd$LAYOUT;
}
private static final long target_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static final long target_fd$offset() {
return target_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static int target_fd(MemorySegment union) {
return union.get(target_fd$LAYOUT, target_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static void target_fd(MemorySegment union, int fieldValue) {
union.set(target_fd$LAYOUT, target_fd$OFFSET, fieldValue);
}
private static final OfInt target_ifindex$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("$anon$1586:3"), groupElement("target_ifindex"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static final OfInt target_ifindex$layout() {
return target_ifindex$LAYOUT;
}
private static final long target_ifindex$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static final long target_ifindex$offset() {
return target_ifindex$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static int target_ifindex(MemorySegment union) {
return union.get(target_ifindex$LAYOUT, target_ifindex$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static void target_ifindex(MemorySegment union, int fieldValue) {
union.set(target_ifindex$LAYOUT, target_ifindex$OFFSET, fieldValue);
}
private static final OfInt attach_bpf_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("attach_bpf_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_bpf_fd
* }
*/
public static final OfInt attach_bpf_fd$layout() {
return attach_bpf_fd$LAYOUT;
}
private static final long attach_bpf_fd$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_bpf_fd
* }
*/
public static final long attach_bpf_fd$offset() {
return attach_bpf_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_bpf_fd
* }
*/
public static int attach_bpf_fd(MemorySegment union) {
return union.get(attach_bpf_fd$LAYOUT, attach_bpf_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_bpf_fd
* }
*/
public static void attach_bpf_fd(MemorySegment union, int fieldValue) {
union.set(attach_bpf_fd$LAYOUT, attach_bpf_fd$OFFSET, fieldValue);
}
private static final OfInt attach_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("attach_type"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static final OfInt attach_type$layout() {
return attach_type$LAYOUT;
}
private static final long attach_type$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static final long attach_type$offset() {
return attach_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static int attach_type(MemorySegment union) {
return union.get(attach_type$LAYOUT, attach_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static void attach_type(MemorySegment union, int fieldValue) {
union.set(attach_type$LAYOUT, attach_type$OFFSET, fieldValue);
}
private static final OfInt attach_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("attach_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_flags
* }
*/
public static final OfInt attach_flags$layout() {
return attach_flags$LAYOUT;
}
private static final long attach_flags$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_flags
* }
*/
public static final long attach_flags$offset() {
return attach_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_flags
* }
*/
public static int attach_flags(MemorySegment union) {
return union.get(attach_flags$LAYOUT, attach_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_flags
* }
*/
public static void attach_flags(MemorySegment union, int fieldValue) {
union.set(attach_flags$LAYOUT, attach_flags$OFFSET, fieldValue);
}
private static final OfInt replace_bpf_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("replace_bpf_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 replace_bpf_fd
* }
*/
public static final OfInt replace_bpf_fd$layout() {
return replace_bpf_fd$LAYOUT;
}
private static final long replace_bpf_fd$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 replace_bpf_fd
* }
*/
public static final long replace_bpf_fd$offset() {
return replace_bpf_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 replace_bpf_fd
* }
*/
public static int replace_bpf_fd(MemorySegment union) {
return union.get(replace_bpf_fd$LAYOUT, replace_bpf_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 replace_bpf_fd
* }
*/
public static void replace_bpf_fd(MemorySegment union, int fieldValue) {
union.set(replace_bpf_fd$LAYOUT, replace_bpf_fd$OFFSET, fieldValue);
}
private static final OfInt relative_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("$anon$1594:3"), groupElement("relative_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static final OfInt relative_fd$layout() {
return relative_fd$LAYOUT;
}
private static final long relative_fd$OFFSET = 20;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static final long relative_fd$offset() {
return relative_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static int relative_fd(MemorySegment union) {
return union.get(relative_fd$LAYOUT, relative_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static void relative_fd(MemorySegment union, int fieldValue) {
union.set(relative_fd$LAYOUT, relative_fd$OFFSET, fieldValue);
}
private static final OfInt relative_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("$anon$1594:3"), groupElement("relative_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static final OfInt relative_id$layout() {
return relative_id$LAYOUT;
}
private static final long relative_id$OFFSET = 20;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static final long relative_id$offset() {
return relative_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static int relative_id(MemorySegment union) {
return union.get(relative_id$LAYOUT, relative_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static void relative_id(MemorySegment union, int fieldValue) {
union.set(relative_id$LAYOUT, relative_id$OFFSET, fieldValue);
}
private static final OfLong expected_revision$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1585:2"), groupElement("expected_revision"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static final OfLong expected_revision$layout() {
return expected_revision$LAYOUT;
}
private static final long expected_revision$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static final long expected_revision$offset() {
return expected_revision$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static long expected_revision(MemorySegment union) {
return union.get(expected_revision$LAYOUT, expected_revision$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static void expected_revision(MemorySegment union, long fieldValue) {
union.set(expected_revision$LAYOUT, expected_revision$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 retval;
* __u32 data_size_in;
* __u32 data_size_out;
* __u64 data_in;
* __u64 data_out;
* __u32 repeat;
* __u32 duration;
* __u32 ctx_size_in;
* __u32 ctx_size_out;
* __u64 ctx_in;
* __u64 ctx_out;
* __u32 flags;
* __u32 cpu;
* __u32 batch_size;
* }
* }
*/
public static class test {
test() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("prog_fd"),
Lib.C_INT.withName("retval"),
Lib.C_INT.withName("data_size_in"),
Lib.C_INT.withName("data_size_out"),
Lib.C_LONG_LONG.withName("data_in"),
Lib.C_LONG_LONG.withName("data_out"),
Lib.C_INT.withName("repeat"),
Lib.C_INT.withName("duration"),
Lib.C_INT.withName("ctx_size_in"),
Lib.C_INT.withName("ctx_size_out"),
Lib.C_LONG_LONG.withName("ctx_in"),
Lib.C_LONG_LONG.withName("ctx_out"),
Lib.C_INT.withName("flags"),
Lib.C_INT.withName("cpu"),
Lib.C_INT.withName("batch_size"),
MemoryLayout.paddingLayout(4)
).withName("$anon$1601:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt prog_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("prog_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static final OfInt prog_fd$layout() {
return prog_fd$LAYOUT;
}
private static final long prog_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static final long prog_fd$offset() {
return prog_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static int prog_fd(MemorySegment struct) {
return struct.get(prog_fd$LAYOUT, prog_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static void prog_fd(MemorySegment struct, int fieldValue) {
struct.set(prog_fd$LAYOUT, prog_fd$OFFSET, fieldValue);
}
private static final OfInt retval$LAYOUT = (OfInt)$LAYOUT.select(groupElement("retval"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 retval
* }
*/
public static final OfInt retval$layout() {
return retval$LAYOUT;
}
private static final long retval$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 retval
* }
*/
public static final long retval$offset() {
return retval$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 retval
* }
*/
public static int retval(MemorySegment struct) {
return struct.get(retval$LAYOUT, retval$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 retval
* }
*/
public static void retval(MemorySegment struct, int fieldValue) {
struct.set(retval$LAYOUT, retval$OFFSET, fieldValue);
}
private static final OfInt data_size_in$LAYOUT = (OfInt)$LAYOUT.select(groupElement("data_size_in"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 data_size_in
* }
*/
public static final OfInt data_size_in$layout() {
return data_size_in$LAYOUT;
}
private static final long data_size_in$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 data_size_in
* }
*/
public static final long data_size_in$offset() {
return data_size_in$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 data_size_in
* }
*/
public static int data_size_in(MemorySegment struct) {
return struct.get(data_size_in$LAYOUT, data_size_in$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 data_size_in
* }
*/
public static void data_size_in(MemorySegment struct, int fieldValue) {
struct.set(data_size_in$LAYOUT, data_size_in$OFFSET, fieldValue);
}
private static final OfInt data_size_out$LAYOUT = (OfInt)$LAYOUT.select(groupElement("data_size_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 data_size_out
* }
*/
public static final OfInt data_size_out$layout() {
return data_size_out$LAYOUT;
}
private static final long data_size_out$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 data_size_out
* }
*/
public static final long data_size_out$offset() {
return data_size_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 data_size_out
* }
*/
public static int data_size_out(MemorySegment struct) {
return struct.get(data_size_out$LAYOUT, data_size_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 data_size_out
* }
*/
public static void data_size_out(MemorySegment struct, int fieldValue) {
struct.set(data_size_out$LAYOUT, data_size_out$OFFSET, fieldValue);
}
private static final OfLong data_in$LAYOUT = (OfLong)$LAYOUT.select(groupElement("data_in"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 data_in
* }
*/
public static final OfLong data_in$layout() {
return data_in$LAYOUT;
}
private static final long data_in$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 data_in
* }
*/
public static final long data_in$offset() {
return data_in$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 data_in
* }
*/
public static long data_in(MemorySegment struct) {
return struct.get(data_in$LAYOUT, data_in$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 data_in
* }
*/
public static void data_in(MemorySegment struct, long fieldValue) {
struct.set(data_in$LAYOUT, data_in$OFFSET, fieldValue);
}
private static final OfLong data_out$LAYOUT = (OfLong)$LAYOUT.select(groupElement("data_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 data_out
* }
*/
public static final OfLong data_out$layout() {
return data_out$LAYOUT;
}
private static final long data_out$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 data_out
* }
*/
public static final long data_out$offset() {
return data_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 data_out
* }
*/
public static long data_out(MemorySegment struct) {
return struct.get(data_out$LAYOUT, data_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 data_out
* }
*/
public static void data_out(MemorySegment struct, long fieldValue) {
struct.set(data_out$LAYOUT, data_out$OFFSET, fieldValue);
}
private static final OfInt repeat$LAYOUT = (OfInt)$LAYOUT.select(groupElement("repeat"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 repeat
* }
*/
public static final OfInt repeat$layout() {
return repeat$LAYOUT;
}
private static final long repeat$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 repeat
* }
*/
public static final long repeat$offset() {
return repeat$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 repeat
* }
*/
public static int repeat(MemorySegment struct) {
return struct.get(repeat$LAYOUT, repeat$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 repeat
* }
*/
public static void repeat(MemorySegment struct, int fieldValue) {
struct.set(repeat$LAYOUT, repeat$OFFSET, fieldValue);
}
private static final OfInt duration$LAYOUT = (OfInt)$LAYOUT.select(groupElement("duration"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 duration
* }
*/
public static final OfInt duration$layout() {
return duration$LAYOUT;
}
private static final long duration$OFFSET = 36;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 duration
* }
*/
public static final long duration$offset() {
return duration$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 duration
* }
*/
public static int duration(MemorySegment struct) {
return struct.get(duration$LAYOUT, duration$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 duration
* }
*/
public static void duration(MemorySegment struct, int fieldValue) {
struct.set(duration$LAYOUT, duration$OFFSET, fieldValue);
}
private static final OfInt ctx_size_in$LAYOUT = (OfInt)$LAYOUT.select(groupElement("ctx_size_in"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 ctx_size_in
* }
*/
public static final OfInt ctx_size_in$layout() {
return ctx_size_in$LAYOUT;
}
private static final long ctx_size_in$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 ctx_size_in
* }
*/
public static final long ctx_size_in$offset() {
return ctx_size_in$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 ctx_size_in
* }
*/
public static int ctx_size_in(MemorySegment struct) {
return struct.get(ctx_size_in$LAYOUT, ctx_size_in$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 ctx_size_in
* }
*/
public static void ctx_size_in(MemorySegment struct, int fieldValue) {
struct.set(ctx_size_in$LAYOUT, ctx_size_in$OFFSET, fieldValue);
}
private static final OfInt ctx_size_out$LAYOUT = (OfInt)$LAYOUT.select(groupElement("ctx_size_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 ctx_size_out
* }
*/
public static final OfInt ctx_size_out$layout() {
return ctx_size_out$LAYOUT;
}
private static final long ctx_size_out$OFFSET = 44;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 ctx_size_out
* }
*/
public static final long ctx_size_out$offset() {
return ctx_size_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 ctx_size_out
* }
*/
public static int ctx_size_out(MemorySegment struct) {
return struct.get(ctx_size_out$LAYOUT, ctx_size_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 ctx_size_out
* }
*/
public static void ctx_size_out(MemorySegment struct, int fieldValue) {
struct.set(ctx_size_out$LAYOUT, ctx_size_out$OFFSET, fieldValue);
}
private static final OfLong ctx_in$LAYOUT = (OfLong)$LAYOUT.select(groupElement("ctx_in"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 ctx_in
* }
*/
public static final OfLong ctx_in$layout() {
return ctx_in$LAYOUT;
}
private static final long ctx_in$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 ctx_in
* }
*/
public static final long ctx_in$offset() {
return ctx_in$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 ctx_in
* }
*/
public static long ctx_in(MemorySegment struct) {
return struct.get(ctx_in$LAYOUT, ctx_in$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 ctx_in
* }
*/
public static void ctx_in(MemorySegment struct, long fieldValue) {
struct.set(ctx_in$LAYOUT, ctx_in$OFFSET, fieldValue);
}
private static final OfLong ctx_out$LAYOUT = (OfLong)$LAYOUT.select(groupElement("ctx_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 ctx_out
* }
*/
public static final OfLong ctx_out$layout() {
return ctx_out$LAYOUT;
}
private static final long ctx_out$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 ctx_out
* }
*/
public static final long ctx_out$offset() {
return ctx_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 ctx_out
* }
*/
public static long ctx_out(MemorySegment struct) {
return struct.get(ctx_out$LAYOUT, ctx_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 ctx_out
* }
*/
public static void ctx_out(MemorySegment struct, long fieldValue) {
struct.set(ctx_out$LAYOUT, ctx_out$OFFSET, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
private static final OfInt cpu$LAYOUT = (OfInt)$LAYOUT.select(groupElement("cpu"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 cpu
* }
*/
public static final OfInt cpu$layout() {
return cpu$LAYOUT;
}
private static final long cpu$OFFSET = 68;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 cpu
* }
*/
public static final long cpu$offset() {
return cpu$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 cpu
* }
*/
public static int cpu(MemorySegment struct) {
return struct.get(cpu$LAYOUT, cpu$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 cpu
* }
*/
public static void cpu(MemorySegment struct, int fieldValue) {
struct.set(cpu$LAYOUT, cpu$OFFSET, fieldValue);
}
private static final OfInt batch_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("batch_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 batch_size
* }
*/
public static final OfInt batch_size$layout() {
return batch_size$LAYOUT;
}
private static final long batch_size$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 batch_size
* }
*/
public static final long batch_size$offset() {
return batch_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 batch_size
* }
*/
public static int batch_size(MemorySegment struct) {
return struct.get(batch_size$LAYOUT, batch_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 batch_size
* }
*/
public static void batch_size(MemorySegment struct, int fieldValue) {
struct.set(batch_size$LAYOUT, batch_size$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout test$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("test"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 retval;
* __u32 data_size_in;
* __u32 data_size_out;
* __u64 data_in;
* __u64 data_out;
* __u32 repeat;
* __u32 duration;
* __u32 ctx_size_in;
* __u32 ctx_size_out;
* __u64 ctx_in;
* __u64 ctx_out;
* __u32 flags;
* __u32 cpu;
* __u32 batch_size;
* } test
* }
*/
public static final GroupLayout test$layout() {
return test$LAYOUT;
}
private static final long test$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 retval;
* __u32 data_size_in;
* __u32 data_size_out;
* __u64 data_in;
* __u64 data_out;
* __u32 repeat;
* __u32 duration;
* __u32 ctx_size_in;
* __u32 ctx_size_out;
* __u64 ctx_in;
* __u64 ctx_out;
* __u32 flags;
* __u32 cpu;
* __u32 batch_size;
* } test
* }
*/
public static final long test$offset() {
return test$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 retval;
* __u32 data_size_in;
* __u32 data_size_out;
* __u64 data_in;
* __u64 data_out;
* __u32 repeat;
* __u32 duration;
* __u32 ctx_size_in;
* __u32 ctx_size_out;
* __u64 ctx_in;
* __u64 ctx_out;
* __u32 flags;
* __u32 cpu;
* __u32 batch_size;
* } test
* }
*/
public static MemorySegment test(MemorySegment union) {
return union.asSlice(test$OFFSET, test$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 retval;
* __u32 data_size_in;
* __u32 data_size_out;
* __u64 data_in;
* __u64 data_out;
* __u32 repeat;
* __u32 duration;
* __u32 ctx_size_in;
* __u32 ctx_size_out;
* __u64 ctx_in;
* __u64 ctx_out;
* __u32 flags;
* __u32 cpu;
* __u32 batch_size;
* } test
* }
*/
public static void test(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, test$OFFSET, test$LAYOUT.byteSize());
}
private static final OfInt start_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1625:2"), groupElement("$anon$1626:3"), groupElement("start_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 start_id
* }
*/
public static final OfInt start_id$layout() {
return start_id$LAYOUT;
}
private static final long start_id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 start_id
* }
*/
public static final long start_id$offset() {
return start_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 start_id
* }
*/
public static int start_id(MemorySegment union) {
return union.get(start_id$LAYOUT, start_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 start_id
* }
*/
public static void start_id(MemorySegment union, int fieldValue) {
union.set(start_id$LAYOUT, start_id$OFFSET, fieldValue);
}
private static final OfInt prog_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1625:2"), groupElement("$anon$1626:3"), groupElement("prog_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_id
* }
*/
public static final OfInt prog_id$layout() {
return prog_id$LAYOUT;
}
private static final long prog_id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_id
* }
*/
public static final long prog_id$offset() {
return prog_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_id
* }
*/
public static int prog_id(MemorySegment union) {
return union.get(prog_id$LAYOUT, prog_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_id
* }
*/
public static void prog_id(MemorySegment union, int fieldValue) {
union.set(prog_id$LAYOUT, prog_id$OFFSET, fieldValue);
}
private static final OfInt map_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1625:2"), groupElement("$anon$1626:3"), groupElement("map_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 map_id
* }
*/
public static final OfInt map_id$layout() {
return map_id$LAYOUT;
}
private static final long map_id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 map_id
* }
*/
public static final long map_id$offset() {
return map_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 map_id
* }
*/
public static int map_id(MemorySegment union) {
return union.get(map_id$LAYOUT, map_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 map_id
* }
*/
public static void map_id(MemorySegment union, int fieldValue) {
union.set(map_id$LAYOUT, map_id$OFFSET, fieldValue);
}
private static final OfInt btf_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1625:2"), groupElement("$anon$1626:3"), groupElement("btf_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_id
* }
*/
public static final OfInt btf_id$layout() {
return btf_id$LAYOUT;
}
private static final long btf_id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_id
* }
*/
public static final long btf_id$offset() {
return btf_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_id
* }
*/
public static int btf_id(MemorySegment union) {
return union.get(btf_id$LAYOUT, btf_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_id
* }
*/
public static void btf_id(MemorySegment union, int fieldValue) {
union.set(btf_id$LAYOUT, btf_id$OFFSET, fieldValue);
}
private static final OfInt link_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1625:2"), groupElement("$anon$1626:3"), groupElement("link_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 link_id
* }
*/
public static final OfInt link_id$layout() {
return link_id$LAYOUT;
}
private static final long link_id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 link_id
* }
*/
public static final long link_id$offset() {
return link_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 link_id
* }
*/
public static int link_id(MemorySegment union) {
return union.get(link_id$LAYOUT, link_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 link_id
* }
*/
public static void link_id(MemorySegment union, int fieldValue) {
union.set(link_id$LAYOUT, link_id$OFFSET, fieldValue);
}
private static final OfInt next_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1625:2"), groupElement("next_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 next_id
* }
*/
public static final OfInt next_id$layout() {
return next_id$LAYOUT;
}
private static final long next_id$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 next_id
* }
*/
public static final long next_id$offset() {
return next_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 next_id
* }
*/
public static int next_id(MemorySegment union) {
return union.get(next_id$LAYOUT, next_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 next_id
* }
*/
public static void next_id(MemorySegment union, int fieldValue) {
union.set(next_id$LAYOUT, next_id$OFFSET, fieldValue);
}
private static final OfInt open_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1625:2"), groupElement("open_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 open_flags
* }
*/
public static final OfInt open_flags$layout() {
return open_flags$LAYOUT;
}
private static final long open_flags$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 open_flags
* }
*/
public static final long open_flags$offset() {
return open_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 open_flags
* }
*/
public static int open_flags(MemorySegment union) {
return union.get(open_flags$LAYOUT, open_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 open_flags
* }
*/
public static void open_flags(MemorySegment union, int fieldValue) {
union.set(open_flags$LAYOUT, open_flags$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* struct {
* __u32 bpf_fd;
* __u32 info_len;
* __u64 info;
* }
* }
*/
public static class info {
info() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("bpf_fd"),
Lib.C_INT.withName("info_len"),
Lib.C_LONG_LONG.withName("info")
).withName("$anon$1637:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt bpf_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bpf_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 bpf_fd
* }
*/
public static final OfInt bpf_fd$layout() {
return bpf_fd$LAYOUT;
}
private static final long bpf_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 bpf_fd
* }
*/
public static final long bpf_fd$offset() {
return bpf_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 bpf_fd
* }
*/
public static int bpf_fd(MemorySegment struct) {
return struct.get(bpf_fd$LAYOUT, bpf_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 bpf_fd
* }
*/
public static void bpf_fd(MemorySegment struct, int fieldValue) {
struct.set(bpf_fd$LAYOUT, bpf_fd$OFFSET, fieldValue);
}
private static final OfInt info_len$LAYOUT = (OfInt)$LAYOUT.select(groupElement("info_len"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 info_len
* }
*/
public static final OfInt info_len$layout() {
return info_len$LAYOUT;
}
private static final long info_len$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 info_len
* }
*/
public static final long info_len$offset() {
return info_len$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 info_len
* }
*/
public static int info_len(MemorySegment struct) {
return struct.get(info_len$LAYOUT, info_len$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 info_len
* }
*/
public static void info_len(MemorySegment struct, int fieldValue) {
struct.set(info_len$LAYOUT, info_len$OFFSET, fieldValue);
}
private static final OfLong info$LAYOUT = (OfLong)$LAYOUT.select(groupElement("info"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 info
* }
*/
public static final OfLong info$layout() {
return info$LAYOUT;
}
private static final long info$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 info
* }
*/
public static final long info$offset() {
return info$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 info
* }
*/
public static long info(MemorySegment struct) {
return struct.get(info$LAYOUT, info$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 info
* }
*/
public static void info(MemorySegment struct, long fieldValue) {
struct.set(info$LAYOUT, info$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout info$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("info"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 bpf_fd;
* __u32 info_len;
* __u64 info;
* } info
* }
*/
public static final GroupLayout info$layout() {
return info$LAYOUT;
}
private static final long info$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 bpf_fd;
* __u32 info_len;
* __u64 info;
* } info
* }
*/
public static final long info$offset() {
return info$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 bpf_fd;
* __u32 info_len;
* __u64 info;
* } info
* }
*/
public static MemorySegment info(MemorySegment union) {
return union.asSlice(info$OFFSET, info$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 bpf_fd;
* __u32 info_len;
* __u64 info;
* } info
* }
*/
public static void info(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, info$OFFSET, info$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 query_flags;
* __u32 attach_flags;
* __u64 prog_ids;
* union {
* __u32 prog_cnt;
* __u32 count;
* };
* __u32 : 32;
* __u64 prog_attach_flags;
* __u64 link_ids;
* __u64 link_attach_flags;
* __u64 revision;
* }
* }
*/
public static class query {
query() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
MemoryLayout.unionLayout(
Lib.C_INT.withName("target_fd"),
Lib.C_INT.withName("target_ifindex")
).withName("$anon$1644:3"),
Lib.C_INT.withName("attach_type"),
Lib.C_INT.withName("query_flags"),
Lib.C_INT.withName("attach_flags"),
Lib.C_LONG_LONG.withName("prog_ids"),
MemoryLayout.unionLayout(
Lib.C_INT.withName("prog_cnt"),
Lib.C_INT.withName("count")
).withName("$anon$1652:3"),
MemoryLayout.paddingLayout(4),
Lib.C_LONG_LONG.withName("prog_attach_flags"),
Lib.C_LONG_LONG.withName("link_ids"),
Lib.C_LONG_LONG.withName("link_attach_flags"),
Lib.C_LONG_LONG.withName("revision")
).withName("$anon$1643:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt target_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1644:3"), groupElement("target_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static final OfInt target_fd$layout() {
return target_fd$LAYOUT;
}
private static final long target_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static final long target_fd$offset() {
return target_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static int target_fd(MemorySegment struct) {
return struct.get(target_fd$LAYOUT, target_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static void target_fd(MemorySegment struct, int fieldValue) {
struct.set(target_fd$LAYOUT, target_fd$OFFSET, fieldValue);
}
private static final OfInt target_ifindex$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1644:3"), groupElement("target_ifindex"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static final OfInt target_ifindex$layout() {
return target_ifindex$LAYOUT;
}
private static final long target_ifindex$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static final long target_ifindex$offset() {
return target_ifindex$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static int target_ifindex(MemorySegment struct) {
return struct.get(target_ifindex$LAYOUT, target_ifindex$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static void target_ifindex(MemorySegment struct, int fieldValue) {
struct.set(target_ifindex$LAYOUT, target_ifindex$OFFSET, fieldValue);
}
private static final OfInt attach_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("attach_type"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static final OfInt attach_type$layout() {
return attach_type$LAYOUT;
}
private static final long attach_type$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static final long attach_type$offset() {
return attach_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static int attach_type(MemorySegment struct) {
return struct.get(attach_type$LAYOUT, attach_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static void attach_type(MemorySegment struct, int fieldValue) {
struct.set(attach_type$LAYOUT, attach_type$OFFSET, fieldValue);
}
private static final OfInt query_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("query_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 query_flags
* }
*/
public static final OfInt query_flags$layout() {
return query_flags$LAYOUT;
}
private static final long query_flags$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 query_flags
* }
*/
public static final long query_flags$offset() {
return query_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 query_flags
* }
*/
public static int query_flags(MemorySegment struct) {
return struct.get(query_flags$LAYOUT, query_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 query_flags
* }
*/
public static void query_flags(MemorySegment struct, int fieldValue) {
struct.set(query_flags$LAYOUT, query_flags$OFFSET, fieldValue);
}
private static final OfInt attach_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("attach_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_flags
* }
*/
public static final OfInt attach_flags$layout() {
return attach_flags$LAYOUT;
}
private static final long attach_flags$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_flags
* }
*/
public static final long attach_flags$offset() {
return attach_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_flags
* }
*/
public static int attach_flags(MemorySegment struct) {
return struct.get(attach_flags$LAYOUT, attach_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_flags
* }
*/
public static void attach_flags(MemorySegment struct, int fieldValue) {
struct.set(attach_flags$LAYOUT, attach_flags$OFFSET, fieldValue);
}
private static final OfLong prog_ids$LAYOUT = (OfLong)$LAYOUT.select(groupElement("prog_ids"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 prog_ids
* }
*/
public static final OfLong prog_ids$layout() {
return prog_ids$LAYOUT;
}
private static final long prog_ids$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 prog_ids
* }
*/
public static final long prog_ids$offset() {
return prog_ids$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 prog_ids
* }
*/
public static long prog_ids(MemorySegment struct) {
return struct.get(prog_ids$LAYOUT, prog_ids$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 prog_ids
* }
*/
public static void prog_ids(MemorySegment struct, long fieldValue) {
struct.set(prog_ids$LAYOUT, prog_ids$OFFSET, fieldValue);
}
private static final OfInt prog_cnt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1652:3"), groupElement("prog_cnt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_cnt
* }
*/
public static final OfInt prog_cnt$layout() {
return prog_cnt$LAYOUT;
}
private static final long prog_cnt$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_cnt
* }
*/
public static final long prog_cnt$offset() {
return prog_cnt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_cnt
* }
*/
public static int prog_cnt(MemorySegment struct) {
return struct.get(prog_cnt$LAYOUT, prog_cnt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_cnt
* }
*/
public static void prog_cnt(MemorySegment struct, int fieldValue) {
struct.set(prog_cnt$LAYOUT, prog_cnt$OFFSET, fieldValue);
}
private static final OfInt count$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1652:3"), groupElement("count"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 count
* }
*/
public static final OfInt count$layout() {
return count$LAYOUT;
}
private static final long count$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 count
* }
*/
public static final long count$offset() {
return count$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 count
* }
*/
public static int count(MemorySegment struct) {
return struct.get(count$LAYOUT, count$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 count
* }
*/
public static void count(MemorySegment struct, int fieldValue) {
struct.set(count$LAYOUT, count$OFFSET, fieldValue);
}
private static final OfLong prog_attach_flags$LAYOUT = (OfLong)$LAYOUT.select(groupElement("prog_attach_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 prog_attach_flags
* }
*/
public static final OfLong prog_attach_flags$layout() {
return prog_attach_flags$LAYOUT;
}
private static final long prog_attach_flags$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 prog_attach_flags
* }
*/
public static final long prog_attach_flags$offset() {
return prog_attach_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 prog_attach_flags
* }
*/
public static long prog_attach_flags(MemorySegment struct) {
return struct.get(prog_attach_flags$LAYOUT, prog_attach_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 prog_attach_flags
* }
*/
public static void prog_attach_flags(MemorySegment struct, long fieldValue) {
struct.set(prog_attach_flags$LAYOUT, prog_attach_flags$OFFSET, fieldValue);
}
private static final OfLong link_ids$LAYOUT = (OfLong)$LAYOUT.select(groupElement("link_ids"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 link_ids
* }
*/
public static final OfLong link_ids$layout() {
return link_ids$LAYOUT;
}
private static final long link_ids$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 link_ids
* }
*/
public static final long link_ids$offset() {
return link_ids$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 link_ids
* }
*/
public static long link_ids(MemorySegment struct) {
return struct.get(link_ids$LAYOUT, link_ids$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 link_ids
* }
*/
public static void link_ids(MemorySegment struct, long fieldValue) {
struct.set(link_ids$LAYOUT, link_ids$OFFSET, fieldValue);
}
private static final OfLong link_attach_flags$LAYOUT = (OfLong)$LAYOUT.select(groupElement("link_attach_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 link_attach_flags
* }
*/
public static final OfLong link_attach_flags$layout() {
return link_attach_flags$LAYOUT;
}
private static final long link_attach_flags$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 link_attach_flags
* }
*/
public static final long link_attach_flags$offset() {
return link_attach_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 link_attach_flags
* }
*/
public static long link_attach_flags(MemorySegment struct) {
return struct.get(link_attach_flags$LAYOUT, link_attach_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 link_attach_flags
* }
*/
public static void link_attach_flags(MemorySegment struct, long fieldValue) {
struct.set(link_attach_flags$LAYOUT, link_attach_flags$OFFSET, fieldValue);
}
private static final OfLong revision$LAYOUT = (OfLong)$LAYOUT.select(groupElement("revision"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 revision
* }
*/
public static final OfLong revision$layout() {
return revision$LAYOUT;
}
private static final long revision$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 revision
* }
*/
public static final long revision$offset() {
return revision$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 revision
* }
*/
public static long revision(MemorySegment struct) {
return struct.get(revision$LAYOUT, revision$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 revision
* }
*/
public static void revision(MemorySegment struct, long fieldValue) {
struct.set(revision$LAYOUT, revision$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout query$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("query"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 query_flags;
* __u32 attach_flags;
* __u64 prog_ids;
* union {
* __u32 prog_cnt;
* __u32 count;
* };
* __u32 : 32;
* __u64 prog_attach_flags;
* __u64 link_ids;
* __u64 link_attach_flags;
* __u64 revision;
* } query
* }
*/
public static final GroupLayout query$layout() {
return query$LAYOUT;
}
private static final long query$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 query_flags;
* __u32 attach_flags;
* __u64 prog_ids;
* union {
* __u32 prog_cnt;
* __u32 count;
* };
* __u32 : 32;
* __u64 prog_attach_flags;
* __u64 link_ids;
* __u64 link_attach_flags;
* __u64 revision;
* } query
* }
*/
public static final long query$offset() {
return query$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 query_flags;
* __u32 attach_flags;
* __u64 prog_ids;
* union {
* __u32 prog_cnt;
* __u32 count;
* };
* __u32 : 32;
* __u64 prog_attach_flags;
* __u64 link_ids;
* __u64 link_attach_flags;
* __u64 revision;
* } query
* }
*/
public static MemorySegment query(MemorySegment union) {
return union.asSlice(query$OFFSET, query$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 query_flags;
* __u32 attach_flags;
* __u64 prog_ids;
* union {
* __u32 prog_cnt;
* __u32 count;
* };
* __u32 : 32;
* __u64 prog_attach_flags;
* __u64 link_ids;
* __u64 link_attach_flags;
* __u64 revision;
* } query
* }
*/
public static void query(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, query$OFFSET, query$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u64 name;
* __u32 prog_fd;
* __u32 : 32;
* __u64 cookie;
* }
* }
*/
public static class raw_tracepoint {
raw_tracepoint() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_LONG_LONG.withName("name"),
Lib.C_INT.withName("prog_fd"),
MemoryLayout.paddingLayout(4),
Lib.C_LONG_LONG.withName("cookie")
).withName("$anon$1666:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfLong name$LAYOUT = (OfLong)$LAYOUT.select(groupElement("name"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 name
* }
*/
public static final OfLong name$layout() {
return name$LAYOUT;
}
private static final long name$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 name
* }
*/
public static final long name$offset() {
return name$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 name
* }
*/
public static long name(MemorySegment struct) {
return struct.get(name$LAYOUT, name$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 name
* }
*/
public static void name(MemorySegment struct, long fieldValue) {
struct.set(name$LAYOUT, name$OFFSET, fieldValue);
}
private static final OfInt prog_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("prog_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static final OfInt prog_fd$layout() {
return prog_fd$LAYOUT;
}
private static final long prog_fd$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static final long prog_fd$offset() {
return prog_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static int prog_fd(MemorySegment struct) {
return struct.get(prog_fd$LAYOUT, prog_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static void prog_fd(MemorySegment struct, int fieldValue) {
struct.set(prog_fd$LAYOUT, prog_fd$OFFSET, fieldValue);
}
private static final OfLong cookie$LAYOUT = (OfLong)$LAYOUT.select(groupElement("cookie"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 cookie
* }
*/
public static final OfLong cookie$layout() {
return cookie$LAYOUT;
}
private static final long cookie$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 cookie
* }
*/
public static final long cookie$offset() {
return cookie$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 cookie
* }
*/
public static long cookie(MemorySegment struct) {
return struct.get(cookie$LAYOUT, cookie$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 cookie
* }
*/
public static void cookie(MemorySegment struct, long fieldValue) {
struct.set(cookie$LAYOUT, cookie$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout raw_tracepoint$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("raw_tracepoint"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u64 name;
* __u32 prog_fd;
* __u32 : 32;
* __u64 cookie;
* } raw_tracepoint
* }
*/
public static final GroupLayout raw_tracepoint$layout() {
return raw_tracepoint$LAYOUT;
}
private static final long raw_tracepoint$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u64 name;
* __u32 prog_fd;
* __u32 : 32;
* __u64 cookie;
* } raw_tracepoint
* }
*/
public static final long raw_tracepoint$offset() {
return raw_tracepoint$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u64 name;
* __u32 prog_fd;
* __u32 : 32;
* __u64 cookie;
* } raw_tracepoint
* }
*/
public static MemorySegment raw_tracepoint(MemorySegment union) {
return union.asSlice(raw_tracepoint$OFFSET, raw_tracepoint$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u64 name;
* __u32 prog_fd;
* __u32 : 32;
* __u64 cookie;
* } raw_tracepoint
* }
*/
public static void raw_tracepoint(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, raw_tracepoint$OFFSET, raw_tracepoint$LAYOUT.byteSize());
}
private static final OfLong btf$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1673:2"), groupElement("btf"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 btf
* }
*/
public static final OfLong btf$layout() {
return btf$LAYOUT;
}
private static final long btf$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 btf
* }
*/
public static final long btf$offset() {
return btf$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 btf
* }
*/
public static long btf(MemorySegment union) {
return union.get(btf$LAYOUT, btf$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 btf
* }
*/
public static void btf(MemorySegment union, long fieldValue) {
union.set(btf$LAYOUT, btf$OFFSET, fieldValue);
}
private static final OfLong btf_log_buf$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1673:2"), groupElement("btf_log_buf"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 btf_log_buf
* }
*/
public static final OfLong btf_log_buf$layout() {
return btf_log_buf$LAYOUT;
}
private static final long btf_log_buf$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 btf_log_buf
* }
*/
public static final long btf_log_buf$offset() {
return btf_log_buf$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 btf_log_buf
* }
*/
public static long btf_log_buf(MemorySegment union) {
return union.get(btf_log_buf$LAYOUT, btf_log_buf$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 btf_log_buf
* }
*/
public static void btf_log_buf(MemorySegment union, long fieldValue) {
union.set(btf_log_buf$LAYOUT, btf_log_buf$OFFSET, fieldValue);
}
private static final OfInt btf_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1673:2"), groupElement("btf_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_size
* }
*/
public static final OfInt btf_size$layout() {
return btf_size$LAYOUT;
}
private static final long btf_size$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_size
* }
*/
public static final long btf_size$offset() {
return btf_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_size
* }
*/
public static int btf_size(MemorySegment union) {
return union.get(btf_size$LAYOUT, btf_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_size
* }
*/
public static void btf_size(MemorySegment union, int fieldValue) {
union.set(btf_size$LAYOUT, btf_size$OFFSET, fieldValue);
}
private static final OfInt btf_log_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1673:2"), groupElement("btf_log_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_log_size
* }
*/
public static final OfInt btf_log_size$layout() {
return btf_log_size$LAYOUT;
}
private static final long btf_log_size$OFFSET = 20;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_log_size
* }
*/
public static final long btf_log_size$offset() {
return btf_log_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_log_size
* }
*/
public static int btf_log_size(MemorySegment union) {
return union.get(btf_log_size$LAYOUT, btf_log_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_log_size
* }
*/
public static void btf_log_size(MemorySegment union, int fieldValue) {
union.set(btf_log_size$LAYOUT, btf_log_size$OFFSET, fieldValue);
}
private static final OfInt btf_log_level$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1673:2"), groupElement("btf_log_level"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_log_level
* }
*/
public static final OfInt btf_log_level$layout() {
return btf_log_level$LAYOUT;
}
private static final long btf_log_level$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_log_level
* }
*/
public static final long btf_log_level$offset() {
return btf_log_level$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_log_level
* }
*/
public static int btf_log_level(MemorySegment union) {
return union.get(btf_log_level$LAYOUT, btf_log_level$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_log_level
* }
*/
public static void btf_log_level(MemorySegment union, int fieldValue) {
union.set(btf_log_level$LAYOUT, btf_log_level$OFFSET, fieldValue);
}
private static final OfInt btf_log_true_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1673:2"), groupElement("btf_log_true_size"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_log_true_size
* }
*/
public static final OfInt btf_log_true_size$layout() {
return btf_log_true_size$LAYOUT;
}
private static final long btf_log_true_size$OFFSET = 28;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_log_true_size
* }
*/
public static final long btf_log_true_size$offset() {
return btf_log_true_size$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_log_true_size
* }
*/
public static int btf_log_true_size(MemorySegment union) {
return union.get(btf_log_true_size$LAYOUT, btf_log_true_size$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_log_true_size
* }
*/
public static void btf_log_true_size(MemorySegment union, int fieldValue) {
union.set(btf_log_true_size$LAYOUT, btf_log_true_size$OFFSET, fieldValue);
}
private static final OfInt btf_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1673:2"), groupElement("btf_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 btf_flags
* }
*/
public static final OfInt btf_flags$layout() {
return btf_flags$LAYOUT;
}
private static final long btf_flags$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 btf_flags
* }
*/
public static final long btf_flags$offset() {
return btf_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 btf_flags
* }
*/
public static int btf_flags(MemorySegment union) {
return union.get(btf_flags$LAYOUT, btf_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 btf_flags
* }
*/
public static void btf_flags(MemorySegment union, int fieldValue) {
union.set(btf_flags$LAYOUT, btf_flags$OFFSET, fieldValue);
}
private static final OfInt btf_token_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1673:2"), groupElement("btf_token_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __s32 btf_token_fd
* }
*/
public static final OfInt btf_token_fd$layout() {
return btf_token_fd$LAYOUT;
}
private static final long btf_token_fd$OFFSET = 36;
/**
* Offset for field:
* {@snippet lang=c :
* __s32 btf_token_fd
* }
*/
public static final long btf_token_fd$offset() {
return btf_token_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __s32 btf_token_fd
* }
*/
public static int btf_token_fd(MemorySegment union) {
return union.get(btf_token_fd$LAYOUT, btf_token_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __s32 btf_token_fd
* }
*/
public static void btf_token_fd(MemorySegment union, int fieldValue) {
union.set(btf_token_fd$LAYOUT, btf_token_fd$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* struct {
* __u32 pid;
* __u32 fd;
* __u32 flags;
* __u32 buf_len;
* __u64 buf;
* __u32 prog_id;
* __u32 fd_type;
* __u64 probe_offset;
* __u64 probe_addr;
* }
* }
*/
public static class task_fd_query {
task_fd_query() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("pid"),
Lib.C_INT.withName("fd"),
Lib.C_INT.withName("flags"),
Lib.C_INT.withName("buf_len"),
Lib.C_LONG_LONG.withName("buf"),
Lib.C_INT.withName("prog_id"),
Lib.C_INT.withName("fd_type"),
Lib.C_LONG_LONG.withName("probe_offset"),
Lib.C_LONG_LONG.withName("probe_addr")
).withName("$anon$1691:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt pid$LAYOUT = (OfInt)$LAYOUT.select(groupElement("pid"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 pid
* }
*/
public static final OfInt pid$layout() {
return pid$LAYOUT;
}
private static final long pid$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 pid
* }
*/
public static final long pid$offset() {
return pid$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 pid
* }
*/
public static int pid(MemorySegment struct) {
return struct.get(pid$LAYOUT, pid$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 pid
* }
*/
public static void pid(MemorySegment struct, int fieldValue) {
struct.set(pid$LAYOUT, pid$OFFSET, fieldValue);
}
private static final OfInt fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 fd
* }
*/
public static final OfInt fd$layout() {
return fd$LAYOUT;
}
private static final long fd$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 fd
* }
*/
public static final long fd$offset() {
return fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 fd
* }
*/
public static int fd(MemorySegment struct) {
return struct.get(fd$LAYOUT, fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 fd
* }
*/
public static void fd(MemorySegment struct, int fieldValue) {
struct.set(fd$LAYOUT, fd$OFFSET, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
private static final OfInt buf_len$LAYOUT = (OfInt)$LAYOUT.select(groupElement("buf_len"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 buf_len
* }
*/
public static final OfInt buf_len$layout() {
return buf_len$LAYOUT;
}
private static final long buf_len$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 buf_len
* }
*/
public static final long buf_len$offset() {
return buf_len$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 buf_len
* }
*/
public static int buf_len(MemorySegment struct) {
return struct.get(buf_len$LAYOUT, buf_len$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 buf_len
* }
*/
public static void buf_len(MemorySegment struct, int fieldValue) {
struct.set(buf_len$LAYOUT, buf_len$OFFSET, fieldValue);
}
private static final OfLong buf$LAYOUT = (OfLong)$LAYOUT.select(groupElement("buf"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 buf
* }
*/
public static final OfLong buf$layout() {
return buf$LAYOUT;
}
private static final long buf$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 buf
* }
*/
public static final long buf$offset() {
return buf$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 buf
* }
*/
public static long buf(MemorySegment struct) {
return struct.get(buf$LAYOUT, buf$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 buf
* }
*/
public static void buf(MemorySegment struct, long fieldValue) {
struct.set(buf$LAYOUT, buf$OFFSET, fieldValue);
}
private static final OfInt prog_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("prog_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_id
* }
*/
public static final OfInt prog_id$layout() {
return prog_id$LAYOUT;
}
private static final long prog_id$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_id
* }
*/
public static final long prog_id$offset() {
return prog_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_id
* }
*/
public static int prog_id(MemorySegment struct) {
return struct.get(prog_id$LAYOUT, prog_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_id
* }
*/
public static void prog_id(MemorySegment struct, int fieldValue) {
struct.set(prog_id$LAYOUT, prog_id$OFFSET, fieldValue);
}
private static final OfInt fd_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("fd_type"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 fd_type
* }
*/
public static final OfInt fd_type$layout() {
return fd_type$LAYOUT;
}
private static final long fd_type$OFFSET = 28;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 fd_type
* }
*/
public static final long fd_type$offset() {
return fd_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 fd_type
* }
*/
public static int fd_type(MemorySegment struct) {
return struct.get(fd_type$LAYOUT, fd_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 fd_type
* }
*/
public static void fd_type(MemorySegment struct, int fieldValue) {
struct.set(fd_type$LAYOUT, fd_type$OFFSET, fieldValue);
}
private static final OfLong probe_offset$LAYOUT = (OfLong)$LAYOUT.select(groupElement("probe_offset"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 probe_offset
* }
*/
public static final OfLong probe_offset$layout() {
return probe_offset$LAYOUT;
}
private static final long probe_offset$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 probe_offset
* }
*/
public static final long probe_offset$offset() {
return probe_offset$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 probe_offset
* }
*/
public static long probe_offset(MemorySegment struct) {
return struct.get(probe_offset$LAYOUT, probe_offset$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 probe_offset
* }
*/
public static void probe_offset(MemorySegment struct, long fieldValue) {
struct.set(probe_offset$LAYOUT, probe_offset$OFFSET, fieldValue);
}
private static final OfLong probe_addr$LAYOUT = (OfLong)$LAYOUT.select(groupElement("probe_addr"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 probe_addr
* }
*/
public static final OfLong probe_addr$layout() {
return probe_addr$LAYOUT;
}
private static final long probe_addr$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 probe_addr
* }
*/
public static final long probe_addr$offset() {
return probe_addr$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 probe_addr
* }
*/
public static long probe_addr(MemorySegment struct) {
return struct.get(probe_addr$LAYOUT, probe_addr$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 probe_addr
* }
*/
public static void probe_addr(MemorySegment struct, long fieldValue) {
struct.set(probe_addr$LAYOUT, probe_addr$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout task_fd_query$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("task_fd_query"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 pid;
* __u32 fd;
* __u32 flags;
* __u32 buf_len;
* __u64 buf;
* __u32 prog_id;
* __u32 fd_type;
* __u64 probe_offset;
* __u64 probe_addr;
* } task_fd_query
* }
*/
public static final GroupLayout task_fd_query$layout() {
return task_fd_query$LAYOUT;
}
private static final long task_fd_query$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 pid;
* __u32 fd;
* __u32 flags;
* __u32 buf_len;
* __u64 buf;
* __u32 prog_id;
* __u32 fd_type;
* __u64 probe_offset;
* __u64 probe_addr;
* } task_fd_query
* }
*/
public static final long task_fd_query$offset() {
return task_fd_query$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 pid;
* __u32 fd;
* __u32 flags;
* __u32 buf_len;
* __u64 buf;
* __u32 prog_id;
* __u32 fd_type;
* __u64 probe_offset;
* __u64 probe_addr;
* } task_fd_query
* }
*/
public static MemorySegment task_fd_query(MemorySegment union) {
return union.asSlice(task_fd_query$OFFSET, task_fd_query$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 pid;
* __u32 fd;
* __u32 flags;
* __u32 buf_len;
* __u64 buf;
* __u32 prog_id;
* __u32 fd_type;
* __u64 probe_offset;
* __u64 probe_addr;
* } task_fd_query
* }
*/
public static void task_fd_query(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, task_fd_query$OFFSET, task_fd_query$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* union {
* __u32 prog_fd;
* __u32 map_fd;
* };
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 flags;
* union {
* __u32 target_btf_id;
* struct {
* __u64 iter_info;
* __u32 iter_info_len;
* };
* struct {
* __u64 bpf_cookie;
* } perf_event;
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi;
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing;
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx;
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit;
* };
* }
* }
*/
public static class link_create {
link_create() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
MemoryLayout.unionLayout(
Lib.C_INT.withName("prog_fd"),
Lib.C_INT.withName("map_fd")
).withName("$anon$1708:3"),
MemoryLayout.unionLayout(
Lib.C_INT.withName("target_fd"),
Lib.C_INT.withName("target_ifindex")
).withName("$anon$1712:3"),
Lib.C_INT.withName("attach_type"),
Lib.C_INT.withName("flags"),
MemoryLayout.unionLayout(
Lib.C_INT.withName("target_btf_id"),
MemoryLayout.structLayout(
Lib.C_LONG_LONG.withName("iter_info"),
Lib.C_INT.withName("iter_info_len"),
MemoryLayout.paddingLayout(4)
).withName("$anon$1720:4"),
bpf_attr.link_create.perf_event.layout().withName("perf_event"),
bpf_attr.link_create.kprobe_multi.layout().withName("kprobe_multi"),
bpf_attr.link_create.tracing.layout().withName("tracing"),
bpf_attr.link_create.netfilter.layout().withName("netfilter"),
bpf_attr.link_create.tcx.layout().withName("tcx"),
bpf_attr.link_create.uprobe_multi.layout().withName("uprobe_multi"),
bpf_attr.link_create.netkit.layout().withName("netkit")
).withName("$anon$1718:3")
).withName("$anon$1707:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt prog_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1708:3"), groupElement("prog_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static final OfInt prog_fd$layout() {
return prog_fd$LAYOUT;
}
private static final long prog_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static final long prog_fd$offset() {
return prog_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static int prog_fd(MemorySegment struct) {
return struct.get(prog_fd$LAYOUT, prog_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static void prog_fd(MemorySegment struct, int fieldValue) {
struct.set(prog_fd$LAYOUT, prog_fd$OFFSET, fieldValue);
}
private static final OfInt map_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1708:3"), groupElement("map_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static final OfInt map_fd$layout() {
return map_fd$LAYOUT;
}
private static final long map_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static final long map_fd$offset() {
return map_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static int map_fd(MemorySegment struct) {
return struct.get(map_fd$LAYOUT, map_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static void map_fd(MemorySegment struct, int fieldValue) {
struct.set(map_fd$LAYOUT, map_fd$OFFSET, fieldValue);
}
private static final OfInt target_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1712:3"), groupElement("target_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static final OfInt target_fd$layout() {
return target_fd$LAYOUT;
}
private static final long target_fd$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static final long target_fd$offset() {
return target_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static int target_fd(MemorySegment struct) {
return struct.get(target_fd$LAYOUT, target_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 target_fd
* }
*/
public static void target_fd(MemorySegment struct, int fieldValue) {
struct.set(target_fd$LAYOUT, target_fd$OFFSET, fieldValue);
}
private static final OfInt target_ifindex$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1712:3"), groupElement("target_ifindex"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static final OfInt target_ifindex$layout() {
return target_ifindex$LAYOUT;
}
private static final long target_ifindex$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static final long target_ifindex$offset() {
return target_ifindex$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static int target_ifindex(MemorySegment struct) {
return struct.get(target_ifindex$LAYOUT, target_ifindex$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 target_ifindex
* }
*/
public static void target_ifindex(MemorySegment struct, int fieldValue) {
struct.set(target_ifindex$LAYOUT, target_ifindex$OFFSET, fieldValue);
}
private static final OfInt attach_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("attach_type"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static final OfInt attach_type$layout() {
return attach_type$LAYOUT;
}
private static final long attach_type$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static final long attach_type$offset() {
return attach_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static int attach_type(MemorySegment struct) {
return struct.get(attach_type$LAYOUT, attach_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 attach_type
* }
*/
public static void attach_type(MemorySegment struct, int fieldValue) {
struct.set(attach_type$LAYOUT, attach_type$OFFSET, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
private static final OfInt target_btf_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("target_btf_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 target_btf_id
* }
*/
public static final OfInt target_btf_id$layout() {
return target_btf_id$LAYOUT;
}
private static final long target_btf_id$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 target_btf_id
* }
*/
public static final long target_btf_id$offset() {
return target_btf_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 target_btf_id
* }
*/
public static int target_btf_id(MemorySegment struct) {
return struct.get(target_btf_id$LAYOUT, target_btf_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 target_btf_id
* }
*/
public static void target_btf_id(MemorySegment struct, int fieldValue) {
struct.set(target_btf_id$LAYOUT, target_btf_id$OFFSET, fieldValue);
}
private static final OfLong iter_info$LAYOUT = (OfLong)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("$anon$1720:4"), groupElement("iter_info"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 iter_info
* }
*/
public static final OfLong iter_info$layout() {
return iter_info$LAYOUT;
}
private static final long iter_info$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 iter_info
* }
*/
public static final long iter_info$offset() {
return iter_info$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 iter_info
* }
*/
public static long iter_info(MemorySegment struct) {
return struct.get(iter_info$LAYOUT, iter_info$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 iter_info
* }
*/
public static void iter_info(MemorySegment struct, long fieldValue) {
struct.set(iter_info$LAYOUT, iter_info$OFFSET, fieldValue);
}
private static final OfInt iter_info_len$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("$anon$1720:4"), groupElement("iter_info_len"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 iter_info_len
* }
*/
public static final OfInt iter_info_len$layout() {
return iter_info_len$LAYOUT;
}
private static final long iter_info_len$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 iter_info_len
* }
*/
public static final long iter_info_len$offset() {
return iter_info_len$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 iter_info_len
* }
*/
public static int iter_info_len(MemorySegment struct) {
return struct.get(iter_info_len$LAYOUT, iter_info_len$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 iter_info_len
* }
*/
public static void iter_info_len(MemorySegment struct, int fieldValue) {
struct.set(iter_info_len$LAYOUT, iter_info_len$OFFSET, fieldValue);
}
/**
* {@snippet lang=c :
* struct {
* __u64 bpf_cookie;
* }
* }
*/
public static class perf_event {
perf_event() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_LONG_LONG.withName("bpf_cookie")
).withName("$anon$1724:4");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfLong bpf_cookie$LAYOUT = (OfLong)$LAYOUT.select(groupElement("bpf_cookie"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 bpf_cookie
* }
*/
public static final OfLong bpf_cookie$layout() {
return bpf_cookie$LAYOUT;
}
private static final long bpf_cookie$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 bpf_cookie
* }
*/
public static final long bpf_cookie$offset() {
return bpf_cookie$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 bpf_cookie
* }
*/
public static long bpf_cookie(MemorySegment struct) {
return struct.get(bpf_cookie$LAYOUT, bpf_cookie$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 bpf_cookie
* }
*/
public static void bpf_cookie(MemorySegment struct, long fieldValue) {
struct.set(bpf_cookie$LAYOUT, bpf_cookie$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout perf_event$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("perf_event"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u64 bpf_cookie;
* } perf_event
* }
*/
public static final GroupLayout perf_event$layout() {
return perf_event$LAYOUT;
}
private static final long perf_event$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u64 bpf_cookie;
* } perf_event
* }
*/
public static final long perf_event$offset() {
return perf_event$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u64 bpf_cookie;
* } perf_event
* }
*/
public static MemorySegment perf_event(MemorySegment struct) {
return struct.asSlice(perf_event$OFFSET, perf_event$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u64 bpf_cookie;
* } perf_event
* }
*/
public static void perf_event(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, perf_event$OFFSET, perf_event$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* }
* }
*/
public static class kprobe_multi {
kprobe_multi() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("flags"),
Lib.C_INT.withName("cnt"),
Lib.C_LONG_LONG.withName("syms"),
Lib.C_LONG_LONG.withName("addrs"),
Lib.C_LONG_LONG.withName("cookies")
).withName("$anon$1731:4");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
private static final OfInt cnt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("cnt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 cnt
* }
*/
public static final OfInt cnt$layout() {
return cnt$LAYOUT;
}
private static final long cnt$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 cnt
* }
*/
public static final long cnt$offset() {
return cnt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 cnt
* }
*/
public static int cnt(MemorySegment struct) {
return struct.get(cnt$LAYOUT, cnt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 cnt
* }
*/
public static void cnt(MemorySegment struct, int fieldValue) {
struct.set(cnt$LAYOUT, cnt$OFFSET, fieldValue);
}
private static final OfLong syms$LAYOUT = (OfLong)$LAYOUT.select(groupElement("syms"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 syms
* }
*/
public static final OfLong syms$layout() {
return syms$LAYOUT;
}
private static final long syms$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 syms
* }
*/
public static final long syms$offset() {
return syms$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 syms
* }
*/
public static long syms(MemorySegment struct) {
return struct.get(syms$LAYOUT, syms$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 syms
* }
*/
public static void syms(MemorySegment struct, long fieldValue) {
struct.set(syms$LAYOUT, syms$OFFSET, fieldValue);
}
private static final OfLong addrs$LAYOUT = (OfLong)$LAYOUT.select(groupElement("addrs"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 addrs
* }
*/
public static final OfLong addrs$layout() {
return addrs$LAYOUT;
}
private static final long addrs$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 addrs
* }
*/
public static final long addrs$offset() {
return addrs$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 addrs
* }
*/
public static long addrs(MemorySegment struct) {
return struct.get(addrs$LAYOUT, addrs$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 addrs
* }
*/
public static void addrs(MemorySegment struct, long fieldValue) {
struct.set(addrs$LAYOUT, addrs$OFFSET, fieldValue);
}
private static final OfLong cookies$LAYOUT = (OfLong)$LAYOUT.select(groupElement("cookies"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 cookies
* }
*/
public static final OfLong cookies$layout() {
return cookies$LAYOUT;
}
private static final long cookies$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 cookies
* }
*/
public static final long cookies$offset() {
return cookies$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 cookies
* }
*/
public static long cookies(MemorySegment struct) {
return struct.get(cookies$LAYOUT, cookies$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 cookies
* }
*/
public static void cookies(MemorySegment struct, long fieldValue) {
struct.set(cookies$LAYOUT, cookies$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout kprobe_multi$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("kprobe_multi"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi
* }
*/
public static final GroupLayout kprobe_multi$layout() {
return kprobe_multi$LAYOUT;
}
private static final long kprobe_multi$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi
* }
*/
public static final long kprobe_multi$offset() {
return kprobe_multi$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi
* }
*/
public static MemorySegment kprobe_multi(MemorySegment struct) {
return struct.asSlice(kprobe_multi$OFFSET, kprobe_multi$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi
* }
*/
public static void kprobe_multi(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, kprobe_multi$OFFSET, kprobe_multi$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* }
* }
*/
public static class tracing {
tracing() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("target_btf_id"),
MemoryLayout.paddingLayout(4),
Lib.C_LONG_LONG.withName("cookie")
).withName("$anon$1738:4");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt target_btf_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("target_btf_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 target_btf_id
* }
*/
public static final OfInt target_btf_id$layout() {
return target_btf_id$LAYOUT;
}
private static final long target_btf_id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 target_btf_id
* }
*/
public static final long target_btf_id$offset() {
return target_btf_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 target_btf_id
* }
*/
public static int target_btf_id(MemorySegment struct) {
return struct.get(target_btf_id$LAYOUT, target_btf_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 target_btf_id
* }
*/
public static void target_btf_id(MemorySegment struct, int fieldValue) {
struct.set(target_btf_id$LAYOUT, target_btf_id$OFFSET, fieldValue);
}
private static final OfLong cookie$LAYOUT = (OfLong)$LAYOUT.select(groupElement("cookie"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 cookie
* }
*/
public static final OfLong cookie$layout() {
return cookie$LAYOUT;
}
private static final long cookie$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 cookie
* }
*/
public static final long cookie$offset() {
return cookie$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 cookie
* }
*/
public static long cookie(MemorySegment struct) {
return struct.get(cookie$LAYOUT, cookie$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 cookie
* }
*/
public static void cookie(MemorySegment struct, long fieldValue) {
struct.set(cookie$LAYOUT, cookie$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout tracing$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("tracing"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing
* }
*/
public static final GroupLayout tracing$layout() {
return tracing$LAYOUT;
}
private static final long tracing$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing
* }
*/
public static final long tracing$offset() {
return tracing$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing
* }
*/
public static MemorySegment tracing(MemorySegment struct) {
return struct.asSlice(tracing$OFFSET, tracing$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing
* }
*/
public static void tracing(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, tracing$OFFSET, tracing$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* }
* }
*/
public static class netfilter {
netfilter() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("pf"),
Lib.C_INT.withName("hooknum"),
Lib.C_INT.withName("priority"),
Lib.C_INT.withName("flags")
).withName("$anon$1747:4");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt pf$LAYOUT = (OfInt)$LAYOUT.select(groupElement("pf"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 pf
* }
*/
public static final OfInt pf$layout() {
return pf$LAYOUT;
}
private static final long pf$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 pf
* }
*/
public static final long pf$offset() {
return pf$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 pf
* }
*/
public static int pf(MemorySegment struct) {
return struct.get(pf$LAYOUT, pf$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 pf
* }
*/
public static void pf(MemorySegment struct, int fieldValue) {
struct.set(pf$LAYOUT, pf$OFFSET, fieldValue);
}
private static final OfInt hooknum$LAYOUT = (OfInt)$LAYOUT.select(groupElement("hooknum"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 hooknum
* }
*/
public static final OfInt hooknum$layout() {
return hooknum$LAYOUT;
}
private static final long hooknum$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 hooknum
* }
*/
public static final long hooknum$offset() {
return hooknum$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 hooknum
* }
*/
public static int hooknum(MemorySegment struct) {
return struct.get(hooknum$LAYOUT, hooknum$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 hooknum
* }
*/
public static void hooknum(MemorySegment struct, int fieldValue) {
struct.set(hooknum$LAYOUT, hooknum$OFFSET, fieldValue);
}
private static final OfInt priority$LAYOUT = (OfInt)$LAYOUT.select(groupElement("priority"));
/**
* Layout for field:
* {@snippet lang=c :
* __s32 priority
* }
*/
public static final OfInt priority$layout() {
return priority$LAYOUT;
}
private static final long priority$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __s32 priority
* }
*/
public static final long priority$offset() {
return priority$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __s32 priority
* }
*/
public static int priority(MemorySegment struct) {
return struct.get(priority$LAYOUT, priority$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __s32 priority
* }
*/
public static void priority(MemorySegment struct, int fieldValue) {
struct.set(priority$LAYOUT, priority$OFFSET, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout netfilter$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("netfilter"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter
* }
*/
public static final GroupLayout netfilter$layout() {
return netfilter$LAYOUT;
}
private static final long netfilter$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter
* }
*/
public static final long netfilter$offset() {
return netfilter$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter
* }
*/
public static MemorySegment netfilter(MemorySegment struct) {
return struct.asSlice(netfilter$OFFSET, netfilter$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter
* }
*/
public static void netfilter(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, netfilter$OFFSET, netfilter$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* }
* }
*/
public static class tcx {
tcx() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
MemoryLayout.unionLayout(
Lib.C_INT.withName("relative_fd"),
Lib.C_INT.withName("relative_id")
).withName("$anon$1754:5"),
MemoryLayout.paddingLayout(4),
Lib.C_LONG_LONG.withName("expected_revision")
).withName("$anon$1753:4");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt relative_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1754:5"), groupElement("relative_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static final OfInt relative_fd$layout() {
return relative_fd$LAYOUT;
}
private static final long relative_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static final long relative_fd$offset() {
return relative_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static int relative_fd(MemorySegment struct) {
return struct.get(relative_fd$LAYOUT, relative_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static void relative_fd(MemorySegment struct, int fieldValue) {
struct.set(relative_fd$LAYOUT, relative_fd$OFFSET, fieldValue);
}
private static final OfInt relative_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1754:5"), groupElement("relative_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static final OfInt relative_id$layout() {
return relative_id$LAYOUT;
}
private static final long relative_id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static final long relative_id$offset() {
return relative_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static int relative_id(MemorySegment struct) {
return struct.get(relative_id$LAYOUT, relative_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static void relative_id(MemorySegment struct, int fieldValue) {
struct.set(relative_id$LAYOUT, relative_id$OFFSET, fieldValue);
}
private static final OfLong expected_revision$LAYOUT = (OfLong)$LAYOUT.select(groupElement("expected_revision"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static final OfLong expected_revision$layout() {
return expected_revision$LAYOUT;
}
private static final long expected_revision$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static final long expected_revision$offset() {
return expected_revision$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static long expected_revision(MemorySegment struct) {
return struct.get(expected_revision$LAYOUT, expected_revision$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static void expected_revision(MemorySegment struct, long fieldValue) {
struct.set(expected_revision$LAYOUT, expected_revision$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout tcx$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("tcx"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx
* }
*/
public static final GroupLayout tcx$layout() {
return tcx$LAYOUT;
}
private static final long tcx$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx
* }
*/
public static final long tcx$offset() {
return tcx$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx
* }
*/
public static MemorySegment tcx(MemorySegment struct) {
return struct.asSlice(tcx$OFFSET, tcx$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx
* }
*/
public static void tcx(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, tcx$OFFSET, tcx$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* }
* }
*/
public static class uprobe_multi {
uprobe_multi() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_LONG_LONG.withName("path"),
Lib.C_LONG_LONG.withName("offsets"),
Lib.C_LONG_LONG.withName("ref_ctr_offsets"),
Lib.C_LONG_LONG.withName("cookies"),
Lib.C_INT.withName("cnt"),
Lib.C_INT.withName("flags"),
Lib.C_INT.withName("pid"),
MemoryLayout.paddingLayout(4)
).withName("$anon$1760:4");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfLong path$LAYOUT = (OfLong)$LAYOUT.select(groupElement("path"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 path
* }
*/
public static final OfLong path$layout() {
return path$LAYOUT;
}
private static final long path$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 path
* }
*/
public static final long path$offset() {
return path$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 path
* }
*/
public static long path(MemorySegment struct) {
return struct.get(path$LAYOUT, path$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 path
* }
*/
public static void path(MemorySegment struct, long fieldValue) {
struct.set(path$LAYOUT, path$OFFSET, fieldValue);
}
private static final OfLong offsets$LAYOUT = (OfLong)$LAYOUT.select(groupElement("offsets"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 offsets
* }
*/
public static final OfLong offsets$layout() {
return offsets$LAYOUT;
}
private static final long offsets$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 offsets
* }
*/
public static final long offsets$offset() {
return offsets$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 offsets
* }
*/
public static long offsets(MemorySegment struct) {
return struct.get(offsets$LAYOUT, offsets$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 offsets
* }
*/
public static void offsets(MemorySegment struct, long fieldValue) {
struct.set(offsets$LAYOUT, offsets$OFFSET, fieldValue);
}
private static final OfLong ref_ctr_offsets$LAYOUT = (OfLong)$LAYOUT.select(groupElement("ref_ctr_offsets"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 ref_ctr_offsets
* }
*/
public static final OfLong ref_ctr_offsets$layout() {
return ref_ctr_offsets$LAYOUT;
}
private static final long ref_ctr_offsets$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 ref_ctr_offsets
* }
*/
public static final long ref_ctr_offsets$offset() {
return ref_ctr_offsets$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 ref_ctr_offsets
* }
*/
public static long ref_ctr_offsets(MemorySegment struct) {
return struct.get(ref_ctr_offsets$LAYOUT, ref_ctr_offsets$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 ref_ctr_offsets
* }
*/
public static void ref_ctr_offsets(MemorySegment struct, long fieldValue) {
struct.set(ref_ctr_offsets$LAYOUT, ref_ctr_offsets$OFFSET, fieldValue);
}
private static final OfLong cookies$LAYOUT = (OfLong)$LAYOUT.select(groupElement("cookies"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 cookies
* }
*/
public static final OfLong cookies$layout() {
return cookies$LAYOUT;
}
private static final long cookies$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 cookies
* }
*/
public static final long cookies$offset() {
return cookies$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 cookies
* }
*/
public static long cookies(MemorySegment struct) {
return struct.get(cookies$LAYOUT, cookies$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 cookies
* }
*/
public static void cookies(MemorySegment struct, long fieldValue) {
struct.set(cookies$LAYOUT, cookies$OFFSET, fieldValue);
}
private static final OfInt cnt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("cnt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 cnt
* }
*/
public static final OfInt cnt$layout() {
return cnt$LAYOUT;
}
private static final long cnt$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 cnt
* }
*/
public static final long cnt$offset() {
return cnt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 cnt
* }
*/
public static int cnt(MemorySegment struct) {
return struct.get(cnt$LAYOUT, cnt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 cnt
* }
*/
public static void cnt(MemorySegment struct, int fieldValue) {
struct.set(cnt$LAYOUT, cnt$OFFSET, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 36;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
private static final OfInt pid$LAYOUT = (OfInt)$LAYOUT.select(groupElement("pid"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 pid
* }
*/
public static final OfInt pid$layout() {
return pid$LAYOUT;
}
private static final long pid$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 pid
* }
*/
public static final long pid$offset() {
return pid$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 pid
* }
*/
public static int pid(MemorySegment struct) {
return struct.get(pid$LAYOUT, pid$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 pid
* }
*/
public static void pid(MemorySegment struct, int fieldValue) {
struct.set(pid$LAYOUT, pid$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout uprobe_multi$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("uprobe_multi"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi
* }
*/
public static final GroupLayout uprobe_multi$layout() {
return uprobe_multi$LAYOUT;
}
private static final long uprobe_multi$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi
* }
*/
public static final long uprobe_multi$offset() {
return uprobe_multi$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi
* }
*/
public static MemorySegment uprobe_multi(MemorySegment struct) {
return struct.asSlice(uprobe_multi$OFFSET, uprobe_multi$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi
* }
*/
public static void uprobe_multi(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, uprobe_multi$OFFSET, uprobe_multi$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* }
* }
*/
public static class netkit {
netkit() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
MemoryLayout.unionLayout(
Lib.C_INT.withName("relative_fd"),
Lib.C_INT.withName("relative_id")
).withName("$anon$1770:5"),
MemoryLayout.paddingLayout(4),
Lib.C_LONG_LONG.withName("expected_revision")
).withName("$anon$1769:4");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt relative_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1770:5"), groupElement("relative_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static final OfInt relative_fd$layout() {
return relative_fd$LAYOUT;
}
private static final long relative_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static final long relative_fd$offset() {
return relative_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static int relative_fd(MemorySegment struct) {
return struct.get(relative_fd$LAYOUT, relative_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 relative_fd
* }
*/
public static void relative_fd(MemorySegment struct, int fieldValue) {
struct.set(relative_fd$LAYOUT, relative_fd$OFFSET, fieldValue);
}
private static final OfInt relative_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1770:5"), groupElement("relative_id"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static final OfInt relative_id$layout() {
return relative_id$LAYOUT;
}
private static final long relative_id$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static final long relative_id$offset() {
return relative_id$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static int relative_id(MemorySegment struct) {
return struct.get(relative_id$LAYOUT, relative_id$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 relative_id
* }
*/
public static void relative_id(MemorySegment struct, int fieldValue) {
struct.set(relative_id$LAYOUT, relative_id$OFFSET, fieldValue);
}
private static final OfLong expected_revision$LAYOUT = (OfLong)$LAYOUT.select(groupElement("expected_revision"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static final OfLong expected_revision$layout() {
return expected_revision$LAYOUT;
}
private static final long expected_revision$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static final long expected_revision$offset() {
return expected_revision$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static long expected_revision(MemorySegment struct) {
return struct.get(expected_revision$LAYOUT, expected_revision$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 expected_revision
* }
*/
public static void expected_revision(MemorySegment struct, long fieldValue) {
struct.set(expected_revision$LAYOUT, expected_revision$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout netkit$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("$anon$1718:3"), groupElement("netkit"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit
* }
*/
public static final GroupLayout netkit$layout() {
return netkit$LAYOUT;
}
private static final long netkit$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit
* }
*/
public static final long netkit$offset() {
return netkit$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit
* }
*/
public static MemorySegment netkit(MemorySegment struct) {
return struct.asSlice(netkit$OFFSET, netkit$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit
* }
*/
public static void netkit(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, netkit$OFFSET, netkit$LAYOUT.byteSize());
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout link_create$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("link_create"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 prog_fd;
* __u32 map_fd;
* };
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 flags;
* union {
* __u32 target_btf_id;
* struct {
* __u64 iter_info;
* __u32 iter_info_len;
* };
* struct {
* __u64 bpf_cookie;
* } perf_event;
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi;
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing;
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx;
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit;
* };
* } link_create
* }
*/
public static final GroupLayout link_create$layout() {
return link_create$LAYOUT;
}
private static final long link_create$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 prog_fd;
* __u32 map_fd;
* };
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 flags;
* union {
* __u32 target_btf_id;
* struct {
* __u64 iter_info;
* __u32 iter_info_len;
* };
* struct {
* __u64 bpf_cookie;
* } perf_event;
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi;
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing;
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx;
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit;
* };
* } link_create
* }
*/
public static final long link_create$offset() {
return link_create$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 prog_fd;
* __u32 map_fd;
* };
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 flags;
* union {
* __u32 target_btf_id;
* struct {
* __u64 iter_info;
* __u32 iter_info_len;
* };
* struct {
* __u64 bpf_cookie;
* } perf_event;
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi;
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing;
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx;
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit;
* };
* } link_create
* }
*/
public static MemorySegment link_create(MemorySegment union) {
return union.asSlice(link_create$OFFSET, link_create$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* union {
* __u32 prog_fd;
* __u32 map_fd;
* };
* union {
* __u32 target_fd;
* __u32 target_ifindex;
* };
* __u32 attach_type;
* __u32 flags;
* union {
* __u32 target_btf_id;
* struct {
* __u64 iter_info;
* __u32 iter_info_len;
* };
* struct {
* __u64 bpf_cookie;
* } perf_event;
* struct {
* __u32 flags;
* __u32 cnt;
* __u64 syms;
* __u64 addrs;
* __u64 cookies;
* } kprobe_multi;
* struct {
* __u32 target_btf_id;
* __u64 cookie;
* } tracing;
* struct {
* __u32 pf;
* __u32 hooknum;
* __s32 priority;
* __u32 flags;
* } netfilter;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } tcx;
* struct {
* __u64 path;
* __u64 offsets;
* __u64 ref_ctr_offsets;
* __u64 cookies;
* __u32 cnt;
* __u32 flags;
* __u32 pid;
* } uprobe_multi;
* struct {
* union {
* __u32 relative_fd;
* __u32 relative_id;
* };
* __u64 expected_revision;
* } netkit;
* };
* } link_create
* }
*/
public static void link_create(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, link_create$OFFSET, link_create$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* union {
* __u32 new_prog_fd;
* __u32 new_map_fd;
* };
* __u32 flags;
* union {
* __u32 old_prog_fd;
* __u32 old_map_fd;
* };
* }
* }
*/
public static class link_update {
link_update() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("link_fd"),
MemoryLayout.unionLayout(
Lib.C_INT.withName("new_prog_fd"),
Lib.C_INT.withName("new_map_fd")
).withName("$anon$1781:3"),
Lib.C_INT.withName("flags"),
MemoryLayout.unionLayout(
Lib.C_INT.withName("old_prog_fd"),
Lib.C_INT.withName("old_map_fd")
).withName("$anon$1788:3")
).withName("$anon$1779:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt link_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("link_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static final OfInt link_fd$layout() {
return link_fd$LAYOUT;
}
private static final long link_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static final long link_fd$offset() {
return link_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static int link_fd(MemorySegment struct) {
return struct.get(link_fd$LAYOUT, link_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static void link_fd(MemorySegment struct, int fieldValue) {
struct.set(link_fd$LAYOUT, link_fd$OFFSET, fieldValue);
}
private static final OfInt new_prog_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1781:3"), groupElement("new_prog_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 new_prog_fd
* }
*/
public static final OfInt new_prog_fd$layout() {
return new_prog_fd$LAYOUT;
}
private static final long new_prog_fd$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 new_prog_fd
* }
*/
public static final long new_prog_fd$offset() {
return new_prog_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 new_prog_fd
* }
*/
public static int new_prog_fd(MemorySegment struct) {
return struct.get(new_prog_fd$LAYOUT, new_prog_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 new_prog_fd
* }
*/
public static void new_prog_fd(MemorySegment struct, int fieldValue) {
struct.set(new_prog_fd$LAYOUT, new_prog_fd$OFFSET, fieldValue);
}
private static final OfInt new_map_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1781:3"), groupElement("new_map_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 new_map_fd
* }
*/
public static final OfInt new_map_fd$layout() {
return new_map_fd$LAYOUT;
}
private static final long new_map_fd$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 new_map_fd
* }
*/
public static final long new_map_fd$offset() {
return new_map_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 new_map_fd
* }
*/
public static int new_map_fd(MemorySegment struct) {
return struct.get(new_map_fd$LAYOUT, new_map_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 new_map_fd
* }
*/
public static void new_map_fd(MemorySegment struct, int fieldValue) {
struct.set(new_map_fd$LAYOUT, new_map_fd$OFFSET, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
private static final OfInt old_prog_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1788:3"), groupElement("old_prog_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 old_prog_fd
* }
*/
public static final OfInt old_prog_fd$layout() {
return old_prog_fd$LAYOUT;
}
private static final long old_prog_fd$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 old_prog_fd
* }
*/
public static final long old_prog_fd$offset() {
return old_prog_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 old_prog_fd
* }
*/
public static int old_prog_fd(MemorySegment struct) {
return struct.get(old_prog_fd$LAYOUT, old_prog_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 old_prog_fd
* }
*/
public static void old_prog_fd(MemorySegment struct, int fieldValue) {
struct.set(old_prog_fd$LAYOUT, old_prog_fd$OFFSET, fieldValue);
}
private static final OfInt old_map_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$1788:3"), groupElement("old_map_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 old_map_fd
* }
*/
public static final OfInt old_map_fd$layout() {
return old_map_fd$LAYOUT;
}
private static final long old_map_fd$OFFSET = 12;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 old_map_fd
* }
*/
public static final long old_map_fd$offset() {
return old_map_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 old_map_fd
* }
*/
public static int old_map_fd(MemorySegment struct) {
return struct.get(old_map_fd$LAYOUT, old_map_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 old_map_fd
* }
*/
public static void old_map_fd(MemorySegment struct, int fieldValue) {
struct.set(old_map_fd$LAYOUT, old_map_fd$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout link_update$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("link_update"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* union {
* __u32 new_prog_fd;
* __u32 new_map_fd;
* };
* __u32 flags;
* union {
* __u32 old_prog_fd;
* __u32 old_map_fd;
* };
* } link_update
* }
*/
public static final GroupLayout link_update$layout() {
return link_update$LAYOUT;
}
private static final long link_update$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* union {
* __u32 new_prog_fd;
* __u32 new_map_fd;
* };
* __u32 flags;
* union {
* __u32 old_prog_fd;
* __u32 old_map_fd;
* };
* } link_update
* }
*/
public static final long link_update$offset() {
return link_update$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* union {
* __u32 new_prog_fd;
* __u32 new_map_fd;
* };
* __u32 flags;
* union {
* __u32 old_prog_fd;
* __u32 old_map_fd;
* };
* } link_update
* }
*/
public static MemorySegment link_update(MemorySegment union) {
return union.asSlice(link_update$OFFSET, link_update$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* union {
* __u32 new_prog_fd;
* __u32 new_map_fd;
* };
* __u32 flags;
* union {
* __u32 old_prog_fd;
* __u32 old_map_fd;
* };
* } link_update
* }
*/
public static void link_update(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, link_update$OFFSET, link_update$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* }
* }
*/
public static class link_detach {
link_detach() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("link_fd")
).withName("$anon$1800:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt link_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("link_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static final OfInt link_fd$layout() {
return link_fd$LAYOUT;
}
private static final long link_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static final long link_fd$offset() {
return link_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static int link_fd(MemorySegment struct) {
return struct.get(link_fd$LAYOUT, link_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static void link_fd(MemorySegment struct, int fieldValue) {
struct.set(link_fd$LAYOUT, link_fd$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout link_detach$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("link_detach"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* } link_detach
* }
*/
public static final GroupLayout link_detach$layout() {
return link_detach$LAYOUT;
}
private static final long link_detach$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* } link_detach
* }
*/
public static final long link_detach$offset() {
return link_detach$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* } link_detach
* }
*/
public static MemorySegment link_detach(MemorySegment union) {
return union.asSlice(link_detach$OFFSET, link_detach$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* } link_detach
* }
*/
public static void link_detach(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, link_detach$OFFSET, link_detach$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 type;
* }
* }
*/
public static class enable_stats {
enable_stats() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("type")
).withName("$anon$1804:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("type"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 type
* }
*/
public static final OfInt type$layout() {
return type$LAYOUT;
}
private static final long type$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 type
* }
*/
public static final long type$offset() {
return type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 type
* }
*/
public static int type(MemorySegment struct) {
return struct.get(type$LAYOUT, type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 type
* }
*/
public static void type(MemorySegment struct, int fieldValue) {
struct.set(type$LAYOUT, type$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout enable_stats$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("enable_stats"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 type;
* } enable_stats
* }
*/
public static final GroupLayout enable_stats$layout() {
return enable_stats$LAYOUT;
}
private static final long enable_stats$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 type;
* } enable_stats
* }
*/
public static final long enable_stats$offset() {
return enable_stats$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 type;
* } enable_stats
* }
*/
public static MemorySegment enable_stats(MemorySegment union) {
return union.asSlice(enable_stats$OFFSET, enable_stats$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 type;
* } enable_stats
* }
*/
public static void enable_stats(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, enable_stats$OFFSET, enable_stats$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* __u32 flags;
* }
* }
*/
public static class iter_create {
iter_create() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("link_fd"),
Lib.C_INT.withName("flags")
).withName("$anon$1808:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt link_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("link_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static final OfInt link_fd$layout() {
return link_fd$LAYOUT;
}
private static final long link_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static final long link_fd$offset() {
return link_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static int link_fd(MemorySegment struct) {
return struct.get(link_fd$LAYOUT, link_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 link_fd
* }
*/
public static void link_fd(MemorySegment struct, int fieldValue) {
struct.set(link_fd$LAYOUT, link_fd$OFFSET, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout iter_create$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("iter_create"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* __u32 flags;
* } iter_create
* }
*/
public static final GroupLayout iter_create$layout() {
return iter_create$LAYOUT;
}
private static final long iter_create$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* __u32 flags;
* } iter_create
* }
*/
public static final long iter_create$offset() {
return iter_create$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* __u32 flags;
* } iter_create
* }
*/
public static MemorySegment iter_create(MemorySegment union) {
return union.asSlice(iter_create$OFFSET, iter_create$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 link_fd;
* __u32 flags;
* } iter_create
* }
*/
public static void iter_create(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, iter_create$OFFSET, iter_create$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 map_fd;
* __u32 flags;
* }
* }
*/
public static class prog_bind_map {
prog_bind_map() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("prog_fd"),
Lib.C_INT.withName("map_fd"),
Lib.C_INT.withName("flags")
).withName("$anon$1813:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt prog_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("prog_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static final OfInt prog_fd$layout() {
return prog_fd$LAYOUT;
}
private static final long prog_fd$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static final long prog_fd$offset() {
return prog_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static int prog_fd(MemorySegment struct) {
return struct.get(prog_fd$LAYOUT, prog_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 prog_fd
* }
*/
public static void prog_fd(MemorySegment struct, int fieldValue) {
struct.set(prog_fd$LAYOUT, prog_fd$OFFSET, fieldValue);
}
private static final OfInt map_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("map_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static final OfInt map_fd$layout() {
return map_fd$LAYOUT;
}
private static final long map_fd$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static final long map_fd$offset() {
return map_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static int map_fd(MemorySegment struct) {
return struct.get(map_fd$LAYOUT, map_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 map_fd
* }
*/
public static void map_fd(MemorySegment struct, int fieldValue) {
struct.set(map_fd$LAYOUT, map_fd$OFFSET, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout prog_bind_map$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("prog_bind_map"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 map_fd;
* __u32 flags;
* } prog_bind_map
* }
*/
public static final GroupLayout prog_bind_map$layout() {
return prog_bind_map$LAYOUT;
}
private static final long prog_bind_map$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 map_fd;
* __u32 flags;
* } prog_bind_map
* }
*/
public static final long prog_bind_map$offset() {
return prog_bind_map$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 map_fd;
* __u32 flags;
* } prog_bind_map
* }
*/
public static MemorySegment prog_bind_map(MemorySegment union) {
return union.asSlice(prog_bind_map$OFFSET, prog_bind_map$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 prog_fd;
* __u32 map_fd;
* __u32 flags;
* } prog_bind_map
* }
*/
public static void prog_bind_map(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, prog_bind_map$OFFSET, prog_bind_map$LAYOUT.byteSize());
}
/**
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 bpffs_fd;
* }
* }
*/
public static class token_create {
token_create() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("flags"),
Lib.C_INT.withName("bpffs_fd")
).withName("$anon$1819:2");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
private static final OfInt bpffs_fd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bpffs_fd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 bpffs_fd
* }
*/
public static final OfInt bpffs_fd$layout() {
return bpffs_fd$LAYOUT;
}
private static final long bpffs_fd$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 bpffs_fd
* }
*/
public static final long bpffs_fd$offset() {
return bpffs_fd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 bpffs_fd
* }
*/
public static int bpffs_fd(MemorySegment struct) {
return struct.get(bpffs_fd$LAYOUT, bpffs_fd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 bpffs_fd
* }
*/
public static void bpffs_fd(MemorySegment struct, int fieldValue) {
struct.set(bpffs_fd$LAYOUT, bpffs_fd$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}
private static final GroupLayout token_create$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("token_create"));
/**
* Layout for field:
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 bpffs_fd;
* } token_create
* }
*/
public static final GroupLayout token_create$layout() {
return token_create$LAYOUT;
}
private static final long token_create$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 bpffs_fd;
* } token_create
* }
*/
public static final long token_create$offset() {
return token_create$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 bpffs_fd;
* } token_create
* }
*/
public static MemorySegment token_create(MemorySegment union) {
return union.asSlice(token_create$OFFSET, token_create$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* struct {
* __u32 flags;
* __u32 bpffs_fd;
* } token_create
* }
*/
public static void token_create(MemorySegment union, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, union, token_create$OFFSET, token_create$LAYOUT.byteSize());
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this union
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}